Browse Source

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

Hcsy 8 years ago
parent
commit
ccda4bc1cd
2 changed files with 69 additions and 44 deletions
  1. 48 38
      UAS_KanBan/Process.Designer.cs
  2. 21 6
      UAS_KanBan/Process.cs

+ 48 - 38
UAS_KanBan/Process.Designer.cs

@@ -71,7 +71,7 @@
             this.TopLine.MouseBack = null;
             this.TopLine.Name = "TopLine";
             this.TopLine.NormlBack = null;
-            this.TopLine.Size = new System.Drawing.Size(1180, 2);
+            this.TopLine.Size = new System.Drawing.Size(1030, 2);
             this.TopLine.TabIndex = 0;
             // 
             // BottomLine
@@ -82,11 +82,11 @@
             this.BottomLine.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.BottomLine.ControlState = CCWin.SkinClass.ControlState.Normal;
             this.BottomLine.DownBack = null;
-            this.BottomLine.Location = new System.Drawing.Point(3, 132);
+            this.BottomLine.Location = new System.Drawing.Point(3, 134);
             this.BottomLine.MouseBack = null;
             this.BottomLine.Name = "BottomLine";
             this.BottomLine.NormlBack = null;
-            this.BottomLine.Size = new System.Drawing.Size(1180, 2);
+            this.BottomLine.Size = new System.Drawing.Size(1030, 2);
             this.BottomLine.TabIndex = 1;
             // 
             // Line1
@@ -97,11 +97,11 @@
             this.Line1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.Line1.ControlState = CCWin.SkinClass.ControlState.Normal;
             this.Line1.DownBack = null;
-            this.Line1.Location = new System.Drawing.Point(301, 23);
+            this.Line1.Location = new System.Drawing.Point(255, 23);
             this.Line1.MouseBack = null;
             this.Line1.Name = "Line1";
             this.Line1.NormlBack = null;
-            this.Line1.Size = new System.Drawing.Size(2, 110);
+            this.Line1.Size = new System.Drawing.Size(2, 112);
             this.Line1.TabIndex = 1;
             // 
             // Line2
@@ -112,11 +112,11 @@
             this.Line2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.Line2.ControlState = CCWin.SkinClass.ControlState.Normal;
             this.Line2.DownBack = null;
-            this.Line2.Location = new System.Drawing.Point(839, 23);
+            this.Line2.Location = new System.Drawing.Point(784, 23);
             this.Line2.MouseBack = null;
             this.Line2.Name = "Line2";
             this.Line2.NormlBack = null;
-            this.Line2.Size = new System.Drawing.Size(2, 110);
+            this.Line2.Size = new System.Drawing.Size(2, 112);
             this.Line2.TabIndex = 3;
             // 
             // MidLine
@@ -127,11 +127,11 @@
             this.MidLine.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.MidLine.ControlState = CCWin.SkinClass.ControlState.Normal;
             this.MidLine.DownBack = null;
-            this.MidLine.Location = new System.Drawing.Point(841, 81);
+            this.MidLine.Location = new System.Drawing.Point(784, 81);
             this.MidLine.MouseBack = null;
             this.MidLine.Name = "MidLine";
             this.MidLine.NormlBack = null;
-            this.MidLine.Size = new System.Drawing.Size(341, 2);
+            this.MidLine.Size = new System.Drawing.Size(250, 2);
             this.MidLine.TabIndex = 2;
             // 
             // Title
@@ -141,7 +141,7 @@
             this.Title.BackColor = System.Drawing.Color.Transparent;
             this.Title.BorderColor = System.Drawing.Color.White;
             this.Title.Font = new System.Drawing.Font("宋体", 45F);
-            this.Title.Location = new System.Drawing.Point(319, 49);
+            this.Title.Location = new System.Drawing.Point(267, 49);
             this.Title.Name = "Title";
             this.Title.Size = new System.Drawing.Size(505, 60);
             this.Title.TabIndex = 4;
@@ -155,11 +155,11 @@
             this.Line3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
             this.Line3.ControlState = CCWin.SkinClass.ControlState.Normal;
             this.Line3.DownBack = null;
-            this.Line3.Location = new System.Drawing.Point(949, 23);
+            this.Line3.Location = new System.Drawing.Point(895, 23);
             this.Line3.MouseBack = null;
             this.Line3.Name = "Line3";
             this.Line3.NormlBack = null;
-            this.Line3.Size = new System.Drawing.Size(2, 110);
+            this.Line3.Size = new System.Drawing.Size(2, 112);
             this.Line3.TabIndex = 4;
             // 
             // 机型_label
@@ -174,6 +174,7 @@
             this.机型_label.Name = "机型_label";
             this.机型_label.Size = new System.Drawing.Size(314, 70);
             this.机型_label.TabIndex = 6;
+            this.机型_label.Tag = "AutoFont";
             this.机型_label.Text = "生产机型";
             // 
             // 产出_label
@@ -188,6 +189,7 @@
             this.产出_label.Name = "产出_label";
             this.产出_label.Size = new System.Drawing.Size(243, 70);
             this.产出_label.TabIndex = 9;
+            this.产出_label.Tag = "AutoFont";
             this.产出_label.Text = "总产出";
             // 
             // 投入_label
@@ -202,6 +204,7 @@
             this.投入_label.Name = "投入_label";
             this.投入_label.Size = new System.Drawing.Size(243, 70);
             this.投入_label.TabIndex = 10;
+            this.投入_label.Tag = "AutoFont";
             this.投入_label.Text = "总投入";
             // 
             // 收益率_label
@@ -212,10 +215,11 @@
             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.Location = new System.Drawing.Point(638, 376);
             this.收益率_label.Name = "收益率_label";
             this.收益率_label.Size = new System.Drawing.Size(243, 70);
             this.收益率_label.TabIndex = 13;
+            this.收益率_label.Tag = "AutoFont";
             this.收益率_label.Text = "收益率";
             // 
             // 故障数_label
@@ -226,10 +230,11 @@
             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.Location = new System.Drawing.Point(638, 488);
             this.故障数_label.Name = "故障数_label";
             this.故障数_label.Size = new System.Drawing.Size(243, 70);
             this.故障数_label.TabIndex = 12;
+            this.故障数_label.Tag = "AutoFont";
             this.故障数_label.Text = "故障数";
             // 
             // 直通率_label
@@ -240,10 +245,11 @@
             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.Location = new System.Drawing.Point(638, 265);
             this.直通率_label.Name = "直通率_label";
             this.直通率_label.Size = new System.Drawing.Size(243, 70);
             this.直通率_label.TabIndex = 11;
+            this.直通率_label.Tag = "AutoFont";
             this.直通率_label.Text = "直通率";
             // 
             // LineCode_label
@@ -253,7 +259,7 @@
             this.LineCode_label.BackColor = System.Drawing.Color.Transparent;
             this.LineCode_label.BorderColor = System.Drawing.Color.White;
             this.LineCode_label.Font = new System.Drawing.Font("宋体", 30F);
-            this.LineCode_label.Location = new System.Drawing.Point(847, 34);
+            this.LineCode_label.Location = new System.Drawing.Point(792, 33);
             this.LineCode_label.Name = "LineCode_label";
             this.LineCode_label.Size = new System.Drawing.Size(97, 40);
             this.LineCode_label.TabIndex = 14;
@@ -266,7 +272,7 @@
             this.WorkShift_label.BackColor = System.Drawing.Color.Transparent;
             this.WorkShift_label.BorderColor = System.Drawing.Color.White;
             this.WorkShift_label.Font = new System.Drawing.Font("宋体", 30F);
-            this.WorkShift_label.Location = new System.Drawing.Point(849, 90);
+            this.WorkShift_label.Location = new System.Drawing.Point(792, 88);
             this.WorkShift_label.Name = "WorkShift_label";
             this.WorkShift_label.Size = new System.Drawing.Size(97, 40);
             this.WorkShift_label.TabIndex = 15;
@@ -278,7 +284,7 @@
             this.Logo.Image = global::UAS_KanBan.Properties.Resources.lo3;
             this.Logo.Location = new System.Drawing.Point(6, 31);
             this.Logo.Name = "Logo";
-            this.Logo.Size = new System.Drawing.Size(289, 95);
+            this.Logo.Size = new System.Drawing.Size(244, 95);
             this.Logo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.Logo.TabIndex = 16;
             this.Logo.TabStop = false;
@@ -292,10 +298,11 @@
             this.投入.BorderColor = System.Drawing.Color.Red;
             this.投入.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.投入.ForeColor = System.Drawing.Color.Red;
-            this.投入.Location = new System.Drawing.Point(377, 376);
+            this.投入.Location = new System.Drawing.Point(340, 376);
             this.投入.Name = "投入";
             this.投入.Size = new System.Drawing.Size(0, 69);
             this.投入.TabIndex = 19;
+            this.投入.Tag = "AutoFont";
             // 
             // 产出
             // 
@@ -306,10 +313,11 @@
             this.产出.BorderColor = System.Drawing.Color.Red;
             this.产出.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.产出.ForeColor = System.Drawing.Color.Red;
-            this.产出.Location = new System.Drawing.Point(377, 488);
+            this.产出.Location = new System.Drawing.Point(340, 488);
             this.产出.Name = "产出";
             this.产出.Size = new System.Drawing.Size(0, 69);
             this.产出.TabIndex = 18;
+            this.产出.Tag = "AutoFont";
             // 
             // 收益率
             // 
@@ -320,10 +328,11 @@
             this.收益率.BorderColor = System.Drawing.Color.Red;
             this.收益率.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.收益率.ForeColor = System.Drawing.Color.Red;
-            this.收益率.Location = new System.Drawing.Point(959, 376);
+            this.收益率.Location = new System.Drawing.Point(898, 376);
             this.收益率.Name = "收益率";
             this.收益率.Size = new System.Drawing.Size(0, 69);
             this.收益率.TabIndex = 22;
+            this.收益率.Tag = "AutoFont";
             // 
             // 故障数
             // 
@@ -334,10 +343,11 @@
             this.故障数.BorderColor = System.Drawing.Color.Red;
             this.故障数.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.故障数.ForeColor = System.Drawing.Color.Red;
-            this.故障数.Location = new System.Drawing.Point(959, 488);
+            this.故障数.Location = new System.Drawing.Point(898, 488);
             this.故障数.Name = "故障数";
             this.故障数.Size = new System.Drawing.Size(0, 69);
             this.故障数.TabIndex = 21;
+            this.故障数.Tag = "AutoFont";
             // 
             // 直通率
             // 
@@ -348,23 +358,23 @@
             this.直通率.BorderColor = System.Drawing.Color.Red;
             this.直通率.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.直通率.ForeColor = System.Drawing.Color.Red;
-            this.直通率.Location = new System.Drawing.Point(959, 265);
+            this.直通率.Location = new System.Drawing.Point(898, 265);
             this.直通率.Name = "直通率";
             this.直通率.Size = new System.Drawing.Size(0, 69);
             this.直通率.TabIndex = 20;
+            this.直通率.Tag = "AutoFont";
             // 
             // 班制
             // 
             this.班制.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.班制.AutoSize = true;
             this.班制.BackColor = System.Drawing.Color.Transparent;
-            this.班制.BorderColor = System.Drawing.Color.White;
-            this.班制.BorderSize = 0;
-            this.班制.Font = new System.Drawing.Font("微软雅黑", 25F, System.Drawing.FontStyle.Bold);
+            this.班制.BorderColor = System.Drawing.Color.Red;
+            this.班制.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.班制.ForeColor = System.Drawing.Color.Red;
-            this.班制.Location = new System.Drawing.Point(973, 88);
+            this.班制.Location = new System.Drawing.Point(909, 88);
             this.班制.Name = "班制";
-            this.班制.Size = new System.Drawing.Size(0, 45);
+            this.班制.Size = new System.Drawing.Size(0, 40);
             this.班制.TabIndex = 24;
             // 
             // Line
@@ -372,13 +382,12 @@
             this.Line.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.Line.AutoSize = true;
             this.Line.BackColor = System.Drawing.Color.Transparent;
-            this.Line.BorderColor = System.Drawing.Color.White;
-            this.Line.BorderSize = 0;
-            this.Line.Font = new System.Drawing.Font("微软雅黑", 25F, System.Drawing.FontStyle.Bold);
+            this.Line.BorderColor = System.Drawing.Color.Red;
+            this.Line.Font = new System.Drawing.Font("宋体", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Line.ForeColor = System.Drawing.Color.Red;
-            this.Line.Location = new System.Drawing.Point(973, 32);
+            this.Line.Location = new System.Drawing.Point(909, 32);
             this.Line.Name = "Line";
-            this.Line.Size = new System.Drawing.Size(0, 45);
+            this.Line.Size = new System.Drawing.Size(0, 40);
             this.Line.TabIndex = 23;
             // 
             // Title2
@@ -387,10 +396,10 @@
             this.Title2.AutoSize = true;
             this.Title2.BackColor = System.Drawing.Color.Transparent;
             this.Title2.BorderColor = System.Drawing.Color.White;
-            this.Title2.Font = new System.Drawing.Font("宋体", 50F);
-            this.Title2.Location = new System.Drawing.Point(344, 168);
+            this.Title2.Font = new System.Drawing.Font("宋体", 45F);
+            this.Title2.Location = new System.Drawing.Point(267, 161);
             this.Title2.Name = "Title2";
-            this.Title2.Size = new System.Drawing.Size(599, 67);
+            this.Title2.Size = new System.Drawing.Size(535, 60);
             this.Title2.TabIndex = 25;
             this.Title2.Text = "投入\\产出实时统计";
             // 
@@ -403,17 +412,18 @@
             this.机型.BorderColor = System.Drawing.Color.Red;
             this.机型.Font = new System.Drawing.Font("宋体", 51.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.机型.ForeColor = System.Drawing.Color.Red;
-            this.机型.Location = new System.Drawing.Point(377, 265);
+            this.机型.Location = new System.Drawing.Point(340, 265);
             this.机型.Name = "机型";
             this.机型.Size = new System.Drawing.Size(0, 69);
             this.机型.TabIndex = 17;
+            this.机型.Tag = "AutoFont";
             // 
             // Process
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
-            this.ClientSize = new System.Drawing.Size(1184, 687);
+            this.ClientSize = new System.Drawing.Size(1036, 687);
             this.Controls.Add(this.Title2);
             this.Controls.Add(this.班制);
             this.Controls.Add(this.Line);

+ 21 - 6
UAS_KanBan/Process.cs

@@ -22,6 +22,20 @@ namespace UAS_KanBan
             InitializeComponent();
             Line.Text = LineCode;
             班制.Text = WcCode;
+            int WorkHeight = Screen.PrimaryScreen.Bounds.Width;
+            if (WorkHeight <= 1024)
+            {
+                for (int i = 0; i < this.Controls.Count; i++)
+                {
+                    if (Controls[i] is Label)
+                    {
+                        if (Controls[i].Tag != null && Controls[i].Tag.ToString() == "AutoFont")
+                            Controls[i].Font = new Font("宋体", Controls[i].Font.Size - 10, FontStyle.Bold);
+                        else
+                            Controls[i].Font = new Font("宋体", Controls[i].Font.Size - 8, FontStyle.Bold);
+                    }
+                }
+            }
         }
 
         private void Process_Load(object sender, EventArgs e)
@@ -32,6 +46,7 @@ namespace UAS_KanBan
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Start();
             WindowState = FormWindowState.Maximized;
+
         }
 
         private void Refresh_Tick(object sender, EventArgs e)
@@ -72,12 +87,12 @@ namespace UAS_KanBan
             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);
             Logo.Size = new Size(Line1.Location.X - 20, BottomLine.Location.Y - TopLine.Location.Y - 20);
-            //机型.Location = new Point(机型_label.Location.X + 机型_label.Width + 30, 机型_label.Location.Y);
-            //投入.Location = new Point(投入_label.Location.X + 机型_label.Width + 30, 投入_label.Location.Y);
-            //产出.Location = new Point(产出_label.Location.X + 机型_label.Width + 30, 产出_label.Location.Y);
-            //直通率.Location = new Point(直通率_label.Location.X + 直通率_label.Width + 30, 直通率_label.Location.Y);
-            //收益率.Location = new Point(收益率_label.Location.X + 收益率_label.Width + 30, 收益率_label.Location.Y);
-            //故障数.Location = new Point(故障数_label.Location.X + 故障数_label.Width + 30, 故障数_label.Location.Y);
+            机型.Location = new Point(机型_label.Location.X + 机型_label.Width + 30, 机型_label.Location.Y);
+            投入.Location = new Point(投入_label.Location.X + 机型_label.Width + 30, 投入_label.Location.Y);
+            产出.Location = new Point(产出_label.Location.X + 机型_label.Width + 30, 产出_label.Location.Y);
+            直通率.Location = new Point(直通率_label.Location.X + 直通率_label.Width + 30, 直通率_label.Location.Y);
+            收益率.Location = new Point(收益率_label.Location.X + 收益率_label.Width + 30, 收益率_label.Location.Y);
+            故障数.Location = new Point(故障数_label.Location.X + 故障数_label.Width + 30, 故障数_label.Location.Y);
         }
 
         private void Process_FormClosing(object sender, FormClosingEventArgs e)