From 9dba1b6adc0bbb4aa8cc531f4e6d822bf1a56be3 Mon Sep 17 00:00:00 2001 From: chenn <gu.beic@qq.com> Date: 星期五, 28 三月 2025 17:45:48 +0800 Subject: [PATCH] 添加例子 --- WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.cs | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs" "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs" index 8ecd57d..68c531c 100644 --- "a/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs" +++ "b/WinFrmUI/DPumpHydr.WinFrmUI.Volute/\345\207\272\346\260\264\350\256\276\350\256\241/ctrlSetOutflowParas.cs" @@ -129,7 +129,7 @@ tabPage1.Controls.Add(_parasControlArcCenter); return; } - if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛) { metroTile鍑哄彛鍥剧墖.BackgroundImage = GlobalResource.BuildImage("Central-exit.png", 878, 238); _parasControlArcSide.SetA_state(true); @@ -144,7 +144,7 @@ _parasControlCenter.SetA_state(false); tabPage1.Controls.Add(_parasControlCenter); return; - case DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴: + case DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛: metroTile鍑哄彛鍥剧墖.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238); _parasControlCurve.SetA_state(true); tabPage1.Controls.Add(_parasControlCurve); @@ -203,6 +203,7 @@ comboBoxType.SelectedIndex = (int)_sharp_type; if (_isxml) { + InitialOutflowStyle(); _isxml = false; } @@ -224,7 +225,7 @@ double outer_dia = 4.5 * Math.Pow(hdrBaseInfo.Q / 3600 / hdrBaseInfo.n, 1 / 3.0) * 1000; //渚ч潰鏇茬嚎 OutflowParas outflowParas渚ч潰鏇茬嚎 = null; - if(outflowParas != null && outflowParas.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + if(outflowParas != null && outflowParas.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛) { outflowParas渚ч潰鏇茬嚎 = outflowParas; } @@ -317,7 +318,7 @@ //鍦嗗姬渚ч潰 OutflowParas outflowParas鍦嗗姬渚ч潰 = null; - if (outflowParas != null && outflowParas.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴 && outflowParas.LinkStyle == eOutflowLinkStyle.鐩寸嚎鍦嗗姬) + if (outflowParas != null && outflowParas.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛 && outflowParas.LinkStyle == eOutflowLinkStyle.鐩寸嚎鍦嗗姬) { outflowParas鍦嗗姬渚ч潰 = outflowParas; } @@ -450,7 +451,7 @@ return null; _outflowParas = _parasControlArcCenter.GetBindingData(out error); } - if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛) { if (_parasControlArcSide == null) return null; @@ -466,7 +467,7 @@ return null; _outflowParas = _parasControlCenter.GetBindingData(out error); break; - case DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴: + case DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛: _outflowParas = _parasControlCurve.GetBindingData(out error); break; case DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴: @@ -508,7 +509,7 @@ { paras2.Offset = (int)((_geomBaseInfo.D3 + _sectionBundleInfo.H[8]) / 2 + 0.5); } - else if (paras3.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + else if (paras3.ShapeStyle == eOutflowShapeStyle.渚ч潰鍑哄彛) { paras3.Offset = (int)(((_geomBaseInfo.D3 / 2 + _sectionBundleInfo.H[8]) * 1.6 / 3 / 5) + 1) * 5; } @@ -522,7 +523,7 @@ { comboBoxType.SelectedIndex = 0; } - else if (_sharp_type == DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + else if (_sharp_type == DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛) { comboBoxType.SelectedIndex = 1; } @@ -582,6 +583,10 @@ private void RefreshModel() { string error; + if(OnRefreshShape3D == null) + { + return; + } var resp = OnRefreshShape3D(GetBindingData(out error)); if (resp != null) { @@ -591,7 +596,7 @@ { _parasControlArcCenter.SetBindingData(resp); } - else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛) { _parasControlArcSide.SetBindingData(resp); } @@ -603,7 +608,7 @@ { _parasControlLine.SetBindingData(resp); } - else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴) + else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛) { _parasControlCurve.SetBindingData(resp); } @@ -642,7 +647,7 @@ } else if (comboBoxType.SelectedIndex == 1) { - _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴; + _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛; checkBox鍦嗗姬杩炴帴.Enabled = true; checkBox鍦嗗姬杩炴帴.Visible = true; _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.鏇茬嚎; @@ -664,6 +669,7 @@ } if (_isxml) { + InitialOutflowStyle(); return; } InitialOutflowStyle(); @@ -688,6 +694,7 @@ } if (_isxml) { + InitialOutflowStyle(); return; } -- Gitblit v1.9.3