duheng
2024-11-06 d6eeab700f8a2e28b910b53117435ff91fe96acc
修改匹配字段阀门类型可空
已修改3个文件
30 ■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.Designer.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.Designer.cs
@@ -138,7 +138,7 @@
            // popupContainerControl1
            // 
            popupContainerControl1.Controls.Add(treeList1);
            popupContainerControl1.Location = new Point(10, 158);
            popupContainerControl1.Location = new Point(20, 214);
            popupContainerControl1.Name = "popupContainerControl1";
            popupContainerControl1.Size = new Size(200, 100);
            popupContainerControl1.TabIndex = 12;
@@ -203,6 +203,7 @@
            TextEditType.Size = new Size(594, 20);
            TextEditType.StyleController = layoutControl1;
            TextEditType.TabIndex = 4;
            TextEditType.SelectedIndexChanged += TextEditType_SelectedIndexChanged;
            // 
            // BtnOk
            // 
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.cs
@@ -123,7 +123,7 @@
                this.TextEditCoefficient.Text = string.Empty;
                return;
            }
             this.TextEditCoefficient.Text = select.MinorLoss.ToString();
            this.TextEditCoefficient.Text = select.MinorLoss.ToString();
        }
        //口径选择变化事件
@@ -166,5 +166,20 @@
                return;
            this.TextEditCoefficient.Text = vm.MinorLoss.ToString();
        }
        private void TextEditType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Enum.TryParse(Convert.ToString(TextEditType.EditValue), true, out HStation.Assets.eValveType valvetype))
            {
                if (valvetype == eValveType.GPV || valvetype == eValveType.TCV)
                {
                    TextEditValveSetting.Enabled = false;
                }
                else
                {
                    TextEditValveSetting.Enabled = true ;
                }
            }
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs
@@ -9,12 +9,13 @@
    public class ValveMatchingViewModel
    {
        /// <summary>
        ///
        ///
        /// </summary>
        public ValveMatchingViewModel() { }
        public ValveMatchingViewModel()
        { }
        /// <summary>
        ///
        ///
        /// </summary>
        public ValveMatchingViewModel(Yw.Model.HydroValveInfo rhs, Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuResult> allCalcuResult)
        {
@@ -40,7 +41,6 @@
                default: break;
            }
            this.ValveSetting = rhs.ValveSetting;
        }
        /// <summaryd>
@@ -174,7 +174,7 @@
        /// </summary>
        [DisplayName("匹配阀门类型")]
        [Browsable(true)]
        public eValveType MatchingValveType { get; set; }
        public eValveType? MatchingValveType { get; set; }
        /// <summary>
        /// 匹配阀门设置