| | |
| | | { |
| | | public partial class FrmMain : Form |
| | | { |
| | | private bool flag; |
| | | |
| | | public FrmMain() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | return; |
| | | } |
| | | |
| | | if (flag) return; |
| | | try |
| | | { |
| | | flag = true; |
| | | this.btnRun.Enabled = false; |
| | | LogOut.Info("开始运行 >>"); |
| | | |
| | | outPath = Path.Combine(outPath, serviceName); |
| | |
| | | |
| | | Tools.Handle.Run(terrainFile, waterPath, flowPath, outPath); |
| | | |
| | | flag = false; |
| | | this.btnRun.Enabled = true; |
| | | LogOut.Info("运行结束 <<"); |
| | | MessageBox.Show("运行结束!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | flag = false; |
| | | this.btnRun.Enabled = true; |
| | | LogOut.Error(ex.StackTrace); |
| | | ShowErr("运行出错:" + ex.Message); |
| | | } |