From 4c2562ebe22e3d07512a77fca3b3fbd853d960f8 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 09 一月 2024 16:30:47 +0800 Subject: [PATCH] 修改fly初始化 --- TEWin/FrmWin.Designer.cs | 1 + TEWin/FrmWin.cs | 25 +++++++++++++++---------- TEWin/FrmTree.Designer.cs | 1 + TEWin/FrmTool.Designer.cs | 1 + 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/TEWin/FrmTool.Designer.cs b/TEWin/FrmTool.Designer.cs index d7f0af0..7f46823 100644 --- a/TEWin/FrmTool.Designer.cs +++ b/TEWin/FrmTool.Designer.cs @@ -60,6 +60,7 @@ this.Controls.Add(this.btnTest); this.Controls.Add(this.txtCode); this.Name = "FrmTool"; + this.ShowInTaskbar = false; this.Text = "FrmTool"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/TEWin/FrmTree.Designer.cs b/TEWin/FrmTree.Designer.cs index c5a7b03..4109d2a 100644 --- a/TEWin/FrmTree.Designer.cs +++ b/TEWin/FrmTree.Designer.cs @@ -53,6 +53,7 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Margin = new System.Windows.Forms.Padding(2); this.Name = "FrmTree"; + this.ShowInTaskbar = false; this.Text = "FrmTree"; ((System.ComponentModel.ISupportInitialize)(this.axTETree)).EndInit(); this.ResumeLayout(false); diff --git a/TEWin/FrmWin.Designer.cs b/TEWin/FrmWin.Designer.cs index 038514d..6ff623e 100644 --- a/TEWin/FrmWin.Designer.cs +++ b/TEWin/FrmWin.Designer.cs @@ -53,6 +53,7 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Margin = new System.Windows.Forms.Padding(2); this.Name = "FrmWin"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "FrmWin"; ((System.ComponentModel.ISupportInitialize)(this.axTEWin)).EndInit(); diff --git a/TEWin/FrmWin.cs b/TEWin/FrmWin.cs index da8a5be..665eebe 100644 --- a/TEWin/FrmWin.cs +++ b/TEWin/FrmWin.cs @@ -18,6 +18,8 @@ public partial class FrmWin : Form { #region 鎴愬憳鍙橀噺+鏋勯�犲嚱鏁�+浜嬩欢 + string fly; + FrmTree tree; FrmTool tool; @@ -53,16 +55,15 @@ mainUrl = Application.StartupPath; bool isTest = "1" == ConfigurationManager.AppSettings["isTest"]; - string fly = isTest ? ConfigurationManager.AppSettings["testFly"] : Path.Combine(Application.StartupPath, "Resources\\sample.fly"); - if (!File.Exists(fly)) + this.fly = isTest ? ConfigurationManager.AppSettings["testFly"] : Path.Combine(Application.StartupPath, "Resources\\sample.fly"); + if (!File.Exists(this.fly)) { - LogOut.Error("Fly鏂囦欢涓嶅瓨鍦細" + fly); + LogOut.Error("Fly鏂囦欢涓嶅瓨鍦細" + this.fly); return; } SG = new SGWorld74(); SG.OnLoadFinished += SG_OnLoadFinished; - SG.Open(fly); tree = new FrmTree(); tree.Show(this); @@ -73,12 +74,14 @@ tree.FormBorderStyle = FormBorderStyle.Sizable; tool = new FrmTool(this); tool.Show(); + + SG.Open(this.fly); } - else - { - this.WindowState = FormWindowState.Maximized; - tree.WindowState = FormWindowState.Maximized; - } + //else + //{ + // this.WindowState = FormWindowState.Maximized; + // tree.WindowState = FormWindowState.Maximized; + //} } catch (Exception ex) @@ -89,7 +92,7 @@ void SG_OnLoadFinished(bool bSuccess) { - // + this.SG.OnLoadFinished -= SG_OnLoadFinished; } void FrmWin_FormClosed(object sender, FormClosedEventArgs e) @@ -173,6 +176,8 @@ SG.Command.Execute(1028, null); break; case 0xd6: // 浼犵粺4D浜у搧娲剧敓(闆嗘垚osgblab) InvokeOsgbLab(); break; + case 0xd7: // 鎵撳紑fly + SG.Open(this.fly); break; } } -- Gitblit v1.9.3