From 21065c4d780e4615e8df2258c06a82b1c634edbf Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 10 十二月 2024 14:24:07 +0800 Subject: [PATCH] 核心界面 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs | 103 +++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 90 insertions(+), 13 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs index ff7114b..3dcbe0f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs @@ -63,6 +63,15 @@ #region 灞炴�ц祴鍊� /// <summary> + /// 鍏佽缂栬緫 + /// </summary> + public bool AllowEdit + { + get { return this.hydroVisualPropertyCtrl1.AllowEdit; } + set { this.hydroVisualPropertyCtrl1.AllowEdit = value; } + } + + /// <summary> /// 閫夋嫨瀵硅薄 /// </summary> public HydroVisualViewModel SelectedObject @@ -105,7 +114,7 @@ this.hydroVisualPropertyCtrl1.UpdateRows(); } - #endregion 灞炴�ф洿鏂� + #endregion #region 浜嬩欢瀹炵幇 @@ -127,6 +136,9 @@ { HydroMatchingHelper.Apply(tankViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -141,6 +153,9 @@ { HydroMatchingHelper.Apply(tankViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -155,6 +170,9 @@ { HydroMatchingHelper.Apply(bluntheadViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -169,6 +187,9 @@ { HydroMatchingHelper.Apply(elbowViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -183,6 +204,9 @@ { HydroMatchingHelper.Apply(threelinkViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -197,6 +221,9 @@ { HydroMatchingHelper.Apply(fourlinkViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -211,6 +238,9 @@ { HydroMatchingHelper.Apply(meterViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -225,6 +255,9 @@ { HydroMatchingHelper.Apply(flowmeterViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -239,6 +272,9 @@ { HydroMatchingHelper.Apply(pressmeterViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -253,6 +289,9 @@ { HydroMatchingHelper.Apply(nozzleViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -267,6 +306,9 @@ { HydroMatchingHelper.Apply(hydrantViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -281,6 +323,9 @@ { HydroMatchingHelper.Apply(pipeViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.ShowDialog(); } @@ -294,6 +339,9 @@ { HydroMatchingHelper.Apply(pumpViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -308,6 +356,9 @@ { HydroMatchingHelper.Apply(valveViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -322,6 +373,9 @@ { HydroMatchingHelper.Apply(exchangerViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -336,6 +390,9 @@ { HydroMatchingHelper.Apply(compressorViewModel, output); this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; dlg.SetBindingData(input); dlg.ShowDialog(); @@ -357,9 +414,14 @@ { case HydroCurve.Tank: { - var tankViewModel = vm as HydroTankViewModel; - var dlg = new TankChartShowDlg(); - dlg.ShowDialog(); + if (long.TryParse(vm.DbId, out long longDbId)) + { + var tankViewModel = vm as HydroTankViewModel; + var dlg = new TankChartShowDlg(); + dlg.SetBingingData(longDbId); + dlg.ShowDialog(); + } + } break; case HydroCurve.Pump: @@ -379,23 +441,36 @@ break; case HydroCurve.Valve: { - var valveViewModel = vm as HydroValveViewModel; - var dlg = new ValveChartShowDlg(); - dlg.ShowDialog(); + if (long.TryParse(vm.DbId, out long longDbId)) + { + var valveViewModel = vm as HydroValveViewModel; + var dlg = new ValveChartShowDlg(); + dlg.SetBingingData(longDbId); + dlg.ShowDialog(); + } } break; case HydroCurve.Exchanger: { - var exchangerViewModel = vm as HydroExchangerViewModel; - var dlg = new ExchangerChartShowDlg(); - dlg.ShowDialog(); + if (long.TryParse(vm.DbId, out long longDbId)) + { + var exchangerViewModel = vm as HydroExchangerViewModel; + var dlg = new ExchangerChartShowDlg(); + dlg.SetBingingData(longDbId); + dlg.ShowDialog(); + } + } break; case HydroCurve.Compressor: { - var compressorViewModel = vm as HydroCompressorViewModel; - var dlg = new CompressorChartShowDlg(); - dlg.ShowDialog(); + if (long.TryParse(vm.DbId, out long longDbId)) + { + var compressorViewModel = vm as HydroCompressorViewModel; + var dlg = new CompressorChartShowDlg(); + dlg.SetBingingData(longDbId); + dlg.ShowDialog(); + } } break; default: break; @@ -451,5 +526,7 @@ } #endregion + + } } \ No newline at end of file -- Gitblit v1.9.3