| | |
| | | } |
| | | |
| | | //选择曲线 |
| | | private bool HydroVisualPropertyCtrl1_SetCurveEvent(HydroVisualViewModel vm, string curveType) |
| | | private bool HydroVisualPropertyCtrl1_SetCurveEvent(HydroVisualViewModel vm, string curve, string curveType) |
| | | { |
| | | if (vm == null) |
| | | { |
| | | return false; |
| | | } |
| | | switch (curveType) |
| | | switch (curve) |
| | | { |
| | | case HydroCurve.Pump: |
| | | { |
| | | var pumpInfo = vm.HydroInfo.Pumps?.Find(x => x.Code == vm.Code); |
| | | if (pumpInfo == null) |
| | | { |
| | | break; |
| | | } |
| | | var input = AssetsMatchingParasHelper.Create(vm.HydroInfo, pumpInfo, null); |
| | | var dlg = new SinglePumpAnalyDlg(); |
| | | dlg.SetBindindData(input); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | var bol = AssetsMatchingParasHelper.Apply(vm.HydroInfo, output); |
| | | if (bol) |
| | | { |
| | | vm.UpdateProperty(); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | } |
| | | return bol; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | //var pumpInfo = vm.HydroInfo.Pumps?.Find(x => x.Code == vm.Code); |
| | | //if (pumpInfo == null) |
| | | //{ |
| | | // break; |
| | | //} |
| | | //var input = AssetsMatchingParasHelper.Create(vm.HydroInfo, pumpInfo, null); |
| | | //var dlg = new SinglePumpAnalyDlg(); |
| | | //dlg.SetBindindData(input); |
| | | //dlg.ReloadDataEvent += (output) => |
| | | //{ |
| | | // var bol = AssetsMatchingParasHelper.Apply(vm.HydroInfo, output); |
| | | // if (bol) |
| | | // { |
| | | // vm.UpdateProperty(); |
| | | // this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | // } |
| | | // return bol; |
| | | //}; |
| | | //dlg.ShowDialog(); |
| | | return true; |
| | | } |
| | | case HydroCurve.PumpQH: |