| | |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using DevExpress.Utils.MVVM; |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using HStation.WinFrmUI.Xhs; |
| | | using Yw.Model; |
| | | |
| | |
| | | /// </summary> |
| | | public event Action<HydroVisualInfo> FlowEffectPropertyValueChangedEvent; |
| | | |
| | | #endregion |
| | | #endregion 事件集 |
| | | |
| | | #region 属性赋值 |
| | | |
| | |
| | | set { this.hydroVisualPropertyCtrl1.SelectedObject = value; } |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 属性赋值 |
| | | |
| | | #region 属性更新 |
| | | |
| | |
| | | case Yw.Hydro.ParterCatalog.Tank: |
| | | { |
| | | var tankViewModel = vm as HydroTankViewModel; |
| | | var input = HydroMatchingHelper.Create(tankViewModel.Vmo, tankViewModel.HydroInfo); |
| | | var input = HydroMatchingHelper.Create(tankViewModel); |
| | | var dlg = new SimulationTankSingleMatchingDlg(); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | HydroMatchingHelper.Apply(tankViewModel.HydroInfo, tankViewModel.Vmo, output); |
| | | tankViewModel.UpdateProperty(); |
| | | HydroMatchingHelper.Apply(tankViewModel, output); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | }; |
| | | dlg.SetBindingData(input); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Waterbox: |
| | | { |
| | | var tankViewModel = vm as HydroTankViewModel; |
| | | var input = HydroMatchingHelper.Create(tankViewModel.Vmo, tankViewModel.HydroInfo); |
| | | var input = HydroMatchingHelper.Create(tankViewModel); |
| | | var dlg = new SimulationTankSingleMatchingDlg(); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | HydroMatchingHelper.Apply(tankViewModel.HydroInfo, tankViewModel.Vmo, output); |
| | | tankViewModel.UpdateProperty(); |
| | | HydroMatchingHelper.Apply(tankViewModel, output); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | }; |
| | | dlg.SetBindingData(input); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Blunthead: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Elbow: |
| | | { |
| | | var elbowViewModel = vm as HydroElbowViewModel; |
| | | var input = HydroMatchingHelper.Create(elbowViewModel.Vmo, elbowViewModel.HydroInfo); |
| | | var input = HydroMatchingHelper.Create(elbowViewModel); |
| | | var dlg = new SimulationElbowSingleMatchingDlg(); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | HydroMatchingHelper.Apply(elbowViewModel.HydroInfo, elbowViewModel.Vmo, output); |
| | | elbowViewModel.UpdateProperty(); |
| | | HydroMatchingHelper.Apply(elbowViewModel, output); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | }; |
| | | dlg.SetBindingData(input); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Threelink: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Fourlink: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Meter: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Flowmeter: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Pressmeter: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Nozzle: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Hydrant: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Pipe: |
| | | { |
| | | |
| | | var pipeViewModel = vm as HydroPipeViewModel; |
| | | var input = HydroMatchingHelper.Create(pipeViewModel); |
| | | var dlg = new SimulationPipeSingleMatchingDlg(); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | HydroMatchingHelper.Apply(pipeViewModel, output); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Pump: |
| | | { |
| | | var pumpViewModel = vm as HydroPumpViewModel; |
| | |
| | | var dlg = new SimulationPumpSingleMatchingDlg(); |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | HydroMatchingHelper.Apply(pumpViewModel.HydroInfo, pumpViewModel.Vmo, output); |
| | | pumpViewModel.UpdateProperty(); |
| | | HydroMatchingHelper.Apply(pumpViewModel, output); |
| | | this.hydroVisualPropertyCtrl1.UpdateRows(); |
| | | }; |
| | | dlg.SetBindingData(input); |
| | | dlg.ShowDialog(); |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Valve: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Exchanger: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case Yw.Hydro.ParterCatalog.Compressor: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | default: break; |
| | | |
| | | default: break; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | case HydroCurve.Tank: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | 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(); |
| | | //return true; |
| | | var pumpViewModel = vm as HydroPumpViewModel; |
| | | //var dlg = new PumpChartShowDlg(); |
| | | } |
| | | break; |
| | | |
| | | case HydroCurve.Valve: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case HydroCurve.Exchanger: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | case HydroCurve.Compressor: |
| | | { |
| | | |
| | | } |
| | | break; |
| | | |
| | | default: break; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 事件实现 |
| | | |
| | | #region 事件穿透 |
| | | |
| | |
| | | this.FlowEffectPropertyValueChangedEvent?.Invoke(vm?.Vmo); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 事件穿透 |
| | | } |
| | | } |