| | |
| | | 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 |
| | | // |
| | |
| | | using SimuTools.Domain; |
| | | using SimuTools.Tools; |
| | | using System; |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | 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) |
| | | { |
| | |
| | | { |
| | | MessageBox.Show(message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | } |
| | | |
| | | private string GetSeconds(long milliseconds) |
| | | { |
| | | return (milliseconds / 1000.0).ToString(); |
| | | } |
| | | } |
| | | } |