Compare commits
41 Commits
main
...
hhsung_wor
@ -0,0 +1,50 @@
|
||||
<UserControl x:Class="SmartAquaViewer.Controls.FFPlayerControl"
|
||||
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.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Border Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="1">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="24"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.RowSpan="2" x:Name="bdrNoSignalContainer">
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="#394861" Opacity="0.4"></SolidColorBrush>
|
||||
</Border.BorderBrush>
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="#22262D" Opacity="0.4"></SolidColorBrush>
|
||||
</Border.Background>
|
||||
<Grid VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Image x:Name="imgPlayer" Grid.RowSpan="2" Stretch="Fill"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Source="{Binding CurrentFrame}"/>
|
||||
<Label HorizontalAlignment="Left" Grid.RowSpan="2" Margin="20, 5, 5, 0" x:Name="lblCCTVID"
|
||||
FontFamily="Verna" FontSize="15" FontWeight='Bold' Foreground="White"
|
||||
Content="{Binding CCTVInfo.DeviceId}"/>
|
||||
<Grid x:Name="grdTopMenuBar" Grid.Row="0" Background="Black" Opacity="0.5" Visibility="Hidden" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" WindowChrome.IsHitTestVisibleInChrome="True" >
|
||||
|
||||
</Grid>
|
||||
<!--<StackPanel Name="spTopMenuBar" Visibility="Hidden" Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Image Name="imgMaximize" Source="../Images/maximize.png" Width="24" Margin="1, 5, 0, 5" MouseLeftButtonUp="imgMaximize_MouseUp" Opacity="0.7" MouseEnter="imgTopmenu_MouseEnter" MouseLeave="imgTopmenu_MouseLeave"/>
|
||||
</StackPanel>-->
|
||||
<Grid Grid.Row="1">
|
||||
<StackPanel VerticalAlignment="Bottom" Orientation="Vertical">
|
||||
<Label HorizontalAlignment="Right" Margin="20, 5, 5, 0" x:Name="lblCCTVName"
|
||||
FontFamily="Verna" FontSize="15" FontWeight='Bold' Foreground="White"
|
||||
Content="{Binding CCTVInfo.DeviceName}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="SmartAquaViewer.Controls.GraphControl"
|
||||
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.Controls"
|
||||
xmlns:oxy="http://oxyplot.org/wpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="1080">
|
||||
<Border>
|
||||
<Grid>
|
||||
<oxy:PlotView Name="pvChart" Model="{Binding Model}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="SmartAquaViewer.Controls.SegmentedControl"
|
||||
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.Controls"
|
||||
xmlns:helper="clr-namespace:SmartAquaViewer.Helper"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton Name="rdbtnA" Content="수조" GroupName="SignalType" Tag="Tank"
|
||||
Checked="RadioButton_Checked"
|
||||
Style="{StaticResource ImageRadioButtonStyle}" Width="250" Height="50" IsChecked="True"
|
||||
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/SegmentedControl/select_btn_1.png"
|
||||
helper:RadioButtonHelper.PressedImage="/Resources/Images/SegmentedControl/select_btn_1_press.png"/>
|
||||
<RadioButton Name="rdbtnB" Content="여과시스템" GroupName="SignalType" Tag="Filter"
|
||||
Checked="RadioButton_Checked"
|
||||
Style="{StaticResource ImageRadioButtonStyle}" Width="250" Height="50"
|
||||
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/SegmentedControl/select_btn_2.png"
|
||||
helper:RadioButtonHelper.PressedImage="/Resources/Images/SegmentedControl/select_btn_2_press.png"/>
|
||||
<RadioButton Name="rdbtnC" Content="살균시스템" GroupName="SignalType" Tag="Sterilizer"
|
||||
Checked="RadioButton_Checked"
|
||||
Style="{StaticResource ImageRadioButtonStyle}" Width="250" Height="50"
|
||||
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/SegmentedControl/select_btn_4.png"
|
||||
helper:RadioButtonHelper.PressedImage="/Resources/Images/SegmentedControl/select_btn_4_press.png"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@ -0,0 +1,140 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:helper="clr-namespace:SmartAquaViewer.Helper"
|
||||
xmlns:vm="clr-namespace:SmartAquaViewer.ViewModel"
|
||||
xmlns:model="clr-namespace:SmartAquaViewer.Model"
|
||||
xmlns:da="clr-namespace:SmartAquaViewer.DataAnalysis">
|
||||
|
||||
<FontFamily x:Key="SCDream1">pack://application:,,,/Fonts/#S-Core Dream 1 Thin</FontFamily>
|
||||
<FontFamily x:Key="SCDream2">pack://application:,,,/Fonts/#S-Core Dream 2 ExtraLight</FontFamily>
|
||||
<FontFamily x:Key="SCDream3">pack://application:,,,/Fonts/#S-Core Dream 3 Light</FontFamily>
|
||||
<FontFamily x:Key="SCDream4">pack://application:,,,/Fonts/#S-Core Dream 4 Regular</FontFamily>
|
||||
<FontFamily x:Key="SCDream5">pack://application:,,,/Fonts/#S-Core Dream 5 Medium</FontFamily>
|
||||
<FontFamily x:Key="SCDream6">pack://application:,,,/Fonts/#S-Core Dream 6 Bold</FontFamily>
|
||||
<FontFamily x:Key="SCDream7">pack://application:,,,/Fonts/#S-Core Dream 7 ExtraBold</FontFamily>
|
||||
<FontFamily x:Key="SCDream8">pack://application:,,,/Fonts/#S-Core Dream 8 Heavy</FontFamily>
|
||||
<FontFamily x:Key="SCDream9">pack://application:,,,/Fonts/#S-Core Dream 9 Black</FontFamily>
|
||||
|
||||
<Style x:Key="RadioButtonStyle" TargetType="RadioButton">
|
||||
<Setter Property="Background" Value="#2F2F44"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="32"/>
|
||||
<Setter Property="Width" Value="300"/>
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="10"
|
||||
BorderThickness="1" BorderBrush="Black">
|
||||
<TextBlock Text="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
FontSize="32" Foreground="{TemplateBinding Foreground}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="#C2C2E6"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ImageRadioButtonStyle" TargetType="RadioButton">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Grid>
|
||||
<Image x:Name="ButtonImage" Stretch="Fill"
|
||||
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helper:RadioButtonHelper.UnPressedImage)}"/>
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
TextElement.FontFamily="{StaticResource SCDream8}"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
TextElement.Foreground="{TemplateBinding Foreground}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="ButtonImage" Property="Source"
|
||||
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helper:RadioButtonHelper.PressedImage)}"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ImageButtonStyle" TargetType="Button">
|
||||
<Setter Property="Width" Value="58"/>
|
||||
<Setter Property="Height" Value="42"/>
|
||||
<Setter Property="Margin" Value="2.5 0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid>
|
||||
<Image x:Name="PART_Image"
|
||||
Source="{TemplateBinding helper:ImageButtonHelper.ImageSource}"
|
||||
Stretch="Uniform"/>
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
RecognizesAccessKey="True"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="PART_Image" Property="Opacity" Value="0.8"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="PART_Image" Property="Opacity" Value="0.6"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="PART_Image" Property="Opacity" Value="0.4"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ComboBoxStyle" TargetType="ComboBox">
|
||||
<Setter Property="BorderBrush" Value="#404F63"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Background" Value="#323232"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DataGridStyle" TargetType="DataGrid">
|
||||
<Setter Property="EnableRowVirtualization" Value="True"/>
|
||||
<Setter Property="VirtualizingStackPanel.IsVirtualizing" Value="True"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||
<Setter Property="HeadersVisibility" Value="Column"/>
|
||||
<Setter Property="AutoGenerateColumns" Value="False"/>
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="CanUserAddRows" Value="False"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DataGridRowStyle" TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Background" Value="#242424"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="DataGridColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="#1F1F1F"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
</Style>
|
||||
<Style x:Key="DataGridElmenetStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 990 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="SmartAquaViewer.View.CCTVView"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid Background="#243851">
|
||||
<ItemsControl ItemsSource="{Binding CCTVInfoList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid x:Name="ugrdFFPlayer" Rows="{Binding RowCount}" Columns="{Binding ColumnCount}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@ -0,0 +1,335 @@
|
||||
<UserControl x:Class="SmartAquaViewer.View.EnegyView"
|
||||
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:classes="clr-namespace:SmartAquaViewer.Classes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="940" d:DesignWidth="1650">
|
||||
|
||||
<UserControl.Resources>
|
||||
<classes:InverseBoolConverter x:Key="InverseBoolConverter"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="#243851">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="160"/>
|
||||
<RowDefinition Height="350"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.ColumnSpan="2" Margin="20" BorderBrush="#3E4C60" BorderThickness="1" CornerRadius="10">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="/Resources/Images/top_bg.png" Stretch="Fill"/>
|
||||
</Border.Background>
|
||||
<UniformGrid Columns="9">
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="총 소비 전력" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="모래여과기" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalSandFilterEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="순환펌프" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalCirculationPumpEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="히트펌프" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalHeatPumpEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="에어브로와" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalAirBlowerEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="오존발생기" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalOzoneGeneratorEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="자외선 살균기" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalUVSterilizerEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="오존용해장치" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalOzoneDissolverEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="배오존장치" HorizontalAlignment="Center"
|
||||
FontSize="22" Foreground="White" FontFamily="{StaticResource SCDream5}"/>
|
||||
<TextBlock Text="{Binding TotalExcessOzoneDestroyerEnergy, StringFormat=\{0:F2\}}" HorizontalAlignment="Center"
|
||||
FontSize="26" Foreground="White" FontFamily="{StaticResource SCDream4}"/>
|
||||
</StackPanel>
|
||||
</UniformGrid>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Grid.RowSpan="2" Margin="20 0 20 20"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalAlignment="Center">
|
||||
<DataGrid Style="{StaticResource DataGridStyle}" ItemsSource="{Binding WaterQualityList}" Background="Transparent"
|
||||
RowStyle="{StaticResource DataGridRowStyle}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="시간"
|
||||
Binding="{Binding RecordedTime, StringFormat=\{0:HH:mm:ss\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
|
||||
<DataGridTextColumn Header="모래여과기" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.SandFilterEnergy}"/>
|
||||
<DataGridTextColumn Header="순환펌프" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.CirculationPumpEnergy}"/>
|
||||
<DataGridTextColumn Header="히트펌프" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.HeatPumpEnergy}"/>
|
||||
<DataGridTextColumn Header="에어브로와" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.AirBlowerEnergy}"/>
|
||||
<DataGridTextColumn Header="오존발생기" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.OzoneGeneratorEnergy}"/>
|
||||
<DataGridTextColumn ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.UVSterilizerEnergy}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel>
|
||||
<TextBlock Text="자외선"/>
|
||||
<TextBlock Text="살균기"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="오존용해장치" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.OzoneDissolverEnergy}"/>
|
||||
<DataGridTextColumn Header="배오존장치" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.ExcessOzoneDestroyerEnergy}"/>
|
||||
<DataGridTextColumn Header="총 전력" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding TotalEnergy, StringFormat=\{0:F2\}}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin="0 0 20 20" CornerRadius="10"
|
||||
Background="#384659" BorderBrush="#404F63" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Margin="15 15 15 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="그래프" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<ComboBox Margin="15 0 0 0" Height="40" Grid.Column="1"
|
||||
Style="{StaticResource ComboBoxStyle}"
|
||||
ItemsSource="{Binding GraphTypes}"
|
||||
SelectedIndex="{Binding SelectedGraphIndex, Mode=TwoWay}"
|
||||
helper:ComboBoxHelper.SelectFirstOnItemsChange="True"
|
||||
IsEditable="False" IsTextSearchEnabled="False"/>
|
||||
</Grid>
|
||||
<Grid Margin="15 0">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="FrameworkElement">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenLine" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenStackArea" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenLineNStackArea" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenPie" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="PIE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource VisibleWhenLineNStackArea}">
|
||||
<Grid Margin="0 0 0 20" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="X축" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<TextBlock Text="{Binding SelectedXField.Display}" VerticalAlignment="Center"
|
||||
Margin="15 0 0 0" Grid.Column="1"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y축" VerticalAlignment="Top"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<Border Grid.Column="1" CornerRadius="10"
|
||||
Background="White" Margin="15 0 0 15">
|
||||
<ListBox ItemsSource="{Binding YFieldCandidates}"
|
||||
DisplayMemberPath="Display"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedItems="{Binding SelectedYFields, Mode=OneWay}"
|
||||
helper:MultiSelectBehavior.KeyPath="Key"
|
||||
helper:MultiSelectBehavior.ValuePath="Value"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Style="{StaticResource VisibleWhenPie}">
|
||||
<Grid Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="필드" VerticalAlignment="Top"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<Border Grid.Column="1" CornerRadius="10"
|
||||
Background="White" Margin="15 0 0 15">
|
||||
<ListBox ItemsSource="{Binding YFieldCandidates}"
|
||||
DisplayMemberPath="Display"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedItems="{Binding SelectedYFields, Mode=OneWay}"
|
||||
helper:MultiSelectBehavior.KeyPath="Key"
|
||||
helper:MultiSelectBehavior.ValuePath="Value"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 15">
|
||||
<RadioButton x:Name="rbStatus" Content="합계"
|
||||
GroupName="pie" Margin="0 0 30 0"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding UseAverage, Converter={StaticResource InverseBoolConverter}, Mode=TwoWay}"/>
|
||||
<RadioButton x:Name="pie" Content="평균"
|
||||
GroupName="pie" Grid.Column="1"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding UseAverage, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="15 0 0 0" Grid.Row="1">
|
||||
<CheckBox Content="마커 표시" IsChecked="{Binding ShowMarkers}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
<CheckBox Content="범례 표시" IsChecked="{Binding ShowLegends}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
<CheckBox Content="도넛 모드" IsChecked="{Binding IsDonut}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="PIE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="15 0" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Button Content="그래프 생성" Style="{StaticResource MaterialDesignFlatLightBgButton}"
|
||||
FontWeight="Bold" Command="{Binding DrawGraphCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="2" Grid.Column="1" Margin="0 0 20 20" CornerRadius="10"
|
||||
Background="#384659" BorderBrush="#404F63" BorderThickness="1">
|
||||
<control:GraphControl x:Name="graphControl"
|
||||
Margin="10" DataContext="{Binding GraphControlVM}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@ -0,0 +1,54 @@
|
||||
<UserControl x:Class="SmartAquaViewer.View.FileListView"
|
||||
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:vm="clr-namespace:SmartAquaViewer.ViewModel"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1040" d:DesignWidth="270">
|
||||
|
||||
<UserControl.DataContext>
|
||||
<vm:FileListViewModel/>
|
||||
</UserControl.DataContext>
|
||||
|
||||
<Border Background="#1E2241">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<!-- Header Row -->
|
||||
<RowDefinition Height="*"/>
|
||||
<!-- File List Row -->
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Reources/Images/ListImage.png"
|
||||
Width="35" Margin="20 0"/>
|
||||
<TextBlock Text="파일 목록"
|
||||
FontSize="20" FontWeight="Bold" Foreground="White"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Width="35" Height="35" Margin="50 0"
|
||||
Background="#ffd663"
|
||||
Command="{Binding OpenFileDialogCommand}">
|
||||
<materialDesign:PackIcon Kind="FolderAdd"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<ListView Grid.Row="1"
|
||||
Margin="10"
|
||||
ItemsSource="{Binding FileList}"
|
||||
SelectedItem="{Binding SelectedFile}"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
BorderThickness="0" Background="Transparent">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" Margin="0 5">
|
||||
<TextBlock Text="{Binding Name}" Margin="5"
|
||||
FontSize="16" FontWeight="Medium" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@ -0,0 +1,269 @@
|
||||
<UserControl x:Class="SmartAquaViewer.View.GreenHouseView"
|
||||
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:classes="clr-namespace:SmartAquaViewer.Classes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="940" d:DesignWidth="1650">
|
||||
|
||||
<UserControl.Resources>
|
||||
<classes:InverseBoolConverter x:Key="InverseBoolConverter"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="#243851">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ScrollViewer Grid.RowSpan="2" Margin="20"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalAlignment="Center">
|
||||
<DataGrid Style="{StaticResource DataGridStyle}" Background="Transparent" ItemsSource="{Binding WaterQualityList}"
|
||||
RowStyle="{StaticResource DataGridRowStyle}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="시간"
|
||||
Binding="{Binding RecordedTime, StringFormat=\{0:HH:mm:ss\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
|
||||
<DataGridTextColumn Header="모래여과기" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.SandFilterGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="순환펌프" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.CirculationPumpGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="히트펌프" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.HeatPumpGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="에어브로와" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Filtering.AirBlowerGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="오존발생기" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.OzoneGeneratorGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.UVSterilizerGreenhouseGas, StringFormat=\{0:F3\}}">
|
||||
<DataGridTextColumn.Header>
|
||||
<StackPanel>
|
||||
<TextBlock Text="자외선"/>
|
||||
<TextBlock Text="살균기"/>
|
||||
</StackPanel>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="오존용해장치" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.OzoneDissolverGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="배오존장치" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding Sterilizing.ExcessOzoneDestroyerGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
<DataGridTextColumn Header="총 배출량" ElementStyle="{StaticResource DataGridElmenetStyle}"
|
||||
Binding="{Binding TotalGreenhouseGas, StringFormat=\{0:F3\}}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border Grid.Row="0" Grid.Column="1" Margin="0 20 20 20" CornerRadius="10"
|
||||
Background="#384659" BorderBrush="#404F63" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Margin="15 15 15 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="그래프" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<ComboBox Margin="15 0 0 0" Height="40" Grid.Column="1"
|
||||
Style="{StaticResource ComboBoxStyle}"
|
||||
ItemsSource="{Binding GraphTypes}"
|
||||
SelectedIndex="{Binding SelectedGraphIndex, Mode=TwoWay}"
|
||||
helper:ComboBoxHelper.SelectFirstOnItemsChange="True"
|
||||
IsEditable="False" IsTextSearchEnabled="False"/>
|
||||
</Grid>
|
||||
<Grid Margin="15 0">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="FrameworkElement">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenLine" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenStackArea" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenLineNStackArea" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenPie" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="PIE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource VisibleWhenLineNStackArea}">
|
||||
<Grid Margin="0 0 0 20" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="X축" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<TextBlock Text="{Binding SelectedXField.Display}" VerticalAlignment="Center"
|
||||
Margin="15 0 0 0" Grid.Column="1"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y축" VerticalAlignment="Top"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<Border Grid.Column="1" CornerRadius="10"
|
||||
Background="White" Margin="15 0 0 15">
|
||||
<ListBox ItemsSource="{Binding YFieldCandidates}"
|
||||
DisplayMemberPath="Display"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedItems="{Binding SelectedYFields, Mode=OneWay}"
|
||||
helper:MultiSelectBehavior.KeyPath="Key"
|
||||
helper:MultiSelectBehavior.ValuePath="Value"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Style="{StaticResource VisibleWhenPie}">
|
||||
<Grid Margin="0 0 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="필드" VerticalAlignment="Top"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<Border Grid.Column="1" CornerRadius="10"
|
||||
Background="White" Margin="15 0 0 15">
|
||||
<ListBox ItemsSource="{Binding YFieldCandidates}"
|
||||
DisplayMemberPath="Display"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedItems="{Binding SelectedYFields, Mode=OneWay}"
|
||||
helper:MultiSelectBehavior.KeyPath="Key"
|
||||
helper:MultiSelectBehavior.ValuePath="Value"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0 0 0 15">
|
||||
<RadioButton x:Name="rbStatus" Content="합계"
|
||||
GroupName="pie" Margin="0 0 30 0"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding UseAverage, Converter={StaticResource InverseBoolConverter}, Mode=TwoWay}"/>
|
||||
<RadioButton x:Name="pie" Content="평균"
|
||||
GroupName="pie" Grid.Column="1"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding UseAverage, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="15 0 0 0" Grid.Row="1">
|
||||
<CheckBox Content="마커 표시" IsChecked="{Binding ShowMarkers}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
<CheckBox Content="범례 표시" IsChecked="{Binding ShowLegends}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STACKAREA">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
<CheckBox Content="도넛 모드" IsChecked="{Binding IsDonut}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center">
|
||||
<CheckBox.Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignUserForegroundCheckBox}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="PIE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="15 0" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Button Content="그래프 생성" Style="{StaticResource MaterialDesignFlatLightBgButton}"
|
||||
FontWeight="Bold" Command="{Binding DrawGraphCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin="0 0 20 20" CornerRadius="10"
|
||||
Background="#384659" BorderBrush="#404F63" BorderThickness="1">
|
||||
<control:GraphControl x:Name="graphControl"
|
||||
Margin="10" DataContext="{Binding GraphControlVM}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@ -0,0 +1,506 @@
|
||||
<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:model="clr-namespace:SmartAquaViewer.Model"
|
||||
xmlns:classes="clr-namespace:SmartAquaViewer.Classes"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="940" d:DesignWidth="1650">
|
||||
|
||||
<UserControl.Resources>
|
||||
<classes:EnumEqualsConverter x:Key="EnumEqualsConverter"/>
|
||||
<classes:BoolToPowerConverter x:Key="BoolToPowerConverter"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<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"
|
||||
SelectedTab="{Binding SelectedTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer x:Name="svTanks" Grid.Row="1" Margin="20 20 20 40"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl ItemsSource="{Binding TankGroups}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="3"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="20 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}"
|
||||
Style="{StaticResource DataGridStyle}"
|
||||
RowStyle="{StaticResource DataGridRowStyle}"
|
||||
ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<DataGrid.Columns>
|
||||
<!-- 측정 시각 -->
|
||||
<DataGridTextColumn
|
||||
Header="시간"
|
||||
Binding="{Binding RecordedTime, StringFormat=\{0:HH:mm:ss\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
|
||||
<!-- Tank 값들 -->
|
||||
<DataGridTextColumn Header="DO(mg/L)" Binding="{Binding Tank.DOValue, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="pH" Binding="{Binding Tank.PH, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="ORP(mV)" Binding="{Binding Tank.ORP, StringFormat=\{0:F0\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="온도(℃)" Binding="{Binding Tank.Temperature, StringFormat=\{0:F1\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="유량(m³/s)" Binding="{Binding Tank.FlowRate, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
<ScrollViewer x:Name="svFilter" Grid.Row="1" Margin="20 20 20 40"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalAlignment="Center" Visibility="Collapsed">
|
||||
<DataGrid ItemsSource="{Binding WaterQualityList}" Style="{StaticResource DataGridStyle}"
|
||||
RowStyle="{StaticResource DataGridRowStyle}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="시간"
|
||||
Binding="{Binding RecordedTime, StringFormat=\{0:HH:mm:ss\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
|
||||
<DataGridTextColumn Header="모래여과기 전원" Binding="{Binding Filtering.SandFilterPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="섬프탱크 pH" Binding="{Binding Filtering.SumpPH}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="섬프탱크 ORP(mV)" Binding="{Binding Filtering.SumpORP, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="섬프탱크 수위(m)" Binding="{Binding Filtering.SumpWaterLevel, StringFormat=\{0:F0\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="섬프탱크 유량(m³/s)" Binding="{Binding Filtering.SumpFlowRate, StringFormat=\{0:F1\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="섬프탱크 수온(°C)" Binding="{Binding Filtering.SumpTemperature, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="순환펌프 전원" Binding="{Binding Filtering.CirculationPumpPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="인버터 제어기 상태" Binding="{Binding Filtering.InverterControllerStatus}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="순환펌프 유량(m³/s)" Binding="{Binding Filtering.FlowRate, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="히트펌프 전원" Binding="{Binding Filtering.HeatPumpPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="히트펌프 온도(°C)" Binding="{Binding Filtering.HeatPumpTemperature, StringFormat=\{0:F2\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="에어브로와 전원" Binding="{Binding Filtering.AirBlowerPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</ScrollViewer>
|
||||
|
||||
<ScrollViewer x:Name="svSterilizer" Grid.Row="1" Margin="20 20 20 40"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
HorizontalAlignment="Center" Visibility="Collapsed">
|
||||
<DataGrid ItemsSource="{Binding WaterQualityList}" Style="{StaticResource DataGridStyle}"
|
||||
RowStyle="{StaticResource DataGridRowStyle}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Header="시간"
|
||||
Binding="{Binding RecordedTime, StringFormat=\{0:HH:mm:ss\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
|
||||
<DataGridTextColumn Header="오존 발생기 전원" Binding="{Binding Sterilizing.OzoneGeneratorPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="자외선 살균기 ID" Binding="{Binding Sterilizing.UVSterilizerId}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="자외선 살균기 전원" Binding="{Binding Sterilizing.UVSterilizerPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="오존용해장치 전원" Binding="{Binding Sterilizing.OzoneDissolverPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="오존용해장치 압력(kPa)" Binding="{Binding Sterilizing.OzoneDissolverPressure, StringFormat=\{0:F1\}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
<DataGridTextColumn Header="배오존장치 전원" Binding="{Binding Sterilizing.ExcessOzoneDestroyerPower, Converter={StaticResource BoolToPowerConverter}}"
|
||||
ElementStyle="{StaticResource DataGridElmenetStyle}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</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/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<Grid Margin="15 15 15 10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="그래프" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<ComboBox Margin="15 0 0 0" Height="40" Grid.Column="1"
|
||||
Style="{StaticResource ComboBoxStyle}"
|
||||
ItemsSource="{Binding GraphTypes}"
|
||||
SelectedIndex="{Binding SelectedGraphIndex, Mode=TwoWay}"
|
||||
helper:ComboBoxHelper.SelectFirstOnItemsChange="True"
|
||||
IsEditable="False" IsTextSearchEnabled="False"/>
|
||||
</Grid>
|
||||
<Grid Margin="15 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="X축" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<ComboBox Margin="15 0 0 0" Height="40" Grid.Column="1"
|
||||
Style="{StaticResource ComboBoxStyle}"
|
||||
ItemsSource="{Binding XFieldCandidates}"
|
||||
SelectedItem="{Binding SelectedXField}"
|
||||
DisplayMemberPath="Display"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="15 10 15 0">
|
||||
<Grid.Resources>
|
||||
<Style TargetType="FrameworkElement">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
<!-- 보이기 토글용 스타일 -->
|
||||
<Style x:Key="VisibleWhenTrue" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STEP">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenTankNLine" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsTankAndLine}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenLine" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="LINE">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenStep" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="STEP">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenScatter" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="SCATTER">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenBox" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedGraphType}" Value="BOX">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="VisibleWhenTime" TargetType="FrameworkElement" BasedOn="{StaticResource {x:Type FrameworkElement}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedXField.Name}" Value="RecordedTime">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<!-- LINE -->
|
||||
<StackPanel Style="{StaticResource VisibleWhenLine}">
|
||||
<StackPanel Style="{StaticResource VisibleWhenTankNLine}">
|
||||
<TextBlock Text="수조 (복수 선택)" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
|
||||
<Border CornerRadius="10" Background="White" Margin="0 5 0 10">
|
||||
<ListBox ItemsSource="{Binding TankGroups}"
|
||||
DisplayMemberPath="Key"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedDictionary="{Binding SelectedWaterTanks, Mode=OneWay}"
|
||||
helper:MultiSelectBehavior.KeyPath="Key"
|
||||
helper:MultiSelectBehavior.ValuePath="Value"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Style="{StaticResource VisibleWhenLine}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y축" VerticalAlignment="Center" Style="{StaticResource VisibleWhenLine}"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<ComboBox ItemsSource="{Binding YFieldCandidates}"
|
||||
SelectedItem="{Binding SelectedYField, Mode=TwoWay}"
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="Display" Margin="15 0 0 0"
|
||||
Height="40" Style="{StaticResource ComboBoxStyle}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- 옵션 -->
|
||||
<StackPanel Orientation="Horizontal" Margin="0 15 0 0" Grid.Row="4">
|
||||
<CheckBox Content="마커 표시" IsChecked="{Binding ShowMarkers}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignUserForegroundCheckBox}"/>
|
||||
<!--<CheckBox Content="스무딩" IsChecked="{Binding UseSmoothing}"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignUserForegroundCheckBox}"/>-->
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--STEP-->
|
||||
<StackPanel Style="{StaticResource VisibleWhenStep}">
|
||||
<Grid Margin="0 5 0 10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="필드 종류" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
|
||||
<RadioButton x:Name="rbStatus" Content="전원/상태"
|
||||
GroupName="strpPlot" Margin="0 0 30 0"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding SelectedKind, Mode=TwoWay,
|
||||
Converter={StaticResource EnumEqualsConverter},
|
||||
ConverterParameter={x:Static model:StepFieldKind.Status}}"/>
|
||||
<RadioButton x:Name="rbValue" Content="센서 값"
|
||||
GroupName="strpPlot" Grid.Column="1"
|
||||
Foreground="White" FontSize="20"
|
||||
Style="{StaticResource MaterialDesignUserForegroundRadioButton}"
|
||||
IsChecked="{Binding SelectedKind, Mode=TwoWay,
|
||||
Converter={StaticResource EnumEqualsConverter},
|
||||
ConverterParameter={x:Static model:StepFieldKind.Sensor}}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 5 0 0">
|
||||
<Grid.Style>
|
||||
<Style TargetType="Grid">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsChecked, ElementName=rbStatus}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Style>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y축" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<ComboBox ItemsSource="{Binding YFieldCandidates}"
|
||||
SelectedItem="{Binding SelectedYField, Mode=TwoWay}"
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="Display" Margin="15 0 0 0"
|
||||
Height="40" Style="{StaticResource ComboBoxStyle}"/>
|
||||
</Grid>
|
||||
|
||||
<StackPanel>
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="StackPanel">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsChecked, ElementName=rbValue}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBlock Text="Y축 (복수 선택)" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<!-- SelectedItems 바인딩을 위한 간단 Behavior는 아래 3) 참고 -->
|
||||
<Border CornerRadius="10" Background="White" Margin="0 5">
|
||||
<ListBox ItemsSource="{Binding YFieldCandidates}"
|
||||
DisplayMemberPath="Display"
|
||||
SelectionMode="Extended"
|
||||
helper:MultiSelectBehavior.SelectedItems="{Binding SelectedYFields, Mode=OneWay}"
|
||||
Height="Auto" Background="White"
|
||||
FontSize="14" FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFilterChipListBox}"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<!-- 옵션 -->
|
||||
<StackPanel Orientation="Horizontal" Margin="0 15 0 0">
|
||||
<CheckBox Content="마커 표시" IsChecked="{Binding ShowMarkers}" Margin="0 0 15 0"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
VerticalContentAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignUserForegroundCheckBox}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- SCATTER: 단일 Y + 옵션 -->
|
||||
<StackPanel Style="{StaticResource VisibleWhenScatter}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Y축" VerticalAlignment="Center" Width="80"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<ComboBox ItemsSource="{Binding YFieldCandidates}"
|
||||
SelectedItem="{Binding SelectedYField}"
|
||||
DisplayMemberPath="Display" Height="40"
|
||||
Grid.Column="1" Grid.ColumnSpan="3" Margin="15 0 0 0"
|
||||
Style="{StaticResource ComboBoxStyle}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="마커 크기" Grid.Row="1" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<Slider Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="15 0 0 0"
|
||||
Minimum="1" Maximum="15" Value="{Binding ScatterMarkerSize}" Width="280" IsSnapToTickEnabled="True" TickFrequency="1"/>
|
||||
<TextBlock Text="{Binding ScatterMarkerSize}" Margin="15 0"
|
||||
Grid.Row="1" Grid.Column="2" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
</Grid>
|
||||
|
||||
<CheckBox Content="회귀선" IsChecked="{Binding ShowRegression}"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"
|
||||
Margin="0" Grid.Row="1" Grid.Column="3"
|
||||
VerticalContentAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignUserForegroundCheckBox}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- BOX: 값 필드 + 그룹 필드 + 옵션 -->
|
||||
<StackPanel Style="{StaticResource VisibleWhenBox}">
|
||||
<Grid Style="{StaticResource VisibleWhenTime}" Margin="0 10 0 15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="시간 범위" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<Slider Margin="15 0 0 0" Grid.Column="1"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Minimum="1" Maximum="24" TickFrequency="1" IsSnapToTickEnabled="True"
|
||||
Value="{Binding BoxTimeSpan}" Width="310"/>
|
||||
<TextBlock Text="{Binding BoxTimeSpan}"
|
||||
Margin="15 0" Grid.Column="2"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
FontSize="18" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="값 필드" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<ComboBox ItemsSource="{Binding YFieldCandidates}"
|
||||
SelectedItem="{Binding SelectedYField}"
|
||||
DisplayMemberPath="Display" Height="40"
|
||||
Grid.Column="1" Margin="15 0 0 0"
|
||||
Style="{StaticResource ComboBoxStyle}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 15 0 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="박스 너비" VerticalAlignment="Center"
|
||||
FontSize="20" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
<Slider Margin="15 0 0 0" Grid.Column="1"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Minimum="0.1" Maximum="1.0" TickFrequency="0.05" IsSnapToTickEnabled="True"
|
||||
Value="{Binding BoxWidth}" Width="310"/>
|
||||
<TextBlock Text="{Binding BoxWidth, StringFormat=F2}"
|
||||
Margin="15 0" Grid.Column="2"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
FontSize="18" FontFamily="{StaticResource SCDream4}" Foreground="White"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="15 0" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Button Content="그래프 생성" Style="{StaticResource MaterialDesignFlatLightBgButton}"
|
||||
FontWeight="Bold" Command="{Binding DrawGraphCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" Margin="0 20 20 20"
|
||||
Background="#384659" BorderBrush="#404F63" BorderThickness="1" CornerRadius="10">
|
||||
<control:GraphControl x:Name="graphControl"
|
||||
Margin="10" DataContext="{Binding GraphControlVM}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</md:DrawerHost.BottomDrawerContent>
|
||||
</md:DrawerHost>
|
||||
</Border>
|
||||
</UserControl>
|
||||