Ver Fonte

修改流程状态

wb_han há 5 anos atrás
pai
commit
32aedf90ef

+ 14 - 15
HOZProject/FormHOZMain.Designer.cs

@@ -37,13 +37,13 @@
             this.textBox2 = new System.Windows.Forms.TextBox();
             this.plPrarInfo = new System.Windows.Forms.Panel();
             this.listmsg = new System.Windows.Forms.ListBox();
+            this.pbImage = new System.Windows.Forms.PictureBox();
             this.plSEM = new System.Windows.Forms.Panel();
             this.lblFlowContent = new System.Windows.Forms.Label();
             this.plLeft = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.plLeftContent = new System.Windows.Forms.Panel();
             this.plTop = new System.Windows.Forms.Panel();
-            this.pbImage = new System.Windows.Forms.PictureBox();
             this.pbStop = new System.Windows.Forms.PictureBox();
             this.pbPause = new System.Windows.Forms.PictureBox();
             this.pbStart = new System.Windows.Forms.PictureBox();
@@ -59,10 +59,10 @@
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
             this.groupBox1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             this.plSEM.SuspendLayout();
             this.plLeft.SuspendLayout();
             this.plTop.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).BeginInit();
@@ -146,9 +146,8 @@
             // 
             this.comboBox1.FormattingEnabled = true;
             this.comboBox1.Items.AddRange(new object[] {
-            "0",
-            "1",
-            "2"});
+            "True",
+            "False"});
             this.comboBox1.Location = new System.Drawing.Point(6, 74);
             this.comboBox1.Name = "comboBox1";
             this.comboBox1.Size = new System.Drawing.Size(100, 20);
@@ -183,6 +182,15 @@
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
+            // pbImage
+            // 
+            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pbImage.Location = new System.Drawing.Point(0, 0);
+            this.pbImage.Name = "pbImage";
+            this.pbImage.Size = new System.Drawing.Size(894, 568);
+            this.pbImage.TabIndex = 20;
+            this.pbImage.TabStop = false;
+            // 
             // plSEM
             // 
             this.plSEM.Controls.Add(this.lblFlowContent);
@@ -257,15 +265,6 @@
             this.plTop.Size = new System.Drawing.Size(1000, 80);
             this.plTop.TabIndex = 3;
             // 
-            // pbImage
-            // 
-            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pbImage.Location = new System.Drawing.Point(0, 0);
-            this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(894, 568);
-            this.pbImage.TabIndex = 20;
-            this.pbImage.TabStop = false;
-            // 
             // pbStop
             // 
             this.pbStop.BackgroundImage = global::HOZProject.Properties.Resources.Stop;
@@ -442,12 +441,12 @@
             this.plFill.ResumeLayout(false);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             this.plSEM.ResumeLayout(false);
             this.plSEM.PerformLayout();
             this.plLeft.ResumeLayout(false);
             this.plLeft.PerformLayout();
             this.plTop.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).EndInit();

+ 1 - 1
HOZProject/FormHOZMain.cs

@@ -567,7 +567,7 @@ namespace HOZProject
             {
                 string name = textBox1.Text;
                 string code = textBox2.Text;
-                int state = Convert.ToInt32(comboBox1.Text);
+                bool state = Convert.ToBoolean(comboBox1.Text);
                 foreach (Control item in plPrarInfo.Controls)
                 {
                     if (item is UserControl)

+ 1 - 1
HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

@@ -119,7 +119,7 @@ namespace HOZProject
                             {
                                 if (tlItem.Code == args.Step_Code)
                                 {
-                                    tlItem.State = Convert.ToInt32(args.State);
+                                    tlItem.State = args.State;
                                     break;
                                 }
                             }

+ 23 - 13
HOZProject/UserControls/UCTimeLine.cs

@@ -253,19 +253,29 @@ namespace HOZProject
                 {
                     if(label.Tag.ToString() == item.Code)
                     {
-                        switch (item.State)
+                        #region 原state Int 判断方法
+                        //switch (item.State)
+                        //{
+                        //        //出错
+                        //    case 0:
+                        //        lineColor = Color.Red;
+                        //        break;
+                        //        //完成
+                        //    case 1:
+                        //        lineColor = Color.GreenYellow;
+                        //        break;
+                        //    default:
+                        //        lineColor = TextColors.Light;
+                        //        break;
+                        //} 
+                        #endregion
+                        if (item.State)
                         {
-                                //出错
-                            case 0:
-                                lineColor = Color.Red;
-                                break;
-                                //完成
-                            case 1:
-                                lineColor = Color.GreenYellow;
-                                break;
-                            default:
-                                lineColor = TextColors.Light;
-                                break;
+                            lineColor = Color.GreenYellow;
+                        }
+                        else
+                        {
+                            lineColor = Color.Red;
                         }
                         break;
                     }
@@ -305,7 +315,7 @@ namespace HOZProject
         /// Gets or sets the State.
         /// </summary>
         /// <value>The State.</value>
-        public int State { get; set; }
+        public bool State { get; set; }
         /// <summary>
         /// Gets or sets the IsData.
         /// </summary>

+ 1 - 1
HOZProject/UserControls/UControl_ParaInfo.cs

@@ -155,7 +155,7 @@ namespace HOZProject
                     TimeLineItem tlItem = new TimeLineItem();
                     tlItem.Details = nodeList[i].Attributes["Details"].Value;
                     tlItem.Code = nodeList[i].Attributes["Code"].Value;
-                    tlItem.State = -1;
+                    //tlItem.State = -1;
                     tlItem.Title = nodeList[i].Attributes["Title"].Value;
                     tlItem.IsData = Convert.ToBoolean(nodeList[i].Attributes["IsData"].Value);
                     tlItem.Type = nodeList[i].Attributes["Type"].Value;