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.
270 lines
15 KiB
270 lines
15 KiB
|
4 weeks ago
|
<UserControl x:Class="leak_test_project.Views.InOutView"
|
||
|
|
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"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
d:DesignHeight="700" d:DesignWidth="1100" Background="#F4F6F7">
|
||
|
|
|
||
|
|
<UserControl.Resources>
|
||
|
|
<!-- Premium Legacy Styles for I/O Monitor -->
|
||
|
|
<Style x:Key="HeaderBorder" TargetType="Border">
|
||
|
|
<Setter Property="Background" Value="#2C3E50"/>
|
||
|
|
<Setter Property="BorderBrush" Value="#1A252F"/>
|
||
|
|
<Setter Property="BorderThickness" Value="1"/>
|
||
|
|
<Setter Property="Height" Value="45"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style x:Key="HeaderLabel" TargetType="TextBlock">
|
||
|
|
<Setter Property="Foreground" Value="White"/>
|
||
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="FontSize" Value="16"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style x:Key="SubHeaderBorder" TargetType="Border">
|
||
|
|
<Setter Property="Background" Value="#EBEDEF"/>
|
||
|
|
<Setter Property="BorderBrush" Value="#BDC3C7"/>
|
||
|
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||
|
|
<Setter Property="Height" Value="35"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style x:Key="SubHeaderLabel" TargetType="TextBlock">
|
||
|
|
<Setter Property="Foreground" Value="#2C3E50"/>
|
||
|
|
<Setter Property="FontSize" Value="12"/>
|
||
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style x:Key="PagingButton" TargetType="Button">
|
||
|
|
<Setter Property="Width" Value="85"/>
|
||
|
|
<Setter Property="Height" Value="35"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
<Setter Property="Background" Value="#E5E8E8"/>
|
||
|
|
<Setter Property="BorderBrush" Value="#95A5A6"/>
|
||
|
|
<Setter Property="BorderThickness" Value="1.5"/>
|
||
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
||
|
|
<Setter Property="FontSize" Value="12"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style TargetType="DataGrid">
|
||
|
|
<Setter Property="Background" Value="White"/>
|
||
|
|
<Setter Property="BorderThickness" Value="0"/>
|
||
|
|
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
|
||
|
|
<Setter Property="HorizontalGridLinesBrush" Value="#ECF0F1"/>
|
||
|
|
<Setter Property="HeadersVisibility" Value="None"/>
|
||
|
|
<Setter Property="RowHeight" Value="32"/>
|
||
|
|
<Setter Property="FontSize" Value="13"/>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<!-- LED Status Indicator Style -->
|
||
|
|
<Style x:Key="LedIndicator" TargetType="Ellipse">
|
||
|
|
<Setter Property="Width" Value="14"/>
|
||
|
|
<Setter Property="Height" Value="14"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
<Style.Triggers>
|
||
|
|
<DataTrigger Binding="{Binding Value}" Value="True">
|
||
|
|
<Setter Property="Fill" Value="#27AE60"/>
|
||
|
|
<Setter Property="Effect">
|
||
|
|
<Setter.Value>
|
||
|
|
<DropShadowEffect Color="#27AE60" BlurRadius="8" ShadowDepth="0"/>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</DataTrigger>
|
||
|
|
<DataTrigger Binding="{Binding Value}" Value="False">
|
||
|
|
<Setter Property="Fill" Value="#BDC3C7"/>
|
||
|
|
</DataTrigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</UserControl.Resources>
|
||
|
|
|
||
|
|
<Grid Margin="15">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<!-- 메인 모니터 그리드 -->
|
||
|
|
<Grid Grid.Row="0">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<!-- INPUT Section -->
|
||
|
|
<Grid Grid.Column="0" Margin="0,0,10,0">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="45"/> <!-- Header -->
|
||
|
|
<RowDefinition Height="35"/> <!-- SubHeader -->
|
||
|
|
<RowDefinition Height="*"/> <!-- List -->
|
||
|
|
<RowDefinition Height="65"/> <!-- Paging -->
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<Border Grid.Row="0" Style="{StaticResource HeaderBorder}">
|
||
|
|
<TextBlock Text="DIGITAL INPUTS (입력)" Style="{StaticResource HeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Grid Grid.Row="1">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="40"/>
|
||
|
|
<ColumnDefinition Width="45"/> <!-- LED -->
|
||
|
|
<ColumnDefinition Width="150"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Border Grid.Column="0" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="ADD." Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="1" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="STAT." Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="2" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="SIGNAL NAME" Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="3" Style="{StaticResource SubHeaderBorder}" BorderThickness="0,0,0,1">
|
||
|
|
<TextBlock Text="DESCRIPTION" Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<Border Grid.Row="2" BorderBrush="#BDC3C7" BorderThickness="1,0,1,1" Background="White">
|
||
|
|
<DataGrid ItemsSource="{Binding CurrentInputs}" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False">
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn Binding="{Binding Address}" Width="40">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
<DataGridTemplateColumn Width="45">
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<Ellipse Style="{StaticResource LedIndicator}"/>
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>
|
||
|
|
<DataGridTextColumn Binding="{Binding Name}" Width="150">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
<DataGridTextColumn Binding="{Binding Description}" Width="*">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="Foreground" Value="#7F8C8D"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
<Button Content="FIRST" Style="{StaticResource PagingButton}" Command="{Binding InputFirstCommand}"/>
|
||
|
|
<Button Content="PREV" Style="{StaticResource PagingButton}" Command="{Binding InputPrevCommand}"/>
|
||
|
|
<Button Content="NEXT" Style="{StaticResource PagingButton}" Command="{Binding InputNextCommand}"/>
|
||
|
|
<Button Content="LAST" Style="{StaticResource PagingButton}" Command="{Binding InputLastCommand}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<!-- OUTPUT Section -->
|
||
|
|
<Grid Grid.Column="1" Margin="10,0,0,0">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="45"/>
|
||
|
|
<RowDefinition Height="35"/>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
<RowDefinition Height="65"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<Border Grid.Row="0" Style="{StaticResource HeaderBorder}">
|
||
|
|
<TextBlock Text="DIGITAL OUTPUTS (출력)" Style="{StaticResource HeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Grid Grid.Row="1">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="40"/>
|
||
|
|
<ColumnDefinition Width="45"/>
|
||
|
|
<ColumnDefinition Width="150"/>
|
||
|
|
<ColumnDefinition Width="*"/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Border Grid.Column="0" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="ADD." Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="1" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="STAT." Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="2" Style="{StaticResource SubHeaderBorder}">
|
||
|
|
<TextBlock Text="SIGNAL NAME" Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
<Border Grid.Column="3" Style="{StaticResource SubHeaderBorder}" BorderThickness="0,0,0,1">
|
||
|
|
<TextBlock Text="DESCRIPTION" Style="{StaticResource SubHeaderLabel}"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<Border Grid.Row="2" BorderBrush="#BDC3C7" BorderThickness="1,0,1,1" Background="White">
|
||
|
|
<DataGrid ItemsSource="{Binding CurrentOutputs}" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False">
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn Binding="{Binding Address}" Width="40">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
<DataGridTemplateColumn Width="45">
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<Ellipse Style="{StaticResource LedIndicator}"/>
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>
|
||
|
|
<DataGridTextColumn Binding="{Binding Name}" Width="150">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
<DataGridTextColumn Binding="{Binding Description}" Width="*">
|
||
|
|
<DataGridTextColumn.ElementStyle>
|
||
|
|
<Style TargetType="TextBlock">
|
||
|
|
<Setter Property="Foreground" Value="#7F8C8D"/>
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||
|
|
<Setter Property="Margin" Value="5,0"/>
|
||
|
|
</Style>
|
||
|
|
</DataGridTextColumn.ElementStyle>
|
||
|
|
</DataGridTextColumn>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
<Button Content="FIRST" Style="{StaticResource PagingButton}" Command="{Binding OutputFirstCommand}"/>
|
||
|
|
<Button Content="PREV" Style="{StaticResource PagingButton}" Command="{Binding OutputPrevCommand}"/>
|
||
|
|
<Button Content="NEXT" Style="{StaticResource PagingButton}" Command="{Binding OutputNextCommand}"/>
|
||
|
|
<Button Content="LAST" Style="{StaticResource PagingButton}" Command="{Binding OutputLastCommand}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<!-- Footer Area -->
|
||
|
|
<Border Grid.Row="1" Background="#D5DBDB" BorderBrush="#AEB6BF" BorderThickness="0,2,0,0" Margin="-15,10,-15,-15">
|
||
|
|
<Button Content="Close" Width="180" Height="50" Margin="0,15"
|
||
|
|
Background="#E5E8E8" BorderBrush="#95A5A6" BorderThickness="1.5"
|
||
|
|
FontWeight="Bold" FontSize="14" HorizontalAlignment="Center" Command="{Binding CloseCommand}"/>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
</UserControl>
|