Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
2ed1733ae1

+ 38 - 0
UAS_KanBan/BaseForm.Designer.cs

@@ -0,0 +1,38 @@
+namespace UAS_KanBan
+{
+    partial class BaseForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "BaseForm";
+        }
+
+        #endregion
+    }
+}

+ 19 - 0
UAS_KanBan/BaseForm.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_KanBan
+{
+    public partial class BaseForm : CCWin.CCSkinMain
+    {
+        public BaseForm()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 98 - 94
UAS_KanBan/Process.Designer.cs

@@ -36,12 +36,12 @@
             this.MidLine = new CCWin.SkinControl.SkinPanel();
             this.Title = new CCWin.SkinControl.SkinLabel();
             this.Line3 = new CCWin.SkinControl.SkinPanel();
-            this.skinLabel3 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel6 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel7 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel4 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel5 = new CCWin.SkinControl.SkinLabel();
-            this.skinLabel8 = new CCWin.SkinControl.SkinLabel();
+            this.机型_label = new CCWin.SkinControl.SkinLabel();
+            this.产出_label = new CCWin.SkinControl.SkinLabel();
+            this.投入_label = new CCWin.SkinControl.SkinLabel();
+            this.收益率_label = new CCWin.SkinControl.SkinLabel();
+            this.故障数_label = new CCWin.SkinControl.SkinLabel();
+            this.直通率_label = new CCWin.SkinControl.SkinLabel();
             this.LineCode_label = new CCWin.SkinControl.SkinLabel();
             this.WorkShift_label = new CCWin.SkinControl.SkinLabel();
             this.Logo = new CCWin.SkinControl.SkinPictureBox();
@@ -161,89 +161,89 @@
             this.Line3.Size = new System.Drawing.Size(2, 110);
             this.Line3.TabIndex = 4;
             // 
-            // skinLabel3
+            // 机型_label
             // 
-            this.skinLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.机型_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel3.AutoSize = true;
-            this.skinLabel3.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel3.BorderColor = System.Drawing.Color.White;
-            this.skinLabel3.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel3.Location = new System.Drawing.Point(7, 265);
-            this.skinLabel3.Name = "skinLabel3";
-            this.skinLabel3.Size = new System.Drawing.Size(314, 70);
-            this.skinLabel3.TabIndex = 6;
-            this.skinLabel3.Text = "生产机型";
-            // 
-            // skinLabel6
-            // 
-            this.skinLabel6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.机型_label.AutoSize = true;
+            this.机型_label.BackColor = System.Drawing.Color.Transparent;
+            this.机型_label.BorderColor = System.Drawing.Color.White;
+            this.机型_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.机型_label.Location = new System.Drawing.Point(7, 265);
+            this.机型_label.Name = "机型_label";
+            this.机型_label.Size = new System.Drawing.Size(314, 70);
+            this.机型_label.TabIndex = 6;
+            this.机型_label.Text = "生产机型";
+            // 
+            // 产出_label
+            // 
+            this.产出_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel6.AutoSize = true;
-            this.skinLabel6.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel6.BorderColor = System.Drawing.Color.White;
-            this.skinLabel6.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel6.Location = new System.Drawing.Point(7, 488);
-            this.skinLabel6.Name = "skinLabel6";
-            this.skinLabel6.Size = new System.Drawing.Size(243, 70);
-            this.skinLabel6.TabIndex = 9;
-            this.skinLabel6.Text = "总产出";
-            // 
-            // skinLabel7
-            // 
-            this.skinLabel7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.产出_label.AutoSize = true;
+            this.产出_label.BackColor = System.Drawing.Color.Transparent;
+            this.产出_label.BorderColor = System.Drawing.Color.White;
+            this.产出_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.产出_label.Location = new System.Drawing.Point(7, 488);
+            this.产出_label.Name = "产出_label";
+            this.产出_label.Size = new System.Drawing.Size(243, 70);
+            this.产出_label.TabIndex = 9;
+            this.产出_label.Text = "总产出";
+            // 
+            // 投入_label
+            // 
+            this.投入_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel7.AutoSize = true;
-            this.skinLabel7.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel7.BorderColor = System.Drawing.Color.White;
-            this.skinLabel7.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel7.Location = new System.Drawing.Point(7, 376);
-            this.skinLabel7.Name = "skinLabel7";
-            this.skinLabel7.Size = new System.Drawing.Size(243, 70);
-            this.skinLabel7.TabIndex = 10;
-            this.skinLabel7.Text = "总投入";
-            // 
-            // skinLabel4
-            // 
-            this.skinLabel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.投入_label.AutoSize = true;
+            this.投入_label.BackColor = System.Drawing.Color.Transparent;
+            this.投入_label.BorderColor = System.Drawing.Color.White;
+            this.投入_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.投入_label.Location = new System.Drawing.Point(7, 376);
+            this.投入_label.Name = "投入_label";
+            this.投入_label.Size = new System.Drawing.Size(243, 70);
+            this.投入_label.TabIndex = 10;
+            this.投入_label.Text = "总投入";
+            // 
+            // 收益率_label
+            // 
+            this.收益率_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel4.AutoSize = true;
-            this.skinLabel4.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel4.BorderColor = System.Drawing.Color.White;
-            this.skinLabel4.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel4.Location = new System.Drawing.Point(662, 376);
-            this.skinLabel4.Name = "skinLabel4";
-            this.skinLabel4.Size = new System.Drawing.Size(243, 70);
-            this.skinLabel4.TabIndex = 13;
-            this.skinLabel4.Text = "收益率";
-            // 
-            // skinLabel5
-            // 
-            this.skinLabel5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.收益率_label.AutoSize = true;
+            this.收益率_label.BackColor = System.Drawing.Color.Transparent;
+            this.收益率_label.BorderColor = System.Drawing.Color.White;
+            this.收益率_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.收益率_label.Location = new System.Drawing.Point(662, 376);
+            this.收益率_label.Name = "收益率_label";
+            this.收益率_label.Size = new System.Drawing.Size(243, 70);
+            this.收益率_label.TabIndex = 13;
+            this.收益率_label.Text = "收益率";
+            // 
+            // 故障数_label
+            // 
+            this.故障数_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel5.AutoSize = true;
-            this.skinLabel5.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel5.BorderColor = System.Drawing.Color.White;
-            this.skinLabel5.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel5.Location = new System.Drawing.Point(662, 488);
-            this.skinLabel5.Name = "skinLabel5";
-            this.skinLabel5.Size = new System.Drawing.Size(243, 70);
-            this.skinLabel5.TabIndex = 12;
-            this.skinLabel5.Text = "故障数";
-            // 
-            // skinLabel8
-            // 
-            this.skinLabel8.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.故障数_label.AutoSize = true;
+            this.故障数_label.BackColor = System.Drawing.Color.Transparent;
+            this.故障数_label.BorderColor = System.Drawing.Color.White;
+            this.故障数_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.故障数_label.Location = new System.Drawing.Point(662, 488);
+            this.故障数_label.Name = "故障数_label";
+            this.故障数_label.Size = new System.Drawing.Size(243, 70);
+            this.故障数_label.TabIndex = 12;
+            this.故障数_label.Text = "故障数";
+            // 
+            // 直通率_label
+            // 
+            this.直通率_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.skinLabel8.AutoSize = true;
-            this.skinLabel8.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel8.BorderColor = System.Drawing.Color.White;
-            this.skinLabel8.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
-            this.skinLabel8.Location = new System.Drawing.Point(662, 265);
-            this.skinLabel8.Name = "skinLabel8";
-            this.skinLabel8.Size = new System.Drawing.Size(243, 70);
-            this.skinLabel8.TabIndex = 11;
-            this.skinLabel8.Text = "直通率";
+            this.直通率_label.AutoSize = true;
+            this.直通率_label.BackColor = System.Drawing.Color.Transparent;
+            this.直通率_label.BorderColor = System.Drawing.Color.White;
+            this.直通率_label.Font = new System.Drawing.Font("宋体", 52F, System.Drawing.FontStyle.Bold);
+            this.直通率_label.Location = new System.Drawing.Point(662, 265);
+            this.直通率_label.Name = "直通率_label";
+            this.直通率_label.Size = new System.Drawing.Size(243, 70);
+            this.直通率_label.TabIndex = 11;
+            this.直通率_label.Text = "直通率";
             // 
             // LineCode_label
             // 
@@ -419,6 +419,8 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(1184, 687);
+            this.ControlBoxActive = System.Drawing.Color.Black;
+            this.ControlBoxDeactive = System.Drawing.Color.Black;
             this.Controls.Add(this.Title2);
             this.Controls.Add(this.班制);
             this.Controls.Add(this.Line);
@@ -431,12 +433,12 @@
             this.Controls.Add(this.Logo);
             this.Controls.Add(this.WorkShift_label);
             this.Controls.Add(this.LineCode_label);
-            this.Controls.Add(this.skinLabel4);
-            this.Controls.Add(this.skinLabel5);
-            this.Controls.Add(this.skinLabel8);
-            this.Controls.Add(this.skinLabel7);
-            this.Controls.Add(this.skinLabel6);
-            this.Controls.Add(this.skinLabel3);
+            this.Controls.Add(this.收益率_label);
+            this.Controls.Add(this.故障数_label);
+            this.Controls.Add(this.直通率_label);
+            this.Controls.Add(this.投入_label);
+            this.Controls.Add(this.产出_label);
+            this.Controls.Add(this.机型_label);
             this.Controls.Add(this.Line3);
             this.Controls.Add(this.Title);
             this.Controls.Add(this.MidLine);
@@ -445,6 +447,7 @@
             this.Controls.Add(this.BottomLine);
             this.Controls.Add(this.TopLine);
             this.ForeColor = System.Drawing.Color.White;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Process";
             this.Text = "产线执行进度";
             this.TitleColor = System.Drawing.Color.WhiteSmoke;
@@ -452,6 +455,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Process_FormClosing);
             this.Load += new System.EventHandler(this.Process_Load);
             this.SizeChanged += new System.EventHandler(this.Process_SizeChanged);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Process_KeyDown);
             ((System.ComponentModel.ISupportInitialize)(this.Logo)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -467,12 +471,12 @@
         private CCWin.SkinControl.SkinPanel MidLine;
         private CCWin.SkinControl.SkinLabel Title;
         private CCWin.SkinControl.SkinPanel Line3;
-        private CCWin.SkinControl.SkinLabel skinLabel3;
-        private CCWin.SkinControl.SkinLabel skinLabel6;
-        private CCWin.SkinControl.SkinLabel skinLabel7;
-        private CCWin.SkinControl.SkinLabel skinLabel4;
-        private CCWin.SkinControl.SkinLabel skinLabel5;
-        private CCWin.SkinControl.SkinLabel skinLabel8;
+        private CCWin.SkinControl.SkinLabel 机型_label;
+        private CCWin.SkinControl.SkinLabel 产出_label;
+        private CCWin.SkinControl.SkinLabel 投入_label;
+        private CCWin.SkinControl.SkinLabel 收益率_label;
+        private CCWin.SkinControl.SkinLabel 故障数_label;
+        private CCWin.SkinControl.SkinLabel 直通率_label;
         private CCWin.SkinControl.SkinLabel LineCode_label;
         private CCWin.SkinControl.SkinLabel WorkShift_label;
         private CCWin.SkinControl.SkinPictureBox Logo;

+ 20 - 3
UAS_KanBan/Process.cs

@@ -10,7 +10,7 @@ using System.Windows.Forms;
 
 namespace UAS_KanBan
 {
-    public partial class Process : CCSkinMain
+    public partial class Process : BaseForm
     {
 
         AutoSizeFormClass asc = new AutoSizeFormClass();
@@ -37,7 +37,7 @@ namespace UAS_KanBan
             Refresh.Tick += Refresh_Tick;
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Start();
-            Width = Width + 1;
+            WindowState = FormWindowState.Maximized;
         }
 
         private void Refresh_Tick(object sender, EventArgs e)
@@ -73,15 +73,32 @@ namespace UAS_KanBan
             Title.Location = new Point(Line1.Location.X + (Line2.Location.X - Line1.Location.X - Title.Size.Width) / 2, TopLine.Location.Y + (BottomLine.Location.Y - TopLine.Location.Y - Title.Size.Height) / 2);
             Title2.Location = new Point(Title.Location.X, Title2.Location.Y);
             Logo.Size = new Size(Line1.Location.X - 20, BottomLine.Location.Y - TopLine.Location.Y - 20);
-            WorkShift_label.Location = new Point(Line2.Location.X + (Line3.Location.X - Line2.Location.X - WorkShift_label.Size.Width) / 2, MidLine.Location.Y+(BottomLine.Location.Y-MidLine.Location.Y- WorkShift_label.Size.Height) /2);
+            WorkShift_label.Location = new Point(Line2.Location.X + (Line3.Location.X - Line2.Location.X - WorkShift_label.Size.Width) / 2, MidLine.Location.Y + (BottomLine.Location.Y - MidLine.Location.Y - WorkShift_label.Size.Height) / 2);
             LineCode_label.Location = new Point(Line2.Location.X + (Line3.Location.X - Line2.Location.X - LineCode_label.Size.Width) / 2, TopLine.Location.Y + (MidLine.Location.Y - TopLine.Location.Y - LineCode_label.Size.Height) / 2);
             Line.Location = new Point(Line.Location.X, TopLine.Location.Y + (MidLine.Location.Y - TopLine.Location.Y - LineCode_label.Size.Height) / 2);
             班制.Location = new Point(班制.Location.X, MidLine.Location.Y + (BottomLine.Location.Y - MidLine.Location.Y - WorkShift_label.Size.Height) / 2);
+            机型.Location = new Point(机型_label.Location.X + 机型_label.Width + 20, 机型_label.Location.Y-10);
+            投入.Location = new Point(投入_label.Location.X + 机型_label.Width + 20, 投入_label.Location.Y-10);
+            产出.Location = new Point(产出_label.Location.X + 机型_label.Width + 20, 产出_label.Location.Y-10);
+            直通率.Location = new Point(直通率_label.Location.X + 直通率_label.Width + 20, 直通率_label.Location.Y-10);
+            收益率.Location = new Point(收益率_label.Location.X + 收益率_label.Width + 20, 收益率_label.Location.Y-10);
+            故障数.Location = new Point(故障数_label.Location.X + 故障数_label.Width + 20, 故障数_label.Location.Y-10);
         }
 
         private void Process_FormClosing(object sender, FormClosingEventArgs e)
         {
             Refresh.Stop();
         }
+
+        private void Process_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Escape)
+            {
+                Hide();
+                Setting set = new Setting();
+                set.ShowDialog();
+                Close();
+            }
+        }
     }
 }

+ 2 - 0
UAS_KanBan/Setting.Designer.cs

@@ -277,6 +277,8 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Menu;
             this.ClientSize = new System.Drawing.Size(677, 401);
+            this.ControlBoxActive = System.Drawing.Color.DeepSkyBlue;
+            this.ControlBoxDeactive = System.Drawing.Color.DeepSkyBlue;
             this.Controls.Add(this.Start);
             this.Controls.Add(this.MasterCombo);
             this.Controls.Add(this.MasterCombo_Label);

+ 2 - 1
UAS_KanBan/Setting.cs

@@ -12,7 +12,7 @@ using CCWin.SkinControl;
 
 namespace UAS_KanBan
 {
-    public partial class Setting : CCSkinMain
+    public partial class Setting : BaseForm
     {
 
         DataHelper dh = new DataHelper();
@@ -23,6 +23,7 @@ namespace UAS_KanBan
 
         public Setting()
         {
+            StartPosition = FormStartPosition.CenterScreen;
             InitializeComponent();
         }
 

+ 6 - 0
UAS_KanBan/UAS_KanBan.csproj

@@ -93,6 +93,12 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="AutoSizeFormClass.cs" />
+    <Compile Include="BaseForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="BaseForm.Designer.cs">
+      <DependentUpon>BaseForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="DataHelper.cs" />
     <Compile Include="Process.cs">
       <SubType>Form</SubType>