章政 8 жил өмнө
parent
commit
0d181a0487

+ 42 - 0
UAS_KanBan/CustomControl/ValueLabel.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_KanBan.CustomControl
+{
+    partial class ValueLabel
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // ValueLabel
+            // 
+            this.Size = new System.Drawing.Size(100, 0);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 13 - 0
UAS_KanBan/CustomControl/ValueLabel.cs

@@ -0,0 +1,13 @@
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_KanBan.CustomControl
+{
+    public partial class ValueLabel : Label
+    {
+        public ValueLabel()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 3 - 0
TestProject/Form1.resx → UAS_KanBan/CustomControl/ValueLabel.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
 </root>

+ 27 - 23
UAS_KanBan/Process.Designer.cs

@@ -55,7 +55,7 @@
             this.Line = new CCWin.SkinControl.SkinLabel();
             this.Title2 = new CCWin.SkinControl.SkinLabel();
             this.Refresh = new System.Windows.Forms.Timer(this.components);
-            this.机型 = new CCWin.SkinControl.SkinLabel();
+            this.机型 = new UAS_KanBan.CustomControl.ValueLabel();
             ((System.ComponentModel.ISupportInitialize)(this.Logo)).BeginInit();
             this.SuspendLayout();
             // 
@@ -185,7 +185,7 @@
             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.Location = new System.Drawing.Point(7, 518);
             this.产出_label.Name = "产出_label";
             this.产出_label.Size = new System.Drawing.Size(243, 70);
             this.产出_label.TabIndex = 9;
@@ -200,7 +200,7 @@
             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.Location = new System.Drawing.Point(7, 393);
             this.投入_label.Name = "投入_label";
             this.投入_label.Size = new System.Drawing.Size(243, 70);
             this.投入_label.TabIndex = 10;
@@ -215,7 +215,7 @@
             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(638, 376);
+            this.收益率_label.Location = new System.Drawing.Point(638, 393);
             this.收益率_label.Name = "收益率_label";
             this.收益率_label.Size = new System.Drawing.Size(243, 70);
             this.收益率_label.TabIndex = 13;
@@ -230,7 +230,7 @@
             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(638, 488);
+            this.故障数_label.Location = new System.Drawing.Point(638, 518);
             this.故障数_label.Name = "故障数_label";
             this.故障数_label.Size = new System.Drawing.Size(243, 70);
             this.故障数_label.TabIndex = 12;
@@ -296,11 +296,12 @@
             this.投入.AutoSize = true;
             this.投入.BackColor = System.Drawing.Color.Transparent;
             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.投入.BorderSize = 0;
+            this.投入.Font = new System.Drawing.Font("宋体", 52.75F, System.Drawing.FontStyle.Bold);
             this.投入.ForeColor = System.Drawing.Color.Red;
-            this.投入.Location = new System.Drawing.Point(340, 376);
+            this.投入.Location = new System.Drawing.Point(340, 393);
             this.投入.Name = "投入";
-            this.投入.Size = new System.Drawing.Size(0, 69);
+            this.投入.Size = new System.Drawing.Size(0, 71);
             this.投入.TabIndex = 19;
             this.投入.Tag = "AutoFont";
             // 
@@ -311,11 +312,12 @@
             this.产出.AutoSize = true;
             this.产出.BackColor = System.Drawing.Color.Transparent;
             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.产出.BorderSize = 0;
+            this.产出.Font = new System.Drawing.Font("宋体", 52.75F, System.Drawing.FontStyle.Bold);
             this.产出.ForeColor = System.Drawing.Color.Red;
-            this.产出.Location = new System.Drawing.Point(340, 488);
+            this.产出.Location = new System.Drawing.Point(340, 518);
             this.产出.Name = "产出";
-            this.产出.Size = new System.Drawing.Size(0, 69);
+            this.产出.Size = new System.Drawing.Size(0, 71);
             this.产出.TabIndex = 18;
             this.产出.Tag = "AutoFont";
             // 
@@ -326,11 +328,12 @@
             this.收益率.AutoSize = true;
             this.收益率.BackColor = System.Drawing.Color.Transparent;
             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.收益率.BorderSize = 0;
+            this.收益率.Font = new System.Drawing.Font("宋体", 52.75F, System.Drawing.FontStyle.Bold);
             this.收益率.ForeColor = System.Drawing.Color.Red;
-            this.收益率.Location = new System.Drawing.Point(898, 376);
+            this.收益率.Location = new System.Drawing.Point(898, 393);
             this.收益率.Name = "收益率";
-            this.收益率.Size = new System.Drawing.Size(0, 69);
+            this.收益率.Size = new System.Drawing.Size(0, 71);
             this.收益率.TabIndex = 22;
             this.收益率.Tag = "AutoFont";
             // 
@@ -341,11 +344,12 @@
             this.故障数.AutoSize = true;
             this.故障数.BackColor = System.Drawing.Color.Transparent;
             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.故障数.BorderSize = 0;
+            this.故障数.Font = new System.Drawing.Font("宋体", 52.75F, System.Drawing.FontStyle.Bold);
             this.故障数.ForeColor = System.Drawing.Color.Red;
-            this.故障数.Location = new System.Drawing.Point(898, 488);
+            this.故障数.Location = new System.Drawing.Point(898, 518);
             this.故障数.Name = "故障数";
-            this.故障数.Size = new System.Drawing.Size(0, 69);
+            this.故障数.Size = new System.Drawing.Size(0, 71);
             this.故障数.TabIndex = 21;
             this.故障数.Tag = "AutoFont";
             // 
@@ -356,11 +360,12 @@
             this.直通率.AutoSize = true;
             this.直通率.BackColor = System.Drawing.Color.Transparent;
             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.直通率.BorderSize = 0;
+            this.直通率.Font = new System.Drawing.Font("宋体", 52.75F, System.Drawing.FontStyle.Bold);
             this.直通率.ForeColor = System.Drawing.Color.Red;
             this.直通率.Location = new System.Drawing.Point(898, 265);
             this.直通率.Name = "直通率";
-            this.直通率.Size = new System.Drawing.Size(0, 69);
+            this.直通率.Size = new System.Drawing.Size(0, 71);
             this.直通率.TabIndex = 20;
             this.直通率.Tag = "AutoFont";
             // 
@@ -409,12 +414,11 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.机型.AutoSize = true;
             this.机型.BackColor = System.Drawing.Color.Transparent;
-            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.机型.Font = new System.Drawing.Font("宋体", 53.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.机型.ForeColor = System.Drawing.Color.Red;
             this.机型.Location = new System.Drawing.Point(340, 265);
             this.机型.Name = "机型";
-            this.机型.Size = new System.Drawing.Size(0, 69);
+            this.机型.Size = new System.Drawing.Size(0, 71);
             this.机型.TabIndex = 17;
             this.机型.Tag = "AutoFont";
             // 
@@ -493,6 +497,6 @@
         private CCWin.SkinControl.SkinLabel Line;
         private CCWin.SkinControl.SkinLabel Title2;
         private System.Windows.Forms.Timer Refresh;
-        private CCWin.SkinControl.SkinLabel 机型;
+        private CustomControl.ValueLabel 机型;
     }
 }

+ 3 - 1
UAS_KanBan/Process.cs

@@ -7,6 +7,7 @@ using System.Drawing;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
+using UAS_KanBan.CustomControl;
 
 namespace UAS_KanBan
 {
@@ -25,9 +26,10 @@ namespace UAS_KanBan
             int WorkHeight = Screen.PrimaryScreen.Bounds.Width;
             if (WorkHeight <= 1024)
             {
+                机型.MaximumSize = new Size(300, 0);
                 for (int i = 0; i < this.Controls.Count; i++)
                 {
-                    if (Controls[i] is Label)
+                    if (Controls[i] is Label ||Controls[i] is ValueLabel)
                     {
                         if (Controls[i].Tag != null && Controls[i].Tag.ToString() == "AutoFont")
                             Controls[i].Font = new Font("宋体", Controls[i].Font.Size - 10, FontStyle.Bold);