فهرست منبع

添加大写采集控件

章政 8 سال پیش
والد
کامیت
f45232eb6e

+ 54 - 0
UAS-MES/CustomControl/TextBoxWithIcon/SnCollectionBox.Designer.cs

@@ -0,0 +1,54 @@
+using UAS_MES.Entity;
+
+namespace UAS_MES.CustomControl.TextBoxWithIcon
+{
+    partial class SnCollectionBox
+    {
+        /// <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()
+        {
+            components = new System.ComponentModel.Container();
+        }
+
+        public override string Text
+        {
+            get
+            {
+                if (SystemInf.UpperCollection)
+                    return base.Text.ToUpper();
+                else
+                    return base.Text;
+            }
+
+            set
+            {
+                base.Text = value;
+            }
+        }
+
+        #endregion
+    }
+}

+ 19 - 0
UAS-MES/CustomControl/TextBoxWithIcon/SnCollectionBox.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES.CustomControl.TextBoxWithIcon
+{
+    public partial class SnCollectionBox : EnterTextBox
+    {
+        public SnCollectionBox()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 2 - 0
UAS-MES/Entity/SystemInf.cs

@@ -69,5 +69,7 @@ namespace UAS_MES.Entity
         /// 缓存的XML文件的路径和名称
         /// </summary>
         public static string CacheFilePath= Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\UAS_MES\CacheFile\CacheInfo.xml";
+
+        public static bool UpperCollection = true;
     }
 }

+ 59 - 24
UAS-MES/Main.Designer.cs

@@ -48,6 +48,7 @@
             this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.headBar1 = new UAS_MES.CustomControl.HeadBar();
+            this.UpperCollection = new System.Windows.Forms.CheckBox();
             this.BasicInf.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
@@ -59,7 +60,8 @@
             this.ProductName.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.ProductName.Font = new System.Drawing.Font("微软雅黑", 13F);
             this.ProductName.ForeColor = System.Drawing.SystemColors.ButtonFace;
-            this.ProductName.Location = new System.Drawing.Point(81, 1);
+            this.ProductName.Location = new System.Drawing.Point(108, 3);
+            this.ProductName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ProductName.Name = "ProductName";
             this.ProductName.Size = new System.Drawing.Size(233, 30);
             this.ProductName.TabIndex = 3;
@@ -72,10 +74,11 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.MainTabControl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MainTabControl.ItemSize = new System.Drawing.Size(96, 25);
-            this.MainTabControl.Location = new System.Drawing.Point(157, 33);
+            this.MainTabControl.Location = new System.Drawing.Point(209, 41);
+            this.MainTabControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.MainTabControl.Name = "MainTabControl";
             this.MainTabControl.SelectedIndex = 0;
-            this.MainTabControl.Size = new System.Drawing.Size(821, 560);
+            this.MainTabControl.Size = new System.Drawing.Size(1095, 700);
             this.MainTabControl.TabIndex = 7;
             this.MainTabControl.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.MainTabControl_ControlRemoved);
             // 
@@ -84,7 +87,8 @@
             this.inf_name_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.inf_name_label.AutoSize = true;
             this.inf_name_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inf_name_label.Location = new System.Drawing.Point(6, 8);
+            this.inf_name_label.Location = new System.Drawing.Point(8, 10);
+            this.inf_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.inf_name_label.Name = "inf_name_label";
             this.inf_name_label.Size = new System.Drawing.Size(43, 20);
             this.inf_name_label.TabIndex = 4;
@@ -103,9 +107,10 @@
             this.BasicInf.Controls.Add(this.Inf_source_label);
             this.BasicInf.Controls.Add(this.inf_name_label);
             this.BasicInf.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.BasicInf.Location = new System.Drawing.Point(0, 593);
+            this.BasicInf.Location = new System.Drawing.Point(0, 741);
+            this.BasicInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BasicInf.Name = "BasicInf";
-            this.BasicInf.Size = new System.Drawing.Size(978, 31);
+            this.BasicInf.Size = new System.Drawing.Size(1304, 39);
             this.BasicInf.TabIndex = 6;
             this.BasicInf.SizeChanged += new System.EventHandler(this.BasicInf_SizeChanged);
             // 
@@ -114,7 +119,8 @@
             this.Inf_currentstep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_currentstep.AutoSize = true;
             this.Inf_currentstep.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_currentstep.Location = new System.Drawing.Point(228, 8);
+            this.Inf_currentstep.Location = new System.Drawing.Point(304, 10);
+            this.Inf_currentstep.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_currentstep.Name = "Inf_currentstep";
             this.Inf_currentstep.Size = new System.Drawing.Size(0, 20);
             this.Inf_currentstep.TabIndex = 15;
@@ -124,7 +130,8 @@
             this.Inf_currentstep_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_currentstep_label.AutoSize = true;
             this.Inf_currentstep_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_currentstep_label.Location = new System.Drawing.Point(147, 8);
+            this.Inf_currentstep_label.Location = new System.Drawing.Point(196, 10);
+            this.Inf_currentstep_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_currentstep_label.Name = "Inf_currentstep_label";
             this.Inf_currentstep_label.Size = new System.Drawing.Size(73, 20);
             this.Inf_currentstep_label.TabIndex = 14;
@@ -135,7 +142,8 @@
             this.Inf_name.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_name.AutoSize = true;
             this.Inf_name.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_name.Location = new System.Drawing.Point(64, 8);
+            this.Inf_name.Location = new System.Drawing.Point(85, 10);
+            this.Inf_name.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_name.Name = "Inf_name";
             this.Inf_name.Size = new System.Drawing.Size(0, 20);
             this.Inf_name.TabIndex = 13;
@@ -145,7 +153,8 @@
             this.Inf_linecode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_linecode.AutoSize = true;
             this.Inf_linecode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_linecode.Location = new System.Drawing.Point(406, 8);
+            this.Inf_linecode.Location = new System.Drawing.Point(541, 10);
+            this.Inf_linecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_linecode.Name = "Inf_linecode";
             this.Inf_linecode.Size = new System.Drawing.Size(0, 20);
             this.Inf_linecode.TabIndex = 11;
@@ -155,7 +164,8 @@
             this.Inf_source.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_source.AutoSize = true;
             this.Inf_source.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_source.Location = new System.Drawing.Point(565, 8);
+            this.Inf_source.Location = new System.Drawing.Point(753, 10);
+            this.Inf_source.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_source.Name = "Inf_source";
             this.Inf_source.Size = new System.Drawing.Size(0, 20);
             this.Inf_source.TabIndex = 10;
@@ -165,7 +175,8 @@
             this.Inf_db.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_db.AutoSize = true;
             this.Inf_db.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_db.Location = new System.Drawing.Point(772, 8);
+            this.Inf_db.Location = new System.Drawing.Point(1029, 10);
+            this.Inf_db.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_db.Name = "Inf_db";
             this.Inf_db.Size = new System.Drawing.Size(0, 20);
             this.Inf_db.TabIndex = 9;
@@ -175,7 +186,8 @@
             this.Inf_linecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_linecode_label.AutoSize = true;
             this.Inf_linecode_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_linecode_label.Location = new System.Drawing.Point(346, 8);
+            this.Inf_linecode_label.Location = new System.Drawing.Point(461, 10);
+            this.Inf_linecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_linecode_label.Name = "Inf_linecode_label";
             this.Inf_linecode_label.Size = new System.Drawing.Size(43, 20);
             this.Inf_linecode_label.TabIndex = 8;
@@ -186,7 +198,8 @@
             this.Inf_db_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_db_label.AutoSize = true;
             this.Inf_db_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_db_label.Location = new System.Drawing.Point(701, 8);
+            this.Inf_db_label.Location = new System.Drawing.Point(935, 10);
+            this.Inf_db_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_db_label.Name = "Inf_db_label";
             this.Inf_db_label.Size = new System.Drawing.Size(58, 20);
             this.Inf_db_label.TabIndex = 7;
@@ -197,7 +210,8 @@
             this.Inf_source_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_source_label.AutoSize = true;
             this.Inf_source_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_source_label.Location = new System.Drawing.Point(505, 8);
+            this.Inf_source_label.Location = new System.Drawing.Point(673, 10);
+            this.Inf_source_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_source_label.Name = "Inf_source_label";
             this.Inf_source_label.Size = new System.Drawing.Size(43, 20);
             this.Inf_source_label.TabIndex = 6;
@@ -209,18 +223,19 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel1.Controls.Add(this.Menu);
-            this.panel1.Location = new System.Drawing.Point(0, 32);
+            this.panel1.Location = new System.Drawing.Point(0, 40);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(155, 562);
+            this.panel1.Size = new System.Drawing.Size(206, 702);
             this.panel1.TabIndex = 1;
             // 
             // Menu
             // 
             this.Menu.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Menu.Location = new System.Drawing.Point(0, 0);
-            this.Menu.Margin = new System.Windows.Forms.Padding(4);
+            this.Menu.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.Menu.Name = "Menu";
-            this.Menu.Size = new System.Drawing.Size(153, 560);
+            this.Menu.Size = new System.Drawing.Size(204, 700);
             this.Menu.TabIndex = 3;
             // 
             // notifyIcon1
@@ -232,8 +247,9 @@
             // 
             this.pictureBox1.Image = global::UAS_MES.Properties.Resources.uas_blue;
             this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(75, 33);
+            this.pictureBox1.Size = new System.Drawing.Size(100, 41);
             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.pictureBox1.TabIndex = 4;
             this.pictureBox1.TabStop = false;
@@ -243,17 +259,34 @@
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(978, 32);
+            this.headBar1.Size = new System.Drawing.Size(1304, 40);
             this.headBar1.TabIndex = 0;
             this.headBar1.Title = null;
             // 
+            // UpperCollection
+            // 
+            this.UpperCollection.AutoSize = true;
+            this.UpperCollection.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.UpperCollection.Checked = true;
+            this.UpperCollection.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.UpperCollection.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.UpperCollection.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.UpperCollection.Location = new System.Drawing.Point(810, 9);
+            this.UpperCollection.Name = "UpperCollection";
+            this.UpperCollection.Size = new System.Drawing.Size(91, 24);
+            this.UpperCollection.TabIndex = 8;
+            this.UpperCollection.Text = "大写采集";
+            this.UpperCollection.UseVisualStyleBackColor = false;
+            this.UpperCollection.CheckedChanged += new System.EventHandler(this.UpperCollection_CheckedChanged);
+            // 
             // Main
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(978, 624);
+            this.ClientSize = new System.Drawing.Size(1304, 780);
+            this.Controls.Add(this.UpperCollection);
             this.Controls.Add(this.BasicInf);
             this.Controls.Add(this.MainTabControl);
             this.Controls.Add(this.pictureBox1);
@@ -262,6 +295,7 @@
             this.Controls.Add(this.headBar1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Main";
             this.Text = "优软科技MES系统";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
@@ -295,6 +329,7 @@
         private System.Windows.Forms.Label Inf_source;
         private System.Windows.Forms.Label Inf_linecode_label;
         private System.Windows.Forms.Label Inf_source_label;
+        private System.Windows.Forms.CheckBox UpperCollection;
     }
 }
 

+ 5 - 0
UAS-MES/Main.cs

@@ -390,5 +390,10 @@ namespace UAS_MES
             Inf_db_label.Location = new Point(Inf_source.Location.X + Inf_source.Width + 45, Inf_source.Location.Y);
             Inf_db.Location = new Point(Inf_db_label.Location.X + Inf_db_label.Width + 5, Inf_db_label.Location.Y);
         }
+
+        private void UpperCollection_CheckedChanged(object sender, EventArgs e)
+        {
+            SystemInf.UpperCollection = UpperCollection.Checked;
+        }
     }
 }