Browse Source

完善看板程序

章政 8 years ago
parent
commit
ee4ecf13e6

+ 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();
+        }
+    }
+}

+ 4 - 0
UAS_KanBan/Process.Designer.cs

@@ -419,6 +419,8 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Black;
             this.BackColor = System.Drawing.Color.Black;
             this.ClientSize = new System.Drawing.Size(1184, 687);
             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.Title2);
             this.Controls.Add(this.班制);
             this.Controls.Add(this.班制);
             this.Controls.Add(this.Line);
             this.Controls.Add(this.Line);
@@ -445,6 +447,7 @@
             this.Controls.Add(this.BottomLine);
             this.Controls.Add(this.BottomLine);
             this.Controls.Add(this.TopLine);
             this.Controls.Add(this.TopLine);
             this.ForeColor = System.Drawing.Color.White;
             this.ForeColor = System.Drawing.Color.White;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Process";
             this.Name = "Process";
             this.Text = "产线执行进度";
             this.Text = "产线执行进度";
             this.TitleColor = System.Drawing.Color.WhiteSmoke;
             this.TitleColor = System.Drawing.Color.WhiteSmoke;
@@ -452,6 +455,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Process_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Process_FormClosing);
             this.Load += new System.EventHandler(this.Process_Load);
             this.Load += new System.EventHandler(this.Process_Load);
             this.SizeChanged += new System.EventHandler(this.Process_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.Process_SizeChanged);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Process_KeyDown);
             ((System.ComponentModel.ISupportInitialize)(this.Logo)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Logo)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();

+ 14 - 3
UAS_KanBan/Process.cs

@@ -10,7 +10,7 @@ using System.Windows.Forms;
 
 
 namespace UAS_KanBan
 namespace UAS_KanBan
 {
 {
-    public partial class Process : CCSkinMain
+    public partial class Process : BaseForm
     {
     {
 
 
         AutoSizeFormClass asc = new AutoSizeFormClass();
         AutoSizeFormClass asc = new AutoSizeFormClass();
@@ -37,7 +37,7 @@ namespace UAS_KanBan
             Refresh.Tick += Refresh_Tick;
             Refresh.Tick += Refresh_Tick;
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Interval = Setting.RefreshRate * 1000;
             Refresh.Start();
             Refresh.Start();
-            Width = Width + 1;
+            WindowState = FormWindowState.Maximized;
         }
         }
 
 
         private void Refresh_Tick(object sender, EventArgs e)
         private void Refresh_Tick(object sender, EventArgs e)
@@ -73,7 +73,7 @@ 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);
             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);
             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);
             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);
             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);
             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(班制.Location.X, MidLine.Location.Y + (BottomLine.Location.Y - MidLine.Location.Y - WorkShift_label.Size.Height) / 2);
@@ -83,5 +83,16 @@ namespace UAS_KanBan
         {
         {
             Refresh.Stop();
             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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Menu;
             this.BackColor = System.Drawing.SystemColors.Menu;
             this.ClientSize = new System.Drawing.Size(677, 401);
             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.Start);
             this.Controls.Add(this.MasterCombo);
             this.Controls.Add(this.MasterCombo);
             this.Controls.Add(this.MasterCombo_Label);
             this.Controls.Add(this.MasterCombo_Label);

+ 2 - 1
UAS_KanBan/Setting.cs

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

+ 6 - 0
UAS_KanBan/UAS_KanBan.csproj

@@ -93,6 +93,12 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Compile Include="AutoSizeFormClass.cs" />
     <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="DataHelper.cs" />
     <Compile Include="Process.cs">
     <Compile Include="Process.cs">
       <SubType>Form</SubType>
       <SubType>Form</SubType>