|
@ -49,6 +49,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
|
|
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
|
|
{ |
|
|
{ |
|
|
Stop.IsEnabled = true; |
|
|
Stop.IsEnabled = true; |
|
|
|
|
|
MainWindowViewModel.TechnologicalProcess_bool = true; |
|
|
int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
|
|
|
int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
|
|
|
if (rownum != -1)//判断鼠标定位是否有效
|
|
|
if (rownum != -1)//判断鼠标定位是否有效
|
|
|
{ |
|
|
{ |
|
@ -56,7 +57,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
workOrder = (Griddata.Columns[2].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
|
|
workOrder = (Griddata.Columns[2].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
|
|
dyelot = (Griddata.Columns[3].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
|
|
dyelot = (Griddata.Columns[3].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
|
|
|
|
|
|
|
|
machin_LOG.Text = Properties.Resources.Machine+":"+machine+" "+Properties.Resources.WorkOrder+":"+workOrder; |
|
|
machin_LOG.Text = Properties.Resources.Machine + ":" + machine + " " + Properties.Resources.WorkOrder + ":" + workOrder; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -74,6 +75,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
|
|
|
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
|
|
|
} |
|
|
} |
|
|
Paused.IsEnabled = true; |
|
|
Paused.IsEnabled = true; |
|
|
|
|
|
MainWindowViewModel.TechnologicalProcess_bool = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e) |
|
|
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e) |
|
@ -105,6 +107,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
edit.IsEnabled = false; |
|
|
edit.IsEnabled = false; |
|
|
Paused.IsEnabled = false; |
|
|
Paused.IsEnabled = false; |
|
|
Resume.IsEnabled = false; |
|
|
Resume.IsEnabled = false; |
|
|
|
|
|
Delete.IsEnabled = false; |
|
|
|
|
|
MainWindowViewModel.TechnologicalProcess_bool = true; |
|
|
}//恢复
|
|
|
}//恢复
|
|
|
private void ListViewItem_Paused(object sender, MouseButtonEventArgs e) |
|
|
private void ListViewItem_Paused(object sender, MouseButtonEventArgs e) |
|
|
{ |
|
|
{ |
|
@ -150,6 +154,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0"; |
|
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0"; |
|
|
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
|
|
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
|
|
{ |
|
|
{ |
|
|
|
|
|
MainWindowViewModel.TechnologicalProcess_bool = true; |
|
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>(); |
|
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>(); |
|
|
dat_821.Clear(); |
|
|
dat_821.Clear(); |
|
|
dat_821.Add("INSTRUCTION", "EDIT"); |
|
|
dat_821.Add("INSTRUCTION", "EDIT"); |
|
@ -180,8 +185,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked); |
|
|
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked); |
|
|
viewstop.ShowDialog(); |
|
|
viewstop.ShowDialog(); |
|
|
}//插入
|
|
|
}//插入
|
|
|
private void Insert_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
|
|
private void Insert_ButtonClicked(object sender, AddressUpdateEventArgs e)//cr返回结果
|
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
MainWindowViewModel.TechnologicalProcess_bool = true; |
|
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>(); |
|
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>(); |
|
|
dat_821.Clear(); |
|
|
dat_821.Clear(); |
|
|
dat_821.Add("INSTRUCTION", "INSERT"); |
|
|
dat_821.Add("INSTRUCTION", "INSERT"); |
|
@ -236,11 +243,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
int State_ = Convert.ToInt16(drEmployee.Field<object>("State")); |
|
|
int State_ = Convert.ToInt16(drEmployee.Field<object>("State")); |
|
|
int index = Convert.ToInt16(drEmployee.Field<object>("ID")); |
|
|
int index = Convert.ToInt16(drEmployee.Field<object>("ID")); |
|
|
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
|
|
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
|
|
{ |
|
|
{ |
|
|
if (machines_info == 0) |
|
|
if (machines_info == 0) |
|
|
{ |
|
|
{ |
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID=index, |
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString |
|
|
DAT= "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) }); |
|
|
{ |
|
|
|
|
|
ID = index, |
|
|
|
|
|
DAT = "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) |
|
|
|
|
|
}); |
|
|
}//信息
|
|
|
}//信息
|
|
|
else if (machines_info == 1) |
|
|
else if (machines_info == 1) |
|
|
{ |
|
|
{ |
|
@ -248,24 +258,24 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
}//输送状态
|
|
|
}//输送状态
|
|
|
else if (machines_info == 2) |
|
|
else if (machines_info == 2) |
|
|
{ |
|
|
{ |
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID = index, |
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString |
|
|
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) }); |
|
|
{ |
|
|
}//单据
|
|
|
ID = index, |
|
|
} |
|
|
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) |
|
|
else |
|
|
}); |
|
|
{ |
|
|
}//单据
|
|
|
MainWindowViewModel.MachineLOG = null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString |
|
|
{ |
|
|
{ |
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID = index, |
|
|
ID = index, |
|
|
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) }); |
|
|
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
MainWindowViewModel.MachineLOG = null; |
|
|
MainWindowViewModel.dt_TP.Clear(); |
|
|
MainWindowViewModel.dt_TP.Clear(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
catch (Exception ) |
|
|
catch (Exception ) |
|
|
{ |
|
|
{ |
|
|