|
|
|
@ -7,6 +7,9 @@ |
|
|
|
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties" |
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
|
|
|
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels" |
|
|
|
xmlns:localUserClass="clr-namespace:DyeingComputer.UserClass" |
|
|
|
xmlns:viewmodel="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ViewModel" |
|
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}" |
|
|
|
mc:Ignorable="d" |
|
|
|
Loaded="UserControl_Loaded" |
|
|
|
d:DesignHeight="900" d:DesignWidth="1200"> |
|
|
|
@ -21,10 +24,11 @@ |
|
|
|
<RowDefinition Height="60"/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<DataGrid Grid.Row="0" x:Name="Griddata" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=999}" |
|
|
|
Background="White" |
|
|
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" FontSize="15" |
|
|
|
Grid.ColumnSpan="2" CanUserResizeRows="False" AutoGenerateColumns="False" MinColumnWidth="30" |
|
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" SelectionMode="Single" |
|
|
|
ItemsSource="{Binding Path=TechnologicalMachine_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Background="White" GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" |
|
|
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" |
|
|
|
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" |
|
|
|
AutoGenerateColumns="False" MinColumnWidth="30" |
|
|
|
HorizontalAlignment="Left" Width="280" MouseDoubleClick="Griddata_MouseDoubleClick"> |
|
|
|
<DataGrid.RowStyle > |
|
|
|
<Style TargetType="{x:Type DataGridRow}"> |
|
|
|
@ -73,11 +77,6 @@ |
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|
</DataGridTemplateColumn> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="210" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Group}" Binding="{Binding Groups}" Width="0" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Binding="{Binding IP}" Width="0" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Binding="{Binding PORT}" Width="0" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Binding="{Binding Serial}" Width="0" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Binding="{Binding Baud}" Width="0" IsReadOnly="True"/> |
|
|
|
</DataGrid.Columns> |
|
|
|
</DataGrid> |
|
|
|
<Grid Grid.Row="0" Margin="280,0,0,0"> |
|
|
|
@ -87,7 +86,97 @@ |
|
|
|
<RowDefinition/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" Background="#FF00204E"/> |
|
|
|
<Grid Grid.Row="2"> |
|
|
|
<Grid Grid.Row="2" x:Name="SET_GRID" Visibility="Collapsed"> |
|
|
|
<DataGrid x:Name="SET_Grid" AlternationCount="2" Margin="0,0,0,0" d:ItemsSource="{d:SampleData ItemCount=99}" AutoGenerateColumns="False" |
|
|
|
ItemsSource="{Binding Path=Paramete_Set,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|
|
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC" |
|
|
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False" |
|
|
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" |
|
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" InputMethod.IsInputMethodEnabled ="False" |
|
|
|
CellEditEnding="SET_Grid_CellEditEnding" BeginningEdit="SET_Grid_BeginningEdit" Background="White" SelectionMode="Single" FontSize="15" Cursor="AppStarting" > |
|
|
|
<DataGrid.RowStyle > |
|
|
|
<Style TargetType="{x:Type DataGridRow}"> |
|
|
|
<Setter Property="Height" Value="30" /> |
|
|
|
<Setter Property="FontSize" Value="25" /> |
|
|
|
<Style.Triggers> |
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|
|
|
<Setter Property="Background" Value="#FFFFFFFF" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|
|
|
<Setter Property="Background" Value="#FFF0F0F0" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsMouseOver" Value="False"/> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</DataGrid.RowStyle> |
|
|
|
<DataGrid.CellStyle> |
|
|
|
<Style TargetType="DataGridCell"> |
|
|
|
<Setter Property="BorderThickness" Value="0"/> |
|
|
|
<Setter Property="MinWidth" Value="20"/> |
|
|
|
<Style.Triggers> |
|
|
|
<Trigger Property="IsSelected" Value="True"> |
|
|
|
<Setter Property="Background" Value="#FFC0C0C0"/> |
|
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/> |
|
|
|
<Setter Property="Foreground" Value="Black"/> |
|
|
|
</Trigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</DataGrid.CellStyle> |
|
|
|
<DataGrid.Columns> |
|
|
|
<!--列信息绑定--> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Type}" Width="200" Binding="{Binding Category}" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="200" Binding="{Binding ParameterID}" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="*" Binding="{Binding ParameterName}" IsReadOnly="True"/> |
|
|
|
<localUserClass:NumericTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="200" Binding="{Binding Value}"/> |
|
|
|
</DataGrid.Columns> |
|
|
|
</DataGrid> |
|
|
|
</Grid> |
|
|
|
<Grid Grid.Row="2" x:Name="SYS_GRID" Visibility="Collapsed"> |
|
|
|
<DataGrid x:Name="SYS_Grid" AlternationCount="2" Margin="0,0,0,0" d:ItemsSource="{d:SampleData ItemCount=99}" AutoGenerateColumns="False" |
|
|
|
ItemsSource="{Binding Path=Sys_Set,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|
|
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC" |
|
|
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False" |
|
|
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" |
|
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" InputMethod.IsInputMethodEnabled ="False" |
|
|
|
CellEditEnding="SYS_Grid_CellEditEnding" BeginningEdit="SYS_Grid_BeginningEdit" Background="White" SelectionMode="Single" FontSize="15" Cursor="AppStarting" > |
|
|
|
<DataGrid.RowStyle > |
|
|
|
<Style TargetType="{x:Type DataGridRow}"> |
|
|
|
<Setter Property="Height" Value="30" /> |
|
|
|
<Setter Property="FontSize" Value="25" /> |
|
|
|
<Style.Triggers> |
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|
|
|
<Setter Property="Background" Value="#FFFFFFFF" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|
|
|
<Setter Property="Background" Value="#FFF0F0F0" /> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsMouseOver" Value="False"/> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</DataGrid.RowStyle> |
|
|
|
<DataGrid.CellStyle> |
|
|
|
<Style TargetType="DataGridCell"> |
|
|
|
<Setter Property="BorderThickness" Value="0"/> |
|
|
|
<Setter Property="MinWidth" Value="20"/> |
|
|
|
<Style.Triggers> |
|
|
|
<Trigger Property="IsSelected" Value="True"> |
|
|
|
<Setter Property="Background" Value="#FFC0C0C0"/> |
|
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/> |
|
|
|
<Setter Property="Foreground" Value="Black"/> |
|
|
|
</Trigger> |
|
|
|
</Style.Triggers> |
|
|
|
</Style> |
|
|
|
</DataGrid.CellStyle> |
|
|
|
<DataGrid.Columns> |
|
|
|
<!--列信息绑定--> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Type}" Width="200" Binding="{Binding Category}" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="200" Binding="{Binding ParameterID}" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="*" Binding="{Binding ParameterName}" IsReadOnly="True"/> |
|
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="400" Binding="{Binding Value}"/> |
|
|
|
</DataGrid.Columns> |
|
|
|
</DataGrid> |
|
|
|
</Grid> |
|
|
|
<Grid Grid.Row="2" x:Name="IO_GRID" Visibility="Visible"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition/> |
|
|
|
@ -259,7 +348,6 @@ |
|
|
|
<DataGridTextColumn Header="info" Width="100" Binding="{Binding Value}" IsReadOnly="True"/> |
|
|
|
</DataGrid.Columns> |
|
|
|
</DataGrid> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
<StackPanel Grid.Row="2" x:Name="mt" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0" > |
|
|
|
@ -288,7 +376,17 @@ |
|
|
|
</ListViewItem> |
|
|
|
</ListView> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<StackPanel Grid.Row="2" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0" Width="400" HorizontalAlignment="Right"> |
|
|
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD"> |
|
|
|
<ListViewItem> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<materialDesign:PackIcon Kind="ChatProcessing" Width="40" Height="30" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|
|
|
<TextBlock Text="{x:Static lang:Resources.Machine}" FontSize="20" VerticalAlignment="Center" Margin="20 10" Foreground="White" /> |
|
|
|
<TextBlock x:Name="MAC_name" FontSize="20" VerticalAlignment="Center" Margin="20 10" Foreground="White" FontWeight="Bold" /> |
|
|
|
</StackPanel> |
|
|
|
</ListViewItem> |
|
|
|
</ListView> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
</Grid> |
|
|
|
|