Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 8 years ago
parent
commit
8eb3bd302e

+ 48 - 0
UAS-MES/CustomControl/BaseForm/BaseForm.Designer.cs

@@ -0,0 +1,48 @@
+namespace UAS_MES.CustomControl.BaseForm
+{
+    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.SuspendLayout();
+            // 
+            // BaseForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(725, 425);
+            this.Name = "BaseForm";
+            this.Text = "BaseForm";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BaseForm_FormClosing);
+            this.Load += new System.EventHandler(this.BaseForm_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 31 - 0
UAS-MES/CustomControl/BaseForm/BaseForm.cs

@@ -0,0 +1,31 @@
+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_MES.CustomControl.BaseForm
+{
+    public partial class BaseForm : Form
+    {
+        public BaseForm()
+        {
+            InitializeComponent();
+        }
+
+        private void BaseForm_Load(object sender, EventArgs e)
+        {
+            Main main = Application.OpenForms["Main"] as Main;
+            main.TopMost = false;
+        }
+
+        private void BaseForm_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            Main main = Application.OpenForms["Main"] as Main;
+            main.TopMost = (main.Controls["headBar1"].Controls["AlwaysTop"] as CheckBox).Checked;
+        }
+    }
+}

+ 120 - 0
UAS-MES/CustomControl/BaseForm/BaseForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 24 - 22
UAS-MES/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -30,6 +30,8 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadBar));
             this.TitleLabel = new System.Windows.Forms.Label();
+            this.UpperCollection = new System.Windows.Forms.CheckBox();
+            this.AlwaysTop = new System.Windows.Forms.CheckBox();
             this.changepwdicon = new System.Windows.Forms.PictureBox();
             this.Change_psw = new System.Windows.Forms.PictureBox();
             this.logouticon = new System.Windows.Forms.PictureBox();
@@ -38,8 +40,6 @@
             this.MinWindow = new System.Windows.Forms.PictureBox();
             this.MinWindow1 = new System.Windows.Forms.PictureBox();
             this.CloseWindow = new System.Windows.Forms.PictureBox();
-            this.UpperCollection = new System.Windows.Forms.CheckBox();
-            this.AlwaysTop = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.changepwdicon)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.logouticon)).BeginInit();
@@ -56,6 +56,28 @@
             this.TitleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
             this.TitleLabel.Name = "TitleLabel";
             // 
+            // UpperCollection
+            // 
+            resources.ApplyResources(this.UpperCollection, "UpperCollection");
+            this.UpperCollection.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.UpperCollection.Checked = true;
+            this.UpperCollection.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.UpperCollection.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.UpperCollection.Name = "UpperCollection";
+            this.UpperCollection.UseVisualStyleBackColor = false;
+            this.UpperCollection.CheckedChanged += new System.EventHandler(this.UpperCollection_CheckedChanged);
+            // 
+            // AlwaysTop
+            // 
+            resources.ApplyResources(this.AlwaysTop, "AlwaysTop");
+            this.AlwaysTop.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.AlwaysTop.Checked = true;
+            this.AlwaysTop.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.AlwaysTop.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.AlwaysTop.Name = "AlwaysTop";
+            this.AlwaysTop.UseVisualStyleBackColor = false;
+            this.AlwaysTop.CheckedChanged += new System.EventHandler(this.AlwaysTop_CheckedChanged);
+            // 
             // changepwdicon
             // 
             resources.ApplyResources(this.changepwdicon, "changepwdicon");
@@ -119,26 +141,6 @@
             this.CloseWindow.TabStop = false;
             this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
             // 
-            // UpperCollection
-            // 
-            resources.ApplyResources(this.UpperCollection, "UpperCollection");
-            this.UpperCollection.BackColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.UpperCollection.Checked = true;
-            this.UpperCollection.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.UpperCollection.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.UpperCollection.Name = "UpperCollection";
-            this.UpperCollection.UseVisualStyleBackColor = false;
-            this.UpperCollection.CheckedChanged += new System.EventHandler(this.UpperCollection_CheckedChanged);
-            // 
-            // AlwaysTop
-            // 
-            resources.ApplyResources(this.AlwaysTop, "AlwaysTop");
-            this.AlwaysTop.BackColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.AlwaysTop.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.AlwaysTop.Name = "AlwaysTop";
-            this.AlwaysTop.UseVisualStyleBackColor = false;
-            this.AlwaysTop.CheckedChanged += new System.EventHandler(this.AlwaysTop_CheckedChanged);
-            // 
             // HeadBar
             // 
             resources.ApplyResources(this, "$this");

+ 72 - 72
UAS-MES/CustomControl/HeadBar/HeadBar.resx

@@ -150,6 +150,78 @@
   <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
     <value>7</value>
   </data>
+  <data name="UpperCollection.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="UpperCollection.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="UpperCollection.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 9pt</value>
+  </data>
+  <data name="UpperCollection.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="UpperCollection.Location" type="System.Drawing.Point, System.Drawing">
+    <value>315, 0</value>
+  </data>
+  <data name="UpperCollection.Size" type="System.Drawing.Size, System.Drawing">
+    <value>91, 40</value>
+  </data>
+  <data name="UpperCollection.TabIndex" type="System.Int32, mscorlib">
+    <value>13</value>
+  </data>
+  <data name="UpperCollection.Text" xml:space="preserve">
+    <value>大写采集</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Name" xml:space="preserve">
+    <value>UpperCollection</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="AlwaysTop.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="AlwaysTop.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="AlwaysTop.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 9pt</value>
+  </data>
+  <data name="AlwaysTop.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="AlwaysTop.Location" type="System.Drawing.Point, System.Drawing">
+    <value>224, 0</value>
+  </data>
+  <data name="AlwaysTop.Size" type="System.Drawing.Size, System.Drawing">
+    <value>91, 40</value>
+  </data>
+  <data name="AlwaysTop.TabIndex" type="System.Int32, mscorlib">
+    <value>14</value>
+  </data>
+  <data name="AlwaysTop.Text" xml:space="preserve">
+    <value>窗体最前</value>
+  </data>
+  <data name="&gt;&gt;AlwaysTop.Name" xml:space="preserve">
+    <value>AlwaysTop</value>
+  </data>
+  <data name="&gt;&gt;AlwaysTop.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;AlwaysTop.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;AlwaysTop.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
   <data name="changepwdicon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
   </data>
@@ -411,78 +483,6 @@
   <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
     <value>10</value>
   </data>
-  <data name="UpperCollection.AutoSize" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="UpperCollection.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
-  <data name="UpperCollection.Font" type="System.Drawing.Font, System.Drawing">
-    <value>微软雅黑, 9pt</value>
-  </data>
-  <data name="UpperCollection.Location" type="System.Drawing.Point, System.Drawing">
-    <value>315, 0</value>
-  </data>
-  <data name="UpperCollection.Size" type="System.Drawing.Size, System.Drawing">
-    <value>91, 40</value>
-  </data>
-  <data name="UpperCollection.TabIndex" type="System.Int32, mscorlib">
-    <value>13</value>
-  </data>
-  <data name="UpperCollection.Text" xml:space="preserve">
-    <value>大写采集</value>
-  </data>
-  <data name="&gt;&gt;UpperCollection.Name" xml:space="preserve">
-    <value>UpperCollection</value>
-  </data>
-  <data name="&gt;&gt;UpperCollection.Type" xml:space="preserve">
-    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;UpperCollection.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name="&gt;&gt;UpperCollection.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name="AlwaysTop.AutoSize" type="System.Boolean, mscorlib">
-    <value>True</value>
-  </data>
-  <data name="AlwaysTop.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
-  <data name="AlwaysTop.Font" type="System.Drawing.Font, System.Drawing">
-    <value>微软雅黑, 9pt</value>
-  </data>
-  <data name="AlwaysTop.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>NoControl</value>
-  </data>
-  <data name="AlwaysTop.Location" type="System.Drawing.Point, System.Drawing">
-    <value>224, 0</value>
-  </data>
-  <data name="AlwaysTop.Size" type="System.Drawing.Size, System.Drawing">
-    <value>91, 40</value>
-  </data>
-  <data name="AlwaysTop.TabIndex" type="System.Int32, mscorlib">
-    <value>14</value>
-  </data>
-  <data name="AlwaysTop.Text" xml:space="preserve">
-    <value>窗体最前</value>
-  </data>
-  <data name="AlwaysTop.Visible" type="System.Boolean, mscorlib">
-    <value>False</value>
-  </data>
-  <data name="&gt;&gt;AlwaysTop.Name" xml:space="preserve">
-    <value>AlwaysTop</value>
-  </data>
-  <data name="&gt;&gt;AlwaysTop.Type" xml:space="preserve">
-    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;AlwaysTop.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name="&gt;&gt;AlwaysTop.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 1 - 1
UAS-MES/DbFind.cs

@@ -8,7 +8,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES
 {
-    public partial class DbFind : Form
+    public partial class DbFind : CustomControl.BaseForm.BaseForm
     {
         //判断是否配置了DbFind
         bool IsAbleDbFind;

+ 1 - 1
UAS-MES/FunctionCode/Employee/Employee_NewGroup.cs

@@ -11,7 +11,7 @@ using UAS_MES.Entity;
 
 namespace UAS_MES.Employee
 {
-    public partial class Employee_NewGroup : Form
+    public partial class Employee_NewGroup : CustomControl.BaseForm.BaseForm
     {
         DataHelper dh;
 

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewBadCode.cs

@@ -13,7 +13,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Make
 {
-    public partial class Make_NewBadCode : Form
+    public partial class Make_NewBadCode : CustomControl.BaseForm.BaseForm
     {
         //所有用到了headBar的部分都需要这段代码
         [DllImport("user32.dll")]

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -13,7 +13,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Make
 {
-    public partial class Make_NewBadCode_DE : Form
+    public partial class Make_NewBadCode_DE : CustomControl.BaseForm.BaseForm
     {
         //所有用到了headBar的部分都需要这段代码
         [DllImport("user32.dll")]

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs

@@ -13,7 +13,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Make
 {
-    public partial class Make_NewMatainInf : Form
+    public partial class Make_NewMatainInf : CustomControl.BaseForm.BaseForm
     {
         //所有用到了headBar的部分都需要这段代码
         [DllImport("user32.dll")]

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewPallet.cs

@@ -7,7 +7,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Make
 {
-    public partial class Make_NewPallet : Form
+    public partial class Make_NewPallet : CustomControl.BaseForm.BaseForm
     {
         DataHelper dh;
         DataTable Dbfind;

+ 1 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.cs

@@ -13,7 +13,7 @@ using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Warehouse
 {
-    public partial class Warehouse_NewPiInOut : Form
+    public partial class Warehouse_NewPiInOut : CustomControl.BaseForm.BaseForm
     {
 
         [DllImport("user32.dll")]

+ 1 - 1
UAS-MES/Main.Designer.cs

@@ -281,7 +281,7 @@
             this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Main";
             this.Text = "优软科技MES系统";
-            this.TopMost = false;
+            this.TopMost = true;
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
             this.Load += new System.EventHandler(this.Main_Load);
             this.BasicInf.ResumeLayout(false);