管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-22 c7d2ead2a09345cdf83a7036418b96f90a11fa86
TEWin/FrmWin.cs
@@ -24,21 +24,21 @@
        FrmTool tool;
        string mainUrl;
        bool isAngle;
        public SGWorld74 SG;
        int angleCount;
        private bool isAngle;
        double angleSize;
        private int angleCount;
        public SGWorld71 SG;
        private double angleSize;
        ITerrainLabel71 angleLabel;
        private ITerrainLabel74 angleLabel;
        ITerrainPolyline71 angleLine;
        private ITerrainPolyline74 angleLine;
        string angleGroupName = "角量算";
        private string angleGroupName = "角量算";
        string mainUrl = Application.StartupPath;
        public FrmWin()
        {
@@ -52,17 +52,17 @@
            try
            {
                LogOut.Info("开始运行..");
                mainUrl = Application.StartupPath;
                bool isTest = "1" == ConfigurationManager.AppSettings["isTest"];
                this.fly = isTest ? ConfigurationManager.AppSettings["testFly"] : Path.Combine(Application.StartupPath, "Resources\\sample.fly");
                this.fly = ConfigurationManager.AppSettings["fly"] ?? ConfigurationManager.AppSettings["testFly"];
                if (!this.fly.Contains(":\\")) this.fly = Path.Combine(Application.StartupPath, this.fly);
                if (!File.Exists(this.fly))
                {
                    LogOut.Error("Fly文件不存在:" + this.fly);
                    return;
                }
                SG = new SGWorld74();
                SG = new SGWorld71();
                SG.OnLoadFinished += SG_OnLoadFinished;
                tree = new FrmTree();
@@ -141,11 +141,11 @@
                    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;
                case 0xc8: // 基础编辑(选择对象,开启编辑)
                case 0xc8: // 编辑数据(选择对象,开启编辑)
                    SG.Command.Execute(1021, null); break;
                case 0xc9: // 点量算(坐标+高程)
                    SG.Command.Execute(1023, null); break;
@@ -170,7 +170,7 @@
                    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;
@@ -186,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)
@@ -197,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;
                    }
@@ -206,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;
            }
        }
@@ -232,7 +232,7 @@
        {
            Process p = new Process();
            p.StartInfo.FileName = path;
            p.StartInfo.Arguments = args;
            if (!string.IsNullOrEmpty(args)) p.StartInfo.Arguments = args;
            p.StartInfo.CreateNoWindow = noWindow;
            p.StartInfo.UseShellExecute = false;
            p.Start();
@@ -284,7 +284,7 @@
            return str;
        }
        #region 角量算+空间统计+空间分析+osgblab
        #region 角量算
        private void AngleMeasurement()
        {
            if (isAngle)
@@ -468,10 +468,18 @@
            return true;
        }
        #endregion
        private string GetAbsolutePath(string key)
        {
            string str = ConfigurationManager.AppSettings[key];
            return str.Contains(":\\") ? str : Path.Combine(Application.StartupPath, str);
        }
        private void SpaceStatistics()
        {
            //
            this.ShowHtml("空间统计", mainUrl + @"\Resources\SpaceStatistics\SpaceStatistics.html", 20, 20, 420, 285);
        }
        private void SpatialAnalysis()
@@ -481,8 +489,8 @@
        private void InvokeOsgbLab()
        {
            //
            ExecCmd(new List<string> { "taskkill /f /t /im OSGBLab.exe" });
            RunExe(GetAbsolutePath("osgblabPath"), null, false);
        }
        #endregion
    }
}