You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
8.2 KiB
134 lines
8.2 KiB
<UserControl x:Class="SmartAquaViewer.View.MonitoringView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:SmartAquaViewer.View"
|
|
xmlns:control="clr-namespace:SmartAquaViewer.Controls"
|
|
xmlns:helper="clr-namespace:SmartAquaViewer.Helper"
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="940" d:DesignWidth="1650">
|
|
<Border>
|
|
<md:DrawerHost BottomDrawerBackground="#122136" IsBottomDrawerOpen="{Binding IsOpenMode}" OpenMode="Standard">
|
|
<Grid Background="#243851">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="70"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource="/Resources/Images/top_bg.png" Stretch="Fill"/>
|
|
</Grid.Background>
|
|
<control:SegmentedControl x:Name="segmentedControl" Margin="20 10"
|
|
SelectedValue="{Binding CurrentSystem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
|
|
<ScrollViewer Grid.Row="1" Margin="20 20 20 40"
|
|
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
|
HorizontalAlignment="Center">
|
|
<ItemsControl ItemsSource="{Binding TankGroups}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Margin="25 0" HorizontalAlignment="Center" >
|
|
<!-- 그룹 헤더: 수조 번호 -->
|
|
<TextBlock Text="{Binding Key, StringFormat=수조 {0}}"
|
|
FontSize="20" FontWeight="Bold" Foreground="White"
|
|
Margin="0 0 0 10"/>
|
|
|
|
<!-- Value(= ObservableCollection<WaterQualityVO>)로 DataGrid -->
|
|
<DataGrid ItemsSource="{Binding Value}"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
IsReadOnly="True"
|
|
HeadersVisibility="Column"
|
|
IsHitTestVisible="True">
|
|
|
|
<DataGrid.Columns>
|
|
<!-- 측정 시각 -->
|
|
<DataGridTextColumn
|
|
Header="시간"
|
|
Binding="{Binding RecordedTime, StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"/>
|
|
|
|
<!-- Tank 값들 -->
|
|
<DataGridTextColumn Header="수조" Binding="{Binding Tank.Number}"/>
|
|
<DataGridTextColumn Header="DO" Binding="{Binding Tank.DO, StringFormat=\{0:F2\}}"/>
|
|
<DataGridTextColumn Header="pH" Binding="{Binding Tank.PH, StringFormat=\{0:F2\}}"/>
|
|
<DataGridTextColumn Header="ORP" Binding="{Binding Tank.ORP, StringFormat=\{0:F0\}}"/>
|
|
<DataGridTextColumn Header="온도(℃)" Binding="{Binding Tank.Temperature, StringFormat=\{0:F1\}}"/>
|
|
<DataGridTextColumn Header="유량(m³/s)" Binding="{Binding Tank.FlowRate, StringFormat=\{0:F2\}}"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<Grid Grid.Row="1" VerticalAlignment="Bottom">
|
|
<Button Name="btnVisibilityDown" Tag="down"
|
|
Style="{StaticResource ImageButtonStyle}" Height="33" Command="{Binding ChangeDrawerStatusCommand}"
|
|
VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="{Binding BtnVisibilityDown}"
|
|
helper:ImageButtonHelper.ImageSource="/Resources/Images/arrow_down.png"/>
|
|
|
|
<Button Name="btnVisibilityUp" Tag="up"
|
|
Style="{StaticResource ImageButtonStyle}" Height="33" Command="{Binding ChangeDrawerStatusCommand}"
|
|
VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="{Binding BtnVisibilityUp}"
|
|
helper:ImageButtonHelper.ImageSource="/Resources/Images/arrow_up.png"/>
|
|
</Grid>
|
|
</Grid>
|
|
<md:DrawerHost.BottomDrawerContent>
|
|
<Border Height="450" BorderThickness="0 3 0 0" BorderBrush="#455569">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="550"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border Margin="20"
|
|
Background="#384659" BorderBrush="#404F63" BorderThickness="1" CornerRadius="10">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="그래프" FontSize="24" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
|
Margin="15 15 15 5"/>
|
|
<TextBlock Grid.Row="2" Text="X축" FontSize="24" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
|
Margin="15 15 15 5"/>
|
|
<TextBlock Grid.Row="4" Text="Y축" FontSize="24" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
|
Margin="15 15 15 5"/>
|
|
|
|
<ComboBox Grid.Row="1" Margin="15 0" Height="50"
|
|
Style="{StaticResource ComboBoxStyle}"
|
|
ItemsSource="{Binding GraphTypes}"
|
|
SelectedItem="{Binding SelectedGraphType}"/>
|
|
|
|
<ComboBox Grid.Row="3" Margin="15 0" Height="50"
|
|
Style="{StaticResource ComboBoxStyle}"></ComboBox>
|
|
<ComboBox Grid.Row="5" Margin="15 0" Height="50"
|
|
Style="{StaticResource ComboBoxStyle}"></ComboBox>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Column="1" Margin="0 20 20 20"
|
|
Background="#384659" BorderBrush="#404F63" BorderThickness="1" CornerRadius="10">
|
|
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</md:DrawerHost.BottomDrawerContent>
|
|
</md:DrawerHost>
|
|
</Border>
|
|
</UserControl>
|