程序组步骤页面逻辑修改
This commit is contained in:
commit
00f6d637ac
2 files changed
+94
-10
No files matched your search
+63
-10
@@ -10,6 +10,7 @@
|
|||||||
d:DesignHeight="630" d:DesignWidth="1280">
|
d:DesignHeight="630" d:DesignWidth="1280">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ConvertMoels:RowToIndexConverter x:Key="RowToIndexConverter"/>
|
<ConvertMoels:RowToIndexConverter x:Key="RowToIndexConverter"/>
|
||||||
|
<ConvertMoels:StatenToImageConvert x:Key="StatenToImageConvert"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Top" Height="40"/>
|
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Top" Height="40"/>
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
Background="White" SelectionMode="Single" FontSize="15">
|
Background="White" SelectionMode="Single" FontSize="15">
|
||||||
<DataGrid.RowStyle >
|
<DataGrid.RowStyle >
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
<Setter Property="Height" Value="30" />
|
<Setter Property="Height" Value="100" />
|
||||||
<Setter Property="FontSize" Value="25" />
|
<Setter Property="FontSize" Value="25" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
||||||
@@ -61,20 +62,72 @@
|
|||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Binding="{Binding ProgramID}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding ProgramID}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Program}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Program}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="60" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="60" IsReadOnly="True">
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="100" Binding="{Binding StepID}" IsReadOnly="True"/>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="300" Binding="{Binding StepName}" IsReadOnly="True"/>
|
<Style TargetType="TextBlock">
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding ParameterName}" IsReadOnly="True"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="0" MinWidth="0" MaxWidth="0" Binding="{Binding StepID}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="0" MinWidth="0" MaxWidth="0" Binding="{Binding StepName}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="0" MinWidth="0" MaxWidth="0" Binding="{Binding ParameterName}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter4}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter4}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter5}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter5}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter6}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="100" IsReadOnly="True">
|
||||||
<DataGridTextColumn Binding="{Binding Parameter7}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter8}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataTemplate>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter9}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<Image Source="{Binding Path=StepID,Converter={StaticResource StatenToImageConvert}}" Height="100" Width="100"/>
|
||||||
<DataGridTextColumn Binding="{Binding Parameter10}" Width="0" MinWidth="0" MaxWidth="0"/>
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="600" IsReadOnly="True">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel>
|
||||||
|
<Border BorderBrush="#FFC9C9C9" BorderThickness="0,0,0,0.5">
|
||||||
|
<TextBlock Height="50" >
|
||||||
|
<Run Text="{x:Static lang:Resources.Function}"/>
|
||||||
|
<Run Text=":"/>
|
||||||
|
<Run Text="{Binding StepName}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
<Border BorderBrush="#FFC9C9C9" BorderThickness="0,0.5,0,0">
|
||||||
|
<TextBlock Height="50" >
|
||||||
|
<Run Text="{x:Static lang:Resources.ParameterSet}"/>
|
||||||
|
<Run Text=":"/>
|
||||||
|
<Run Text="{Binding ParameterName}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="100" IsReadOnly="True">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image Source="{Binding Path=StepID_S1,Converter={StaticResource StatenToImageConvert}}" Height="100" Width="100"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="100" IsReadOnly="True">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image Source="{Binding Path=StepID_S2,Converter={StaticResource StatenToImageConvert}}" Height="100" Width="100"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="100" IsReadOnly="True">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image Source="{Binding Path=StepID_S3 ,Converter={StaticResource StatenToImageConvert}}" Height="100" Width="100"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@@ -216,6 +216,37 @@ namespace DyeingComputer.View
|
|||||||
DataRow dr = sql.Tables[0].NewRow();//添加表数据
|
DataRow dr = sql.Tables[0].NewRow();//添加表数据
|
||||||
dr["ProgramID"] = ProgramID;
|
dr["ProgramID"] = ProgramID;
|
||||||
dr["Program"] = ProgramNAME;
|
dr["Program"] = ProgramNAME;
|
||||||
|
dr["Parameter1"] = 0;
|
||||||
|
dr["Parameter2"] = 0;
|
||||||
|
dr["Parameter3"] = 0;
|
||||||
|
dr["Parameter4"] = 0;
|
||||||
|
dr["Parameter5"] = 0;
|
||||||
|
dr["Parameter6"] = 0;
|
||||||
|
dr["Parameter7"] = 0;
|
||||||
|
dr["Parameter8"] = 0;
|
||||||
|
dr["Parameter9"] = 0;
|
||||||
|
dr["Parameter10"] = 0;
|
||||||
|
dr["Parameter1_S1"] = 0;
|
||||||
|
dr["Parameter2_S1"] = 0;
|
||||||
|
dr["Parameter3_S1"] = 0;
|
||||||
|
dr["Parameter4_S1"] = 0;
|
||||||
|
dr["Parameter5_S1"] = 0;
|
||||||
|
dr["Parameter1_S2"] = 0;
|
||||||
|
dr["Parameter2_S2"] = 0;
|
||||||
|
dr["Parameter3_S2"] = 0;
|
||||||
|
dr["Parameter4_S2"] = 0;
|
||||||
|
dr["Parameter5_S2"] = 0;
|
||||||
|
dr["Parameter1_S3"] = 0;
|
||||||
|
dr["Parameter2_S3"] = 0;
|
||||||
|
dr["Parameter3_S3"] = 0;
|
||||||
|
dr["Parameter4_S3"] = 0;
|
||||||
|
dr["Parameter5_S3"] = 0;
|
||||||
|
dr["StepName_S1"] = " ";
|
||||||
|
dr["StepName_S2"] = " ";
|
||||||
|
dr["StepName_S3"] = " ";
|
||||||
|
dr["StepID_S1"] = "000";
|
||||||
|
dr["StepID_S2"] = "000";
|
||||||
|
dr["StepID_S3"] = "000";
|
||||||
sql.Tables[0].Rows.InsertAt(dr, d - 1);
|
sql.Tables[0].Rows.InsertAt(dr, d - 1);
|
||||||
ID = null;
|
ID = null;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user