Browse Source

适应分辨率

章政 8 years ago
parent
commit
07e3ca7f35
2 changed files with 29 additions and 14 deletions
  1. 22 12
      UAS_KanBan/Process.Designer.cs
  2. 7 2
      UAS_KanBan/Process.cs

+ 22 - 12
UAS_KanBan/Process.Designer.cs

@@ -97,7 +97,7 @@
             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(244, 23);
+            this.Line1.Location = new System.Drawing.Point(255, 23);
             this.Line1.MouseBack = null;
             this.Line1.Name = "Line1";
             this.Line1.NormlBack = null;
@@ -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(262, 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;
@@ -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
@@ -216,6 +219,7 @@
             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
@@ -230,6 +234,7 @@
             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
@@ -244,6 +249,7 @@
             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
@@ -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(234, 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;
@@ -296,6 +302,7 @@
             this.投入.Name = "投入";
             this.投入.Size = new System.Drawing.Size(0, 69);
             this.投入.TabIndex = 19;
+            this.投入.Tag = "AutoFont";
             // 
             // 产出
             // 
@@ -310,6 +317,7 @@
             this.产出.Name = "产出";
             this.产出.Size = new System.Drawing.Size(0, 69);
             this.产出.TabIndex = 18;
+            this.产出.Tag = "AutoFont";
             // 
             // 收益率
             // 
@@ -324,6 +332,7 @@
             this.收益率.Name = "收益率";
             this.收益率.Size = new System.Drawing.Size(0, 69);
             this.收益率.TabIndex = 22;
+            this.收益率.Tag = "AutoFont";
             // 
             // 故障数
             // 
@@ -338,6 +347,7 @@
             this.故障数.Name = "故障数";
             this.故障数.Size = new System.Drawing.Size(0, 69);
             this.故障数.TabIndex = 21;
+            this.故障数.Tag = "AutoFont";
             // 
             // 直通率
             // 
@@ -352,19 +362,19 @@
             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(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(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
@@ -388,7 +397,7 @@
             this.Title2.BackColor = System.Drawing.Color.Transparent;
             this.Title2.BorderColor = System.Drawing.Color.White;
             this.Title2.Font = new System.Drawing.Font("宋体", 45F);
-            this.Title2.Location = new System.Drawing.Point(278, 159);
+            this.Title2.Location = new System.Drawing.Point(267, 161);
             this.Title2.Name = "Title2";
             this.Title2.Size = new System.Drawing.Size(535, 60);
             this.Title2.TabIndex = 25;
@@ -407,6 +416,7 @@
             this.机型.Name = "机型";
             this.机型.Size = new System.Drawing.Size(0, 69);
             this.机型.TabIndex = 17;
+            this.机型.Tag = "AutoFont";
             // 
             // Process
             // 

+ 7 - 2
UAS_KanBan/Process.cs

@@ -28,7 +28,12 @@ namespace UAS_KanBan
                 for (int i = 0; i < this.Controls.Count; i++)
                 {
                     if (Controls[i] is Label)
-                        Controls[i].Font = new Font("宋体", Controls[i].Font.Size - 8, FontStyle.Bold);
+                    {
+                        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);
+                    }
                 }
             }
         }
@@ -41,7 +46,7 @@ namespace UAS_KanBan
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Start();
             WindowState = FormWindowState.Maximized;
-          
+
         }
 
         private void Refresh_Tick(object sender, EventArgs e)