From a6c50c87d1ba3f5c8785dcc9e8ea640b5a43209f Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期四, 26 九月 2024 15:07:09 +0800 Subject: [PATCH] 修改报错 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingViewModel.cs | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs | 5 WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs | 102 +++++---- WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.Designer.cs | 4 WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.resx | 22 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingViewModel.cs | 6 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingViewModel.cs | 8 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingViewModel.cs | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.resx | 2 WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs | 43 +-- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingViewModel.cs | 6 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user | 3 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingViewModel.cs | 6 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 52 +---- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs | 44 ++- /dev/null | 114 ----------- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/FourlinkMatchingViewModel.cs | 5 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingListCtrl.cs | 15 - WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/01-PumpMainCurveChoice/PumpMainChoieViewModel.cs | 10 25 files changed, 179 insertions(+), 373 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs index 2365b33..544cc88 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.Designer.cs @@ -33,7 +33,6 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); treeList1 = new DevExpress.XtraTreeList.TreeList(); colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colIsHave = new DevExpress.XtraTreeList.Columns.TreeListColumn(); colUnitName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); colIsNull = new DevExpress.XtraTreeList.Columns.TreeListColumn(); colDefaultValue = new DevExpress.XtraTreeList.Columns.TreeListColumn(); @@ -64,7 +63,8 @@ // BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(654, 471); + BtnOk.Location = new Point(654, 384); + BtnOk.Margin = new Padding(3, 2, 3, 2); BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(107, 22); BtnOk.StyleController = layoutControl1; @@ -79,18 +79,20 @@ layoutControl1.Controls.Add(BtnOk); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); + layoutControl1.Margin = new Padding(3, 2, 3, 2); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; - layoutControl1.Size = new Size(874, 495); + layoutControl1.Size = new Size(874, 408); layoutControl1.TabIndex = 9; layoutControl1.Text = "layoutControl1"; // // treeList1 // treeList1.CheckBoxFieldName = "IsHave"; - treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName, colIsHave, colUnitName, colIsNull, colDefaultValue, colPropChoice }); + treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName, colUnitName, colIsNull, colDefaultValue, colPropChoice }); treeList1.DataSource = sysCatalogPropViewModelBindingSource; treeList1.Location = new Point(2, 2); + treeList1.Margin = new Padding(3, 2, 3, 2); treeList1.Name = "treeList1"; treeList1.OptionsBehavior.AllowRecursiveNodeChecking = true; treeList1.OptionsScrollAnnotations.ShowSelectedRows = DevExpress.Utils.DefaultBoolean.True; @@ -98,7 +100,7 @@ treeList1.OptionsView.CheckBoxStyle = DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle.Check; treeList1.OptionsView.RootCheckBoxStyle = DevExpress.XtraTreeList.NodeCheckBoxStyle.Check; treeList1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemCheckedComboBoxEdit1 }); - treeList1.Size = new Size(870, 465); + treeList1.Size = new Size(870, 378); treeList1.TabIndex = 4; treeList1.BeforeCheckNode += treeList1_BeforeCheckNode; treeList1.AfterCheckNode += treeList1_AfterCheckNode; @@ -113,15 +115,6 @@ colName.OptionsColumn.AllowSort = true; colName.Visible = true; colName.VisibleIndex = 0; - // - // colIsHave - // - colIsHave.Caption = "鏄惁閫夋嫨"; - colIsHave.FieldName = "IsHave"; - colIsHave.Name = "colIsHave"; - colIsHave.OptionsColumn.AllowSort = true; - colIsHave.Visible = true; - colIsHave.VisibleIndex = 4; // // colUnitName // @@ -158,7 +151,7 @@ colPropChoice.Name = "colPropChoice"; colPropChoice.OptionsColumn.AllowSort = true; colPropChoice.Visible = true; - colPropChoice.VisibleIndex = 5; + colPropChoice.VisibleIndex = 4; // // repositoryItemCheckedComboBoxEdit1 // @@ -166,7 +159,6 @@ repositoryItemCheckedComboBoxEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); repositoryItemCheckedComboBoxEdit1.Name = "repositoryItemCheckedComboBoxEdit1"; repositoryItemCheckedComboBoxEdit1.SelectAllItemCaption = "鍏ㄩ��"; - repositoryItemCheckedComboBoxEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; repositoryItemCheckedComboBoxEdit1.EditValueChanged += repositoryItemCheckedComboBoxEdit1_EditValueChanged; // // sysCatalogPropViewModelBindingSource @@ -178,7 +170,8 @@ btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(765, 471); + btnCancel.Location = new Point(765, 384); + btnCancel.Margin = new Padding(3, 2, 3, 2); btnCancel.Name = "btnCancel"; btnCancel.Size = new Size(107, 22); btnCancel.StyleController = layoutControl1; @@ -192,13 +185,13 @@ Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem1, emptySpaceItem2, layoutControlItem3 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - Root.Size = new Size(874, 495); + Root.Size = new Size(874, 408); Root.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = btnCancel; - layoutControlItem2.Location = new Point(763, 469); + layoutControlItem2.Location = new Point(763, 382); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(111, 26); layoutControlItem2.TextSize = new Size(0, 0); @@ -207,7 +200,7 @@ // layoutControlItem1 // layoutControlItem1.Control = BtnOk; - layoutControlItem1.Location = new Point(652, 469); + layoutControlItem1.Location = new Point(652, 382); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(111, 26); layoutControlItem1.TextSize = new Size(0, 0); @@ -216,7 +209,7 @@ // emptySpaceItem2 // emptySpaceItem2.AllowHotTrack = false; - emptySpaceItem2.Location = new Point(0, 469); + emptySpaceItem2.Location = new Point(0, 382); emptySpaceItem2.Name = "emptySpaceItem2"; emptySpaceItem2.Size = new Size(652, 26); emptySpaceItem2.TextSize = new Size(0, 0); @@ -226,7 +219,7 @@ layoutControlItem3.Control = treeList1; layoutControlItem3.Location = new Point(0, 0); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(874, 469); + layoutControlItem3.Size = new Size(874, 382); layoutControlItem3.TextSize = new Size(0, 0); layoutControlItem3.TextVisible = false; // @@ -240,11 +233,10 @@ // // SetSysPropForCatalogDlg // - AutoScaleDimensions = new SizeF(7F, 17F); + AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(874, 495); + ClientSize = new Size(874, 408); Controls.Add(layoutControl1); - Margin = new Padding(3, 4, 3, 4); Name = "SetSysPropForCatalogDlg"; StartPosition = FormStartPosition.CenterScreen; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); @@ -273,7 +265,6 @@ private BindingSource sysCatalogPropViewModelBindingSource; private DevExpress.XtraTreeList.TreeList treeList1; private DevExpress.XtraTreeList.Columns.TreeListColumn colName; - private DevExpress.XtraTreeList.Columns.TreeListColumn colIsHave; private DevExpress.XtraTreeList.Columns.TreeListColumn colUnitName; private DevExpress.XtraTreeList.Columns.TreeListColumn colIsNull; private DevExpress.XtraTreeList.Columns.TreeListColumn colDefaultValue; diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs index f357efa..f7907e2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/01-SysCatalogManage/SetSysPropForCatalogDlg.cs @@ -12,7 +12,7 @@ { InitializeComponent(); repositoryItemCheckedComboBoxEdit1.DisplayMember = "Name"; - repositoryItemCheckedComboBoxEdit1.ValueMember = "ID"; + repositoryItemCheckedComboBoxEdit1.ValueMember = "Name"; this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } @@ -51,7 +51,7 @@ model.Inherit = child.Inherit; model.ChoiceList = child.ChoiceList; model.ChoiceIds = child.ChoiceList.Where(x => x.Have).Select(x => x.ID).ToList(); - var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.ID.ToString()).ToList(); + var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.Name.ToString()).ToList(); string result = string.Join(", ", stringList); model.DisplayChoice = result; _allBindingList.Add(model); @@ -171,10 +171,10 @@ private void treeList1_BeforeCheckNode(object sender, DevExpress.XtraTreeList.CheckNodeEventArgs e) { - string isGroup = e.Node.GetValue("Inherit").ToString(); - if (isGroup == "True") + string Inherit = e.Node.GetValue("Inherit").ToString(); + if (Inherit == "True") { - e.State = CheckState.Unchecked; + e.State = CheckState.Checked; } else { diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.Designer.cs index 1509ce6..5eae4fd 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.Designer.cs @@ -148,6 +148,7 @@ colChoice.Name = "colChoice"; colChoice.Visible = true; colChoice.VisibleIndex = 1; + colChoice.Width = 281; // // colDescription // @@ -158,6 +159,7 @@ colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 2; + colDescription.Width = 498; // // colName // @@ -168,6 +170,7 @@ colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; + colName.Width = 281; // // ColDelete // @@ -179,6 +182,7 @@ ColDelete.OptionsColumn.AllowEdit = false; ColDelete.Visible = true; ColDelete.VisibleIndex = 3; + ColDelete.Width = 67; // // repositoryItemButtonEdit1 // diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.resx b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.resx index 31ceb2b..7ad8b2e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/SetSysPropChoiceDlg.resx @@ -125,19 +125,23 @@ <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALMCAAAC77u/ + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJIDAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz - OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp - dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkRlbGV0ZUNpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0x - Niw0QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHog - TTIzLjEsMjAuMmwtMi44LDIuOEwxNiwxOC44bC00LjIsNC4yICAgbC0yLjgtMi44bDQuMi00LjJsLTQu - Mi00LjJsMi44LTIuOGw0LjIsNC4ybDQuMi00LjJsMi44LDIuOEwxOC44LDE2TDIzLjEsMjAuMnoiIGNs - YXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs= + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4NCiAgICA8cGF0aCBk + PSJNMTguOCwxNmw4LjktOC45YzAuNC0wLjQsMC40LTEsMC0xLjRsLTEuNC0xLjRjLTAuNC0wLjQtMS0w + LjQtMS40LDBMMTYsMTMuMkw3LjEsNC4zYy0wLjQtMC40LTEtMC40LTEuNCwwICAgTDQuMyw1LjdjLTAu + NCwwLjQtMC40LDEsMCwxLjRsOC45LDguOWwtOC45LDguOWMtMC40LDAuNC0wLjQsMSwwLDEuNGwxLjQs + MS40YzAuNCwwLjQsMSwwLjQsMS40LDBsOC45LTguOWw4LjksOC45ICAgYzAuNCwwLjQsMSwwLjQsMS40 + LDBsMS40LTEuNGMwLjQtMC40LDAuNC0xLDAtMS40TDE4LjgsMTZ6IiBjbGFzcz0iUmVkIiAvPg0KICA8 + L2c+DQo8L3N2Zz4L </value> </data> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs index 62085d4..5070d38 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs @@ -10,8 +10,9 @@ private const double _powerTolerance = 0.05; //璧勪骇鑷姩鍖归厤 - public static async Task<AssetsMatchingViewModel> Matching(AssetsMatchingViewModel assetsAutoMatchingView) + public static async Task<bool> Matching(AssetsMatchingViewModel assetsAutoMatchingView) { + bool IsMaching = false; var pumpMain = new BLL.PumpMain(); var adaptingManage = new BLL.AdaptingManage(); var pipeLineManage = new BLL.PipeLineManage(); @@ -20,54 +21,59 @@ var allAdapting = await adaptingManage.GetAll(); var allPipeLine = await pipeLineManage.GetAll(); var allValve = await valveMain.GetAll(); - var assetsAutoMatching = new AssetsMatchingViewModel(); - var pumpMatchingList = new List<PumpMatchingViewModel>(); - var threeLinkMatchingList = new List<ThreelinkMatchingViewModel>(); - var fourLinkMatchingList = new List<FourlinkMatchingViewModel>(); - var pipeLineMatchingList = new List<PipeMatchingViewModel>(); - var valveMatchingList = new List<ValveMatchingViewModel>(); - var elbowsMatchingList = new List<ElbowsMatchingViewModel>(); //娉靛尮閰� foreach (var item in assetsAutoMatchingView.PumpMatchingList) { - pumpMatchingList.Add(await MatchingPumps(item, allPump)); + if (await MatchingPumps(item, allPump)) + { + IsMaching = true; + } } //涓夐�氬尮閰� foreach (var item in assetsAutoMatchingView.ThreelinkMatchingList) { - threeLinkMatchingList.Add(MatchingThreelink(item, allAdapting)); + if (MatchingThreelink(item, allAdapting)) + { + IsMaching = true; + } } //鍥涢�氬尮閰� foreach (var item in assetsAutoMatchingView.FourlinkMatchingList) { - fourLinkMatchingList.Add(MatchingFourlink(item, allAdapting)); + if (MatchingFourlink(item, allAdapting)) + { + IsMaching = true; + } } //绠¢亾鍖归厤 foreach (var item in assetsAutoMatchingView.PipeMatchingList) { - pipeLineMatchingList.Add(MatchingPipe(item, allPipeLine)); + if (MatchingPipe(item, allPipeLine)) + { + IsMaching = true; + } } //闃�闂ㄥ尮閰� foreach (var item in assetsAutoMatchingView.ValveMatchingList) { - valveMatchingList.Add(MatchingValve(item, allValve)); + if (MatchingValve(item, allValve)) + { + IsMaching = true; + } } //寮ご鍖归厤 foreach (var item in assetsAutoMatchingView.ElbowsMatchingList) { - elbowsMatchingList.Add(MatchingElbow(item, allAdapting)); + if (MatchingElbow(item, allAdapting)) + { + IsMaching = true; + } } - assetsAutoMatching.PumpMatchingList = pumpMatchingList; - assetsAutoMatching.ThreelinkMatchingList = threeLinkMatchingList; - assetsAutoMatching.FourlinkMatchingList = fourLinkMatchingList; - assetsAutoMatching.ElbowsMatchingList = elbowsMatchingList; - assetsAutoMatching.PipeMatchingList = pipeLineMatchingList; - assetsAutoMatching.ValveMatchingList = valveMatchingList; - return assetsAutoMatching; + return IsMaching; } //娉靛尮閰� - public static async Task<PumpMatchingViewModel> MatchingPumps(PumpMatchingViewModel viewModel, List<Vmo.PumpMainVmo> pumpMainVmos) + public static async Task<bool> MatchingPumps(PumpMatchingViewModel viewModel, List<Vmo.PumpMainVmo> pumpMainVmos) { Vmo.PumpMainVmo vmo = null; int startCount = 0; @@ -133,21 +139,22 @@ var list = await new BLL.XhsPumpMainPhartMappingExtensions().GetByPumpMainID(vmo.ID); if (list != null && list.Count > 0) { - viewModel.MatchingCurveDbId = list.First().ID; + viewModel.MatchingCurveDbId = list.First().ID.ToString(); } + return true; } - return null; + return false; } //闃�闂ㄥ尮閰� - public static ValveMatchingViewModel MatchingValve(ValveMatchingViewModel input, List<Vmo.ValveMainVmo> adaptingManageVmos) + public static bool MatchingValve(ValveMatchingViewModel input, List<Vmo.ValveMainVmo> adaptingManageVmos) { HStation.Vmo.ValveMainVmo vmo = null; int firstCount = 0; //鍙e緞鏈�灏忓樊鍊� // 缁濆鍖归厤 var absoluteMatch = adaptingManageVmos.Where(i => - ((input.Diameter == null && i.Caliber == null) || i.Caliber == input.Diameter) && + ((i.Caliber == null) || i.Caliber == input.Diameter) && ((input.Material == null && i.Material == "榛樿") || i.Material == input.Material)).ToList(); if (absoluteMatch.Any()) { @@ -230,20 +237,20 @@ if (vmo != null) { input.MatchingMinorLoss = vmo.Coefficient; - return input; + return true; } - return input; + return false; } //绠¢亾鍖归厤 - public static PipeMatchingViewModel MatchingPipe(PipeMatchingViewModel input, List<Vmo.PipeLineManageVmo> pipeLineManageVmos) + public static bool MatchingPipe(PipeMatchingViewModel input, List<Vmo.PipeLineManageVmo> pipeLineManageVmos) { Vmo.PipeLineManageVmo vmo = null; int StartCount = 0; //鍙e緞鏈�灏忓樊鍊� // 缁濆鍖归厤 var absoluteMatch = pipeLineManageVmos.Where(i => - ((input.Caliber == null && i.Caliber == null) || i.Caliber == input.Caliber) && + ((i.Caliber == null) || i.Caliber == input.Diameter) && ((input.Material == null && i.Material == "榛樿") || i.Material == input.Material)).ToList(); if (absoluteMatch.Any()) { @@ -262,9 +269,9 @@ //鍖洪棿鍖归厤 var rangeMatch = pipeLineManageVmos.Where(item => { - if (item.Caliber != null && input.Caliber != null) + if (item.Caliber != null) { - return Math.Abs(Convert.ToInt64(item.Caliber - input.Caliber)) <= _caliberTolerance; + return Math.Abs(Convert.ToInt64(item.Caliber - input.Diameter)) <= _caliberTolerance; } return false; }) @@ -302,26 +309,27 @@ { case HStation.Assets.eAlgorithmType.Hazen: input.MatchingMinorLoss = vmo.Hazen; - return input; + break; case HStation.Assets.eAlgorithmType.Manning: input.MatchingMinorLoss = vmo.Manning; - return input; + break; case HStation.Assets.eAlgorithmType.Darcy: input.MatchingMinorLoss = vmo.Darcy; - return input; + break; default: input.MatchingMinorLoss = vmo.Hazen; - return input; + break; } + return true; } - return input; + return false; } //寮ご鍖归厤 - public static ElbowsMatchingViewModel MatchingElbow(ElbowsMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) + public static bool MatchingElbow(ElbowsMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) { Vmo.AdaptingManageVmo vmo = null; int firstCount = 0; @@ -411,13 +419,13 @@ if (vmo != null) { input.MatchingMinorLoss = vmo.Coefficient; - return input; + return true; } - return input; + return false; } //涓夐�氬尮閰� - public static ThreelinkMatchingViewModel MatchingThreelink(ThreelinkMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) + public static bool MatchingThreelink(ThreelinkMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) { Vmo.AdaptingManageVmo vmo = null; int firstCount = 0; @@ -507,13 +515,13 @@ if (vmo != null) { input.MatchingMinorLoss = vmo.Coefficient; - return input; + return true; } - return input; + return false; } //鍥涢�氬尮閰� - public static FourlinkMatchingViewModel MatchingFourlink(FourlinkMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) + public static bool MatchingFourlink(FourlinkMatchingViewModel input, List<Vmo.AdaptingManageVmo> adaptingManageVmos) { Vmo.AdaptingManageVmo vmo = null; int firstCount = 0; @@ -603,11 +611,10 @@ if (vmo != null) { input.MatchingMinorLoss = vmo.Coefficient; - return input; + return true; } - return input; + return false; } - //杩斿洖涓や釜瀛楃涓蹭箣闂寸浉鍚岀殑瀛楃涓暟 private static int CountCommonCharacters(string baseString, string compareString) @@ -636,6 +643,5 @@ return string.Join("", str1.Intersect(str2)); } - } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/01-PumpMainCurveChoice/PumpMainChoieViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/01-PumpMainCurveChoice/PumpMainChoieViewModel.cs index fa0bdeb..ae0a4f8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/01-PumpMainCurveChoice/PumpMainChoieViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/01-PumpMainCurveChoice/PumpMainChoieViewModel.cs @@ -1,15 +1,15 @@ 锘縩amespace HStation.WinFrmUI.Xhs { - public class PumpMainCurveChoieViewModel + public class PumpMainChoieViewModel { - public PumpMainCurveChoieViewModel(Vmo.PumpSeriesVmo rhs) + public PumpMainChoieViewModel(Vmo.PumpSeriesVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.IsPump = false; } - public PumpMainCurveChoieViewModel(Vmo.PumpGroupVmo rhs) + public PumpMainChoieViewModel(Vmo.PumpGroupVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; @@ -17,7 +17,7 @@ this.IsPump = false; } - public PumpMainCurveChoieViewModel(Vmo.PumpMainVmo rhs, long GroupID) + public PumpMainChoieViewModel(Vmo.PumpMainVmo rhs, long GroupID) { this.ID = rhs.ID; this.Name = rhs.Name; @@ -25,7 +25,7 @@ this.IsPump = true; } - public PumpMainCurveChoieViewModel(Vmo.PumpMainVmo rhs) + public PumpMainChoieViewModel(Vmo.PumpMainVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.Designer.cs deleted file mode 100644 index d7dee70..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.Designer.cs +++ /dev/null @@ -1,165 +0,0 @@ -锘縩amespace HStation.WinFrmUI .Xhs -{ - partial class AssetsAutoMatchingMainDlg - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - navigationFrame1 = new DevExpress.XtraBars.Navigation.NavigationFrame(); - navigationPage1 = new DevExpress.XtraBars.Navigation.NavigationPage(); - AssetsMainChoicePage = new XhsProjectSimulationMatchingListCtrl(); - navigationPage2 = new DevExpress.XtraBars.Navigation.NavigationPage(); - BtnAutoMatching = new SimpleButton(); - Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - ((ISupportInitialize)layoutControl1).BeginInit(); - layoutControl1.SuspendLayout(); - ((ISupportInitialize)navigationFrame1).BeginInit(); - navigationFrame1.SuspendLayout(); - navigationPage1.SuspendLayout(); - ((ISupportInitialize)Root).BeginInit(); - ((ISupportInitialize)layoutControlItem2).BeginInit(); - ((ISupportInitialize)layoutControlItem3).BeginInit(); - SuspendLayout(); - // - // layoutControl1 - // - layoutControl1.Controls.Add(navigationFrame1); - layoutControl1.Controls.Add(BtnAutoMatching); - layoutControl1.Dock = DockStyle.Fill; - layoutControl1.Location = new Point(0, 0); - layoutControl1.Name = "layoutControl1"; - layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1222, 300, 650, 400); - layoutControl1.Root = Root; - layoutControl1.Size = new Size(1075, 581); - layoutControl1.TabIndex = 6; - layoutControl1.Text = "layoutControl1"; - // - // navigationFrame1 - // - navigationFrame1.Controls.Add(navigationPage1); - navigationFrame1.Controls.Add(navigationPage2); - navigationFrame1.Location = new Point(12, 38); - navigationFrame1.Name = "navigationFrame1"; - navigationFrame1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { navigationPage1, navigationPage2 }); - navigationFrame1.SelectedPage = navigationPage1; - navigationFrame1.Size = new Size(1051, 531); - navigationFrame1.TabIndex = 2; - navigationFrame1.Text = "navigationFrame1"; - // - // navigationPage1 - // - navigationPage1.Caption = "navigationPage1"; - navigationPage1.Controls.Add(AssetsMainChoicePage); - navigationPage1.Name = "navigationPage1"; - navigationPage1.Size = new Size(1051, 531); - // - // AssetsMainChoicePage - // - AssetsMainChoicePage.Dock = DockStyle.Fill; - AssetsMainChoicePage.Location = new Point(0, 0); - AssetsMainChoicePage.Name = "AssetsMainChoicePage"; - AssetsMainChoicePage.Size = new Size(1051, 531); - AssetsMainChoicePage.TabIndex = 0; - // - // navigationPage2 - // - navigationPage2.Caption = "navigationPage2"; - navigationPage2.Name = "navigationPage2"; - navigationPage2.Size = new Size(1051, 531); - // - // BtnAutoMatching - // - BtnAutoMatching.Location = new Point(12, 12); - BtnAutoMatching.Name = "BtnAutoMatching"; - BtnAutoMatching.Size = new Size(1051, 22); - BtnAutoMatching.StyleController = layoutControl1; - BtnAutoMatching.TabIndex = 0; - BtnAutoMatching.Text = "鑷姩鍖归厤"; - BtnAutoMatching.Click += BtnAutoMatching_Click; - // - // Root - // - Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem3 }); - Root.Name = "Root"; - Root.Size = new Size(1075, 581); - Root.TextVisible = false; - // - // layoutControlItem2 - // - layoutControlItem2.Control = navigationFrame1; - layoutControlItem2.Location = new Point(0, 26); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(1055, 535); - layoutControlItem2.TextSize = new Size(0, 0); - layoutControlItem2.TextVisible = false; - // - // layoutControlItem3 - // - layoutControlItem3.Control = BtnAutoMatching; - layoutControlItem3.Location = new Point(0, 0); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(1055, 26); - layoutControlItem3.TextSize = new Size(0, 0); - layoutControlItem3.TextVisible = false; - // - // AssetsAutoMatchingMainDlg - // - AutoScaleDimensions = new SizeF(7F, 14F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(1075, 581); - Controls.Add(layoutControl1); - Name = "AssetsAutoMatchingMainDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "鑷姩鍖归厤"; - ((ISupportInitialize)layoutControl1).EndInit(); - layoutControl1.ResumeLayout(false); - ((ISupportInitialize)navigationFrame1).EndInit(); - navigationFrame1.ResumeLayout(false); - navigationPage1.ResumeLayout(false); - ((ISupportInitialize)Root).EndInit(); - ((ISupportInitialize)layoutControlItem2).EndInit(); - ((ISupportInitialize)layoutControlItem3).EndInit(); - ResumeLayout(false); - } - - #endregion - - private DevExpress.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraBars.Navigation.NavigationFrame navigationFrame1; - private DevExpress.XtraBars.Navigation.NavigationPage navigationPage1; - private DevExpress.XtraBars.Navigation.NavigationPage navigationPage2; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private XhsProjectSimulationMatchingListCtrl AssetsMainChoicePage; - private SimpleButton BtnAutoMatching; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.cs deleted file mode 100644 index 58a2501..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.cs +++ /dev/null @@ -1,51 +0,0 @@ -锘縩amespace HStation.WinFrmUI.Xhs -{ - public partial class AssetsAutoMatchingMainDlg : DevExpress.XtraEditors.XtraForm - { - public AssetsAutoMatchingMainDlg() - { - InitializeComponent(); - this.AssetsMainChoicePage.FormRowClickEvent += AssetsMainChoicePage_FormRowClickEvent; - } - - private void AssetsMainChoicePage_FormRowClickEvent(string code) - { - AssetsMatchingClickEvent.Invoke(code); - } - - public event Func<AssetsMatchingViewModel, bool> RelaodEvent = null; - - public event Action<string> AssetsMatchingClickEvent = null; - - private AssetsMatchingViewModel _assetsAutoMatching = null; - - public void SetBindingData(AssetsMatchingViewModel assetsAutoMatchingInputViewModel) - { - _assetsAutoMatching = assetsAutoMatchingInputViewModel; - this.AssetsMainChoicePage.SetBindingData(_assetsAutoMatching); - } - - //瀹屾垚 - private void btnComplete_Click(object sender, EventArgs e) - { - if (RelaodEvent.Invoke(_assetsAutoMatching)) - { - TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); - } - else - { - TipFormHelper.ShowError("淇敼澶辫触!"); - } - this.DialogResult = DialogResult.OK; - this.Close(); - } - - //鑷姩鍖归厤 - private async void BtnAutoMatching_Click(object sender, EventArgs e) - { - WaitFormHelper.ShowWaitForm(this); - _assetsAutoMatching = await this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching); - WaitFormHelper.HideWaitForm(this); - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.resx deleted file mode 100644 index af32865..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/AssetsAutoMatchingMainDlg.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘�<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/PumpMainChoieViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/PumpMainChoieViewModel.cs deleted file mode 100644 index ae0a4f8..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/00-core/PumpMainChoieViewModel.cs +++ /dev/null @@ -1,114 +0,0 @@ -锘縩amespace HStation.WinFrmUI.Xhs -{ - public class PumpMainChoieViewModel - { - public PumpMainChoieViewModel(Vmo.PumpSeriesVmo rhs) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.IsPump = false; - } - - public PumpMainChoieViewModel(Vmo.PumpGroupVmo rhs) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.ParentID = rhs.PumpSeriesID; - this.IsPump = false; - } - - public PumpMainChoieViewModel(Vmo.PumpMainVmo rhs, long GroupID) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.ParentID = GroupID; - this.IsPump = true; - } - - public PumpMainChoieViewModel(Vmo.PumpMainVmo rhs) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.ParentID = rhs.PumpSeriesID; - this.IsPump = true; - this.Erosion = rhs.Erosion; - this.RatedPower = rhs.RatedPower; - this.RatedFlow = rhs.RatedFlow; - this.RatedSpeed = rhs.RatedSpeed; - this.RatedEfficiency = rhs.RatedEfficiency; - this.D2 = rhs.D2; - this.Description = rhs.Description; - this.SortCode = rhs.SortCode; - } - - public long ID { get; set; } - public long ParentID { get; set; } - public string Name { get; set; } - public bool IsPump { get; set; } - - /// <summary> - /// 娉电郴鍒桰D - /// </summary> - public long PumpSeriesID { get; set; } - - /// <summary> - /// 鍙傛暟 - /// </summary> - public Dictionary<string, string> Paras { get; set; } - - /// <summary> - /// 鏍囩 - /// </summary> - public List<string> Flags { get; set; } - - /// <summary> - /// 鏍囧織 - /// </summary> - public string TagName { get; set; } - - /// <summary> - /// 鎺掑簭鐮� - /// </summary> - public int SortCode { get; set; } - - /// <summary> - /// 棰濆畾杞�� - /// </summary> - public double RatedSpeed { get; set; } - - /// <summary> - /// 棰濆畾娴侀噺 - /// </summary> - public double RatedFlow { get; set; } - - /// <summary> - /// 棰濆畾鎵▼ - /// </summary> - public double RatedHead { get; set; } - - /// <summary> - /// 棰濆畾鏁堢巼 - /// </summary> - public double? RatedEfficiency { get; set; } - - /// <summary> - /// 棰濆畾鍔熺巼 - /// </summary> - public double RatedPower { get; set; } - - /// <summary> - /// 姘旇殌 - /// </summary> - public double? Erosion { get; set; } - - /// <summary> - /// 鍙惰疆澶栧緞 - /// </summary> - public double? D2 { get; set; } - - /// <summary> - /// 璇存槑 - /// </summary> - public string Description { get; set; } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/FourlinkMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/FourlinkMatchingViewModel.cs index c724d1a..0508c48 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/FourlinkMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/FourlinkMatchingViewModel.cs @@ -5,7 +5,6 @@ /// </summary> public class FourlinkMatchingViewModel { - /// <summary> /// ID /// </summary> @@ -68,10 +67,6 @@ [DisplayName("鎹熷け绯绘暟")] [Browsable(true)] public double? MinorLoss { get; set; } - - - - /// <summary> /// 鍖归厤鍨嬪彿 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs index 75cd476..edfbb38 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/01-viewmodel/ValveMatchingViewModel.cs @@ -5,8 +5,7 @@ /// </summary> public class ValveMatchingViewModel { - - /// <summary> + /// <summaryd> /// ID /// </summary> [DisplayName("ID")] @@ -83,7 +82,6 @@ [Browsable(true)] public string ValveSetting { get; set; } - /// <summary> /// 鍖归厤鍨嬪彿 /// </summary> @@ -139,6 +137,5 @@ [DisplayName("鍖归厤姘村ご鎹熷け鏇茬嚎")] [Browsable(false)] public List<CurvePointMatchingViewModel> MatchingCurveQL { get; set; } - } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingListCtrl.cs index 8dade33..981a9ee 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingListCtrl.cs @@ -31,28 +31,19 @@ public async Task<List<PumpMatchingViewModel>> SetMatching(List<PumpMatchingViewModel> pumpMatchingViewModel, List<PumpMainVmo> pumpMainVmos) { - var finishList = new List<PumpMatchingViewModel>(); if (pumpMatchingViewModel == null) return null; foreach (var item in pumpMatchingViewModel) { - var result = await AssetsMatchingHelper.MatchingPumps(item, pumpMainVmos); - if (result != null) - { - finishList.Add(result); - } - else - { - finishList.Add(item); - } + await AssetsMatchingHelper.MatchingPumps(item, pumpMainVmos); } _allBindingList.Clear(); - foreach (var item in finishList) + foreach (var item in pumpMatchingViewModel) { _allBindingList.Add(new XhsProjectSimulationPumpMatchingViewModel(item)); } this.pumpFormViewModelBindingSource.ResetBindings(false); - return finishList; + return pumpMatchingViewModel; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingViewModel.cs index c12d539..77e8653 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/02-pump/XhsProjectSimulationPumpMatchingViewModel.cs @@ -19,12 +19,12 @@ this.RatedQ = rhs.RatedQ; this.MatchingRatedP = rhs.MatchingRatedP; this.MatchingDbID = rhs.MatchingDbId; - this.MatchingChartDbID = rhs.MatchingCurveDbId; + this.MatchingCurveDbId = rhs.MatchingCurveDbId; this.MatchingRatedH = rhs.MatchingRatedH; this.MatchingRatedN = rhs.MatchingRatedN; this.MatchingRatedP = rhs.MatchingRatedP; this.MatchingRatedQ = rhs.MatchingRatedQ; - if (rhs.DbId == null) + if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } @@ -108,7 +108,7 @@ [DisplayName("鍖归厤鍚嶤hartDbID")] [Browsable(false)] - public long? MatchingChartDbID { get; set; } + public string MatchingCurveDbId { get; set; } /// <summary> /// 淇敼鍚庨瀹氬姛鐜� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingListCtrl.cs index 71ffdb7..6992205 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingListCtrl.cs @@ -33,26 +33,17 @@ { if (inputs == null) return null; - var finishList = new List<ValveMatchingViewModel>(); foreach (var item in inputs) { - var result = AssetsMatchingHelper.MatchingValve(item, alllist); - if (result != null) - { - finishList.Add(result); - } - else - { - finishList.Add(item); - } + AssetsMatchingHelper.MatchingValve(item, alllist); } _allBindingList.Clear(); - foreach (var item in finishList) + foreach (var item in inputs) { _allBindingList.Add(new XhsProjectSimulationValveMatchingViewModel(item)); } this.valveFormViewModelBindingSource.ResetBindings(false); - return finishList; + return inputs; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingViewModel.cs index cd74671..f69e216 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/03-valve/XhsProjectSimulationValveMatchingViewModel.cs @@ -17,11 +17,11 @@ this.Code = rhs.Code; this.DbId = rhs.DbId; this.ModelType = rhs.ModelType; - this.MatchingCaliber = rhs.MatchingDiameter; + this.MatchingDiameter = rhs.MatchingDiameter.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; this.MatchingDbid = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; - if (rhs.DbId == null) + if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } @@ -57,7 +57,7 @@ /// </summary> [DisplayName("MatchingDbid")] [Browsable(false)] - public long? MatchingDbid { get; set; } + public string MatchingDbid { get; set; } /// <summary> /// 缂栫爜 @@ -99,7 +99,7 @@ /// </summary> [DisplayName("淇敼鍚庡彛寰�")] [Browsable(true)] - public string MatchingCaliber { get; set; } + public string MatchingDiameter { get; set; } /// <summary> /// Db閿佸畾 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingListCtrl.cs index e56601b..bbb5697 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingListCtrl.cs @@ -35,26 +35,17 @@ { return null; } - var finishList = new List<PipeMatchingViewModel>(); foreach (var item in inputs) { - var result = AssetsMatchingHelper.MatchingPipe(item, alllist); - if (result != null) - { - finishList.Add(result); - } - else - { - finishList.Add(item); - } + AssetsMatchingHelper.MatchingPipe(item, alllist); } _allBindingList.Clear(); - foreach (var item in finishList) + foreach (var item in inputs) { _allBindingList.Add(new XhsProjectSimulationPipeMatchingViewModel(item)); } this.pipeLineFormViewModelBindingSource.ResetBindings(false); - return finishList; + return inputs; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingViewModel.cs index 78b135e..4fb5b69 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/04-pipe/XhsProjectSimulationPipeMatchingViewModel.cs @@ -13,17 +13,17 @@ this.ID = rhs.ID; this.DbLocked = rhs.DbLocked; this.Material = rhs.Material; - this.Caliber = rhs.Caliber; + this.Caliber = rhs.Diameter; this.Code = rhs.Code; this.Dbid = rhs.DbId; this.ModelType = rhs.ModelType; this.eAlgorithmType = rhs.eAlgorithmType; - this.MatchingCaliber = rhs.MatchingCaliber; + this.MatchingCaliber = rhs.MatchingDiameter.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; - this.MatchingDbid = rhs.MatchingDbid; + this.MatchingDbId = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; - if (rhs.DbId == null) + if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } @@ -59,7 +59,7 @@ /// </summary> [DisplayName("MatchingDbid")] [Browsable(false)] - public long? MatchingDbid { get; set; } + public string MatchingDbId { get; set; } /// <summary> /// 缂栫爜 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingListCtrl.cs index d0cd586..93d78e3 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingListCtrl.cs @@ -33,26 +33,17 @@ { if (inputs == null || inputs.Count == 0) return null; - var resultList = new List<ElbowsMatchingViewModel>(); foreach (var item in inputs) { - var result = AssetsMatchingHelper.MatchingElbow(item, alllist); - if (result != null) - { - resultList.Add(result); - } - else - { - resultList.Add(item); - } + AssetsMatchingHelper.MatchingElbow(item, alllist); } _allBindingList.Clear(); - foreach (var item in resultList) + foreach (var item in inputs) { _allBindingList.Add(new XhsProjectSimulationElbowsMatchingViewModel(item)); } this.elbowsFormViewModelBindingSource.ResetBindings(false); - return resultList; + return inputs; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingViewModel.cs index 36f9bea..947dcdf 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/05-elbows/XhsProjectSimulationElbowsMatchingViewModel.cs @@ -17,12 +17,12 @@ this.Code = rhs.Code; this.Dbid = rhs.DbId; this.ModelType = rhs.ModelType; - this.MatchingCaliber = rhs.MatchingCaliber; + this.MatchingCaliber = rhs.MatchingCaliber.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; this.MatchingDbid = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; - if (rhs.DbId == null) + if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } @@ -58,7 +58,7 @@ /// </summary> [DisplayName("MatchingDbid")] [Browsable(false)] - public long? MatchingDbid { get; set; } + public string MatchingDbid { get; set; } /// <summary> /// 缂栫爜 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingListCtrl.cs index a46c702..4434d26 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingListCtrl.cs @@ -35,26 +35,17 @@ { if (inputs == null || inputs.Count == 0) return null; - var resultList = new List<ThreelinkMatchingViewModel>(); foreach (var item in inputs) { - var result = AssetsMatchingHelper.MatchingThreelink(item, alllist); - if (result != null) - { - resultList.Add(result); - } - else - { - resultList.Add(item); - } + AssetsMatchingHelper.MatchingThreelink(item, alllist); } _allBindingList.Clear(); - foreach (var item in resultList) + foreach (var item in inputs) { _allBindingList.Add(new XhsProjectSimulationThreelinkMatchingViewModel(item)); } this.threeLinkFormViewModelBindingSource.ResetBindings(false); - return resultList; + return inputs; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingViewModel.cs index eaf6f42..a75be95 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/06-threelink/XhsProjectSimulationThreelinkMatchingViewModel.cs @@ -17,9 +17,9 @@ this.Code = rhs.Code; this.DbId = rhs.DbId; this.ModelType = rhs.ModelType; - this.MatchingCaliber = rhs.MatchingCaliber; + this.MatchingCaliber = rhs.MatchingCaliber.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; - this.MatchingDbid = rhs.MatchingDbid; + this.MatchingDbId = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; if (rhs.DbId == null) { @@ -57,7 +57,7 @@ /// </summary> [DisplayName("MatchingDbid")] [Browsable(false)] - public long? MatchingDbid { get; set; } + public string MatchingDbId { get; set; } /// <summary> /// 缂栫爜 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingListCtrl.cs index f8d4419..2e8cbfa 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingListCtrl.cs @@ -33,26 +33,17 @@ { if (inputs == null || inputs.Count == 0) return null; - var resultList = new List<FourlinkMatchingViewModel>(); foreach (var item in inputs) { - var result = AssetsMatchingHelper.MatchingFourlink(item, alllist); - if (result != null) - { - resultList.Add(result); - } - else - { - resultList.Add(item); - } + AssetsMatchingHelper.MatchingFourlink(item, alllist); } _allBindingList.Clear(); - foreach (var item in resultList) + foreach (var item in inputs) { _allBindingList.Add(new XhsProjectSimulationFourlinkMatchingViewModel(item)); } this.fourLinkFormViewModelBindingSource.ResetBindings(false); - return resultList; + return inputs; } //琛岀偣鍑讳簨浠� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingViewModel.cs index d6cc0e0..801afe0 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-matching/07-fourlink/XhsProjectSimulationFourlinkMatchingViewModel.cs @@ -15,14 +15,14 @@ this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.Code = rhs.Code; - this.Dbid = rhs.Dbid; + this.Dbid = rhs.DbId; this.ModelType = rhs.ModelType; - this.MatchingCaliber = rhs.MatchingCaliber; + this.MatchingCaliber = rhs.MatchingCaliber.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; - this.MatchingDbid = rhs.MatchingDbid; + this.MatchingDbId = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; - if (rhs.Dbid == null) + if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } @@ -58,7 +58,7 @@ /// </summary> [DisplayName("MatchingDbid")] [Browsable(false)] - public long? MatchingDbid { get; set; } + public string MatchingDbId { get; set; } /// <summary> /// 缂栫爜 diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs index 64deb50..50e4eeb 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs @@ -69,12 +69,14 @@ controlContainer4 = new DevExpress.XtraBars.Docking.ControlContainer(); svgImg32 = new DevExpress.Utils.SvgImageCollection(components); radialMenu1 = new DevExpress.XtraBars.Ribbon.RadialMenu(components); + xhsProjectSimulationMatchingListCtrl1 = new Xhs.XhsProjectSimulationMatchingListCtrl(); ((ISupportInitialize)ribbonControl1).BeginInit(); ((ISupportInitialize)tabPane1).BeginInit(); tabPane1.SuspendLayout(); ((ISupportInitialize)dockManager1).BeginInit(); docPnlProperty.SuspendLayout(); docPnlMatchingList.SuspendLayout(); + controlContainer5.SuspendLayout(); docPnlHydroParterList.SuspendLayout(); controlContainer3.SuspendLayout(); docPnlHydroCalcu.SuspendLayout(); @@ -96,7 +98,7 @@ ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; - ribbonControl1.Size = new Size(1161, 128); + ribbonControl1.Size = new Size(1161, 101); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // barBtnHydroCheck @@ -151,7 +153,7 @@ // barBtnMatching.Caption = "鑷姩鍖归厤"; barBtnMatching.Id = 10; - barBtnMatching.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAutoMatching.ImageOptions.SvgImage"); + barBtnMatching.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnMatching.ImageOptions.SvgImage"); barBtnMatching.Name = "barBtnMatching"; barBtnMatching.ItemClick += barBtnMatching_ItemClick; // @@ -240,12 +242,12 @@ tabPane1.Controls.Add(pageQ3d); tabPane1.Controls.Add(tabPageL3d); tabPane1.Dock = DockStyle.Fill; - tabPane1.Location = new Point(0, 128); + tabPane1.Location = new Point(0, 101); tabPane1.Name = "tabPane1"; tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { pageBimface, pageQ3d, tabPageL3d }); - tabPane1.RegularSize = new Size(886, 218); + tabPane1.RegularSize = new Size(886, 245); tabPane1.SelectedPage = pageBimface; - tabPane1.Size = new Size(886, 218); + tabPane1.Size = new Size(886, 245); tabPane1.TabIndex = 1; tabPane1.Text = "tabPane1"; // @@ -253,7 +255,7 @@ // pageBimface.Caption = "涓夌淮妯″瀷"; pageBimface.Name = "pageBimface"; - pageBimface.Size = new Size(886, 185); + pageBimface.Size = new Size(886, 212); // // pageQ3d // @@ -278,17 +280,17 @@ docPnlProperty.Controls.Add(dockPanel1_Container); docPnlProperty.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right; docPnlProperty.ID = new Guid("cffe2560-3445-4488-83cf-b9e4b936ff18"); - docPnlProperty.Location = new Point(886, 128); + docPnlProperty.Location = new Point(886, 101); docPnlProperty.Name = "docPnlProperty"; docPnlProperty.OriginalSize = new Size(275, 200); - docPnlProperty.Size = new Size(275, 611); + docPnlProperty.Size = new Size(275, 638); docPnlProperty.Text = "灞炴��"; // // dockPanel1_Container // dockPanel1_Container.Location = new Point(4, 26); dockPanel1_Container.Name = "dockPanel1_Container"; - dockPanel1_Container.Size = new Size(268, 582); + dockPanel1_Container.Size = new Size(268, 609); dockPanel1_Container.TabIndex = 0; // // docPnlMatchingList @@ -297,7 +299,7 @@ docPnlMatchingList.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom; docPnlMatchingList.FloatVertical = true; docPnlMatchingList.ID = new Guid("19fbbff8-5202-46bc-b9f4-472249e3c49a"); - docPnlMatchingList.Location = new Point(0, 680); + docPnlMatchingList.Location = new Point(0, 597); docPnlMatchingList.Name = "docPnlMatchingList"; docPnlMatchingList.OriginalSize = new Size(200, 59); docPnlMatchingList.Size = new Size(886, 59); @@ -305,6 +307,7 @@ // // controlContainer5 // + controlContainer5.Controls.Add(xhsProjectSimulationMatchingListCtrl1); controlContainer5.Location = new Point(3, 27); controlContainer5.Name = "controlContainer5"; controlContainer5.Size = new Size(880, 29); @@ -316,7 +319,7 @@ docPnlHydroParterList.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom; docPnlHydroParterList.FloatVertical = true; docPnlHydroParterList.ID = new Guid("facc1bde-3cf7-455c-b59c-8377daa6b90e"); - docPnlHydroParterList.Location = new Point(0, 601); + docPnlHydroParterList.Location = new Point(0, 518); docPnlHydroParterList.Name = "docPnlHydroParterList"; docPnlHydroParterList.OriginalSize = new Size(200, 79); docPnlHydroParterList.Size = new Size(886, 79); @@ -346,7 +349,7 @@ docPnlHydroCalcu.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom; docPnlHydroCalcu.FloatVertical = true; docPnlHydroCalcu.ID = new Guid("ac7055c0-e9fe-40c2-bf51-83dde5710cd4"); - docPnlHydroCalcu.Location = new Point(0, 517); + docPnlHydroCalcu.Location = new Point(0, 434); docPnlHydroCalcu.Name = "docPnlHydroCalcu"; docPnlHydroCalcu.OriginalSize = new Size(200, 84); docPnlHydroCalcu.Size = new Size(886, 84); @@ -364,7 +367,7 @@ docPnlHydroCheck.Controls.Add(controlContainer1); docPnlHydroCheck.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom; docPnlHydroCheck.ID = new Guid("dee18895-8b3d-44cd-9001-28bee516095d"); - docPnlHydroCheck.Location = new Point(0, 429); + docPnlHydroCheck.Location = new Point(0, 346); docPnlHydroCheck.Name = "docPnlHydroCheck"; docPnlHydroCheck.OriginalSize = new Size(200, 88); docPnlHydroCheck.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Bottom; @@ -407,6 +410,14 @@ radialMenu1.Name = "radialMenu1"; radialMenu1.Ribbon = ribbonControl1; // + // xhsProjectSimulationMatchingListCtrl1 + // + xhsProjectSimulationMatchingListCtrl1.Dock = DockStyle.Fill; + xhsProjectSimulationMatchingListCtrl1.Location = new Point(0, 0); + xhsProjectSimulationMatchingListCtrl1.Name = "xhsProjectSimulationMatchingListCtrl1"; + xhsProjectSimulationMatchingListCtrl1.Size = new Size(880, 29); + xhsProjectSimulationMatchingListCtrl1.TabIndex = 0; + // // XhsProjectSimulationCorePage // Appearance.BackColor = SystemColors.Control; @@ -414,12 +425,12 @@ AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(tabPane1); - Controls.Add(docPnlUnMatchingList); Controls.Add(docPnlHydroCheck); Controls.Add(docPnlHydroCalcu); Controls.Add(docPnlHydroParterList); Controls.Add(docPnlMatchingList); Controls.Add(docPnlProperty); + Controls.Add(docPnlUnMatchingList); Controls.Add(ribbonControl1); Margin = new Padding(2); Name = "XhsProjectSimulationCorePage"; @@ -430,6 +441,7 @@ ((ISupportInitialize)dockManager1).EndInit(); docPnlProperty.ResumeLayout(false); docPnlMatchingList.ResumeLayout(false); + controlContainer5.ResumeLayout(false); docPnlHydroParterList.ResumeLayout(false); controlContainer3.ResumeLayout(false); docPnlHydroCalcu.ResumeLayout(false); @@ -486,9 +498,9 @@ private DevExpress.XtraBars.Navigation.TabNavigationPage tabPageL3d; private DevExpress.XtraBars.Docking.DockPanel docPnlMatchingList; private DevExpress.XtraBars.Docking.ControlContainer controlContainer5; - private Xhs.XhsProjectSimulationMatchingListCtrl assetsMainChoicePage1; - private XhsProjectSimulationUnMatchingListCtrl xhsProjectSimulationUnMatchingListCtrl1; + private XhsProjectSimulationUnMatchingListCtrl xhsProjectSimulationUnMatchingListCtrl1; private XhsProjectSimulationL3dCtrl xhsProjectSimulationL3dCtrl1; private DevExpress.XtraBars.Ribbon.RadialMenu radialMenu1; + private Xhs.XhsProjectSimulationMatchingListCtrl xhsProjectSimulationMatchingListCtrl1; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs index 3d2be6c..82875ba 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -20,13 +20,12 @@ this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; this.docPnlUnMatchingList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; this.docPnlMatchingList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; - this.assetsMainChoicePage1.FormRowClickEvent += xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent; + this.xhsProjectSimulationMatchingListCtrl1.FormRowClickEvent += xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent; } private HStation.Vmo.XhsProjectVmo _project = null;//椤圭洰 private HStation.Vmo.XhsProjectSiteVmo _projectSite = null;//椤圭洰绔� private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅 - private Yw.Model.HydroParterInfo _parter = null; private Yw.EPAnet.CheckResult _checkResult = null; @@ -82,10 +81,6 @@ { return _hydroInfo; } - - - - //姘村姏璁$畻 private async void barBtnHydroCalcu_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) @@ -151,18 +146,6 @@ TipFormHelper.ShowSucceed("瀵煎嚭鎴愬姛"); } - - - - - - - - - - - - //姘村姏鏋勪欢鏄庣粏闈㈡澘鐐瑰嚮浜嬩欢 private async void hydroParterListCtrl1_HydroClickEvent(Yw.Model.HydroParterInfo parter) { @@ -219,7 +202,7 @@ await this.xhsProjectSimulationBimfaceCtrl1.SetLinkComponentsColor(elementIds); } - #endregion + #endregion Bimface #region 鑷姩鍖归厤 @@ -237,8 +220,8 @@ this.docPnlUnMatchingList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; var input = AssetsMatchingParasHelper.Create(_hydroInfo); - this.assetsMainChoicePage1.SetBindingData(input); - this.assetsMainChoicePage1.RelaodEvent += (output) => + this.xhsProjectSimulationMatchingListCtrl1.SetBindingData(input); + this.xhsProjectSimulationMatchingListCtrl1.RelaodEvent += (output) => { return AssetsMatchingParasHelper.Apply(_hydroInfo, output); }; @@ -246,8 +229,7 @@ this.docPnlMatchingList.Height = 350; } - - #endregion + #endregion 鑷姩鍖归厤 #region 鏈尮閰嶅垪琛� @@ -288,8 +270,7 @@ ShowProperty(); } - - #endregion + #endregion 鏈尮閰嶅垪琛� #region 涓�閿樉闅� @@ -319,7 +300,7 @@ } } - #endregion + #endregion 涓�閿樉闅� #region 姘村姏鏍¢獙 @@ -362,9 +343,7 @@ ShowProperty(); } - #endregion - - + #endregion 姘村姏鏍¢獙 #region 淇濆瓨姘村姏淇℃伅 @@ -385,8 +364,7 @@ TipFormHelper.ShowSucceed("淇濆瓨鎴愬姛锛�"); } - - #endregion + #endregion 淇濆瓨姘村姏淇℃伅 #region 涓氬姟鏂规硶 @@ -440,16 +418,6 @@ } } - - - - - #endregion - - - - - - + #endregion 涓氬姟鏂规硶 } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.resx index e15645f..84b8a68 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.resx +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.resx @@ -262,7 +262,7 @@ MC45LTItMnMwLjktMiwyLTJTMjYsMjIuOSwyNiwyNHoiIGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= </value> </data> - <data name="barBtnAutoMatching.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <data name="barBtnMatching.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user index a58aad7..809c594 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user @@ -67,9 +67,6 @@ <Compile Update="03-scheme\02-asset-mgr\PumpMain_Wizrad\PumpMainForm.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="04-simulation\06-simulation\01-matching\00-core\AssetsAutoMatchingMainDlg.cs"> - <SubType>Form</SubType> - </Compile> <Compile Update="04-simulation\06-simulation\01-matching\00-core\XhsProjectSimulationMatchingListCtrl.cs"> <SubType>UserControl</SubType> </Compile> -- Gitblit v1.9.3