| | |
| | | |
| | | private void btnRun_Click(object sender, EventArgs e) |
| | | { |
| | | string serviceName = this.txtServiceName.Text.Trim(); |
| | | string terrainFile = this.txtTerrainPath.Text.Trim(); |
| | | string waterPath = this.txtWaterPath.Text.Trim(); |
| | | string flowPath = this.txtFlowPath.Text.Trim(); |
| | | string outPath = this.txtOutPath.Text.Trim(); |
| | | |
| | | if (string.IsNullOrEmpty(serviceName)) |
| | | { |
| | | ShowErr("服务名称,要求必填!"); |
| | | return; |
| | | } |
| | | if (!File.Exists(terrainFile)) |
| | | { |
| | | ShowErr("地形文件,要求必须存在!"); |
| | |
| | | flag = true; |
| | | LogOut.Info(">> 开始运行 >>"); |
| | | |
| | | outPath = Path.Combine(outPath, serviceName); |
| | | if (!Directory.Exists(outPath)) |
| | | { |
| | | Directory.CreateDirectory(outPath); |
| | | } |
| | | |
| | | Tools.Handle.Run(terrainFile, waterPath, flowPath, outPath); |
| | | |
| | | LogOut.Info("<< 运行结束 <<"); |
| | | flag = false; |
| | | LogOut.Info("<< 运行结束 <<"); |
| | | MessageBox.Show("运行结束!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | catch (Exception ex) |
| | | { |