This commit is contained in:
sc committed 2024-09-19 00:05:11 +08:00
commit aa954eb61b
10 files changed
+117 -73

No files matched your search

+1
View File
@@ -6,6 +6,7 @@
xmlns:local="clr-namespace:DyeingComputer.View"
xmlns:lang="clr-namespace:DyeingComputer.Properties"
mc:Ignorable="d" Loaded="UserControl_Loaded"
KeyDown="UserControl_KeyDown"
d:DesignHeight="630" d:DesignWidth="1280">
<Grid Focusable="True">
<DataGrid x:Name="Grid" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
+8 -3
View File
@@ -100,9 +100,13 @@ namespace DyeingComputer.View
private void UserControl_KeyDown(object sender, KeyEventArgs e) //键盘监控
{
if (e.Key == Key.Y) //按键y
if ((MainWindowViewModel.WORK_RUN == 1) || (MainWindowViewModel.WORK_RUN == 0))//停止暂停时可以启用开始
{
if (e.Key == Key.Y) //按键y
{
MainWindowViewModel strart = new MainWindowViewModel();//实例
strart.STEP_START(Numder, Convert.ToDouble(P1), Convert.ToDouble(P2), Convert.ToDouble(P3), Convert.ToDouble(P4), Convert.ToDouble(P5));//传入参数开始
}
}
}
@@ -209,7 +213,7 @@ namespace DyeingComputer.View
string Numder = null;
string ID = null;
string P1, P2, P3, P4, P5;
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
int rownum = Grid.SelectedIndex;//获取鼠标选中行并定义变量
@@ -224,5 +228,6 @@ namespace DyeingComputer.View
P5 = (Grid.Columns[10].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第10列,
}
}
}
}