diff --git a/Rs.SkyLine/Home.cs b/Rs.SkyLine/Home.cs index 897103b..0fb3e67 100644 --- a/Rs.SkyLine/Home.cs +++ b/Rs.SkyLine/Home.cs @@ -249,7 +249,22 @@ namespace Rs.MotionPlat { GC.Collect(); if(MachineManage.Instance.MachineStatus.ToString()!=lblMachineState.Text) + { + if(MachineManage.Instance.MachineStatus== EMachineStatus.NotInit) + { + this.panel1.BackColor = Color.Red; + } + else if(MachineManage.Instance.MachineStatus== EMachineStatus.Homing || MachineManage.Instance.MachineStatus == EMachineStatus.Stop) + { + this.panel1.BackColor = Color.FromArgb(192, 192, 0); + } + else + { + this.panel1.BackColor = Color.FromArgb(46, 46, 46); + } lblMachineState.Text=MachineManage.Instance.MachineStatus.ToString(); + } + if(MachineManage.Instance.GetLoadUnloadStatus().ToString() != lblRunState.Text.Replace("RunState:","")) { lblRunState.Text = "RunState:" + MachineManage.Instance.GetLoadUnloadStatus().ToString(); @@ -264,7 +279,10 @@ namespace Rs.MotionPlat if (TurnoverFlow.Instance.GetStep().ToString() != lblTurnoverFlow.Text.Replace("Turnover:", "")) lblTurnoverFlow.Text = "Turnover:" + TurnoverFlow.Instance.GetStep().ToString(); } - + if(MachineManage.Instance.InitializeState.ToString()!= lblInitializeState.Text.Replace("InitializeState:", "")) + { + lblInitializeState.Text = $"InitializeState:{MachineManage.Instance.InitializeState.ToString()}"; + } Process proc = Process.GetCurrentProcess(); if (proc != null) { diff --git a/Rs.SkyLine/Home.designer.cs b/Rs.SkyLine/Home.designer.cs index 2c90be3..5739732 100644 --- a/Rs.SkyLine/Home.designer.cs +++ b/Rs.SkyLine/Home.designer.cs @@ -40,6 +40,8 @@ this.btnSystem = new Rs.Controls.ButtonEx(); this.btnRecipe = new Rs.Controls.ButtonEx(); this.panel1 = new System.Windows.Forms.Panel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.lblInitializeState = new System.Windows.Forms.Label(); this.panel5 = new System.Windows.Forms.Panel(); this.lblMemory = new System.Windows.Forms.Label(); this.panel4 = new System.Windows.Forms.Panel(); @@ -58,6 +60,7 @@ this.timer2 = new System.Windows.Forms.Timer(this.components); this.tableLayoutPanel2.SuspendLayout(); this.panel1.SuspendLayout(); + this.panel6.SuspendLayout(); this.panel5.SuspendLayout(); this.panel4.SuspendLayout(); this.panel3.SuspendLayout(); @@ -291,6 +294,7 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(46)))), ((int)(((byte)(46))))); + this.panel1.Controls.Add(this.panel6); this.panel1.Controls.Add(this.panel5); this.panel1.Controls.Add(this.panel4); this.panel1.Controls.Add(this.panel3); @@ -303,6 +307,26 @@ this.panel1.Size = new System.Drawing.Size(1594, 33); this.panel1.TabIndex = 7; // + // panel6 + // + this.panel6.Controls.Add(this.lblInitializeState); + this.panel6.Dock = System.Windows.Forms.DockStyle.Left; + this.panel6.Location = new System.Drawing.Point(827, 0); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(237, 33); + this.panel6.TabIndex = 6; + // + // lblInitializeState + // + this.lblInitializeState.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblInitializeState.ForeColor = System.Drawing.Color.White; + this.lblInitializeState.Location = new System.Drawing.Point(0, 0); + this.lblInitializeState.Name = "lblInitializeState"; + this.lblInitializeState.Size = new System.Drawing.Size(237, 33); + this.lblInitializeState.TabIndex = 3; + this.lblInitializeState.Text = "InitializeState:"; + this.lblInitializeState.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // panel5 // this.panel5.Controls.Add(this.lblMemory); @@ -328,7 +352,7 @@ this.panel4.Dock = System.Windows.Forms.DockStyle.Left; this.panel4.Location = new System.Drawing.Point(546, 0); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(215, 33); + this.panel4.Size = new System.Drawing.Size(281, 33); this.panel4.TabIndex = 4; // // lblTurnoverFlow @@ -337,7 +361,7 @@ this.lblTurnoverFlow.ForeColor = System.Drawing.Color.White; this.lblTurnoverFlow.Location = new System.Drawing.Point(0, 0); this.lblTurnoverFlow.Name = "lblTurnoverFlow"; - this.lblTurnoverFlow.Size = new System.Drawing.Size(215, 33); + this.lblTurnoverFlow.Size = new System.Drawing.Size(281, 33); this.lblTurnoverFlow.TabIndex = 3; this.lblTurnoverFlow.Text = "Turnover:"; this.lblTurnoverFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -476,6 +500,7 @@ this.Controls.SetChildIndex(this.panel_main, 0); this.tableLayoutPanel2.ResumeLayout(false); this.panel1.ResumeLayout(false); + this.panel6.ResumeLayout(false); this.panel5.ResumeLayout(false); this.panel4.ResumeLayout(false); this.panel3.ResumeLayout(false); @@ -516,5 +541,7 @@ private System.Windows.Forms.Panel panel5; private System.Windows.Forms.Label lblMemory; private System.Windows.Forms.Timer timer2; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label lblInitializeState; } } \ No newline at end of file