From b138834384e977cfc93cff1c66f70676cd4e7e18 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 03 一月 2024 11:23:11 +0800 Subject: [PATCH] 添加大量的资源文件~ --- TEWin/FrmWin.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 48 insertions(+), 9 deletions(-) diff --git a/TEWin/FrmWin.cs b/TEWin/FrmWin.cs index 5112be1..4b04207 100644 --- a/TEWin/FrmWin.cs +++ b/TEWin/FrmWin.cs @@ -21,15 +21,9 @@ FrmTool tool; - public SGWorld74 SG = null; + string mainUrl; - public static string StartupPath - { - get - { - return System.Windows.Forms.Application.StartupPath; - } - } + public SGWorld74 SG = null; public FrmWin() { @@ -43,8 +37,9 @@ try { LogOut.Info("寮�濮嬭繍琛�.."); + mainUrl = Application.StartupPath.Replace("\\", "/"); - string fly = Path.Combine(StartupPath, "Resources\\sample.fly"); + string fly = Path.Combine(Application.StartupPath, "Resources\\sample.fly"); if (!File.Exists(fly)) { LogOut.Error("Fly鏂囦欢涓嶅瓨鍦細" + fly); @@ -61,6 +56,8 @@ string isTest = ConfigurationManager.AppSettings["isTest"]; if ("1".Equals(isTest)) { + this.FormBorderStyle = FormBorderStyle.FixedSingle; + tree.FormBorderStyle = FormBorderStyle.FixedSingle; tool = new FrmTool(this); tool.Show(); } @@ -225,5 +222,47 @@ { } + + public void ShowHtmlByid(int id, int arg) + { + switch (id) + { + case 1034: + this.ShowHtml("璺濈娴嬮噺", mainUrl + "/Resources/DistanceMeasurement/distanceMeasurement.html", 20, 20, 400, 245); + break; + case 1037: + this.ShowHtml("闈㈢Н娴嬮噺", mainUrl + "/Resources/AreaMeasurement/AreaMeasurement.html", 20, 20, 400, 245); + break; + case 1149: + if (28 == arg) + this.ShowHtml("鍓栭潰鍒嗘瀽", mainUrl + "/Resources/TerrainProfile/TerrainProfile.html", 20, 20, 400, 290); + else + this.ShowHtml("鍓栧垏鍒嗘瀽", mainUrl + "/Resources/CrossSection/CrossSection.html", 20, 20, 400, 225); + break; + case 1093: + this.ShowHtml("鍧″害鍒嗘瀽", mainUrl + "/Resources/SlopeMapQuery/SlopeMapQuery.html", 20, 20, 350, 365); + break; + case 1045: + this.ShowHtml("浣撶Н鍒嗘瀽", mainUrl + "/Resources/Volume/Volume.html", 20, 20, 350, 225); + break; + } + } + + public void ShowHtml(string tile, string url, int left, int top, int width, int height) + { + if (SG.Window.GetPopupByCaption(tile) != null) + { + SG.Window.RemovePopupByCaption(tile); + } + + var popup = SG.Creator.CreatePopupMessage(tile, url, left, top, width, height); + popup.AllowResize = true; + popup.ShowCaption = true; + popup.AllowDrag = true; + popup.Width = width; + popup.Height = height; + + SG.Window.ShowPopup(popup); + } } } -- Gitblit v1.9.3