Kaynağa Gözat

更新控件

洺瑀 葛 1 yıl önce
ebeveyn
işleme
c1bc958b05

+ 11 - 7
ProjectBase.Controls/FEM_Controls/CircleLabel.cs

@@ -8,8 +8,18 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
+
+
 namespace ProjectBase.Controls
 {
+    public enum LedState
+    {
+        NG = 0,
+        OK = 1,
+        DEFAULT = -1,
+
+    }
+
     public partial class CircleLabel : UserControl
     {
         public CircleLabel()
@@ -60,13 +70,7 @@ namespace ProjectBase.Controls
             }
         }
 
-        public enum LedState
-        {
-            NG = 0,
-            OK = 1,
-            DEFAULT= -1,
-
-        }
+     
 
         private void CircleLabel_FontChanged(object sender, EventArgs e)
         {

+ 2 - 2
ProjectBase.Controls/FEM_Controls/LeftLabels.Designer.cs

@@ -145,11 +145,11 @@
             this.tableLayoutPanel1.SetRowSpan(this.circleLabel1, 2);
             this.circleLabel1.Size = new System.Drawing.Size(109, 117);
             this.circleLabel1.TabIndex = 5;
-            this.circleLabel1.WorkState = ProjectBase.Controls.CircleLabel.LedState.OK;
+            this.circleLabel1.WorkState = ProjectBase.Controls.LedState.OK;
             // 
             // LeftLabels
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(19F, 41F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(16F, 35F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.tableLayoutPanel1);
             this.Font = new System.Drawing.Font("微软雅黑", 16F);

+ 7 - 0
ProjectBase.Controls/FEM_Controls/LeftLabels.cs

@@ -52,5 +52,12 @@ namespace ProjectBase.Controls
             get { return circleLabel1.Text; }
             set { circleLabel1.Text = value; }
         }
+
+        [Browsable(true)]
+        public LedState WorkState
+        {
+            get { return circleLabel1.WorkState; }
+            set { circleLabel1.WorkState = value; }
+        }
     }
 }

+ 1 - 1
ProjectBase.Controls/FEM_Controls/RightLabels.Designer.cs

@@ -140,7 +140,7 @@
             this.tableLayoutPanel1.SetRowSpan(this.circleLabel1, 2);
             this.circleLabel1.Size = new System.Drawing.Size(107, 117);
             this.circleLabel1.TabIndex = 5;
-            this.circleLabel1.WorkState = ProjectBase.Controls.CircleLabel.LedState.OK;
+            this.circleLabel1.WorkState = ProjectBase.Controls.LedState.OK;
             // 
             // RightLabels
             // 

+ 8 - 0
ProjectBase.Controls/FEM_Controls/RightLabels.cs

@@ -52,5 +52,13 @@ namespace ProjectBase.Controls
             get { return circleLabel1.Text; }
             set { circleLabel1.Text = value; }
         }
+
+
+        [Browsable(true)]
+        public LedState WorkState
+        {
+            get { return circleLabel1.WorkState; }
+            set { circleLabel1.WorkState = value; }
+        }
     }
 }

+ 0 - 6
SIMDP.BLL/SIMDP.BLL.csproj

@@ -32,12 +32,6 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
-      <HintPath>..\packages\Common.Logging.3.3.1\lib\net40\Common.Logging.dll</HintPath>
-    </Reference>
-    <Reference Include="Common.Logging.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
-      <HintPath>..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll</HintPath>
-    </Reference>
     <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
       <HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
     </Reference>

+ 5 - 5
SIMDP.Project/Form/FormColorContrast.Designer.cs

@@ -192,10 +192,10 @@ namespace SIMDP.Project
             this.labelControl5.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.labelControl5.Appearance.Options.UseFont = true;
-            this.labelControl5.Location = new System.Drawing.Point(332, 8);
+            this.labelControl5.Location = new System.Drawing.Point(319, 6);
             this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.labelControl5.Name = "labelControl5";
-            this.labelControl5.Size = new System.Drawing.Size(60, 14);
+            this.labelControl5.Size = new System.Drawing.Size(75, 18);
             this.labelControl5.TabIndex = 25;
             this.labelControl5.Text = "解析显示:";
             // 
@@ -212,7 +212,7 @@ namespace SIMDP.Project
             this.lookUp_TaskState.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
             this.lookUp_TaskState.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.lookUp_TaskState.Size = new System.Drawing.Size(73, 22);
+            this.lookUp_TaskState.Size = new System.Drawing.Size(73, 26);
             this.lookUp_TaskState.TabIndex = 26;
             this.lookUp_TaskState.EditValueChanged += new System.EventHandler(this.lookUp_TaskState_EditValueChanged);
             // 
@@ -251,13 +251,13 @@ namespace SIMDP.Project
             this.label_PageInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.label_PageInfo.Location = new System.Drawing.Point(3, 259);
             this.label_PageInfo.Name = "label_PageInfo";
-            this.label_PageInfo.Size = new System.Drawing.Size(75, 14);
+            this.label_PageInfo.Size = new System.Drawing.Size(92, 18);
             this.label_PageInfo.TabIndex = 10;
             this.label_PageInfo.Text = "共 {0} 条记录";
             // 
             // FormColorContrast
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(722, 284);
             this.Controls.Add(this.panel1);

+ 4 - 4
SIMDP.Project/Form/FormCurrentTask.Designer.cs

@@ -289,7 +289,7 @@ namespace SIMDP.Project
             // lookUp_TaskState
             // 
             this.lookUp_TaskState.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.lookUp_TaskState.Location = new System.Drawing.Point(105, 8);
+            this.lookUp_TaskState.Location = new System.Drawing.Point(105, 6);
             this.lookUp_TaskState.Name = "lookUp_TaskState";
             this.lookUp_TaskState.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lookUp_TaskState.Properties.Appearance.Options.UseFont = true;
@@ -343,7 +343,7 @@ namespace SIMDP.Project
             // 
             this.txt_VINInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.txt_VINInput.Enabled = false;
-            this.txt_VINInput.Location = new System.Drawing.Point(471, 9);
+            this.txt_VINInput.Location = new System.Drawing.Point(471, 7);
             this.txt_VINInput.Name = "txt_VINInput";
             this.txt_VINInput.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.txt_VINInput.Properties.Appearance.Options.UseFont = true;
@@ -368,7 +368,7 @@ namespace SIMDP.Project
             // 
             this.txt_ModelInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.txt_ModelInput.Enabled = false;
-            this.txt_ModelInput.Location = new System.Drawing.Point(835, 9);
+            this.txt_ModelInput.Location = new System.Drawing.Point(835, 7);
             this.txt_ModelInput.Name = "txt_ModelInput";
             this.txt_ModelInput.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.txt_ModelInput.Properties.Appearance.Options.UseFont = true;
@@ -382,7 +382,7 @@ namespace SIMDP.Project
             // 
             this.lookUp_Color.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.lookUp_Color.Enabled = false;
-            this.lookUp_Color.Location = new System.Drawing.Point(1078, 8);
+            this.lookUp_Color.Location = new System.Drawing.Point(1078, 6);
             this.lookUp_Color.Name = "lookUp_Color";
             this.lookUp_Color.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lookUp_Color.Properties.Appearance.Options.UseFont = true;

+ 0 - 2
SIMDP.Project/Form/FormCurrentTask.cs

@@ -703,8 +703,6 @@ namespace SIMDP.Project
 
         public static event delegateResetVertify2 manualForceMatchSuccess;
 
-        public static event delegateResetVertify2 manualForceReleaseEmpty;
-
         public delegate void delegateResetVertify3(short model, short color, string vin);
 
         public static event delegateResetVertify3 manualForceWrite2Tighting;

+ 5 - 5
SIMDP.Project/Form/FormModelContrast.Designer.cs

@@ -95,10 +95,10 @@ namespace SIMDP.Project
             this.labelControl5.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.labelControl5.Appearance.Options.UseFont = true;
-            this.labelControl5.Location = new System.Drawing.Point(352, 8);
+            this.labelControl5.Location = new System.Drawing.Point(337, 6);
             this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.labelControl5.Name = "labelControl5";
-            this.labelControl5.Size = new System.Drawing.Size(60, 14);
+            this.labelControl5.Size = new System.Drawing.Size(75, 18);
             this.labelControl5.TabIndex = 25;
             this.labelControl5.Text = "解析显示:";
             // 
@@ -115,7 +115,7 @@ namespace SIMDP.Project
             this.lookUp_TaskState.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
             this.lookUp_TaskState.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.lookUp_TaskState.Size = new System.Drawing.Size(77, 22);
+            this.lookUp_TaskState.Size = new System.Drawing.Size(77, 26);
             this.lookUp_TaskState.TabIndex = 26;
             this.lookUp_TaskState.EditValueChanged += new System.EventHandler(this.lookUp_TaskState_EditValueChanged);
             // 
@@ -154,7 +154,7 @@ namespace SIMDP.Project
             this.label_PageInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.label_PageInfo.Location = new System.Drawing.Point(3, 245);
             this.label_PageInfo.Name = "label_PageInfo";
-            this.label_PageInfo.Size = new System.Drawing.Size(75, 14);
+            this.label_PageInfo.Size = new System.Drawing.Size(92, 18);
             this.label_PageInfo.TabIndex = 10;
             this.label_PageInfo.Text = "共 {0} 条记录";
             // 
@@ -257,7 +257,7 @@ namespace SIMDP.Project
             // 
             // FormModelContrast
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(757, 270);
             this.Controls.Add(this.panel1);

+ 0 - 1
SIMDP.Project/Form/FormMonitorTighten.Designer.cs

@@ -366,7 +366,6 @@ namespace SIMDP.Project
 
         #endregion
 
-        private ProjectBase.Controls.CircleLabel circleLabel1;
         private System.Windows.Forms.Label label1;
         private ProjectBase.Controls.LeftLabels TagCom7;
         private System.Windows.Forms.Label lbl_newVIN;

+ 29 - 3
SIMDP.Project/Form/FormMonitorTighten.cs

@@ -1,4 +1,5 @@
-using System;
+using ProjectBase.Controls;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -39,8 +40,18 @@ namespace SIMDP.Project
 
 
             //230213
-            lbl_oldVIN.Text = "搬出车身号:"+ MXComponent_FEM02.oldVIN;
-            lbl_newVIN.Text = "装配车身号:"+ MXComponent_FEM02.newVIN;
+            lbl_oldVIN.Text = "搬出车身号:" + MXComponent_FEM02.oldVIN;
+            lbl_newVIN.Text = "装配车身号:" + MXComponent_FEM02.newVIN;
+
+            TagCom1.WorkState = GenTightResult(MXComponent_FEM02.old_itightRes1);
+            TagCom2.WorkState = GenTightResult(MXComponent_FEM02.old_itightRes2);
+            TagCom3.WorkState = GenTightResult(MXComponent_FEM02.old_itightRes3);
+            TagCom4.WorkState = GenTightResult(MXComponent_FEM02.old_itightRes4);
+            TagCom5.WorkState = GenTightResult(MXComponent_FEM02.itightRes1);
+            TagCom6.WorkState = GenTightResult(MXComponent_FEM02.itightRes2);
+            TagCom7.WorkState = GenTightResult(MXComponent_FEM02.itightRes3);
+            TagCom8.WorkState = GenTightResult(MXComponent_FEM02.itightRes4);
+
 
             TagCom1.Torque_Value = MXComponent_FEM02.old_torque1.ToString("0.0");
             TagCom2.Torque_Value = MXComponent_FEM02.old_torque2.ToString("0.0");
@@ -62,6 +73,21 @@ namespace SIMDP.Project
 
         }
 
+        private LedState GenTightResult(int ires)
+        {
+            switch (ires)
+            {
+                case 1:
+                    return LedState.OK;
+                case 2:
+                    return LedState.NG;
+                case 0:
+                    return LedState.DEFAULT;
+                default:
+                    return LedState.DEFAULT;
+            }
+        }
+
 
         private void btn_Close_MouseMove(object sender, MouseEventArgs e)
         {

+ 8 - 2
SIMDP.Project/MXComponent_FEM02.cs

@@ -44,8 +44,6 @@ namespace SIMDP.Project
 
             FormCurrentTask.manualForceMatchSuccess += new FormCurrentTask.delegateResetVertify2(ManualForceMatchSuccess);
 
-            FormCurrentTask.manualForceReleaseEmpty += new FormCurrentTask.delegateResetVertify2(ManualForceReleaseEmpty);
-
             FormCurrentTask.manualForceWrite2Tighting += new FormCurrentTask.delegateResetVertify3(ManualForceWrite2Tighting);
 
         }
@@ -692,6 +690,10 @@ namespace SIMDP.Project
         public static float angle3 = 0.0f;
         public static float angle4 = 0.0f;
 
+        public static short old_itightRes1 = 0;
+        public static short old_itightRes2 = 0;
+        public static short old_itightRes3 = 0;
+        public static short old_itightRes4 = 0;
         public static float old_torque1 = 0.0f;
         public static float old_torque2 = 0.0f;
         public static float old_torque3 = 0.0f;
@@ -707,6 +709,10 @@ namespace SIMDP.Project
         public void UpdateFormMonitorTightenData()
         {
             oldVIN = SysEnvironment.Global_Tighting_Pointer;//这个是发车后,刚刚拧紧完的 (搬出的)
+            old_itightRes1 = itightRes1;
+            old_itightRes2 = itightRes2;
+            old_itightRes3 = itightRes3;
+            old_itightRes4 = itightRes4;
             old_torque1 = torque1;
             old_torque2 = torque2;
             old_torque3 = torque3;