diff --git a/Rs.Controls/RsTray.Designer.cs b/Rs.Controls/RsTray.Designer.cs index 60f8db0..3c44af2 100644 --- a/Rs.Controls/RsTray.Designer.cs +++ b/Rs.Controls/RsTray.Designer.cs @@ -28,12 +28,13 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.panel2 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.lblStatus = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.设置无料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.设置有料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.禁用ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -86,7 +87,7 @@ // // lblStatus // - this.lblStatus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.lblStatus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.lblStatus.Dock = System.Windows.Forms.DockStyle.Fill; this.lblStatus.Font = new System.Drawing.Font("宋体", 13F); this.lblStatus.ForeColor = System.Drawing.Color.White; diff --git a/Rs.Controls/RsTray.cs b/Rs.Controls/RsTray.cs index 324923a..7d309f3 100644 --- a/Rs.Controls/RsTray.cs +++ b/Rs.Controls/RsTray.cs @@ -40,6 +40,17 @@ namespace Rs.Controls public ESortDir SortDir { get; set; } = ESortDir.Horizontal; public event Action SlotClickEvent; + + private bool mShowStatus = true; + + public bool ShowStatus + { + get { return mShowStatus; } + set { mShowStatus = value; + lblStatus.Visible = mShowStatus; + } + } + private string mStatus; public string Status diff --git a/Rs.MotionPlat/FormMain.Designer.cs b/Rs.MotionPlat/FormMain.Designer.cs index b9fbc7f..c7a78c7 100644 --- a/Rs.MotionPlat/FormMain.Designer.cs +++ b/Rs.MotionPlat/FormMain.Designer.cs @@ -560,10 +560,12 @@ this.trayEmpty1.RowNum = 9; this.trayEmpty1.RowSpace = 3; this.trayEmpty1.SelectSlot = null; + this.trayEmpty1.ShowStatus = true; this.trayEmpty1.ShowText = false; this.trayEmpty1.SinglePoint = false; this.trayEmpty1.Size = new System.Drawing.Size(121, 399); this.trayEmpty1.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayEmpty1.Status = null; this.trayEmpty1.TabIndex = 0; this.trayEmpty1.TopSpaceHeight = 20; // @@ -587,10 +589,12 @@ this.trayInput.RowNum = 9; this.trayInput.RowSpace = 3; this.trayInput.SelectSlot = null; + this.trayInput.ShowStatus = true; this.trayInput.ShowText = false; this.trayInput.SinglePoint = false; this.trayInput.Size = new System.Drawing.Size(121, 399); this.trayInput.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayInput.Status = null; this.trayInput.TabIndex = 0; this.trayInput.TopSpaceHeight = 20; // @@ -614,10 +618,12 @@ this.trayOk.RowNum = 9; this.trayOk.RowSpace = 3; this.trayOk.SelectSlot = null; + this.trayOk.ShowStatus = true; this.trayOk.ShowText = false; this.trayOk.SinglePoint = false; this.trayOk.Size = new System.Drawing.Size(121, 399); this.trayOk.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayOk.Status = null; this.trayOk.TabIndex = 0; this.trayOk.TopSpaceHeight = 20; // @@ -642,10 +648,12 @@ this.trayNg.RowNum = 9; this.trayNg.RowSpace = 3; this.trayNg.SelectSlot = null; + this.trayNg.ShowStatus = true; this.trayNg.ShowText = false; this.trayNg.SinglePoint = false; this.trayNg.Size = new System.Drawing.Size(121, 399); this.trayNg.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayNg.Status = null; this.trayNg.TabIndex = 0; this.trayNg.TopSpaceHeight = 20; // @@ -670,10 +678,12 @@ this.trayMulti.RowNum = 9; this.trayMulti.RowSpace = 3; this.trayMulti.SelectSlot = null; + this.trayMulti.ShowStatus = true; this.trayMulti.ShowText = false; this.trayMulti.SinglePoint = false; this.trayMulti.Size = new System.Drawing.Size(121, 399); this.trayMulti.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayMulti.Status = null; this.trayMulti.TabIndex = 0; this.trayMulti.TopSpaceHeight = 20; // @@ -698,10 +708,12 @@ this.trayEmpty2.RowNum = 9; this.trayEmpty2.RowSpace = 3; this.trayEmpty2.SelectSlot = null; + this.trayEmpty2.ShowStatus = true; this.trayEmpty2.ShowText = false; this.trayEmpty2.SinglePoint = false; this.trayEmpty2.Size = new System.Drawing.Size(124, 399); this.trayEmpty2.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayEmpty2.Status = null; this.trayEmpty2.TabIndex = 0; this.trayEmpty2.TopSpaceHeight = 20; // @@ -750,10 +762,12 @@ this.trayTurnover.RowNum = 4; this.trayTurnover.RowSpace = 3; this.trayTurnover.SelectSlot = null; + this.trayTurnover.ShowStatus = true; this.trayTurnover.ShowText = false; this.trayTurnover.SinglePoint = false; this.trayTurnover.Size = new System.Drawing.Size(244, 193); this.trayTurnover.SortDir = Rs.Controls.ESortDir.Horizontal; + this.trayTurnover.Status = null; this.trayTurnover.TabIndex = 1; this.trayTurnover.TopSpaceHeight = 20; //