管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-03 b138834384e977cfc93cff1c66f70676cd4e7e18
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);
        }
    }
}