管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-07-26 0450925f66ddded2dc51b21884a9bb9d98aa2342
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();
        }
    }
}