WinFrmUI/HStation.WinFrmUI.Assets.Core/20-exchanger/04-curveql/AssetsExchangerCurveQLViewDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,59 @@ namespace HStation.WinFrmUI { partial class AssetsExchangerCurveQLViewDlg { /// <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() { universalChartViewCtrl1 = new UniversalChartViewCtrl(); SuspendLayout(); // // universalChartViewCtrl1 // universalChartViewCtrl1.Dock = DockStyle.Fill; universalChartViewCtrl1.Location = new Point(0, 0); universalChartViewCtrl1.Margin = new Padding(2, 2, 2, 2); universalChartViewCtrl1.Name = "universalChartViewCtrl1"; universalChartViewCtrl1.Size = new Size(860, 511); universalChartViewCtrl1.TabIndex = 0; // // AssetsExchangerCurveQLViewDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(860, 511); Controls.Add(universalChartViewCtrl1); Name = "AssetsExchangerCurveQLViewDlg"; StartPosition = FormStartPosition.CenterParent; Text = "水头æå¤±æ²çº¿"; ResumeLayout(false); } #endregion private UniversalChartViewCtrl universalChartViewCtrl1; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/20-exchanger/04-curveql/AssetsExchangerCurveQLViewDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,52 @@ using DevExpress.XtraCharts; using DevExpress.XtraEditors; using HStation.Vmo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Yw; namespace HStation.WinFrmUI { public partial class AssetsExchangerCurveQLViewDlg : DevExpress.XtraEditors.XtraForm { public AssetsExchangerCurveQLViewDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(long relationId) { var relation = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.GetByID(relationId); SetBindingData(relation); } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(PhartDiagramRelationVmo relation) { var vmo = await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID); SetBindingData(vmo); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Vmo.PhartDiagramExGraphListVmo vmo) { this.universalChartViewCtrl1.SetBindingData(vmo); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/20-exchanger/04-curveql/AssetsExchangerCurveQLViewDlg.resx
WinFrmUI/HStation.WinFrmUI.Assets.Core/21-compressor/04-curveql/AssetsCompressorCurveQLViewDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,59 @@ namespace HStation.WinFrmUI { partial class AssetsCompressorCurveQLViewDlg { /// <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() { universalChartViewCtrl1 = new UniversalChartViewCtrl(); SuspendLayout(); // // universalChartViewCtrl1 // universalChartViewCtrl1.Dock = DockStyle.Fill; universalChartViewCtrl1.Location = new Point(0, 0); universalChartViewCtrl1.Margin = new Padding(2, 2, 2, 2); universalChartViewCtrl1.Name = "universalChartViewCtrl1"; universalChartViewCtrl1.Size = new Size(860, 511); universalChartViewCtrl1.TabIndex = 0; // // AssetsCompressorCurveQLViewDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(860, 511); Controls.Add(universalChartViewCtrl1); Name = "AssetsCompressorCurveQLViewDlg"; StartPosition = FormStartPosition.CenterParent; Text = "水头æå¤±æ²çº¿"; ResumeLayout(false); } #endregion private UniversalChartViewCtrl universalChartViewCtrl1; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/21-compressor/04-curveql/AssetsCompressorCurveQLViewDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,52 @@ using DevExpress.XtraCharts; using DevExpress.XtraEditors; using HStation.Vmo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Yw; namespace HStation.WinFrmUI { public partial class AssetsCompressorCurveQLViewDlg : DevExpress.XtraEditors.XtraForm { public AssetsCompressorCurveQLViewDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(long relationId) { var relation = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.GetByID(relationId); SetBindingData(relation); } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(PhartDiagramRelationVmo relation) { var vmo = await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID); SetBindingData(vmo); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Vmo.PhartDiagramExGraphListVmo vmo) { this.universalChartViewCtrl1.SetBindingData(vmo); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/21-compressor/04-curveql/AssetsCompressorCurveQLViewDlg.resxcopy from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorChartShowDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/21-compressor/04-curveql/AssetsCompressorCurveQLViewDlg.resx
WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj
@@ -412,6 +412,9 @@ <Compile Update="20-exchanger\03-factor\ViewAssetsCoolingFactorDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="20-exchanger\04-curveql\AssetsExchangerCurveQLViewDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="20-exchanger\04-curveql\ImportAssetsExchangerCurveQLByPictureDlg.cs"> <SubType>Form</SubType> </Compile> WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user
@@ -440,6 +440,9 @@ <Compile Update="21-compressor\04-curveql\AssetsCompressorCurveQLMgrPage.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="21-compressor\04-curveql\AssetsCompressorCurveQLViewDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="21-compressor\04-curveql\EditAssetsCompressorCurveQLDlg.cs"> <SubType>Form</SubType> </Compile> WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj
@@ -68,7 +68,7 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="NPOI" Version="2.7.1" /> <PackageReference Include="Yw.BLL.Phart.Core" Version="3.0.2" /> <PackageReference Include="Yw.BLL.Phart.Core" Version="3.0.5" /> </ItemGroup> <ItemGroup> WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user
@@ -32,5 +32,11 @@ <Compile Update="relation\02-edit\EditPhartDiagramRelationDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="relation\03-grid\PhartDiagramRelationGridViewCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="relation\04-view\PhartDiagramRelationCurveViewDlg.cs"> <SubType>Form</SubType> </Compile> </ItemGroup> </Project> WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/DataSources/HStation.WinFrmUI.PhartDiagramRelationGridItemViewModel.datasource
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!-- This file is automatically generated by Visual Studio. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> <GenericObjectDataSource DisplayName="PhartDiagramRelationGridItemViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>HStation.WinFrmUI.PhartDiagramRelationGridItemViewModel, HStation.WinFrmUI.PhartRelation.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource> WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridItemViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,65 @@ using HStation.Vmo; using System.ComponentModel.DataAnnotations; namespace HStation.WinFrmUI { /// <summary> /// /// </summary> public class PhartDiagramRelationGridItemViewModel { /// <summary> /// /// </summary> public PhartDiagramRelationGridItemViewModel() { } /// <summary> /// /// </summary> public PhartDiagramRelationGridItemViewModel(PhartDiagramRelationVmo rhs) { this.ID = rhs.ID; this.Name = rhs.OtherName; this.Importance = rhs.Importance; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; } /// <summary> /// ID /// </summary> [Display(Name = "ID")] public long ID { get; set; } /// <summary> /// åç§° /// </summary> [Display(Name = "åç§°")] public string Name { get; set; } /// <summary> /// éè¦åº¦ /// </summary> [Display(Name = "éè¦åº¦")] public int Importance { get; set; } /// <summary> /// æåºç /// </summary> [Display(Name = "æåºç ")] public int SortCode { get; set; } /// <summary> /// 说æ /// </summary> [Display(Name = "说æ")] public string Description { get; set; } /// <summary> /// /// </summary> public PhartDiagramRelationVmo Vmo { get; set; } } } WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,144 @@ namespace HStation.WinFrmUI { partial class PhartDiagramRelationGridViewCtrl { /// <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 Component 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() { components = new System.ComponentModel.Container(); DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PhartDiagramRelationGridViewCtrl)); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); gridControl1 = new DevExpress.XtraGrid.GridControl(); phartDiagramRelationGridItemViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colImportance = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colCurve = new DevExpress.XtraGrid.Columns.GridColumn(); repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)phartDiagramRelationGridItemViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); SuspendLayout(); // // gridControl1 // gridControl1.DataSource = phartDiagramRelationGridItemViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; gridControl1.Location = new Point(0, 0); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); gridControl1.Size = new Size(764, 444); gridControl1.TabIndex = 0; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // phartDiagramRelationGridItemViewModelBindingSource // phartDiagramRelationGridItemViewModelBindingSource.DataSource = typeof(PhartDiagramRelationGridItemViewModel); // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colImportance, colDescription, colCurve }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.RowCellClick += gridView1_RowCellClick; // // colName // colName.FieldName = "Name"; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; // // colImportance // colImportance.FieldName = "Importance"; colImportance.MaxWidth = 100; colImportance.MinWidth = 100; colImportance.Name = "colImportance"; colImportance.Visible = true; colImportance.VisibleIndex = 1; colImportance.Width = 100; // // colDescription // colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 2; // // colCurve // colCurve.Caption = "æ²çº¿"; colCurve.ColumnEdit = repositoryItemButtonEdit1; colCurve.MaxWidth = 60; colCurve.MinWidth = 60; colCurve.Name = "colCurve"; colCurve.Visible = true; colCurve.VisibleIndex = 3; colCurve.Width = 60; // // repositoryItemButtonEdit1 // repositoryItemButtonEdit1.AutoHeight = false; editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); editorButtonImageOptions1.SvgImageSize = new Size(20, 20); repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // // PhartDiagramRelationGridViewCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(gridControl1); Name = "PhartDiagramRelationGridViewCtrl"; Size = new Size(764, 444); ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)phartDiagramRelationGridItemViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraGrid.GridControl gridControl1; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; private BindingSource phartDiagramRelationGridItemViewModelBindingSource; private DevExpress.XtraGrid.Columns.GridColumn colName; private DevExpress.XtraGrid.Columns.GridColumn colImportance; private DevExpress.XtraGrid.Columns.GridColumn colDescription; private DevExpress.XtraGrid.Columns.GridColumn colCurve; private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; } } WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ using DevExpress.XtraEditors; using HStation.Vmo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Yw; namespace HStation.WinFrmUI { public partial class PhartDiagramRelationGridViewCtrl : DevExpress.XtraEditors.XtraUserControl { public PhartDiagramRelationGridViewCtrl() { InitializeComponent(); this.gridView1.SetNormalView(); this.gridView1.RegistCustomDrawCell(); } private List<PhartDiagramRelationGridItemViewModel> _allBindingList = null;//ææç»å®å表 /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(string objectType, long objectId) { var allList = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.GetByObjectTypeAndObjectID(objectType, objectId); SetBindingData(allList); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(List<PhartDiagramRelationVmo> allList) { _allBindingList = new List<PhartDiagramRelationGridItemViewModel>(); allList?.OrderBy(x => x.SortCode).ToList().ForEach(x => _allBindingList.Add(new PhartDiagramRelationGridItemViewModel(x))); this.phartDiagramRelationGridItemViewModelBindingSource.DataSource = _allBindingList; this.phartDiagramRelationGridItemViewModelBindingSource.ResetBindings(false); } //è¡ç¹å»äºä»¶ private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { if (e.Column == this.colCurve) { var row = this.gridView1.GetRow(e.RowHandle) as PhartDiagramRelationGridItemViewModel; if (row == null) { return; } var dlg = new PhartDiagramRelationCurveViewDlg(); dlg.SetBindingData(row.Vmo); dlg.ShowDialog(); } } } } WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.resx
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerSingleMatchingCtrl.resx ÐÞ¸Ä @@ -117,7 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="ExchangerSingleMatchingViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="phartDiagramRelationGridItemViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> @@ -125,22 +125,28 @@ <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALkCAAAC77u/ dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMAEAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh Y2U9InByZXNlcnZlIiBpZD0iQ3JlYXRlX0xpbmVfQ2hhcnRfTm9fTWFya2VycyIgc3R5bGU9ImVuYWJs ZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJs dWV7ZmlsbDojMTE3N0Q3O30KCS5ZZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFD O30KPC9zdHlsZT4NCiAgPHBvbHlnb24gcG9pbnRzPSIyLjgsNS44IDIuOCw1LjggMy43LDQgMTUuMyw5 LjcgMjguOCwyIDI5LjgsMy43IDE1LjMsMTIgMi44LDUuOCAiIGNsYXNzPSJSZWQiIC8+DQogIDxwb2x5 Z29uIHBvaW50cz0iMi43LDE3LjYgMi43LDE3LjYgMy45LDE2LjEgMTUuMiwyNS41IDI4LjYsMTIuMiAz MCwxMy42IDE1LjQsMjguMiAyLjcsMTcuNiAiIGNsYXNzPSJZZWxsb3ciIC8+DQogIDxwb2x5Z29uIHBv aW50cz0iMi43LDI4LjEgMTUuMSwxNy44IDI5LjYsMjEuOSAyOSwyMy44IDE1LjUsMjAgMy45LDI5LjYg Mi43LDI4LjEgIiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLlll bGxvd3tmaWxsOiNGRkIxMTU7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMzU7fQoJLnN0M3tv cGFjaXR5OjAuNjU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iU3BsaW5lIj4NCiAgICA8cGF0aCBkPSJNMjks MTZjLTEuNywwLTMsMS4zLTMsM2MwLDAuNywwLjMsMS40LDAuNywxLjljLTEuMiwzLjItMyw1LjEtNC43 LDUuMWMtMi41LDAtNS4yLTQuMS01LjgtMTAuMiAgIGMxLjEtMC41LDEuOC0xLjUsMS44LTIuOGMwLTEu NC0xLTIuNy0yLjQtMi45QzE0LjcsNi41LDEyLjEsNCw5LDRzLTUuNywyLjUtNi42LDYuMUMxLDEwLjMs MCwxMS42LDAsMTNjMCwxLjcsMS4zLDMsMywzczMtMS4zLDMtMyAgIGMwLTEuMi0wLjctMi4xLTEuNi0y LjZDNS4yLDcuOCw3LDYsOSw2czMuOCwxLjgsNC42LDQuNGMtMSwwLjUtMS42LDEuNS0xLjYsMi42YzAs MS40LDAuOSwyLjUsMi4yLDIuOUMxNC45LDIyLjgsMTguMSwyOCwyMiwyOCAgIGMyLjYsMCw1LTIuNCw2 LjQtNi4xYzAuMiwwLDAuNCwwLjEsMC42LDAuMWMxLjcsMCwzLTEuMywzLTNTMzAuNywxNiwyOSwxNnog TTMsMTRjLTAuNiwwLTEtMC40LTEtMWMwLTAuNiwwLjQtMSwxLTFzMSwwLjQsMSwxICAgQzQsMTMuNiwz LjYsMTQsMywxNHogTTE1LDEyYzAuNiwwLDEsMC40LDEsMWMwLDAuNi0wLjQsMS0xLDFzLTEtMC40LTEt MUMxNCwxMi40LDE0LjQsMTIsMTUsMTJ6IE0yOSwyMGMtMC42LDAtMS0wLjQtMS0xICAgYzAtMC42LDAu NC0xLDEtMXMxLDAuNCwxLDFDMzAsMTkuNiwyOS42LDIwLDI5LDIweiIgY2xhc3M9IkJsdWUiIC8+DQog IDwvZz4NCjwvc3ZnPgs= </value> </data> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>71</value> </metadata> </root> WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/04-view/PhartDiagramRelationCurveViewDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,59 @@ namespace HStation.WinFrmUI { partial class PhartDiagramRelationCurveViewDlg { /// <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() { universalChartViewCtrl1 = new UniversalChartViewCtrl(); SuspendLayout(); // // universalChartViewCtrl1 // universalChartViewCtrl1.Dock = DockStyle.Fill; universalChartViewCtrl1.Location = new Point(0, 0); universalChartViewCtrl1.Margin = new Padding(2, 2, 2, 2); universalChartViewCtrl1.Name = "universalChartViewCtrl1"; universalChartViewCtrl1.Size = new Size(844, 533); universalChartViewCtrl1.TabIndex = 0; // // PhartDiagramRelationCurveViewDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(844, 533); Controls.Add(universalChartViewCtrl1); Name = "PhartDiagramRelationCurveViewDlg"; StartPosition = FormStartPosition.CenterParent; Text = "æ²çº¿"; ResumeLayout(false); } #endregion private UniversalChartViewCtrl universalChartViewCtrl1; } } WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/04-view/PhartDiagramRelationCurveViewDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ using DevExpress.XtraEditors; using HStation.Vmo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Yw; namespace HStation.WinFrmUI { public partial class PhartDiagramRelationCurveViewDlg : DevExpress.XtraEditors.XtraForm { public PhartDiagramRelationCurveViewDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(PhartDiagramRelationVmo relation) { var vmo = await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID); SetBindingData(vmo); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Vmo.PhartDiagramExGraphListVmo vmo) { this.universalChartViewCtrl1.SetBindingData(vmo); } } } WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/04-view/PhartDiagramRelationCurveViewDlg.resxcopy from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorChartShowDlg.resx copy to WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/04-view/PhartDiagramRelationCurveViewDlg.resx
WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingHelper.cs
@@ -125,7 +125,7 @@ //æ¢çå¨å¹é foreach (var item in assetsAutoMatchingView.Exchangers) { if (MatchingExchanger(item, allExchanger)) if (Matching(item, allExchanger)) { IsMaching = true; } @@ -133,7 +133,7 @@ //å缩æºå¹é foreach (var item in assetsAutoMatchingView.Compressors) { if (MatchingCompressor(item, allCompressorMain)) if (Matching(item, allCompressorMain)) { IsMaching = true; } @@ -1037,243 +1037,281 @@ } //æ¢çå¨å¹é public static bool MatchingExchanger(HydroExchangerMatchingViewModel input, List<Vmo.AssetsExchangerMainVmo> exchangerVmos) public static bool Matching(HydroExchangerMatchingViewModel input, List<Vmo.AssetsExchangerMainVmo> allExchangerList) { // bool isNotarize = false; //æ¯å¦ç¡®å® //è¾å ¥åæ°éªè¯ if (input == null) { return false; } // if (exchangerVmos == null || input == null || exchangerVmos.Count == 0) // { // return true; // } // Vmo.AssetsExchangerMainVmo vmo = null; // var nameMatching = exchangerVmos.Where(x => //(x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || //(x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 //) //å è¿è¡çé,åè¿è¡ä»å¤§å°å°æåº //.OrderByDescending(x => // (x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || // (x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); //æ°æ®æºæ²¡ææ°æ®å没æå¹é æå if (allExchangerList == null || allExchangerList.Count < 1) { return false; } // if (nameMatching.Count > 1) // { // var absoluteMatching = nameMatching.Where(i => // i.Material == input.Material //ææçº¦æ // ).ToList(); // if (absoluteMatching.Count > 1) // { // var defaultList = absoluteMatching.Where(x => x.Flags.Contains("é»è®¤å¼")).ToList(); // //åé»è®¤ // if (defaultList.Count > 0) // { // vmo = defaultList.First(); // } // else if (defaultList.Count <= 0) // { // vmo = exchangerVmos.First(); // } // } // else if (absoluteMatching.Count == 1) // { // isNotarize = true; //æéåå ¸ var dict = new Dictionary<AssetsExchangerMainVmo, double>(); foreach (var item in allExchangerList) { dict.Add(item, 0); } // vmo = absoluteMatching.First(); // } // else // vmo = exchangerVmos.First(); // } // else if (nameMatching.Count == 1) // { // isNotarize = true; //åå· int modelTypeWeight = 10; if (!string.IsNullOrEmpty(input.ModelType)) { foreach (var item in allExchangerList) { if (!string.IsNullOrEmpty(item.Name)) { var count = item.Name.ToLower().Intersect(input.ModelType.ToLower()).Count(); dict[item] += count * modelTypeWeight; } } } // vmo = nameMatching.First(); // } // else // { // var absoluteMatching = exchangerVmos.Where(i => // i.Material == input.Material //ææçº¦æ // ).ToList(); // if (absoluteMatching.Count > 1) // { // var defaultList = absoluteMatching.Where(x => x.Flags.Contains("é»è®¤å¼")).ToList(); // //åé»è®¤ // if (defaultList.Count > 0) // { // vmo = defaultList.First(); // } // else if (defaultList.Count <= 0) // { // vmo = exchangerVmos.First(); // } // } // else if (absoluteMatching.Count == 1) // { // isNotarize = true; //æè´¨ int materialWeight = 5; if (!string.IsNullOrEmpty(input.Material)) { foreach (var item in allExchangerList) { if (!string.IsNullOrEmpty(item.Material)) { var count = item.Material.ToLower().Intersect(input.Material.ToLower()).Count(); dict[item] += count * materialWeight; } } } // vmo = absoluteMatching.First(); // } // else // vmo = exchangerVmos.First(); // } // if (vmo != null) // { // if (!isNotarize) // { // if (input.MinorLoss < 0) // input.MatchingMinorLoss = vmo.MinorLoss; // if (input.DbId == null) // input.MatchingDbId = vmo.ID.ToString(); // if (input.Material == null) // input.MatchingMaterial = vmo.Material; // if (input.ModelType == null) // input.MatchingModelType = vmo.Name; // if (input.CurveDbId == null) // { // var curveList = Task.Run(async () => await new BLL.AssetsExchangerCoefficient().GetByMainID(vmo.ID)).Result; // if (curveList != null && curveList.Count > 0) // { // input.MatchingCurveDbId = curveList.First().ID.ToString(); // var pt_list = Yw.JsonHelper.Json2Object<List<HydroCurvePointViewModel>>(curveList.First().MinorLossCurve); // input.MatchingCurveQL = pt_list; // } // } // } // else // { // input.MatchingMinorLoss = vmo.MinorLoss; // input.MatchingDbId = vmo.ID.ToString(); // input.MatchingMaterial = vmo.Material; // input.MatchingModelType = vmo.Name; // var curveList = Task.Run(async () => await new BLL.AssetsExchangerCoefficient().GetByMainID(vmo.ID)).Result; // if (curveList != null && curveList.Count > 0) // { // input.MatchingCurveDbId = curveList.First().ID.ToString(); // var pt_list = Yw.JsonHelper.Json2Object<List<HydroCurvePointViewModel>>(curveList.First().MinorLossCurve); // input.MatchingCurveQL = pt_list; // } // } // return true; // } // return false; //å£å¾ int diameterWeight = 1; if (input.Diameter > 0) { foreach (var item in allExchangerList) { if (item.Diameter.HasValue) { var diff = Math.Abs(item.Diameter.Value - input.Diameter); dict[item] += diff / input.Diameter * 100 * diameterWeight; } } } // å ³é®å int keywordWeight = 1; foreach (var item in allExchangerList) { if (item.KeyWords != null && item.KeyWords.Count > 0) { if (!string.IsNullOrEmpty(input.ModelType)) { var count = item.KeyWords.Count(x => input.ModelType.ToLower().Contains(x.ToLower())); dict[item] += count * keywordWeight; } if (!string.IsNullOrEmpty(input.Material)) { var count = item.KeyWords.Count(x => input.Material.ToLower().Contains(x.ToLower())); dict[item] += count * keywordWeight; } } } //æ ç¾ int flagWeight = 1; foreach (var item in allExchangerList) { if (item.Flags != null && item.Flags.Count > 0) { if (item.Flags.Contains(HStation.Assets.Flags.é»è®¤)) { dict[item] += flagWeight; } } } var exchanger = dict.OrderBy(x => x.Value).LastOrDefault().Key; input.MatchingDbId = exchanger.ID.ToString(); if (string.IsNullOrEmpty(input.ModelType)) { input.MatchingModelType = exchanger.Name; } if (string.IsNullOrEmpty(input.Material)) { input.MatchingMaterial = exchanger.Material; } if (input.Diameter <= 0) { if (exchanger.Diameter.HasValue) { input.MatchingDiameter = exchanger.Diameter.Value; } } if (input.MinorLoss <= 0) { input.MatchingMinorLoss = exchanger.MinorLoss; } var relationList = Task.Run(async () => await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance .GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ExchangerMain, exchanger.ID)).Result; if (relationList != null && relationList.Count > 0) { var relation = relationList.OrderBy(x => x.Importance).LastOrDefault(); input.MatchingCurveDbId = relation.ID.ToString(); var diagram = Task.Run(async () => await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID)).Result; if (diagram != null) { var graph = diagram.GraphList?.FirstOrDefault(); if (graph != null) { var pts = graph.GetFeatPointList(); input.MatchingCurveQL = pts?.Select(x => new HydroCurvePointViewModel(x.X, x.Y)).ToList(); } } } return true; } //ç©ºåæºå¹é public static bool MatchingCompressor(HydroCompressorMatchingViewModel input, List<Vmo.AssetsCompressorMainVmo> compressorVmos) public static bool Matching(HydroCompressorMatchingViewModel input, List<Vmo.AssetsCompressorMainVmo> allCompressorList) { // bool isNotarize = false; //æ¯å¦ç¡®å® // if (compressorVmos == null || input == null || compressorVmos.Count == 0) // { // return true; // } // Vmo.AssetsCompressorMainVmo vmo = null; // var nameMatching = compressorVmos.Where(x => //(x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || //(x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 //) //å è¿è¡çé,åè¿è¡ä»å¤§å°å°æåº //.OrderByDescending(x => // (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || // (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); //è¾å ¥åæ°éªè¯ if (input == null) { return false; } // if (nameMatching.Count > 1) // { // var absoluteMatching = nameMatching.Where(i => // i.Material == input.Material //ææçº¦æ // ).ToList(); // if (absoluteMatching.Count > 1) // { // var defaultList = absoluteMatching.Where(x => x.Flags.Contains("é»è®¤å¼")).ToList(); // //åé»è®¤ // if (defaultList.Count > 0) // { // vmo = defaultList.First(); // } // else if (defaultList.Count <= 0) // { // vmo = compressorVmos.First(); // } // } // else if (absoluteMatching.Count == 1) // { // isNotarize = true; //æ°æ®æºæ²¡ææ°æ®å没æå¹é æå if (allCompressorList == null || allCompressorList.Count < 1) { return false; } // vmo = absoluteMatching.First(); // } // else // vmo = compressorVmos.First(); // } // else if (nameMatching.Count == 1) // { // isNotarize = true; //æéåå ¸ var dict = new Dictionary<AssetsCompressorMainVmo, double>(); foreach (var item in allCompressorList) { dict.Add(item, 0); } // vmo = nameMatching.First(); // } // else // { // var absoluteMatching = compressorVmos.Where(i => // i.Material == input.Material //ææçº¦æ // ).ToList(); // if (absoluteMatching.Count > 1) // { // var defaultList = absoluteMatching.Where(x => x.Flags.Contains("é»è®¤å¼")).ToList(); // //åé»è®¤ // if (defaultList.Count > 0) // { // vmo = defaultList.First(); // } // else if (defaultList.Count <= 0) // { // vmo = compressorVmos.First(); // } // } // else if (absoluteMatching.Count == 1) // { // isNotarize = true; //åå· int modelTypeWeight = 10; if (!string.IsNullOrEmpty(input.ModelType)) { foreach (var item in allCompressorList) { if (!string.IsNullOrEmpty(item.Name)) { var count = item.Name.ToLower().Intersect(input.ModelType.ToLower()).Count(); dict[item] += count * modelTypeWeight; } } } // vmo = absoluteMatching.First(); // } // else // vmo = compressorVmos.First(); // } // if (vmo != null) // { // if (!isNotarize) // { // if (input.MinorLoss < 0) // input.MatchingMinorLoss = vmo.MinorLoss; // if (input.DbId == null) // input.MatchingDbId = vmo.ID.ToString(); // if (input.Material == null) // input.MatchingMaterial = vmo.Material; // if (input.ModelType == null) // input.MatchingModelType = vmo.Name; // if (input.CurveDbId == null) // { // var curveList = Task.Run(async () => await new BLL.AssetsCompressorCoefficient().GetByMainID(vmo.ID)).Result; // if (curveList != null && curveList.Count > 0) // { // input.MatchingCurveDbId = curveList.First().ID.ToString(); // var pt_list = Yw.JsonHelper.Json2Object<List<HydroCurvePointViewModel>>(curveList.First().MinorLossCurve); // input.MatchingCurveQL = pt_list; // } // } // } // else // { // input.MatchingMinorLoss = vmo.MinorLoss; // input.MatchingDbId = vmo.ID.ToString(); // input.MatchingMaterial = vmo.Material; // input.MatchingModelType = vmo.Name; // var curveList = Task.Run(async () => await new BLL.AssetsCompressorCoefficient().GetByMainID(vmo.ID)).Result; // if (curveList != null && curveList.Count > 0) // { // input.MatchingCurveDbId = curveList.First().ID.ToString(); // var pt_list = Yw.JsonHelper.Json2Object<List<HydroCurvePointViewModel>>(curveList.First().MinorLossCurve); // input.MatchingCurveQL = pt_list; // } // } // return true; // } return false; //æè´¨ int materialWeight = 5; if (!string.IsNullOrEmpty(input.Material)) { foreach (var item in allCompressorList) { if (!string.IsNullOrEmpty(item.Material)) { var count = item.Material.ToLower().Intersect(input.Material.ToLower()).Count(); dict[item] += count * materialWeight; } } } //å£å¾ int diameterWeight = 1; if (input.Diameter > 0) { foreach (var item in allCompressorList) { if (item.Diameter.HasValue) { var diff = Math.Abs(item.Diameter.Value - input.Diameter); dict[item] += diff / input.Diameter * 100 * diameterWeight; } } } // å ³é®å int keywordWeight = 1; foreach (var item in allCompressorList) { if (item.KeyWords != null && item.KeyWords.Count > 0) { if (!string.IsNullOrEmpty(input.ModelType)) { var count = item.KeyWords.Count(x => input.ModelType.ToLower().Contains(x.ToLower())); dict[item] += count * keywordWeight; } if (!string.IsNullOrEmpty(input.Material)) { var count = item.KeyWords.Count(x => input.Material.ToLower().Contains(x.ToLower())); dict[item] += count * keywordWeight; } } } //æ ç¾ int flagWeight = 1; foreach (var item in allCompressorList) { if (item.Flags != null && item.Flags.Count > 0) { if (item.Flags.Contains(HStation.Assets.Flags.é»è®¤)) { dict[item] += flagWeight; } } } var compressor = dict.OrderBy(x => x.Value).LastOrDefault().Key; input.MatchingDbId = compressor.ID.ToString(); if (string.IsNullOrEmpty(input.ModelType)) { input.MatchingModelType = compressor.Name; } if (string.IsNullOrEmpty(input.Material)) { input.MatchingMaterial = compressor.Material; } if (input.Diameter <= 0) { if (compressor.Diameter.HasValue) { input.MatchingDiameter = compressor.Diameter.Value; } } if (input.MinorLoss <= 0) { input.MatchingMinorLoss = compressor.MinorLoss; } var relationList = Task.Run(async () => await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance .GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ExchangerMain, compressor.ID)).Result; if (relationList != null && relationList.Count > 0) { var relation = relationList.OrderBy(x => x.Importance).LastOrDefault(); input.MatchingCurveDbId = relation.ID.ToString(); var diagram = Task.Run(async () => await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID)).Result; if (diagram != null) { var graph = diagram.GraphList?.FirstOrDefault(); if (graph != null) { var pts = graph.GetFeatPointList(); input.MatchingCurveQL = pts?.Select(x => new HydroCurvePointViewModel(x.X, x.Y)).ToList(); } } } return true; } //é·å¤´å¹é WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs
@@ -368,7 +368,7 @@ { var exchangerViewModel = vm as HydroExchangerViewModel; var input = HydroMatchingHelper.Create(exchangerViewModel); var dlg = new SimulationExchangerSingleMatchingDlg(); var dlg = new AssetsExchangerSingleMatchingDlg(); dlg.ReloadDataEvent += (output) => { HydroMatchingHelper.Apply(exchangerViewModel, output); @@ -385,7 +385,7 @@ { var compressorViewModel = vm as HydroCompressorViewModel; var input = HydroMatchingHelper.Create(compressorViewModel); var dlg = new SimulationCompressorSingleMatchingDlg(); var dlg = new AssetsCompressorSingleMatchingDlg(); dlg.ReloadDataEvent += (output) => { HydroMatchingHelper.Apply(compressorViewModel, output); @@ -455,8 +455,8 @@ if (long.TryParse(vm.DbId, out long longDbId)) { var exchangerViewModel = vm as HydroExchangerViewModel; var dlg = new ExchangerChartShowDlg(); dlg.SetBingingData(longDbId); var dlg = new AssetsExchangerCurveQLViewDlg(); dlg.SetBindingData(longDbId); dlg.ShowDialog(); } @@ -467,8 +467,8 @@ if (long.TryParse(vm.DbId, out long longDbId)) { var compressorViewModel = vm as HydroCompressorViewModel; var dlg = new CompressorChartShowDlg(); dlg.SetBingingData(longDbId); var dlg = new AssetsCompressorCurveQLViewDlg(); dlg.SetBindingData(longDbId); dlg.ShowDialog(); } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,450 @@ namespace HStation.WinFrmUI { partial class AssetsCompressorSingleMatchingCtrl { /// <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 Component 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() { components = new Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); phartDiagramRelationGridViewCtrl1 = new PhartDiagramRelationGridViewCtrl(); generalSearchCtrl1 = new GeneralSearchCtrl(); txtDiameterMax = new TextEdit(); txtDiameterMin = new TextEdit(); txtMaterial = new TextEdit(); txtName = new TextEdit(); gridControl1 = new DevExpress.XtraGrid.GridControl(); assetsCompressorSingleMatchingViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); colDiameter = new DevExpress.XtraGrid.Columns.GridColumn(); colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); colKeyWords = new DevExpress.XtraGrid.Columns.GridColumn(); colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem(); layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)txtDiameterMax.Properties).BeginInit(); ((ISupportInitialize)txtDiameterMin.Properties).BeginInit(); ((ISupportInitialize)txtMaterial.Properties).BeginInit(); ((ISupportInitialize)txtName.Properties).BeginInit(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)assetsCompressorSingleMatchingViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); ((ISupportInitialize)layoutControlItem4).BeginInit(); ((ISupportInitialize)layoutControlItem6).BeginInit(); ((ISupportInitialize)layoutControlItem5).BeginInit(); ((ISupportInitialize)simpleLabelItem1).BeginInit(); ((ISupportInitialize)layoutControlGroup2).BeginInit(); ((ISupportInitialize)layoutControlItem7).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(phartDiagramRelationGridViewCtrl1); layoutControl1.Controls.Add(generalSearchCtrl1); layoutControl1.Controls.Add(txtDiameterMax); layoutControl1.Controls.Add(txtDiameterMin); layoutControl1.Controls.Add(txtMaterial); layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(gridControl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1206, 280, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(1028, 569); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // phartDiagramRelationGridViewCtrl1 // phartDiagramRelationGridViewCtrl1.Location = new Point(0, 389); phartDiagramRelationGridViewCtrl1.Name = "phartDiagramRelationGridViewCtrl1"; phartDiagramRelationGridViewCtrl1.Size = new Size(1028, 180); phartDiagramRelationGridViewCtrl1.TabIndex = 10; // // generalSearchCtrl1 // generalSearchCtrl1.Location = new Point(556, 33); generalSearchCtrl1.Margin = new Padding(2); generalSearchCtrl1.Name = "generalSearchCtrl1"; generalSearchCtrl1.Size = new Size(460, 24); generalSearchCtrl1.TabIndex = 9; // // txtDiameterMax // txtDiameterMax.Location = new Point(496, 35); txtDiameterMax.Name = "txtDiameterMax"; txtDiameterMax.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; txtDiameterMax.Properties.DisplayFormat.FormatString = "{0}mm"; txtDiameterMax.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; txtDiameterMax.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); txtDiameterMax.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); txtDiameterMax.Properties.NullValuePrompt = "mm"; txtDiameterMax.Size = new Size(56, 20); txtDiameterMax.StyleController = layoutControl1; txtDiameterMax.TabIndex = 8; // // txtDiameterMin // txtDiameterMin.Location = new Point(412, 35); txtDiameterMin.Name = "txtDiameterMin"; txtDiameterMin.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; txtDiameterMin.Properties.DisplayFormat.FormatString = "{0}mm"; txtDiameterMin.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; txtDiameterMin.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); txtDiameterMin.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); txtDiameterMin.Properties.NullValuePrompt = "mm"; txtDiameterMin.Size = new Size(56, 20); txtDiameterMin.StyleController = layoutControl1; txtDiameterMin.TabIndex = 7; // // txtMaterial // txtMaterial.Location = new Point(232, 35); txtMaterial.Name = "txtMaterial"; txtMaterial.Size = new Size(136, 20); txtMaterial.StyleController = layoutControl1; txtMaterial.TabIndex = 6; // // txtName // txtName.Location = new Point(52, 35); txtName.Name = "txtName"; txtName.Size = new Size(136, 20); txtName.StyleController = layoutControl1; txtName.TabIndex = 5; // // gridControl1 // gridControl1.DataSource = assetsCompressorSingleMatchingViewModelBindingSource; gridControl1.Location = new Point(0, 70); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; gridControl1.Size = new Size(1028, 297); gridControl1.TabIndex = 4; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // assetsCompressorSingleMatchingViewModelBindingSource // assetsCompressorSingleMatchingViewModelBindingSource.DataSource = typeof(AssetsCompressorSingleMatchingViewModel); // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colMaterial, colDiameter, colMinorLoss, colKeyWords, colFlags, colTagName, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.FocusedRowChanged += gridView1_FocusedRowChanged; // // colName // colName.FieldName = "Name"; colName.MaxWidth = 150; colName.MinWidth = 100; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; colName.Width = 100; // // colMaterial // colMaterial.FieldName = "Material"; colMaterial.MaxWidth = 100; colMaterial.MinWidth = 100; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 1; colMaterial.Width = 100; // // colDiameter // colDiameter.FieldName = "Diameter"; colDiameter.MaxWidth = 100; colDiameter.MinWidth = 100; colDiameter.Name = "colDiameter"; colDiameter.Visible = true; colDiameter.VisibleIndex = 2; colDiameter.Width = 100; // // colMinorLoss // colMinorLoss.FieldName = "MinorLoss"; colMinorLoss.MaxWidth = 100; colMinorLoss.MinWidth = 100; colMinorLoss.Name = "colMinorLoss"; colMinorLoss.Visible = true; colMinorLoss.VisibleIndex = 3; colMinorLoss.Width = 100; // // colKeyWords // colKeyWords.FieldName = "KeyWords"; colKeyWords.MinWidth = 100; colKeyWords.Name = "colKeyWords"; colKeyWords.Visible = true; colKeyWords.VisibleIndex = 4; colKeyWords.Width = 100; // // colFlags // colFlags.FieldName = "Flags"; colFlags.MinWidth = 100; colFlags.Name = "colFlags"; colFlags.Visible = true; colFlags.VisibleIndex = 5; colFlags.Width = 100; // // colTagName // colTagName.FieldName = "TagName"; colTagName.MaxWidth = 150; colTagName.MinWidth = 100; colTagName.Name = "colTagName"; colTagName.Visible = true; colTagName.VisibleIndex = 6; colTagName.Width = 100; // // colDescription // colDescription.FieldName = "Description"; colDescription.MinWidth = 100; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 7; colDescription.Width = 100; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlGroup1, layoutControlGroup2 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); Root.Size = new Size(1028, 569); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = gridControl1; layoutControlItem1.Location = new Point(0, 69); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 1, 0); layoutControlItem1.Size = new Size(1028, 298); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlGroup1 // layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem6, layoutControlItem5, simpleLabelItem1 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Size = new Size(1028, 69); layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup1.Text = "æ£ç´¢æ¡ä»¶"; // // layoutControlItem2 // layoutControlItem2.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem2.Control = txtName; layoutControlItem2.Location = new Point(0, 0); layoutControlItem2.MaxSize = new Size(180, 24); layoutControlItem2.MinSize = new Size(180, 24); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(180, 28); layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem2.Text = "åç§°:"; layoutControlItem2.TextSize = new Size(28, 14); // // layoutControlItem3 // layoutControlItem3.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem3.Control = txtMaterial; layoutControlItem3.Location = new Point(180, 0); layoutControlItem3.MaxSize = new Size(180, 24); layoutControlItem3.MinSize = new Size(180, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(180, 28); layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem3.Text = "æè´¨:"; layoutControlItem3.TextSize = new Size(28, 14); // // layoutControlItem4 // layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem4.Control = txtDiameterMin; layoutControlItem4.Location = new Point(360, 0); layoutControlItem4.MaxSize = new Size(100, 24); layoutControlItem4.MinSize = new Size(100, 24); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(100, 28); layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem4.Text = "ç´å¾:"; layoutControlItem4.TextSize = new Size(28, 14); // // layoutControlItem6 // layoutControlItem6.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem6.Control = generalSearchCtrl1; layoutControlItem6.Location = new Point(544, 0); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(464, 28); layoutControlItem6.TextSize = new Size(0, 0); layoutControlItem6.TextVisible = false; // // layoutControlItem5 // layoutControlItem5.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem5.Control = txtDiameterMax; layoutControlItem5.Location = new Point(484, 0); layoutControlItem5.MaxSize = new Size(60, 24); layoutControlItem5.MinSize = new Size(60, 24); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(60, 28); layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem5.Text = "å£å¾:"; layoutControlItem5.TextSize = new Size(0, 0); layoutControlItem5.TextVisible = false; // // simpleLabelItem1 // simpleLabelItem1.AllowHotTrack = false; simpleLabelItem1.AppearanceItemCaption.Options.UseTextOptions = true; simpleLabelItem1.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; simpleLabelItem1.Location = new Point(460, 0); simpleLabelItem1.MaxSize = new Size(24, 0); simpleLabelItem1.MinSize = new Size(24, 18); simpleLabelItem1.Name = "simpleLabelItem1"; simpleLabelItem1.Size = new Size(24, 28); simpleLabelItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; simpleLabelItem1.Text = "~"; simpleLabelItem1.TextSize = new Size(28, 14); // // layoutControlGroup2 // layoutControlGroup2.GroupStyle = DevExpress.Utils.GroupStyle.Title; layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7 }); layoutControlGroup2.Location = new Point(0, 367); layoutControlGroup2.Name = "layoutControlGroup2"; layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup2.Size = new Size(1028, 202); layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup2.Text = "æ²çº¿å表"; // // layoutControlItem7 // layoutControlItem7.Control = phartDiagramRelationGridViewCtrl1; layoutControlItem7.Location = new Point(0, 0); layoutControlItem7.MaxSize = new Size(0, 180); layoutControlItem7.MinSize = new Size(5, 180); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlItem7.Size = new Size(1028, 180); layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem7.TextSize = new Size(0, 0); layoutControlItem7.TextVisible = false; // // AssetsCompressorSingleMatchingCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "AssetsCompressorSingleMatchingCtrl"; Size = new Size(1028, 569); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)txtDiameterMax.Properties).EndInit(); ((ISupportInitialize)txtDiameterMin.Properties).EndInit(); ((ISupportInitialize)txtMaterial.Properties).EndInit(); ((ISupportInitialize)txtName.Properties).EndInit(); ((ISupportInitialize)gridControl1).EndInit(); ((ISupportInitialize)assetsCompressorSingleMatchingViewModelBindingSource).EndInit(); ((ISupportInitialize)gridView1).EndInit(); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ((ISupportInitialize)layoutControlItem4).EndInit(); ((ISupportInitialize)layoutControlItem6).EndInit(); ((ISupportInitialize)layoutControlItem5).EndInit(); ((ISupportInitialize)simpleLabelItem1).EndInit(); ((ISupportInitialize)layoutControlGroup2).EndInit(); ((ISupportInitialize)layoutControlItem7).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private TextEdit txtDiameterMax; private TextEdit txtDiameterMin; private TextEdit txtMaterial; private TextEdit txtName; private DevExpress.XtraGrid.GridControl gridControl1; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private GeneralSearchCtrl generalSearchCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1; private DevExpress.XtraGrid.Columns.GridColumn colName; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; private DevExpress.XtraGrid.Columns.GridColumn colKeyWords; private DevExpress.XtraGrid.Columns.GridColumn colFlags; private DevExpress.XtraGrid.Columns.GridColumn colTagName; private DevExpress.XtraGrid.Columns.GridColumn colDescription; private BindingSource assetsCompressorSingleMatchingViewModelBindingSource; private DevExpress.XtraGrid.Columns.GridColumn colDiameter; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; private PhartDiagramRelationGridViewCtrl phartDiagramRelationGridViewCtrl1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,126 @@ using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HStation.WinFrmUI { public partial class AssetsCompressorSingleMatchingCtrl : DevExpress.XtraEditors.XtraUserControl { public AssetsCompressorSingleMatchingCtrl() { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); this.gridView1.SetLimitView(); this.gridView1.RegistCustomDrawCell(); this.generalSearchCtrl1.SearchEvent += Search; this.generalSearchCtrl1.ClearEvent += Clear; } public List<AssetsCompressorSingleMatchingViewModel> _allList = null;//ææå表 private List<AssetsCompressorSingleMatchingViewModel> _allBindingList = null;//ææç»å®å表 private AssetsCompressorMainVmo _selected = null;//å½åéä¸ /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(string dbId) { var allList = await BLLFactory<HStation.BLL.AssetsCompressorMain>.Instance.GetAll(); _allList = new List<AssetsCompressorSingleMatchingViewModel>(); allList.ForEach(x => _allList.Add(new AssetsCompressorSingleMatchingViewModel(x))); if (long.TryParse(dbId, out long id)) { var item = allList?.Find(x => x.ID == id); _selected = item; } Search(); if (_selected != null) { if (_allBindingList != null && _allBindingList.Count > 0) { await Task.Run(() => { var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected); if (dataSourceIndex >= 0) { var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex); this.gridView1.FocusedRowHandle = rowIndex; } }); } } } //æ¥è¯¢ private void Search() { _allBindingList = _allList; var name = this.txtName.Text.Trim(); if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) { _allBindingList = _allBindingList.Where(x => !string.IsNullOrEmpty(x.Name) && x.Name.Contains(name)).ToList(); } var material = this.txtMaterial.Text.Trim(); if (!string.IsNullOrEmpty(material)) { _allBindingList = _allBindingList.Where(x => !string.IsNullOrEmpty(x.Material) && x.Material.Contains(material)).ToList(); } double? diameterMin = this.txtDiameterMin.EditValue == null ? null : double.Parse(this.txtDiameterMin.EditValue.ToString()); if (diameterMin.HasValue) { _allBindingList = _allBindingList.Where(x => x.Diameter.HasValue && x.Diameter.Value >= diameterMin.Value).ToList(); } double? diameterMax = this.txtDiameterMax.EditValue == null ? null : double.Parse(this.txtDiameterMax.EditValue.ToString()); if (diameterMax.HasValue) { _allBindingList = _allBindingList.Where(x => x.Diameter.HasValue && x.Diameter.Value <= diameterMax.Value).ToList(); } this.assetsCompressorSingleMatchingViewModelBindingSource.DataSource = _allBindingList; this.assetsCompressorSingleMatchingViewModelBindingSource.ResetBindings(false); } //æ¸ é¤ private void Clear() { this.txtName.EditValue = null; this.txtMaterial.EditValue = null; this.txtDiameterMin.EditValue = null; this.txtDiameterMax.EditValue = null; Search(); } /// <summary> /// è·å /// </summary> public AssetsCompressorMainVmo Get() { var vm = this.gridView1.GetFocusedRow() as AssetsCompressorSingleMatchingViewModel; if (vm == null) { return default; } return vm.Vmo; } //èç¦æ¹å private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { var row = this.gridView1.GetFocusedRow() as AssetsCompressorSingleMatchingViewModel; if (row == null) { return; } this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.CompressorMain, row.Vmo.ID); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.resxcopy from WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerChartShowDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.resx
Îļþ´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerChartShowDlg.resx ¸´ÖÆ @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="assetsCompressorSingleMatchingViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,127 @@ namespace HStation.WinFrmUI { partial class AssetsCompressorSingleMatchingDlg { /// <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(); generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); assetsCompressorSingleMatchingCtrl1 = new AssetsCompressorSingleMatchingCtrl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(generalOkAndCancelCtrl1); layoutControl1.Controls.Add(assetsCompressorSingleMatchingCtrl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; layoutControl1.Size = new Size(1068, 649); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // generalOkAndCancelCtrl1 // generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); generalOkAndCancelCtrl1.Location = new Point(12, 611); generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; generalOkAndCancelCtrl1.Size = new Size(1044, 26); generalOkAndCancelCtrl1.TabIndex = 5; // // assetsCompressorSingleMatchingCtrl1 // assetsCompressorSingleMatchingCtrl1.Location = new Point(12, 12); assetsCompressorSingleMatchingCtrl1.Name = "assetsCompressorSingleMatchingCtrl1"; assetsCompressorSingleMatchingCtrl1.Size = new Size(1044, 595); assetsCompressorSingleMatchingCtrl1.TabIndex = 4; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2 }); Root.Name = "Root"; Root.Size = new Size(1068, 649); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = assetsCompressorSingleMatchingCtrl1; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(1048, 599); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = generalOkAndCancelCtrl1; layoutControlItem2.Location = new Point(0, 599); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(1048, 30); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // AssetsCompressorSingleMatchingDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1068, 649); Controls.Add(layoutControl1); Name = "AssetsCompressorSingleMatchingDlg"; StartPosition = FormStartPosition.CenterParent; Text = "å缩æº"; ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; private AssetsCompressorSingleMatchingCtrl assetsCompressorSingleMatchingCtrl1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ using DevExpress.Mvvm.POCO; using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HStation.WinFrmUI { public partial class AssetsCompressorSingleMatchingDlg : DevExpress.XtraEditors.XtraForm { public AssetsCompressorSingleMatchingDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } public event Action<HydroCompressorMatchingViewModel> ReloadDataEvent; private HydroCompressorMatchingViewModel _input = null; /// <summary> /// /// </summary> public void SetBindingData(HydroCompressorMatchingViewModel input) { if (input == null) { return; } _input = input; this.assetsCompressorSingleMatchingCtrl1.SetBindingData(input.DbId); } private void GeneralOkAndCancelCtrl1_OkEvent() { if (_input == null) { return; } var vm = this.assetsCompressorSingleMatchingCtrl1.Get(); if (vm == null) { return; } _input.MatchingModelType = vm.Name; _input.MatchingMaterial = vm.Material; _input.MatchingDiameter = vm.Diameter; _input.MinorLoss = vm.MinorLoss; this.ReloadDataEvent?.Invoke(_input); this.DialogResult = DialogResult.OK; this.Close(); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.resx
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,99 @@ namespace HStation.WinFrmUI { /// <summary> /// /// </summary> public class AssetsCompressorSingleMatchingViewModel { /// <summary> /// /// </summary> public AssetsCompressorSingleMatchingViewModel() { } /// <summary> /// /// </summary> public AssetsCompressorSingleMatchingViewModel(AssetsCompressorMainVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.Material = rhs.Material; this.Diameter = rhs.Diameter; this.MinorLoss = rhs.MinorLoss; this.KeyWords = HStation.Service.Assets.KeyWordHelper.ToString(rhs.KeyWords); this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; } /// <summary> /// id /// </summary> [Display(Name = "ID")] public long ID { get; set; } /// <summary> /// åå· /// </summary> [DisplayName("åå·")] public string Name { get; set; } /// <summary> /// æè´¨ /// </summary> [DisplayName("æè´¨")] public string Material { get; set; } /// <summary> /// ç´å¾ mm /// </summary> [DisplayName("ç´å¾(mm)")] public double? Diameter { get; set; } /// <summary> /// å±é»ç³»æ° m /// </summary> [DisplayName("å±é»ç³»æ°(m)")] public double MinorLoss { get; set; } /// <summary> /// å ³é®å /// </summary> [DisplayName("å ³é®å")] public string KeyWords { get; set; } /// <summary> /// æ ç¾ /// </summary> [DisplayName("æ ç¾")] public string Flags { get; set; } /// <summary> /// æ å¿ /// </summary> [DisplayName("æ å¿")] public string TagName { get; set; } /// <summary> /// æåºç /// </summary> [DisplayName("æåºç ")] public int SortCode { get; set; } /// <summary> /// 说æ /// </summary> [DisplayName("说æ")] public string Description { get; set; } /// <summary> /// /// </summary> public AssetsCompressorMainVmo Vmo { get; set; } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorChartShowDlg.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorChartShowDlg.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorSingleMatchingCtrl.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorSingleMatchingCtrl.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorSingleMatchingCtrl.resx
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/CompressorSingleMatchingViewModel.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/SimulationCompressorSingleMatchingDlg.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/SimulationCompressorSingleMatchingDlg.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,450 @@ namespace HStation.WinFrmUI { partial class AssetsExchangerSingleMatchingCtrl { /// <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 Component 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() { components = new Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); phartDiagramRelationGridViewCtrl1 = new PhartDiagramRelationGridViewCtrl(); generalSearchCtrl1 = new GeneralSearchCtrl(); txtDiameterMax = new TextEdit(); txtDiameterMin = new TextEdit(); txtMaterial = new TextEdit(); txtName = new TextEdit(); gridControl1 = new DevExpress.XtraGrid.GridControl(); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); colDiameter = new DevExpress.XtraGrid.Columns.GridColumn(); colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); colKeyWords = new DevExpress.XtraGrid.Columns.GridColumn(); colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem(); layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); assetsExchangerSingleMatchingViewModelBindingSource = new BindingSource(components); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)txtDiameterMax.Properties).BeginInit(); ((ISupportInitialize)txtDiameterMin.Properties).BeginInit(); ((ISupportInitialize)txtMaterial.Properties).BeginInit(); ((ISupportInitialize)txtName.Properties).BeginInit(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); ((ISupportInitialize)layoutControlItem4).BeginInit(); ((ISupportInitialize)layoutControlItem6).BeginInit(); ((ISupportInitialize)layoutControlItem5).BeginInit(); ((ISupportInitialize)simpleLabelItem1).BeginInit(); ((ISupportInitialize)layoutControlGroup2).BeginInit(); ((ISupportInitialize)layoutControlItem7).BeginInit(); ((ISupportInitialize)assetsExchangerSingleMatchingViewModelBindingSource).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(phartDiagramRelationGridViewCtrl1); layoutControl1.Controls.Add(generalSearchCtrl1); layoutControl1.Controls.Add(txtDiameterMax); layoutControl1.Controls.Add(txtDiameterMin); layoutControl1.Controls.Add(txtMaterial); layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(gridControl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1206, 280, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(1028, 569); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // phartDiagramRelationGridViewCtrl1 // phartDiagramRelationGridViewCtrl1.Location = new Point(0, 389); phartDiagramRelationGridViewCtrl1.Name = "phartDiagramRelationGridViewCtrl1"; phartDiagramRelationGridViewCtrl1.Size = new Size(1028, 180); phartDiagramRelationGridViewCtrl1.TabIndex = 10; // // generalSearchCtrl1 // generalSearchCtrl1.Location = new Point(556, 33); generalSearchCtrl1.Margin = new Padding(2); generalSearchCtrl1.Name = "generalSearchCtrl1"; generalSearchCtrl1.Size = new Size(460, 24); generalSearchCtrl1.TabIndex = 9; // // txtDiameterMax // txtDiameterMax.Location = new Point(496, 35); txtDiameterMax.Name = "txtDiameterMax"; txtDiameterMax.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; txtDiameterMax.Properties.DisplayFormat.FormatString = "{0}mm"; txtDiameterMax.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; txtDiameterMax.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); txtDiameterMax.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); txtDiameterMax.Properties.NullValuePrompt = "mm"; txtDiameterMax.Size = new Size(56, 20); txtDiameterMax.StyleController = layoutControl1; txtDiameterMax.TabIndex = 8; // // txtDiameterMin // txtDiameterMin.Location = new Point(412, 35); txtDiameterMin.Name = "txtDiameterMin"; txtDiameterMin.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; txtDiameterMin.Properties.DisplayFormat.FormatString = "{0}mm"; txtDiameterMin.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; txtDiameterMin.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); txtDiameterMin.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); txtDiameterMin.Properties.NullValuePrompt = "mm"; txtDiameterMin.Size = new Size(56, 20); txtDiameterMin.StyleController = layoutControl1; txtDiameterMin.TabIndex = 7; // // txtMaterial // txtMaterial.Location = new Point(232, 35); txtMaterial.Name = "txtMaterial"; txtMaterial.Size = new Size(136, 20); txtMaterial.StyleController = layoutControl1; txtMaterial.TabIndex = 6; // // txtName // txtName.Location = new Point(52, 35); txtName.Name = "txtName"; txtName.Size = new Size(136, 20); txtName.StyleController = layoutControl1; txtName.TabIndex = 5; // // gridControl1 // gridControl1.DataSource = assetsExchangerSingleMatchingViewModelBindingSource; gridControl1.Location = new Point(0, 70); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; gridControl1.Size = new Size(1028, 297); gridControl1.TabIndex = 4; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colMaterial, colDiameter, colMinorLoss, colKeyWords, colFlags, colTagName, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.FocusedRowChanged += gridView1_FocusedRowChanged; // // colName // colName.FieldName = "Name"; colName.MaxWidth = 150; colName.MinWidth = 100; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; colName.Width = 100; // // colMaterial // colMaterial.FieldName = "Material"; colMaterial.MaxWidth = 100; colMaterial.MinWidth = 100; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 1; colMaterial.Width = 100; // // colDiameter // colDiameter.FieldName = "Diameter"; colDiameter.MaxWidth = 100; colDiameter.MinWidth = 100; colDiameter.Name = "colDiameter"; colDiameter.Visible = true; colDiameter.VisibleIndex = 2; colDiameter.Width = 100; // // colMinorLoss // colMinorLoss.FieldName = "MinorLoss"; colMinorLoss.MaxWidth = 100; colMinorLoss.MinWidth = 100; colMinorLoss.Name = "colMinorLoss"; colMinorLoss.Visible = true; colMinorLoss.VisibleIndex = 3; colMinorLoss.Width = 100; // // colKeyWords // colKeyWords.FieldName = "KeyWords"; colKeyWords.MinWidth = 100; colKeyWords.Name = "colKeyWords"; colKeyWords.Visible = true; colKeyWords.VisibleIndex = 4; colKeyWords.Width = 100; // // colFlags // colFlags.FieldName = "Flags"; colFlags.MinWidth = 100; colFlags.Name = "colFlags"; colFlags.Visible = true; colFlags.VisibleIndex = 5; colFlags.Width = 100; // // colTagName // colTagName.FieldName = "TagName"; colTagName.MaxWidth = 150; colTagName.MinWidth = 100; colTagName.Name = "colTagName"; colTagName.Visible = true; colTagName.VisibleIndex = 6; colTagName.Width = 100; // // colDescription // colDescription.FieldName = "Description"; colDescription.MinWidth = 100; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 7; colDescription.Width = 100; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlGroup1, layoutControlGroup2 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); Root.Size = new Size(1028, 569); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = gridControl1; layoutControlItem1.Location = new Point(0, 69); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 1, 0); layoutControlItem1.Size = new Size(1028, 298); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlGroup1 // layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem6, layoutControlItem5, simpleLabelItem1 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Size = new Size(1028, 69); layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup1.Text = "æ£ç´¢æ¡ä»¶"; // // layoutControlItem2 // layoutControlItem2.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem2.Control = txtName; layoutControlItem2.Location = new Point(0, 0); layoutControlItem2.MaxSize = new Size(180, 24); layoutControlItem2.MinSize = new Size(180, 24); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(180, 28); layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem2.Text = "åç§°:"; layoutControlItem2.TextSize = new Size(28, 14); // // layoutControlItem3 // layoutControlItem3.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem3.Control = txtMaterial; layoutControlItem3.Location = new Point(180, 0); layoutControlItem3.MaxSize = new Size(180, 24); layoutControlItem3.MinSize = new Size(180, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(180, 28); layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem3.Text = "æè´¨:"; layoutControlItem3.TextSize = new Size(28, 14); // // layoutControlItem4 // layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem4.Control = txtDiameterMin; layoutControlItem4.Location = new Point(360, 0); layoutControlItem4.MaxSize = new Size(100, 24); layoutControlItem4.MinSize = new Size(100, 24); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(100, 28); layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem4.Text = "ç´å¾:"; layoutControlItem4.TextSize = new Size(28, 14); // // layoutControlItem6 // layoutControlItem6.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem6.Control = generalSearchCtrl1; layoutControlItem6.Location = new Point(544, 0); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(464, 28); layoutControlItem6.TextSize = new Size(0, 0); layoutControlItem6.TextVisible = false; // // layoutControlItem5 // layoutControlItem5.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem5.Control = txtDiameterMax; layoutControlItem5.Location = new Point(484, 0); layoutControlItem5.MaxSize = new Size(60, 24); layoutControlItem5.MinSize = new Size(60, 24); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(60, 28); layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem5.Text = "å£å¾:"; layoutControlItem5.TextSize = new Size(0, 0); layoutControlItem5.TextVisible = false; // // simpleLabelItem1 // simpleLabelItem1.AllowHotTrack = false; simpleLabelItem1.AppearanceItemCaption.Options.UseTextOptions = true; simpleLabelItem1.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; simpleLabelItem1.Location = new Point(460, 0); simpleLabelItem1.MaxSize = new Size(24, 0); simpleLabelItem1.MinSize = new Size(24, 18); simpleLabelItem1.Name = "simpleLabelItem1"; simpleLabelItem1.Size = new Size(24, 28); simpleLabelItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; simpleLabelItem1.Text = "~"; simpleLabelItem1.TextSize = new Size(28, 14); // // layoutControlGroup2 // layoutControlGroup2.GroupStyle = DevExpress.Utils.GroupStyle.Title; layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7 }); layoutControlGroup2.Location = new Point(0, 367); layoutControlGroup2.Name = "layoutControlGroup2"; layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup2.Size = new Size(1028, 202); layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup2.Text = "æ²çº¿å表"; // // layoutControlItem7 // layoutControlItem7.Control = phartDiagramRelationGridViewCtrl1; layoutControlItem7.Location = new Point(0, 0); layoutControlItem7.MaxSize = new Size(0, 180); layoutControlItem7.MinSize = new Size(5, 180); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlItem7.Size = new Size(1028, 180); layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem7.TextSize = new Size(0, 0); layoutControlItem7.TextVisible = false; // // assetsExchangerSingleMatchingViewModelBindingSource // assetsExchangerSingleMatchingViewModelBindingSource.DataSource = typeof(AssetsExchangerSingleMatchingViewModel); // // AssetsExchangerSingleMatchingCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "AssetsExchangerSingleMatchingCtrl"; Size = new Size(1028, 569); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)txtDiameterMax.Properties).EndInit(); ((ISupportInitialize)txtDiameterMin.Properties).EndInit(); ((ISupportInitialize)txtMaterial.Properties).EndInit(); ((ISupportInitialize)txtName.Properties).EndInit(); ((ISupportInitialize)gridControl1).EndInit(); ((ISupportInitialize)gridView1).EndInit(); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ((ISupportInitialize)layoutControlItem4).EndInit(); ((ISupportInitialize)layoutControlItem6).EndInit(); ((ISupportInitialize)layoutControlItem5).EndInit(); ((ISupportInitialize)simpleLabelItem1).EndInit(); ((ISupportInitialize)layoutControlGroup2).EndInit(); ((ISupportInitialize)layoutControlItem7).EndInit(); ((ISupportInitialize)assetsExchangerSingleMatchingViewModelBindingSource).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private TextEdit txtDiameterMax; private TextEdit txtDiameterMin; private TextEdit txtMaterial; private TextEdit txtName; private DevExpress.XtraGrid.GridControl gridControl1; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private GeneralSearchCtrl generalSearchCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1; private DevExpress.XtraGrid.Columns.GridColumn colName; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; private DevExpress.XtraGrid.Columns.GridColumn colKeyWords; private DevExpress.XtraGrid.Columns.GridColumn colFlags; private DevExpress.XtraGrid.Columns.GridColumn colTagName; private DevExpress.XtraGrid.Columns.GridColumn colDescription; private DevExpress.XtraGrid.Columns.GridColumn colDiameter; private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; private PhartDiagramRelationGridViewCtrl phartDiagramRelationGridViewCtrl1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private BindingSource assetsExchangerSingleMatchingViewModelBindingSource; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,126 @@ using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HStation.WinFrmUI { public partial class AssetsExchangerSingleMatchingCtrl : DevExpress.XtraEditors.XtraUserControl { public AssetsExchangerSingleMatchingCtrl() { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); this.gridView1.SetLimitView(); this.gridView1.RegistCustomDrawCell(); this.generalSearchCtrl1.SearchEvent += Search; this.generalSearchCtrl1.ClearEvent += Clear; } public List<AssetsExchangerSingleMatchingViewModel> _allList = null;//ææå表 private List<AssetsExchangerSingleMatchingViewModel> _allBindingList = null;//ææç»å®å表 private AssetsExchangerMainVmo _selected = null;//å½åéä¸ /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(string dbId) { var allList = await BLLFactory<HStation.BLL.AssetsExchangerMain>.Instance.GetAll(); _allList = new List<AssetsExchangerSingleMatchingViewModel>(); allList.ForEach(x => _allList.Add(new AssetsExchangerSingleMatchingViewModel(x))); if (long.TryParse(dbId, out long id)) { var item = allList?.Find(x => x.ID == id); _selected = item; } Search(); if (_selected != null) { if (_allBindingList != null && _allBindingList.Count > 0) { await Task.Run(() => { var dataSourceIndex = _allBindingList.FindIndex(x => x.Vmo == _selected); if (dataSourceIndex >= 0) { var rowIndex = this.gridView1.GetRowHandle(dataSourceIndex); this.gridView1.FocusedRowHandle = rowIndex; } }); } } } //æ¥è¯¢ private void Search() { _allBindingList = _allList; var name = this.txtName.Text.Trim(); if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) { _allBindingList = _allBindingList.Where(x => !string.IsNullOrEmpty(x.Name) && x.Name.Contains(name)).ToList(); } var material = this.txtMaterial.Text.Trim(); if (!string.IsNullOrEmpty(material)) { _allBindingList = _allBindingList.Where(x => !string.IsNullOrEmpty(x.Material) && x.Material.Contains(material)).ToList(); } double? diameterMin = this.txtDiameterMin.EditValue == null ? null : double.Parse(this.txtDiameterMin.EditValue.ToString()); if (diameterMin.HasValue) { _allBindingList = _allBindingList.Where(x => x.Diameter.HasValue && x.Diameter.Value >= diameterMin.Value).ToList(); } double? diameterMax = this.txtDiameterMax.EditValue == null ? null : double.Parse(this.txtDiameterMax.EditValue.ToString()); if (diameterMax.HasValue) { _allBindingList = _allBindingList.Where(x => x.Diameter.HasValue && x.Diameter.Value <= diameterMax.Value).ToList(); } this.assetsExchangerSingleMatchingViewModelBindingSource.DataSource = _allBindingList; this.assetsExchangerSingleMatchingViewModelBindingSource.ResetBindings(false); } //æ¸ é¤ private void Clear() { this.txtName.EditValue = null; this.txtMaterial.EditValue = null; this.txtDiameterMin.EditValue = null; this.txtDiameterMax.EditValue = null; Search(); } /// <summary> /// è·å /// </summary> public AssetsExchangerMainVmo Get() { var vm = this.gridView1.GetFocusedRow() as AssetsExchangerSingleMatchingViewModel; if (vm == null) { return default; } return vm.Vmo; } //èç¦æ¹å private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { var row = this.gridView1.GetFocusedRow() as AssetsExchangerSingleMatchingViewModel; if (row == null) { return; } this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.ExchangerMain, row.Vmo.ID); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.resx
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerChartShowDlg.resx ÐÞ¸Ä @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="assetsExchangerSingleMatchingViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,127 @@ namespace HStation.WinFrmUI { partial class AssetsExchangerSingleMatchingDlg { /// <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(); generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); assetsExchangerSingleMatchingCtrl1 = new AssetsExchangerSingleMatchingCtrl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(generalOkAndCancelCtrl1); layoutControl1.Controls.Add(assetsExchangerSingleMatchingCtrl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; layoutControl1.Size = new Size(1068, 649); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // generalOkAndCancelCtrl1 // generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); generalOkAndCancelCtrl1.Location = new Point(12, 611); generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; generalOkAndCancelCtrl1.Size = new Size(1044, 26); generalOkAndCancelCtrl1.TabIndex = 5; // // assetsExchangerSingleMatchingCtrl1 // assetsExchangerSingleMatchingCtrl1.Location = new Point(12, 12); assetsExchangerSingleMatchingCtrl1.Name = "assetsExchangerSingleMatchingCtrl1"; assetsExchangerSingleMatchingCtrl1.Size = new Size(1044, 595); assetsExchangerSingleMatchingCtrl1.TabIndex = 4; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2 }); Root.Name = "Root"; Root.Size = new Size(1068, 649); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = assetsExchangerSingleMatchingCtrl1; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(1048, 599); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = generalOkAndCancelCtrl1; layoutControlItem2.Location = new Point(0, 599); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(1048, 30); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // AssetsExchangerSingleMatchingDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1068, 649); Controls.Add(layoutControl1); Name = "AssetsExchangerSingleMatchingDlg"; StartPosition = FormStartPosition.CenterParent; Text = "æ¢çå¨"; ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; private AssetsExchangerSingleMatchingCtrl assetsExchangerSingleMatchingCtrl1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ using DevExpress.Mvvm.POCO; using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HStation.WinFrmUI { public partial class AssetsExchangerSingleMatchingDlg : DevExpress.XtraEditors.XtraForm { public AssetsExchangerSingleMatchingDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } public event Action<HydroExchangerMatchingViewModel> ReloadDataEvent; private HydroExchangerMatchingViewModel _input = null; /// <summary> /// /// </summary> public void SetBindingData(HydroExchangerMatchingViewModel input) { if (input == null) { return; } _input = input; this.assetsExchangerSingleMatchingCtrl1.SetBindingData(input.DbId); } private void GeneralOkAndCancelCtrl1_OkEvent() { if (_input == null) { return; } var vm = this.assetsExchangerSingleMatchingCtrl1.Get(); if (vm == null) { return; } _input.MatchingModelType = vm.Name; _input.MatchingMaterial = vm.Material; _input.MatchingDiameter = vm.Diameter; _input.MinorLoss = vm.MinorLoss; this.ReloadDataEvent?.Invoke(_input); this.DialogResult = DialogResult.OK; this.Close(); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.resx
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,99 @@ namespace HStation.WinFrmUI { /// <summary> /// /// </summary> public class AssetsExchangerSingleMatchingViewModel { /// <summary> /// /// </summary> public AssetsExchangerSingleMatchingViewModel() { } /// <summary> /// /// </summary> public AssetsExchangerSingleMatchingViewModel(AssetsExchangerMainVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.Material = rhs.Material; this.Diameter = rhs.Diameter; this.MinorLoss = rhs.MinorLoss; this.KeyWords = HStation.Service.Assets.KeyWordHelper.ToString(rhs.KeyWords); this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; } /// <summary> /// id /// </summary> [Display(Name = "ID")] public long ID { get; set; } /// <summary> /// åå· /// </summary> [DisplayName("åå·")] public string Name { get; set; } /// <summary> /// æè´¨ /// </summary> [DisplayName("æè´¨")] public string Material { get; set; } /// <summary> /// ç´å¾ mm /// </summary> [DisplayName("ç´å¾(mm)")] public double? Diameter { get; set; } /// <summary> /// å±é»ç³»æ° m /// </summary> [DisplayName("å±é»ç³»æ°(m)")] public double MinorLoss { get; set; } /// <summary> /// å ³é®å /// </summary> [DisplayName("å ³é®å")] public string KeyWords { get; set; } /// <summary> /// æ ç¾ /// </summary> [DisplayName("æ ç¾")] public string Flags { get; set; } /// <summary> /// æ å¿ /// </summary> [DisplayName("æ å¿")] public string TagName { get; set; } /// <summary> /// æåºç /// </summary> [DisplayName("æåºç ")] public int SortCode { get; set; } /// <summary> /// 说æ /// </summary> [DisplayName("说æ")] public string Description { get; set; } /// <summary> /// /// </summary> public AssetsExchangerMainVmo Vmo { get; set; } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerChartShowDlg.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerChartShowDlg.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerSingleMatchingCtrl.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerSingleMatchingCtrl.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/ExchangerSingleMatchingViewModel.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/SimulationExchangerSingleMatchingDlg.Designer.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/SimulationExchangerSingleMatchingDlg.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj
@@ -227,6 +227,18 @@ <Compile Update="03-simulation\07-matching\09-Tank\TankChartShowDlg.cs" /> <Compile Update="03-simulation\07-matching\09-Tank\SimulationTankSingleMatchingDlg.cs" /> <Compile Update="03-simulation\07-matching\09-Tank\TankSingleMatchingCtrl.cs" /> <Compile Update="03-simulation\07-matching\17-compressor\AssetsCompressorSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\17-compressor\AssetsCompressorSingleMatchingDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-exchanger\AssetsExchangerSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-exchanger\AssetsExchangerSingleMatchingDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-pressmeter\AssetsPressmeterSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> @@ -263,12 +275,6 @@ <Compile Update="03-simulation\07-matching\05-elbows\01-elbowsinglematching\SimulationElbowSingleMatchingDlg.cs" /> <Compile Update="03-simulation\07-matching\07-fourlink\01-fourlinksinglematching\FourlinkSingleMatchingCtrl.cs" /> <Compile Update="03-simulation\07-matching\07-fourlink\01-fourlinksinglematching\SimulationFourlinkSingleMatchingDlg.cs" /> <Compile Update="03-simulation\07-matching\17-compressor\SimulationCompressorSingleMatchingDlg.cs" /> <Compile Update="03-simulation\07-matching\17-compressor\CompressorChartShowDlg.cs" /> <Compile Update="03-simulation\07-matching\17-compressor\CompressorSingleMatchingCtrl.cs" /> <Compile Update="03-simulation\07-matching\18-exchanger\ExchangerChartShowDlg.cs" /> <Compile Update="03-simulation\07-matching\18-exchanger\ExchangerSingleMatchingCtrl.cs" /> <Compile Update="03-simulation\07-matching\18-exchanger\SimulationExchangerSingleMatchingDlg.cs" /> <Compile Update="03-simulation\06-simulation\XhsProjectSimulationCorePage.cs" /> <Compile Update="03-simulation\08-working\XhsProjectSimulationWorkingPage.cs" /> <Compile Update="03-simulation\09-energy\SimulationMultiWorkingEnergyDlg.cs" /> WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
@@ -205,26 +205,14 @@ <Compile Update="03-simulation\07-matching\16-sprinkler\SprinklerSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\17-compressor\CompressorChartShowDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\07-matching\17-compressor\CompressorSingleMatchingCtrl.cs"> <Compile Update="03-simulation\06-simulation\XhsProjectSimulationCorePage.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\17-compressor\SimulationCompressorSingleMatchingDlg.cs"> <Compile Update="03-simulation\07-matching\17-compressor\CompressorChartShowDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-exchanger\ExchangerChartShowDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-exchanger\ExchangerSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\18-exchanger\SimulationExchangerSingleMatchingDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\06-simulation\XhsProjectSimulationCorePage.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\07-matching\21-cooling\AssetsCoolingSingleMatchingCtrl.cs"> <SubType>UserControl</SubType> WinFrmUI/HStation.WinFrmUI.Xhs.Core/Properties/DataSources/HStation.WinFrmUI.AssetsCompressorSingleMatchingViewModel.datasource
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!-- This file is automatically generated by Visual Studio. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> <GenericObjectDataSource DisplayName="AssetsCompressorSingleMatchingViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>HStation.WinFrmUI.AssetsCompressorSingleMatchingViewModel, HStation.WinFrmUI.Xhs.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource> WinFrmUI/HStation.WinFrmUI.Xhs.Core/Properties/DataSources/HStation.WinFrmUI.AssetsExchangerSingleMatchingViewModel.datasource
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!-- This file is automatically generated by Visual Studio. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> <GenericObjectDataSource DisplayName="AssetsExchangerSingleMatchingViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>HStation.WinFrmUI.AssetsExchangerSingleMatchingViewModel, HStation.WinFrmUI.Xhs.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource>