添加步骤页面参数及工单
This commit is contained in:
commit
10508fb79a
7 files changed
+161
-34
No files matched your search
@@ -495,4 +495,7 @@
|
|||||||
<data name="R_P" xml:space="preserve">
|
<data name="R_P" xml:space="preserve">
|
||||||
<value>Run/Pause</value>
|
<value>Run/Pause</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="NAME_" xml:space="preserve">
|
||||||
|
<value />
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -495,4 +495,10 @@
|
|||||||
<data name="R_P" xml:space="preserve">
|
<data name="R_P" xml:space="preserve">
|
||||||
<value>Run/Pause</value>
|
<value>Run/Pause</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Resources" xml:space="preserve">
|
||||||
|
<value>Resources</value>
|
||||||
|
</data>
|
||||||
|
<data name="NAME_" xml:space="preserve">
|
||||||
|
<value>NAME</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -495,4 +495,7 @@
|
|||||||
<data name="R_P" xml:space="preserve">
|
<data name="R_P" xml:space="preserve">
|
||||||
<value>运行/暂停</value>
|
<value>运行/暂停</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="NAME_" xml:space="preserve">
|
||||||
|
<value>名称</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -490,9 +490,12 @@
|
|||||||
<value>染色機</value>
|
<value>染色機</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Protocols" xml:space="preserve">
|
<data name="Protocols" xml:space="preserve">
|
||||||
<value />
|
<value>協定</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="R_P" xml:space="preserve">
|
<data name="R_P" xml:space="preserve">
|
||||||
|
<value>運行/暫停</value>
|
||||||
|
</data>
|
||||||
|
<data name="NAME_" xml:space="preserve">
|
||||||
<value />
|
<value />
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -84,10 +84,97 @@
|
|||||||
<DataGridTextColumn Binding="{Binding DYELOT}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding DYELOT}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<ScrollViewer HorizontalAlignment="Left" Width="600" Margin="0,40,0,0" VerticalScrollBarVisibility="Auto"
|
<Grid Width="600" Margin="0,40,0,0" HorizontalAlignment="Left" >
|
||||||
PanningMode="VerticalOnly">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" PanningMode="VerticalOnly">
|
||||||
<TextBlock x:Name="log" TextWrapping="Wrap" FontSize="25" Background="White" Text="{Binding Sys_log}" />
|
<TextBlock x:Name="log" TextWrapping="Wrap" FontSize="25" Background="White"
|
||||||
|
Text="{Binding Sys_log}" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
<DataGrid x:Name="Receip" HorizontalAlignment="Left" IsHitTestVisible="False" Visibility="Collapsed"
|
||||||
|
AutoGenerateColumns="False" FontSize="15" AlternationCount="2"
|
||||||
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9"
|
||||||
|
ColumnHeaderHeight="40" >
|
||||||
|
<DataGrid.RowStyle >
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||||
|
<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"/>
|
||||||
|
<DataTrigger Binding="{Binding Amount}" Value="{x:Null}">
|
||||||
|
<Setter Property="Foreground" Value="#FFADADAD"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding Amount}" Value="0">
|
||||||
|
<Setter Property="Foreground" Value="Red"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</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.Step}" Binding="{Binding Step}" Width="60"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="200" Binding="{Binding ProductCode}"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding Grams}"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding Amount}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
<DataGrid x:Name="Parameter_set" HorizontalAlignment="Left" Visibility="Collapsed"
|
||||||
|
AutoGenerateColumns="False" FontSize="15" AlternationCount="2"
|
||||||
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9"
|
||||||
|
ColumnHeaderHeight="40" >
|
||||||
|
<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.ParameterSet}" Binding="{Binding Name}" Width="200"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="200" Binding="{Binding ParameterSet}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="{Binding Program_Name}" Height="30" Block.TextAlignment="Center">
|
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="{Binding Program_Name}" Height="30" Block.TextAlignment="Center">
|
||||||
<TextBlock.LayoutTransform>
|
<TextBlock.LayoutTransform>
|
||||||
<!--文字同样旋转90度-->
|
<!--文字同样旋转90度-->
|
||||||
|
|||||||
@@ -67,8 +67,18 @@ namespace DyeingComputer.View
|
|||||||
// ProgramgroupView_edit.IsEnabled = false;
|
// ProgramgroupView_edit.IsEnabled = false;
|
||||||
// ProgramgroupView_del.IsEnabled = false;
|
// ProgramgroupView_del.IsEnabled = false;
|
||||||
// ProgramgroupView_Insert.IsEnabled = false;
|
// ProgramgroupView_Insert.IsEnabled = false;
|
||||||
}
|
tblDatas.Columns.Add("Name", Type.GetType("System.String"));
|
||||||
|
tblDatas.Columns.Add("Value", Type.GetType("System.Double"));
|
||||||
|
tblDatas.Columns.Add("ID", Type.GetType("System.String"));
|
||||||
|
|
||||||
|
DataRow newRow;
|
||||||
|
newRow = tblDatas.NewRow();
|
||||||
|
newRow["Name"] = Properties.Resources.PumpSpeed;//
|
||||||
|
newRow["Value"] = MainWindowViewModel.Selet_dtm("1020");
|
||||||
|
newRow["ID"] = "1020";
|
||||||
|
tblDatas.Rows.Add(newRow);
|
||||||
|
}
|
||||||
|
DataTable tblDatas = new DataTable("Datas");
|
||||||
public static object workName;
|
public static object workName;
|
||||||
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
@@ -288,13 +298,25 @@ namespace DyeingComputer.View
|
|||||||
string ID = null;
|
string ID = null;
|
||||||
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
|
||||||
|
|
||||||
private void DyeingMachine_Click(object sender, RoutedEventArgs e)
|
private void DyeingMachine_Click(object sender, RoutedEventArgs e)//染色剂
|
||||||
{
|
{
|
||||||
|
Receip.Visibility = Visibility.Collapsed;
|
||||||
|
// Parameter_Scroll.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
private void Receipt_Click(object sender, RoutedEventArgs e)
|
private void Receipt_Click(object sender, RoutedEventArgs e)//领料单
|
||||||
{
|
{
|
||||||
|
Receip.Visibility = Visibility.Visible;
|
||||||
|
// Parameter_Scroll.Visibility = Visibility.Collapsed;
|
||||||
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
string sql_script = "select * from Dyelot where WorkOrder = '" + MainWindowViewModel.WorkNumder + "'";
|
||||||
|
Receip.ItemsSource = SQLiteHelpers.ExecuteDataSet(sql_script, null).Tables[0].DefaultView; //转换显示
|
||||||
|
SQLiteHelpers.Close(); //关闭连接
|
||||||
|
}
|
||||||
|
private void ParameterSet_Click(object sender, RoutedEventArgs e)//参数
|
||||||
|
{
|
||||||
|
// Parameter_Scroll.Visibility = Visibility.Visible;
|
||||||
|
Receip.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProgramgroupView_run_Click(object sender, RoutedEventArgs e)//运行/暂停
|
private void ProgramgroupView_run_Click(object sender, RoutedEventArgs e)//运行/暂停
|
||||||
@@ -307,11 +329,6 @@ namespace DyeingComputer.View
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ParameterSet_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||||
@@ -349,5 +366,9 @@ namespace DyeingComputer.View
|
|||||||
dt_TP = sql.Tables[0];
|
dt_TP = sql.Tables[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1593,27 +1593,31 @@ namespace DyeingComputer.ViewModel
|
|||||||
if (MI01 == 1)//
|
if (MI01 == 1)//
|
||||||
{
|
{
|
||||||
SYSlog = SYSlog + "\n" + Resources.ClothWheel + "M/min";
|
SYSlog = SYSlog + "\n" + Resources.ClothWheel + "M/min";
|
||||||
SYSlog = SYSlog + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1022")));
|
SYSlog = SYSlog + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1025")));
|
||||||
if (MT18 >= 2) SYSlog = SYSlog + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1023")));
|
if (MT18 >= 2) SYSlog = SYSlog + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1026")));
|
||||||
if (MT18 >= 3) SYSlog = SYSlog + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1024")));
|
if (MT18 >= 3) SYSlog = SYSlog + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1027")));
|
||||||
if (MT18 >= 4) SYSlog = SYSlog + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1025")));
|
if (MT18 >= 4) SYSlog = SYSlog + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1028")));
|
||||||
if (MT18 >= 5) SYSlog = SYSlog + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1026")));
|
if (MT18 >= 5) SYSlog = SYSlog + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1029")));
|
||||||
if (MT18 >= 6) SYSlog = SYSlog + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1027")));
|
if (MT18 >= 6) SYSlog = SYSlog + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1035")));
|
||||||
if (MT18 >= 7) SYSlog = SYSlog + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1028")));
|
if (MT18 >= 7) SYSlog = SYSlog + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1037")));
|
||||||
if (MT18 >= 8) SYSlog = SYSlog + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1029")));
|
|
||||||
if (MT18 >= 9) SYSlog = SYSlog + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1030")));
|
|
||||||
if (MT18 >= 10) SYSlog = SYSlog + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1031")));
|
|
||||||
SYSlog = SYSlog + "\n" + Resources.Cycletime + "Sec";
|
|
||||||
SYSlog = SYSlog + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1032")));
|
|
||||||
if (MT18 >= 2) SYSlog = SYSlog + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1033")));
|
|
||||||
if (MT18 >= 3) SYSlog = SYSlog + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1034")));
|
|
||||||
if (MT18 >= 4) SYSlog = SYSlog + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1035")));
|
|
||||||
if (MT18 >= 5) SYSlog = SYSlog + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1036")));
|
|
||||||
if (MT18 >= 6) SYSlog = SYSlog + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1037")));
|
|
||||||
if (MT18 >= 7) SYSlog = SYSlog + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1038")));
|
|
||||||
if (MT18 >= 8) SYSlog = SYSlog + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1039")));
|
if (MT18 >= 8) SYSlog = SYSlog + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1039")));
|
||||||
if (MT18 >= 9) SYSlog = SYSlog + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1040")));
|
if (MT18 >= 9) SYSlog = SYSlog + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1053")));
|
||||||
if (MT18 >= 10) SYSlog = SYSlog + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1041")));
|
if (MT18 >= 10) SYSlog = SYSlog + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1055")));
|
||||||
|
if (MT18 >= 11) SYSlog = SYSlog + " | " + "11 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1057")));
|
||||||
|
if (MT18 >= 12) SYSlog = SYSlog + " | " + "12 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1059")));
|
||||||
|
SYSlog = SYSlog + "\n" + Resources.Cycletime + "Sec";
|
||||||
|
SYSlog = SYSlog + "\n" + "1 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1030")));
|
||||||
|
if (MT18 >= 2) SYSlog = SYSlog + " | " + "2 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1031")));
|
||||||
|
if (MT18 >= 3) SYSlog = SYSlog + " | " + "3 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1032")));
|
||||||
|
if (MT18 >= 4) SYSlog = SYSlog + "\n" + "4 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1033")));
|
||||||
|
if (MT18 >= 5) SYSlog = SYSlog + " | " + "5 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1034")));
|
||||||
|
if (MT18 >= 6) SYSlog = SYSlog + " | " + "6 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1036")));
|
||||||
|
if (MT18 >= 7) SYSlog = SYSlog + "\n" + "7 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1038")));
|
||||||
|
if (MT18 >= 8) SYSlog = SYSlog + " | " + "8 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1040")));
|
||||||
|
if (MT18 >= 9) SYSlog = SYSlog + " | " + "9 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1054")));
|
||||||
|
if (MT18 >= 10) SYSlog = SYSlog + "\n" + "10 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1056")));
|
||||||
|
if (MT18 >= 11) SYSlog = SYSlog + " | " + "11 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1058")));
|
||||||
|
if (MT18 >= 12) SYSlog = SYSlog + " | " + "12 : " + string.Format("{0:D3}", Convert.ToInt16(Selet_dtm("1060")));
|
||||||
}//布轮信息
|
}//布轮信息
|
||||||
|
|
||||||
SYSlog = SYSlog + "\n-------------------------------------------------------";
|
SYSlog = SYSlog + "\n-------------------------------------------------------";
|
||||||
|
|||||||
Reference in new issue
Block a user