管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-26 0450925f66ddded2dc51b21884a9bb9d98aa2342
添加计时功能
已修改2个文件
13 ■■■■ 文件已修改
SimuTools/FrmMain.Designer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SimuTools/FrmMain.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SimuTools/FrmMain.Designer.cs
@@ -77,7 +77,7 @@
            this.txtTerrainPath.Name = "txtTerrainPath";
            this.txtTerrainPath.Size = new System.Drawing.Size(482, 26);
            this.txtTerrainPath.TabIndex = 49;
            this.txtTerrainPath.Text = "D:\\simu\\input\\terrain_overlay_buildings(float32).tif";
            this.txtTerrainPath.Text = "D:\\simu\\input\\tongzhou-local-mesh2-terrain.tif";
            // 
            // txtWaterPath
            // 
SimuTools/FrmMain.cs
@@ -1,6 +1,7 @@
using SimuTools.Domain;
using SimuTools.Tools;
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
@@ -124,11 +125,14 @@
                this.btnRun.Enabled = false;
                LogOut.Info("开始运行 >>");
                Stopwatch stopWatch = new Stopwatch();
                stopWatch.Start();
                Tools.Handle.Run(new Args(serviceName, terrainFile, buildingFile, waterPath, flowPath, outPath));
                stopWatch.Stop();
                this.btnRun.Enabled = true;
                LogOut.Info("运行结束 <<");
                MessageBox.Show("运行结束!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBox.Show("运行结束!\n耗时:" + GetSeconds(stopWatch.ElapsedMilliseconds) + " 秒", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
@@ -142,5 +146,10 @@
        {
            MessageBox.Show(message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
        private string GetSeconds(long milliseconds)
        {
            return (milliseconds / 1000.0).ToString();
        }
    }
}