瀏覽代碼

添加导入配置图像文件

wb_han 5 年之前
父節點
當前提交
6b8880767b

+ 36 - 33
HOZProject/FormHOZMain.Designer.cs

@@ -30,42 +30,43 @@
         {
             this.plMain = new System.Windows.Forms.Panel();
             this.plFill = new System.Windows.Forms.Panel();
-            this.plSEM = new System.Windows.Forms.Panel();
             this.plProcess = new System.Windows.Forms.Panel();
             this.listmsg = new System.Windows.Forms.ListBox();
+            this.plSEM = new System.Windows.Forms.Panel();
             this.plLeft = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.plLeftContent = new System.Windows.Forms.Panel();
             this.plTop = new System.Windows.Forms.Panel();
-            this.btnImportTemplateFile = new System.Windows.Forms.Button();
+            this.pbImage = new System.Windows.Forms.PictureBox();
             this.pbStop = new System.Windows.Forms.PictureBox();
             this.pbPause = new System.Windows.Forms.PictureBox();
             this.pbStart = new System.Windows.Forms.PictureBox();
             this.pbMax = new System.Windows.Forms.PictureBox();
             this.pbMin = new System.Windows.Forms.PictureBox();
             this.pbClose = new System.Windows.Forms.PictureBox();
+            this.pbImportTemplateFile = new System.Windows.Forms.PictureBox();
             this.pbLog = new System.Windows.Forms.PictureBox();
             this.pbInit = new System.Windows.Forms.PictureBox();
             this.pbSave = new System.Windows.Forms.PictureBox();
             this.pbNew = new System.Windows.Forms.PictureBox();
             this.pbOpen = new System.Windows.Forms.PictureBox();
-            this.pbImage = new System.Windows.Forms.PictureBox();
             this.plMain.SuspendLayout();
             this.plFill.SuspendLayout();
             this.plLeft.SuspendLayout();
             this.plTop.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMax)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMin)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImportTemplateFile)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbLog)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbInit)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbSave)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbNew)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbOpen)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
             this.SuspendLayout();
             // 
             // plMain
@@ -97,14 +98,6 @@
             this.plFill.Size = new System.Drawing.Size(894, 658);
             this.plFill.TabIndex = 5;
             // 
-            // plSEM
-            // 
-            this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.plSEM.Location = new System.Drawing.Point(0, 568);
-            this.plSEM.Name = "plSEM";
-            this.plSEM.Size = new System.Drawing.Size(894, 90);
-            this.plSEM.TabIndex = 19;
-            // 
             // plProcess
             // 
             this.plProcess.BackColor = System.Drawing.Color.White;
@@ -126,6 +119,14 @@
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
+            // plSEM
+            // 
+            this.plSEM.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.plSEM.Location = new System.Drawing.Point(0, 568);
+            this.plSEM.Name = "plSEM";
+            this.plSEM.Size = new System.Drawing.Size(894, 90);
+            this.plSEM.TabIndex = 19;
+            // 
             // plLeft
             // 
             this.plLeft.BackColor = System.Drawing.Color.Black;
@@ -163,13 +164,13 @@
             // plTop
             // 
             this.plTop.BackColor = System.Drawing.Color.Black;
-            this.plTop.Controls.Add(this.btnImportTemplateFile);
             this.plTop.Controls.Add(this.pbStop);
             this.plTop.Controls.Add(this.pbPause);
             this.plTop.Controls.Add(this.pbStart);
             this.plTop.Controls.Add(this.pbMax);
             this.plTop.Controls.Add(this.pbMin);
             this.plTop.Controls.Add(this.pbClose);
+            this.plTop.Controls.Add(this.pbImportTemplateFile);
             this.plTop.Controls.Add(this.pbLog);
             this.plTop.Controls.Add(this.pbInit);
             this.plTop.Controls.Add(this.pbSave);
@@ -181,16 +182,14 @@
             this.plTop.Size = new System.Drawing.Size(1000, 80);
             this.plTop.TabIndex = 3;
             // 
-            // btnImportTemplateFile
+            // pbImage
             // 
-            this.btnImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnImportTemplateFile.Location = new System.Drawing.Point(374, 6);
-            this.btnImportTemplateFile.Name = "btnImportTemplateFile";
-            this.btnImportTemplateFile.Size = new System.Drawing.Size(68, 71);
-            this.btnImportTemplateFile.TabIndex = 10;
-            this.btnImportTemplateFile.Text = "选择模板文件";
-            this.btnImportTemplateFile.UseVisualStyleBackColor = true;
-            this.btnImportTemplateFile.Click += new System.EventHandler(this.btnImportTemplateFile_Click);
+            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pbImage.Location = new System.Drawing.Point(0, 0);
+            this.pbImage.Name = "pbImage";
+            this.pbImage.Size = new System.Drawing.Size(894, 568);
+            this.pbImage.TabIndex = 20;
+            this.pbImage.TabStop = false;
             // 
             // pbStop
             // 
@@ -270,6 +269,18 @@
             this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter);
             this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave);
             // 
+            // pbImportTemplateFile
+            // 
+            this.pbImportTemplateFile.BackgroundImage = global::HOZProject.Properties.Resources.ImportConfigFile;
+            this.pbImportTemplateFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+            this.pbImportTemplateFile.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbImportTemplateFile.Location = new System.Drawing.Point(374, 6);
+            this.pbImportTemplateFile.Name = "pbImportTemplateFile";
+            this.pbImportTemplateFile.Size = new System.Drawing.Size(68, 71);
+            this.pbImportTemplateFile.TabIndex = 6;
+            this.pbImportTemplateFile.TabStop = false;
+            this.pbImportTemplateFile.Click += new System.EventHandler(this.pbImportTemplateFile_Click);
+            // 
             // pbLog
             // 
             this.pbLog.BackgroundImage = global::HOZProject.Properties.Resources.Log;
@@ -330,15 +341,6 @@
             this.pbOpen.TabStop = false;
             this.pbOpen.Click += new System.EventHandler(this.pbOpen_Click);
             // 
-            // pbImage
-            // 
-            this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pbImage.Location = new System.Drawing.Point(0, 0);
-            this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(894, 568);
-            this.pbImage.TabIndex = 20;
-            this.pbImage.TabStop = false;
-            // 
             // FormHOZMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -358,18 +360,19 @@
             this.plLeft.ResumeLayout(false);
             this.plLeft.PerformLayout();
             this.plTop.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStop)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbPause)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbStart)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMax)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbMin)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbImportTemplateFile)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbLog)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbInit)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbSave)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbNew)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbOpen)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -394,8 +397,8 @@
         private System.Windows.Forms.PictureBox pbStop;
         private System.Windows.Forms.PictureBox pbPause;
         private System.Windows.Forms.ListBox listmsg;
-        private System.Windows.Forms.Button btnImportTemplateFile;
         private System.Windows.Forms.Panel plSEM;
         private System.Windows.Forms.PictureBox pbImage;
+        private System.Windows.Forms.PictureBox pbImportTemplateFile;
     }
 }

+ 1 - 1
HOZProject/FormHOZMain.cs

@@ -410,7 +410,7 @@ namespace HOZProject
         }
         #endregion
 
-        private void btnImportTemplateFile_Click(object sender, EventArgs e)
+        private void pbImportTemplateFile_Click(object sender, EventArgs e)
         {
             //打开默认路径
             OpenFileDialog openFileDialog = new OpenFileDialog();

+ 10 - 0
HOZProject/Properties/Resources.Designer.cs

@@ -150,6 +150,16 @@ namespace HOZProject.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap ImportConfigFile {
+            get {
+                object obj = ResourceManager.GetObject("ImportConfigFile", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

二進制
HOZProject/Resources/ImportConfigFile.png