From edc37f77fa57f8923ba28c5c84c29985ea555de8 Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期六, 11 七月 2020 17:05:01 +0800 Subject: [PATCH] 界面修改 --- src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs | 53 +++++++------------------- src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs | 18 ++++---- src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs | 28 +++++++------ 3 files changed, 39 insertions(+), 60 deletions(-) diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs index 6bc91d2..0e3e8f1 100644 --- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs +++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisOperation.Designer.cs @@ -140,11 +140,11 @@ // // textBoxP2PVel // - this.textBoxP2PVel.Location = new System.Drawing.Point(154, 34); + this.textBoxP2PVel.Location = new System.Drawing.Point(340, 7); this.textBoxP2PVel.Name = "textBoxP2PVel"; this.textBoxP2PVel.Size = new System.Drawing.Size(116, 21); this.textBoxP2PVel.TabIndex = 5; - this.textBoxP2PVel.Text = "10"; + this.textBoxP2PVel.Text = "50"; // // textBoxP2PPrfPosition // @@ -164,7 +164,7 @@ // // textBoxP2PAcc // - this.textBoxP2PAcc.Location = new System.Drawing.Point(340, 4); + this.textBoxP2PAcc.Location = new System.Drawing.Point(154, 35); this.textBoxP2PAcc.Name = "textBoxP2PAcc"; this.textBoxP2PAcc.Size = new System.Drawing.Size(116, 21); this.textBoxP2PAcc.TabIndex = 5; @@ -173,7 +173,7 @@ // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(92, 37); + this.label7.Location = new System.Drawing.Point(278, 10); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(41, 12); this.label7.TabIndex = 4; @@ -186,7 +186,7 @@ this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(65, 12); this.label6.TabIndex = 4; - this.label6.Text = "瑙勫垝浣嶇疆锛�"; + this.label6.Text = "鐩爣浣嶇疆锛�"; // // label9 // @@ -200,7 +200,7 @@ // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(278, 7); + this.label8.Location = new System.Drawing.Point(92, 38); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(53, 12); this.label8.TabIndex = 4; @@ -236,7 +236,7 @@ // // textBoxJogDec // - this.textBoxJogDec.Location = new System.Drawing.Point(340, 4); + this.textBoxJogDec.Location = new System.Drawing.Point(340, 34); this.textBoxJogDec.Name = "textBoxJogDec"; this.textBoxJogDec.Size = new System.Drawing.Size(116, 21); this.textBoxJogDec.TabIndex = 5; @@ -264,7 +264,7 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(278, 7); + this.label5.Location = new System.Drawing.Point(278, 37); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(53, 12); this.label5.TabIndex = 4; @@ -276,7 +276,7 @@ this.textBoxJogVel.Name = "textBoxJogVel"; this.textBoxJogVel.Size = new System.Drawing.Size(116, 21); this.textBoxJogVel.TabIndex = 5; - this.textBoxJogVel.Text = "5"; + this.textBoxJogVel.Text = "50"; // // label4 // diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs index 842650f..0e89807 100644 --- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs +++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.Designer.cs @@ -38,11 +38,9 @@ this.ioIndicatorCtrl1 = new Bro.UI.Model.Winform.IOIndicatorCtrl(); this.textBoxCurVel = new System.Windows.Forms.TextBox(); this.textBoxPrfVel = new System.Windows.Forms.TextBox(); - this.textBoxCurPosition = new System.Windows.Forms.TextBox(); this.textBoxPrfPositon = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.timerAxisStatus = new System.Windows.Forms.Timer(this.components); this.groupBoxAxisStatus.SuspendLayout(); @@ -58,16 +56,14 @@ this.groupBoxAxisStatus.Controls.Add(this.ioIndicatorCtrl1); this.groupBoxAxisStatus.Controls.Add(this.textBoxCurVel); this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfVel); - this.groupBoxAxisStatus.Controls.Add(this.textBoxCurPosition); this.groupBoxAxisStatus.Controls.Add(this.textBoxPrfPositon); this.groupBoxAxisStatus.Controls.Add(this.label5); this.groupBoxAxisStatus.Controls.Add(this.label4); - this.groupBoxAxisStatus.Controls.Add(this.label3); this.groupBoxAxisStatus.Controls.Add(this.label2); this.groupBoxAxisStatus.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBoxAxisStatus.Location = new System.Drawing.Point(0, 0); this.groupBoxAxisStatus.Name = "groupBoxAxisStatus"; - this.groupBoxAxisStatus.Size = new System.Drawing.Size(440, 148); + this.groupBoxAxisStatus.Size = new System.Drawing.Size(440, 111); this.groupBoxAxisStatus.TabIndex = 5; this.groupBoxAxisStatus.TabStop = false; this.groupBoxAxisStatus.Text = "杞寸姸鎬�"; @@ -76,7 +72,7 @@ // this.ioIndicatorCtrl2.Desc = "浼烘湇浣胯兘"; this.ioIndicatorCtrl2.IsOn = null; - this.ioIndicatorCtrl2.Location = new System.Drawing.Point(344, 22); + this.ioIndicatorCtrl2.Location = new System.Drawing.Point(223, 22); this.ioIndicatorCtrl2.Name = "ioIndicatorCtrl2"; this.ioIndicatorCtrl2.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl2.TabIndex = 4; @@ -85,7 +81,7 @@ // this.ioIndicatorCtrl10.Desc = "杩愬姩鍑洪敊"; this.ioIndicatorCtrl10.IsOn = null; - this.ioIndicatorCtrl10.Location = new System.Drawing.Point(223, 82); + this.ioIndicatorCtrl10.Location = new System.Drawing.Point(223, 75); this.ioIndicatorCtrl10.Name = "ioIndicatorCtrl10"; this.ioIndicatorCtrl10.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl10.TabIndex = 4; @@ -94,7 +90,7 @@ // this.ioIndicatorCtrl9.Desc = "杩愬姩鐘舵��"; this.ioIndicatorCtrl9.IsOn = null; - this.ioIndicatorCtrl9.Location = new System.Drawing.Point(223, 112); + this.ioIndicatorCtrl9.Location = new System.Drawing.Point(223, 48); this.ioIndicatorCtrl9.Name = "ioIndicatorCtrl9"; this.ioIndicatorCtrl9.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl9.TabIndex = 4; @@ -103,7 +99,7 @@ // this.ioIndicatorCtrl8.Desc = "璐熼檺浣�"; this.ioIndicatorCtrl8.IsOn = null; - this.ioIndicatorCtrl8.Location = new System.Drawing.Point(344, 52); + this.ioIndicatorCtrl8.Location = new System.Drawing.Point(344, 48); this.ioIndicatorCtrl8.Name = "ioIndicatorCtrl8"; this.ioIndicatorCtrl8.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl8.TabIndex = 4; @@ -112,7 +108,7 @@ // this.ioIndicatorCtrl6.Desc = "姝i檺浣�"; this.ioIndicatorCtrl6.IsOn = null; - this.ioIndicatorCtrl6.Location = new System.Drawing.Point(223, 52); + this.ioIndicatorCtrl6.Location = new System.Drawing.Point(344, 19); this.ioIndicatorCtrl6.Name = "ioIndicatorCtrl6"; this.ioIndicatorCtrl6.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl6.TabIndex = 4; @@ -121,14 +117,14 @@ // this.ioIndicatorCtrl1.Desc = "椹卞姩鎶ヨ"; this.ioIndicatorCtrl1.IsOn = null; - this.ioIndicatorCtrl1.Location = new System.Drawing.Point(223, 22); + this.ioIndicatorCtrl1.Location = new System.Drawing.Point(344, 75); this.ioIndicatorCtrl1.Name = "ioIndicatorCtrl1"; this.ioIndicatorCtrl1.Size = new System.Drawing.Size(90, 24); this.ioIndicatorCtrl1.TabIndex = 4; // // textBoxCurVel // - this.textBoxCurVel.Location = new System.Drawing.Point(76, 113); + this.textBoxCurVel.Location = new System.Drawing.Point(76, 79); this.textBoxCurVel.Name = "textBoxCurVel"; this.textBoxCurVel.ReadOnly = true; this.textBoxCurVel.Size = new System.Drawing.Size(116, 21); @@ -136,23 +132,15 @@ // // textBoxPrfVel // - this.textBoxPrfVel.Location = new System.Drawing.Point(76, 84); + this.textBoxPrfVel.Location = new System.Drawing.Point(76, 50); this.textBoxPrfVel.Name = "textBoxPrfVel"; this.textBoxPrfVel.ReadOnly = true; this.textBoxPrfVel.Size = new System.Drawing.Size(116, 21); this.textBoxPrfVel.TabIndex = 3; // - // textBoxCurPosition - // - this.textBoxCurPosition.Location = new System.Drawing.Point(76, 55); - this.textBoxCurPosition.Name = "textBoxCurPosition"; - this.textBoxCurPosition.ReadOnly = true; - this.textBoxCurPosition.Size = new System.Drawing.Size(116, 21); - this.textBoxCurPosition.TabIndex = 3; - // // textBoxPrfPositon // - this.textBoxPrfPositon.Location = new System.Drawing.Point(76, 23); + this.textBoxPrfPositon.Location = new System.Drawing.Point(76, 22); this.textBoxPrfPositon.Name = "textBoxPrfPositon"; this.textBoxPrfPositon.ReadOnly = true; this.textBoxPrfPositon.Size = new System.Drawing.Size(116, 21); @@ -161,7 +149,7 @@ // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(14, 116); + this.label5.Location = new System.Drawing.Point(14, 82); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(65, 12); this.label5.TabIndex = 2; @@ -170,29 +158,20 @@ // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(14, 87); + this.label4.Location = new System.Drawing.Point(14, 53); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(65, 12); this.label4.TabIndex = 2; this.label4.Text = "瑙勫垝閫熷害锛�"; // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(14, 58); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(65, 12); - this.label3.TabIndex = 2; - this.label3.Text = "瀹為檯浣嶇疆锛�"; - // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(14, 26); + this.label2.Location = new System.Drawing.Point(14, 25); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(65, 12); this.label2.TabIndex = 2; - this.label2.Text = "瑙勫垝浣嶇疆锛�"; + this.label2.Text = "鐩爣浣嶇疆锛�"; // // timerAxisStatus // @@ -206,7 +185,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBoxAxisStatus); this.Name = "CtrlMotionCardAxisStatus"; - this.Size = new System.Drawing.Size(440, 148); + this.Size = new System.Drawing.Size(440, 111); this.groupBoxAxisStatus.ResumeLayout(false); this.groupBoxAxisStatus.PerformLayout(); this.ResumeLayout(false); @@ -224,11 +203,9 @@ private Model.Winform.IOIndicatorCtrl ioIndicatorCtrl1; private System.Windows.Forms.TextBox textBoxCurVel; private System.Windows.Forms.TextBox textBoxPrfVel; - private System.Windows.Forms.TextBox textBoxCurPosition; private System.Windows.Forms.TextBox textBoxPrfPositon; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Timer timerAxisStatus; } diff --git a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs index 7411bd0..02042d2 100644 --- a/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs +++ b/src/Bro.UI.Device.Winform/MotionCard/CtrlMotionCardAxisStatus.cs @@ -24,8 +24,8 @@ private int _axisIndex { get; set; } private string _axisName { get; set; } - public AxisMovingStatus _axisMovingStatus = new AxisMovingStatus(); - public CtrlMotionCardAxisStatus(IDevice device,int axisIndex,string axisName) + public AxisMovingStatus _axisMovingStatus; + public CtrlMotionCardAxisStatus(IDevice device, int axisIndex, string axisName) { InitializeComponent(); Device = device; @@ -37,19 +37,21 @@ private void RefreshStatus(object sender, EventArgs e) { _axisMovingStatus = MotionCard.AxisStatusList.FirstOrDefault(u => u.AxisIndex == _axisIndex); - textBoxPrfPositon.Text = _axisMovingStatus.Destination.ToString(); - textBoxCurPosition.Text = _axisMovingStatus.CurPosition.ToString(); - textBoxPrfVel.Text = _axisMovingStatus.PrfVelocity.ToString(); - textBoxCurVel.Text = _axisMovingStatus.CurVelocity.ToString(); - int axis_sts = _axisMovingStatus.AxisStatus; + if (_axisMovingStatus != null) + { + textBoxPrfPositon.Text = _axisMovingStatus.Destination.ToString(); + textBoxPrfVel.Text = _axisMovingStatus.PrfVelocity.ToString(); + textBoxCurVel.Text = _axisMovingStatus.CurVelocity.ToString(); + int axis_sts = _axisMovingStatus.AxisStatus; - ioIndicatorCtrl1.IsOn = (axis_sts & 0x2) == 0;//椹卞姩鎶ヨ - ioIndicatorCtrl2.IsOn = (axis_sts & 0x200) == 0;//浼烘湇浣胯兘 - ioIndicatorCtrl6.IsOn = (axis_sts & 0x20) == 0;//姝i檺浣� - ioIndicatorCtrl8.IsOn = (axis_sts & 0x40) == 0;//璐熼檺浣� - ioIndicatorCtrl9.IsOn = (axis_sts & 0x400) == 0;//杩愬姩鐘舵�� - ioIndicatorCtrl10.IsOn = (axis_sts & 0x10) == 0;//杩愬姩鍑洪敊 + ioIndicatorCtrl1.IsOn = (axis_sts & 0x2) == 0;//椹卞姩鎶ヨ + ioIndicatorCtrl2.IsOn = (axis_sts & 0x200) != 0;//浼烘湇浣胯兘 + ioIndicatorCtrl6.IsOn = (axis_sts & 0x20) == 0;//姝i檺浣� + ioIndicatorCtrl8.IsOn = (axis_sts & 0x40) == 0;//璐熼檺浣� + ioIndicatorCtrl9.IsOn = (axis_sts & 0x400) == 0;//杩愬姩鐘舵�� + ioIndicatorCtrl10.IsOn = (axis_sts & 0x10) == 0;//杩愬姩鍑洪敊 + } } } } -- Gitblit v1.8.0