diff --git a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
index 932c43b..fe0133c 100644
--- a/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
+++ b/Rs.DeweyTester/Flow/NormalFlow/DischargeFlow.cs
@@ -70,6 +70,7 @@ namespace Rs.MotionPlat.Flow
return instance;
}
}
+ public event Action workFinishedEvent;
private AlarmEntity alarmEntity;
Stopwatch timeout = new Stopwatch();
EDischargeFlowStep flowStep = EDischargeFlowStep.等待启动;
@@ -613,6 +614,8 @@ namespace Rs.MotionPlat.Flow
StockManager.Reset(3);
Ops.Stop();
takeSlotIndex = 1;
+ GlobalVar.Clear = false;
+ workFinishedEvent?.Invoke();
flowStep = EDischargeFlowStep.等待启动;
}
break;
diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs
index 318fe3c..77b75f7 100644
--- a/Rs.DeweyTester/FormMain.cs
+++ b/Rs.DeweyTester/FormMain.cs
@@ -30,7 +30,10 @@ namespace Rs.MotionPlat
public FormMain()
{
InitializeComponent();
-
+ DischargeFlow.Instance.workFinishedEvent += () => {
+ GlobalVar.Clear = false;
+ switchButton1.Checked = false;
+ };
}
private void timer1_Tick(object sender, EventArgs e)
diff --git a/Rs.DeweyTester/FormMain.designer.cs b/Rs.DeweyTester/FormMain.designer.cs
index 2a83fda..9388bae 100644
--- a/Rs.DeweyTester/FormMain.designer.cs
+++ b/Rs.DeweyTester/FormMain.designer.cs
@@ -32,8 +32,8 @@ namespace Rs.MotionPlat
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
@@ -247,14 +247,14 @@ namespace Rs.MotionPlat
this.dgv_errinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText;
this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
- dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle3.BackColor = System.Drawing.Color.Red;
- dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White;
- dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle1.BackColor = System.Drawing.Color.Red;
+ dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
+ dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgv_errinfo.ColumnHeadersHeight = 30;
this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1,
@@ -332,8 +332,8 @@ namespace Rs.MotionPlat
// Time
//
this.Time.DataPropertyName = "Time";
- dataGridViewCellStyle4.BackColor = System.Drawing.Color.Red;
- this.Time.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle2.BackColor = System.Drawing.Color.Red;
+ this.Time.DefaultCellStyle = dataGridViewCellStyle2;
this.Time.FillWeight = 25F;
this.Time.HeaderText = "Time";
this.Time.MinimumWidth = 6;
diff --git a/Rs.DeweyTester/FormMain.resx b/Rs.DeweyTester/FormMain.resx
index fc06a1b..915fbba 100644
--- a/Rs.DeweyTester/FormMain.resx
+++ b/Rs.DeweyTester/FormMain.resx
@@ -132,12 +132,6 @@
True
-
- True
-
-
- True
-
107, 17