Pārlūkot izejas kodu

机型适应所有的分辨率

章政 8 gadi atpakaļ
vecāks
revīzija
31b1d03eb1
1 mainītis faili ar 2 papildinājumiem un 3 dzēšanām
  1. 2 3
      UAS_KanBan/Process.cs

+ 2 - 3
UAS_KanBan/Process.cs

@@ -26,10 +26,9 @@ 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 ||Controls[i] is ValueLabel)
+                    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);
@@ -48,7 +47,6 @@ namespace UAS_KanBan
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Start();
             WindowState = FormWindowState.Maximized;
-
         }
 
         private void Refresh_Tick(object sender, EventArgs e)
@@ -95,6 +93,7 @@ namespace UAS_KanBan
             直通率.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);
+            机型.MaximumSize = new Size(直通率_label.Location.X - 机型_label.Location.X - 机型_label.Width-40, 0);
         }
 
         private void Process_FormClosing(object sender, FormClosingEventArgs e)