管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-11 0ac9c5eb993abd7053b075fc6e1e62049d2c047b
TEWin/FrmWin.cs
@@ -18,13 +18,15 @@
    public partial class FrmWin : Form
    {
        #region 成员变量+构造函数+事件
        string fly;
        FrmTree tree;
        FrmTool tool;
        string mainUrl;
        public SGWorld74 SG;
        public SGWorld71 SG;
        private bool isAngle;
@@ -32,9 +34,9 @@
        private double angleSize;
        private ITerrainLabel74 angleLabel;
        private ITerrainLabel71 angleLabel;
        private ITerrainPolyline74 angleLine;
        private ITerrainPolyline71 angleLine;
        private string angleGroupName = "角量算";
@@ -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 = new SGWorld71();
                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)
@@ -138,7 +141,7 @@
                    SG.Command.Execute(1014, 26); break;
                case 0xc6: // 模型数据(*.osgb)
                    ExecCmd(new List<string> { "taskkill /f /t /im MeshLayerTool.exe" }); // SG.Command.Execute(2342, null);
                    RunExe(Path.Combine(ConfigurationManager.AppSettings["tePath"], "MeshLayerTool.exe"), " -RunApp TerraExplorer -RunConvertor -Mode ImportMeshLayer -Type osgb", false);
                    RunExe(Path.Combine(ConfigurationManager.AppSettings["tePath"], "MeshLayerTool.exe"), " -RunConvertor -Mode ImportMeshLayer -Type osgb", false); // -RunApp TerraExplorer
                    break;
                case 0xc7: // 模型数据(*.obj)
                    SG.Command.Execute(1012, 13); break;
@@ -167,12 +170,14 @@
                    this.ShowHtmlByid(1093, 0); break;
                case 0xd3: // DEM分析(等值线)
                    SG.Command.Execute(1039, null); break;
                case 0xd4: // 三维模型分析(剖面分析+剖切分析)
                case 0xd4: // 三维模型分析(剖切分析)
                    this.ShowHtmlByid(1149, 39); break;
                case 0xd5: // 地理场景产品组装(抽取指定区域并发布离线数据包)
                    SG.Command.Execute(1028, null); break;
                case 0xd6: // 传统4D产品派生(集成osgblab)
                    InvokeOsgbLab(); break;
                case 0xd7: // 打开fly
                    SG.Open(this.fly); break;
            }
        }
@@ -181,10 +186,10 @@
            switch (id)
            {
                case 1034:
                    this.ShowHtml("距离测量", mainUrl + @"\Resources\DistanceMeasurement\distanceMeasurement.html", 20, 20, 400, 245);
                    this.ShowHtml("距离测量", mainUrl + @"\Resources\DistanceMeasurement\distanceMeasurement.html", 20, 20, 400, 275);
                    break;
                case 1037:
                    this.ShowHtml("面积测量", mainUrl + @"/Resources\AreaMeasurement\AreaMeasurement.html", 20, 20, 400, 245);
                    this.ShowHtml("面积测量", mainUrl + @"/Resources\AreaMeasurement\AreaMeasurement.html", 20, 20, 400, 205);
                    break;
                case 1149:
                    switch (arg)
@@ -192,7 +197,7 @@
                        case 24:
                            this.ShowHtml("坡向分析", mainUrl + @"\Resources\SlopeCursor\SlopeCursor.html", 20, 20, 400, 330); break;
                        case 28:
                            this.ShowHtml("剖面分析", mainUrl + @"\Resources\TerrainProfile\TerrainProfile.html", 20, 20, 400, 290); break;
                            this.ShowHtml("剖面分析", mainUrl + @"\Resources\TerrainProfile\TerrainProfile.html", 20, 20, 400, 265); break;
                        case 39:
                            this.ShowHtml("剖切分析", mainUrl + @"\Resources\CrossSection\CrossSection.html", 20, 20, 400, 225); break;
                    }
@@ -201,7 +206,7 @@
                    this.ShowHtml("坡度分析", mainUrl + @"\Resources\SlopeMapQuery\SlopeMapQuery.html", 20, 20, 350, 365);
                    break;
                case 1045:
                    this.ShowHtml("体积分析", mainUrl + @"\Resources\Volume\Volume.html", 20, 20, 350, 255);
                    this.ShowHtml("体积分析", mainUrl + @"\Resources\Volume\Volume.html", 20, 20, 350, 225);
                    break;
            }
        }