chenn
2025-04-01 9a7e74591a70bc1be9c9995b5cab4cbfafaa8996
WinFrmUI/DPumpHydr.WinFrmUI.Volute/出水设计/ctrlSetOutflowParas.cs
@@ -107,6 +107,12 @@
                return _sharp_type;
            }
        }
        bool _isxml = false;
        public bool Isxml
        {
            get { return _isxml; }
            set { _isxml = value; }
        }
        private void InitialOutflowStyle()
        {
            if (_parasControlCenter == null)
@@ -123,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);
@@ -138,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);
@@ -172,11 +178,20 @@
            if(outflowParas != null)
            {
                _sharp_type = outflowParas.ShapeStyle;
                _link_type = outflowParas.LinkStyle;
            }
            //
            InitialCtrlDefaultParas(hdrBaseInfo, geomBaseInfo, sectionBundleInfo, outflowParas);
     
            if(_link_type == eOutflowLinkStyle.鏇茬嚎)
            {
                checkBox鍦嗗姬杩炴帴.Checked = false;
            }
            else
            {
                checkBox鍦嗗姬杩炴帴.Checked = true;
            }
            if (_sharp_type == eOutflowShapeStyle.鏈煡)
            {
@@ -185,9 +200,16 @@
            }
            else
            {
                comboBoxType.SelectedIndex = (int)_sharp_type;
                if (_isxml)
                {
                    InitialOutflowStyle();
                    _isxml = false;
                }
                InitialOutflowStyle();
                RefreshModel();
                    RefreshModel();
            }
            return 1;
@@ -203,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;
            }
@@ -296,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;
            }
@@ -429,7 +451,7 @@
                        return null;
                    _outflowParas = _parasControlArcCenter.GetBindingData(out error);
                }
                if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴)
                if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛)
                {
                    if (_parasControlArcSide == null)
                        return null;
@@ -445,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.渚ч潰鍑哄彛_鐩寸嚎杩炴帴:
@@ -487,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;
            }
@@ -501,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;
            }
@@ -561,6 +583,10 @@
        private void RefreshModel()
        {
            string error;
            if(OnRefreshShape3D == null)
            {
                return;
            }
            var resp = OnRefreshShape3D(GetBindingData(out error));
            if (resp != null)
            {
@@ -570,7 +596,7 @@
                    {
                        _parasControlArcCenter.SetBindingData(resp);
                    }
                    else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴)
                    else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛)
                    {
                        _parasControlArcSide.SetBindingData(resp);
                    }
@@ -582,7 +608,7 @@
                    {
                        _parasControlLine.SetBindingData(resp);
                    }
                    else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴)
                    else if (_sharp_type == eOutflowShapeStyle.渚ч潰鍑哄彛)
                    {
                        _parasControlCurve.SetBindingData(resp);
                    }
@@ -621,9 +647,9 @@
            }
            else if (comboBoxType.SelectedIndex == 1)
            {
                _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鏇茬嚎杩炴帴;
                checkBox鍦嗗姬杩炴帴.Enabled = false;
                checkBox鍦嗗姬杩炴帴.Visible = false;
                _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛;
                checkBox鍦嗗姬杩炴帴.Enabled = true;
                checkBox鍦嗗姬杩炴帴.Visible = true;
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.鏇茬嚎;
                if (checkBox鍦嗗姬杩炴帴.Checked)
                {
@@ -633,7 +659,7 @@
                {
                    _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.鏇茬嚎;
                }
              }
            }
            else if (comboBoxType.SelectedIndex == 2)
            {
                _sharp_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowShapeStyle.渚ч潰鍑哄彛_鐩寸嚎杩炴帴;
@@ -641,10 +667,14 @@
                checkBox鍦嗗姬杩炴帴.Visible = false;
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.鏇茬嚎;
            }
            if (_isxml)
            {
                InitialOutflowStyle();
                return;
            }
            InitialOutflowStyle();
            RefreshModel();
                RefreshModel();
        }
        private void btnNextStep_Click(object sender, EventArgs e)
@@ -662,6 +692,11 @@
            {
                _link_type = DPumpHydr.WinFrmUI.Volute.ViewModel.eOutflowLinkStyle.鐩寸嚎鍦嗗姬;
            }
            if (_isxml)
            {
                InitialOutflowStyle();
                return;
            }
            InitialOutflowStyle();