瀏覽代碼

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

Hcsy 8 年之前
父節點
當前提交
f1d8f8f8af
共有 6 個文件被更改,包括 47 次插入158 次删除
  1. 4 5
      TestProject/App.config
  2. 0 93
      TestProject/Form1.Designer.cs
  3. 0 36
      TestProject/Form1.cs
  4. 14 1
      TestProject/Form2.Designer.cs
  5. 20 12
      TestProject/Form2.cs
  6. 9 11
      TestProject/TestProject.csproj

+ 4 - 5
TestProject/App.config

@@ -1,12 +1,11 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <configSections>
     </configSections>
     <connectionStrings>
-        <add name="MES" connectionString="Data Source=117.25.180.218/orcl;User ID=MES_TEST;PassWord=select!#%*("
-            providerName="" />
+        <add name="MES" connectionString="Data Source=117.25.180.218/orcl;User ID=MES_TEST;PassWord=select!#%*(" providerName=""/>
     </connectionStrings>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
     </startup>
-</configuration>
+</configuration>

+ 0 - 93
TestProject/Form1.Designer.cs

@@ -1,93 +0,0 @@
-namespace TestProject
-{
-    partial class Form1
-    {
-        /// <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 Windows 窗体设计器生成的代码
-
-        /// <summary>
-        /// 设计器支持所需的方法 - 不要修改
-        /// 使用代码编辑器修改此方法的内容。
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.button1 = new System.Windows.Forms.Button();
-            this.button2 = new System.Windows.Forms.Button();
-            this.qqButton1 = new TestProject.QQButton();
-            this.SuspendLayout();
-            // 
-            // button1
-            // 
-            this.button1.Location = new System.Drawing.Point(632, 124);
-            this.button1.Margin = new System.Windows.Forms.Padding(4);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(100, 29);
-            this.button1.TabIndex = 0;
-            this.button1.Text = "button1";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            // 
-            // button2
-            // 
-            this.button2.Location = new System.Drawing.Point(373, 112);
-            this.button2.Margin = new System.Windows.Forms.Padding(4);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(100, 29);
-            this.button2.TabIndex = 1;
-            this.button2.Text = "button2";
-            this.button2.UseVisualStyleBackColor = true;
-            this.button2.Click += new System.EventHandler(this.button2_Click);
-            // 
-            // qqButton1
-            // 
-            this.qqButton1.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.qqButton1.IsShowBorder = true;
-            this.qqButton1.Location = new System.Drawing.Point(159, 112);
-            this.qqButton1.Name = "qqButton1";
-            this.qqButton1.Size = new System.Drawing.Size(166, 97);
-            this.qqButton1.TabIndex = 2;
-            this.qqButton1.Text = "12312";
-            this.qqButton1.UseVisualStyleBackColor = true;
-            this.qqButton1.Click += new System.EventHandler(this.qqButton1_Click);
-            // 
-            // Form1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1063, 578);
-            this.Controls.Add(this.qqButton1);
-            this.Controls.Add(this.button2);
-            this.Controls.Add(this.button1);
-            this.Margin = new System.Windows.Forms.Padding(4);
-            this.Name = "Form1";
-            this.Text = "Form1";
-            this.Load += new System.EventHandler(this.Form1_Load);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.Button button2;
-        private QQButton qqButton1;
-    }
-}
-

+ 0 - 36
TestProject/Form1.cs

@@ -1,36 +0,0 @@
-using MES接口;
-using System;
-using System.Windows.Forms;
-
-namespace TestProject
-{
-    public partial class Form1 : Form
-    {
-        public Form1()
-        {
-            InitializeComponent();
-        }
-
-        private void Form1_Load(object sender, EventArgs e)
-        {
-
-        }
-
-        private void button1_Click(object sender, EventArgs e)
-        {
-            LogicHandler lg = new LogicHandler();
-            string ErrorMessage = "";
-            LogicHandler.SetAddressInfo("EZ01", "123123123123", "123", "123", "123", "123", out ErrorMessage);
-        }
-
-        private void button2_Click(object sender, EventArgs e)
-        {
-        
-        }
-
-        private void qqButton1_Click(object sender, EventArgs e)
-        {
-
-        }
-    }
-}

+ 14 - 1
TestProject/Form2.Designer.cs

@@ -34,6 +34,7 @@
             this.rtfRichTextBox1 = new CCWin.SkinControl.RtfRichTextBox();
             this.skinListView1 = new CCWin.SkinControl.SkinListView();
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.button1 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // rtfRichTextBox1
@@ -53,7 +54,7 @@
             this.columnHeader1});
             this.skinListView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
             listViewItem1});
-            this.skinListView1.Location = new System.Drawing.Point(29, 61);
+            this.skinListView1.Location = new System.Drawing.Point(59, 99);
             this.skinListView1.Name = "skinListView1";
             this.skinListView1.OwnerDraw = true;
             this.skinListView1.Size = new System.Drawing.Size(121, 383);
@@ -61,12 +62,23 @@
             this.skinListView1.UseCompatibleStateImageBehavior = false;
             this.skinListView1.View = System.Windows.Forms.View.Details;
             // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(283, 171);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 2;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
             // Form2
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.SkyBlue;
             this.ClientSize = new System.Drawing.Size(1351, 666);
+            this.Controls.Add(this.button1);
             this.Controls.Add(this.skinListView1);
             this.Controls.Add(this.rtfRichTextBox1);
             this.Name = "Form2";
@@ -82,5 +94,6 @@
         private CCWin.SkinControl.RtfRichTextBox rtfRichTextBox1;
         private CCWin.SkinControl.SkinListView skinListView1;
         private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.Button button1;
     }
 }

+ 20 - 12
TestProject/Form2.cs

@@ -1,20 +1,11 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows.Forms;
-using CCWin;
-using System.Net.Mail;
+using BenQGuru.eMES.DLLService;
 
 namespace TestProject
 {
-    public partial class Form2 : CCSkinMain
+    public partial class Form2 : Form
     {
-        int TimerCount = 0;
         public Form2()
         {
             InitializeComponent();
@@ -22,7 +13,7 @@ namespace TestProject
 
         private void Form2_Load(object sender, EventArgs e)
         {
-           
+          
         }
 
         private void ChangeBackColor(object sender, EventArgs e)
@@ -30,5 +21,22 @@ namespace TestProject
             
            
         }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            MESHelper helper = new MESHelper();
+            string user = "zhangz";
+            string resCode = "ZY_AOIA";
+            string psw = "111111";
+            string err="";
+            if (helper.CheckUserAndResourcePassed(user, resCode, psw, out err))
+            {
+                MessageBox.Show("OK");
+            }
+            else
+            {
+                MessageBox.Show(err);
+            }
+        }
     }
 }

+ 9 - 11
TestProject/TestProject.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>TestProject</RootNamespace>
     <AssemblyName>TestProject</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <IsWebBootstrapper>true</IsWebBootstrapper>
@@ -35,6 +35,7 @@
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -66,9 +67,15 @@
     <GenerateManifests>true</GenerateManifests>
   </PropertyGroup>
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
+  </PropertyGroup>
+  <PropertyGroup>
+    <NoWin32Manifest>true</NoWin32Manifest>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="BenQGuru.eMES.DLLService">
+      <HintPath>tool\BenQGuru.eMES.DLLService.dll</HintPath>
+    </Reference>
     <Reference Include="CSkin">
       <HintPath>tool\CSkin.dll</HintPath>
     </Reference>
@@ -94,12 +101,6 @@
   <ItemGroup>
     <Compile Include="DrawHelper.cs" />
     <Compile Include="EMouseEnum.cs" />
-    <Compile Include="Form1.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="Form1.Designer.cs">
-      <DependentUpon>Form1.cs</DependentUpon>
-    </Compile>
     <Compile Include="Form2.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -114,9 +115,6 @@
     <Compile Include="QQButton.Designer.cs">
       <DependentUpon>QQButton.cs</DependentUpon>
     </Compile>
-    <EmbeddedResource Include="Form1.resx">
-      <DependentUpon>Form1.cs</DependentUpon>
-    </EmbeddedResource>
     <EmbeddedResource Include="Form2.resx">
       <DependentUpon>Form2.cs</DependentUpon>
     </EmbeddedResource>