This commit is contained in:
sc committed 2024-12-09 23:37:40 +08:00
commit 915aedd87b
5 files changed
+35 -25

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@
<ColumnDefinition Width="5"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<DataGrid Grid.Column="2" x:Name="Gridstep" AlternationCount="2" IsReadOnly="True" SelectionChanged="Gridstep_SelectionChanged"
<DataGrid Grid.Column="2" x:Name="Gridstep" AlternationCount="2" IsReadOnly="True" MouseDoubleClick="Gridstep_MouseDoubleClick"
d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
+7 -6
View File
@@ -59,10 +59,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
machin_LOG.Text = Properties.Resources.Machine + ":" + machine + " " + Properties.Resources.WorkOrder + ":" + workOrder;
}
}
}
private void Gridstep_SelectionChanged(object sender, SelectionChangedEventArgs e)
private void Gridstep_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
Paused.IsEnabled = true;
MainWindowViewModel.TechnologicalProcess_bool = false;
int rownum = Gridstep.SelectedIndex;//获取鼠标选中行并定义变量
if (rownum != -1)//判断鼠标定位是否有效
{
@@ -74,8 +76,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
P4 = (Gridstep.Columns[9].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第9列,
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
}
Paused.IsEnabled = true;
MainWindowViewModel.TechnologicalProcess_bool = false;
}
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
@@ -148,13 +148,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
viewstop.data = ID;
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(edit_ButtonClicked);
viewstop.ShowDialog();
MainWindowViewModel.TechnologicalProcess_bool = true;
}//编辑
string Numder = null;
string ID = null;
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
{
MainWindowViewModel.TechnologicalProcess_bool = true;
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
dat_821.Clear();
dat_821.Add("INSTRUCTION", "EDIT");
@@ -184,7 +185,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
viewstop.data = ID;
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked);
viewstop.ShowDialog();
}//插入
}//插入
private void Insert_ButtonClicked(object sender, AddressUpdateEventArgs e)//cr返回结果
{