开机检查任务状态,步骤明细显示处理
This commit is contained in:
commit
5d630c5a86
2 files changed
+59
-48
No files matched your search
@@ -308,15 +308,6 @@ namespace DyeingComputer.View
|
||||
{
|
||||
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||
// Grid.DataContext = new MainWindowViewModel();
|
||||
if (workName != null)
|
||||
{
|
||||
GridSTEP.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MainWindowViewModel.WORK_RUN != 0) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||
}
|
||||
CountDown();
|
||||
}
|
||||
|
||||
private void UserControl_KeyDown(object sender, KeyEventArgs e) //键盘监控
|
||||
@@ -471,6 +462,16 @@ namespace DyeingComputer.View
|
||||
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Address_ButtonClicked);
|
||||
viewstop.ShowDialog();
|
||||
}
|
||||
private void ProgramgroupView_Jump_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
MainWindowViewModel.RUN_STEPID = Convert.ToInt16(ID);//插入步骤号
|
||||
MainWindowViewModel.STEP_START(Numder, Convert.ToDouble(P1), Convert.ToDouble(P2), Convert.ToDouble(P3),
|
||||
Convert.ToDouble(P4), Convert.ToDouble(P5));
|
||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Jump", "STEP = " + ID +
|
||||
";StepID=" + Numder + ";P1=" + P1 + ";P2=" + P2 + ";P3=" + P3 + ";P4=" + P4 + ";P5=" + P5);
|
||||
|
||||
}//跳步
|
||||
|
||||
string Numder = null;
|
||||
string ID = null;
|
||||
@@ -496,18 +497,7 @@ namespace DyeingComputer.View
|
||||
Parameter_set.Visibility = Visibility.Visible;
|
||||
Receip.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void ProgramgroupView_Jump_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
MainWindowViewModel.RUN_STEPID = Convert.ToInt16(ID);//插入步骤号
|
||||
MainWindowViewModel.STEP_START(Numder, Convert.ToDouble(P1),Convert.ToDouble(P2), Convert.ToDouble(P3),
|
||||
Convert.ToDouble(P4), Convert.ToDouble(P5));
|
||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Jump", "STEP = " + ID+
|
||||
";StepID=" + Numder + ";P1=" + P1 + ";P2=" + P2 + ";P3=" + P3 + ";P4=" + P4 + ";P5=" + P5);
|
||||
|
||||
}//跳步
|
||||
|
||||
|
||||
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
// if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||
@@ -520,32 +510,9 @@ namespace DyeingComputer.View
|
||||
P2 = (GridSTEP.Columns[7].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第7列,
|
||||
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
|
||||
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
|
||||
P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
|
||||
|
||||
|
||||
P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
|
||||
}
|
||||
}
|
||||
|
||||
public void CountDown()
|
||||
{
|
||||
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(3)//秒
|
||||
};
|
||||
timer1s.Tick += Tick_Event_1S;
|
||||
timer1s.Start();
|
||||
}
|
||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||
{
|
||||
if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||
if (sql != null)
|
||||
{
|
||||
dt_TP = sql.Tables[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user