| | |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using TimePoint = Hydro.CommonBase.TimePoint; |
| | | |
| | | namespace Hydro.MapView |
| | | { |
| | |
| | | |
| | | |
| | | time = DateTime.Now; |
| | | if (configPath==null) configPath= System.IO.Directory.GetCurrentDirectory() + "\\" + "config_calc.wdb"; ; |
| | | if (configPath == null) configPath = System.IO.Directory.GetCurrentDirectory() + "\\" + "config_calc.wdb"; ; |
| | | string path = configPath; |
| | | result = wdo.Init(path, InpPath, onFinish, onError, null, param, false); |
| | | if (result != null) |
| | | { |
| | | MessageBox.Show(result); |
| | | wdo.Close(); |
| | | |
| | | return null; |
| | | throw new Exception(result); |
| | | |
| | | //return null; |
| | | //return; |
| | | } |
| | | |
| | |
| | | { |
| | | |
| | | |
| | | MessageBox.Show("原因:" + result, "计算失败"); |
| | | //MessageBox.Show("原因:" + result, "计算失败"); |
| | | new Thread(() => |
| | | { |
| | | Thread.Sleep(1000); |
| | |
| | | { |
| | | isFinished = true; |
| | | } |
| | | throw new Exception("计算失败,原因:" + result); |
| | | } |
| | | |
| | | } |