Dto/HStation.Dto.Xhs.Core/03-scheme/AddXhsSchemeInput.cs
@@ -25,10 +25,15 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> [Required] public eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Dto/HStation.Dto.Xhs.Core/03-scheme/UpdateXhsSchemeInput.cs
@@ -24,10 +24,15 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> [Required] public eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Dto/HStation.Dto.Xhs.Core/03-scheme/XhsSchemeDto.cs
@@ -21,7 +21,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes; this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.UseStatus = rhs.UseStatus; @@ -50,9 +51,14 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> public eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Dto/HStation.Dto.Xhs.Core/03-scheme/XhsSchemeStdDto.cs
@@ -21,7 +21,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes; this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.UseStatus = rhs.UseStatus; @@ -50,9 +51,14 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> public eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Service/HStation.Service.Xhs.Core/00-core/eSchemeType.cs
ÎļþÒÑɾ³ý Service/HStation.Service.Xhs.Core/01-entity/03-scheme/XhsScheme.cs
@@ -23,7 +23,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes; this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.UseStatus = rhs.UseStatus; @@ -49,9 +50,15 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// æ¹é ç±»å /// </summary> public int SchemeType { get; set; } [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] public string ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Service/HStation.Service.Xhs.Core/02-model/XhsScheme.cs
@@ -21,7 +21,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes?.ToList(); this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.UseStatus = rhs.UseStatus; @@ -38,7 +39,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes?.ToList(); this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.UseStatus = rhs.UseStatus; @@ -62,9 +64,14 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> public eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° Service/HStation.Service.Xhs.Core/05-service/03-scheme/XhsScheme_Instance.cs
@@ -8,6 +8,7 @@ if (entity == null) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.XhsScheme, Model.XhsScheme>() .ForMember(d => d.ChangeTypes, opt => opt.MapFrom(src => StringListHelper.ToList(src.ChangeTypes))) .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToDictionary(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) ).CreateMapper(); @@ -21,6 +22,7 @@ if (entities == null || entities.Count < 1) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.XhsScheme, Model.XhsScheme>() .ForMember(d => d.ChangeTypes, opt => opt.MapFrom(src => StringListHelper.ToList(src.ChangeTypes))) .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToDictionary(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) ).CreateMapper(); @@ -34,6 +36,9 @@ if (model == null) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.XhsScheme, Entity.XhsScheme>() .ForMember(d => d.ChangeTypes, opt => opt.MapFrom(src => StringListHelper.ToString(src.ChangeTypes))) .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) ).CreateMapper(); var entity = mapper.Map<Model.XhsScheme, Entity.XhsScheme>(model); return entity; @@ -45,21 +50,28 @@ if (models == null || models.Count < 1) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.XhsScheme, Entity.XhsScheme>() .ForMember(d => d.ChangeTypes, opt => opt.MapFrom(src => StringListHelper.ToString(src.ChangeTypes))) .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) ).CreateMapper(); var entities = mapper.Map<List<Model.XhsScheme>, List<Entity.XhsScheme>>(models); return entities; } //Model to Entity internal static void Model2Entity(Model.XhsProject model, Entity.XhsProject entity) internal static void Model2Entity(Model.XhsScheme model, Entity.XhsScheme entity) { if (model == null || entity == null) return; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.XhsProject, Entity.XhsProject>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.XhsScheme, Entity.XhsScheme>() .ForMember(d => d.ChangeTypes, opt => opt.MapFrom(src => StringListHelper.ToString(src.ChangeTypes))) .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) ).CreateMapper(); mapper.Map(model, entity); } } } Vmo/HStation.Vmo.Xhs.Core/03-scheme/XhsSchemeVmo.cs
@@ -1,4 +1,6 @@ namespace HStation.Vmo using System.ComponentModel.DataAnnotations; namespace HStation.Vmo { /// <summary> /// @@ -19,7 +21,8 @@ this.SiteID = rhs.SiteID; this.NO = rhs.NO; this.Name = rhs.Name; this.SchemeType = rhs.SchemeType; this.ChangeTypes = rhs.ChangeTypes; this.AllowCustom = rhs.AllowCustom; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.UseStatus = rhs.UseStatus; @@ -48,9 +51,14 @@ public string Name { get; set; } /// <summary> /// æ¹æ¡ç±»å /// åæ´ç±»å /// </summary> public HStation.Xhs.eSchemeType SchemeType { get; set; } public List<string> ChangeTypes { get; set; } /// <summary> /// èªå®ä¹ /// </summary> public bool AllowCustom { get; set; } /// <summary> /// åæ° WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -179,6 +179,7 @@ var structOthersFileInfo = allFileInfoList.Find(x => x.Name == HStation.Revit.ConstParas.StructOthersFileName); var structRevitModel = HStation.Service.RevitParseHelper.FromJsonFile (structFileInfo.FullName, structOthersFileInfo?.FullName, out bool structFileResult, out List<string> structFileMsgList); vm.RevitModel = structRevitModel; //è§£æç»æå¤æ if (!structFileResult) { @@ -219,8 +220,6 @@ feedBackProgress?.Invoke(100, 100); return true; } vm.RevitModel = structRevitModel; var hydroInfo = HStation.Hydro.TransferHelper.FromRevit(structRevitModel, out msg); if (hydroInfo == null) WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/00-core/CreateXhsSchemeViewModel.cs
@@ -15,11 +15,18 @@ /// <summary> /// /// </summary> public CreateXhsSchemeViewModel(XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo) public CreateXhsSchemeViewModel ( XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, List<XhsSchemeVmo> allSchemeList ) { this.Project = project; this.ProjectSite = projectSite; this.HydroInfo = hydroInfo; this.AllSchemeList = allSchemeList; } @@ -40,11 +47,16 @@ /// </summary> public Yw.Model.HydroModelInfo HydroInfo { get; set; } /// <summary> /// æææ¹æ¡å表 /// </summary> public List<XhsSchemeVmo> AllSchemeList { get; set; } #endregion #region åºæ¬ä¿¡æ¯ public XhsScheme Scheme { get; set; } public XhsSchemeVmo Scheme { get; set; } #endregion WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/AddXhsSchemeDlg.cs
@@ -61,11 +61,11 @@ //åå§åæä»¶æ ¼å¼ private void InitialSchemeType() { this.imgCmbSchemeType.Properties.BeginUpdate(); this.imgCmbSchemeType.Properties.Items.Clear(); this.imgCmbSchemeType.Properties.Items.AddEnum(typeof(HStation.Xhs.eSchemeType), false); this.imgCmbSchemeType.EditValue = eSchemeType.Common; this.imgCmbSchemeType.Properties.EndUpdate(); //this.imgCmbSchemeType.Properties.BeginUpdate(); //this.imgCmbSchemeType.Properties.Items.Clear(); //this.imgCmbSchemeType.Properties.Items.AddEnum(typeof(HStation.Xhs.eSchemeType), false); //this.imgCmbSchemeType.EditValue = eSchemeType.Common; //this.imgCmbSchemeType.Properties.EndUpdate(); } //åå§åæ ç¾ private async Task InitialFlags() @@ -281,7 +281,7 @@ xhs_scheme.SiteID = _project_site.ID; xhs_scheme.NO = this.txtNo.Text.Trim(); xhs_scheme.Name = this.txtName.Text.Trim(); xhs_scheme.SchemeType = eSchemeType.Common; //xhs_scheme.SchemeType = eSchemeType.Common; xhs_scheme.Paras = null; xhs_scheme.Flags = null; xhs_scheme.UseStatus = Yw.Model.eUseStatus.Enable; WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/00-core/XhsSchemeChangeTypeCheckedHelper.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,208 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HStation.WinFrmUI { /// <summary> /// /// </summary> public class XhsSchemeChangeTypeCheckedHelper { /// <summary> /// è·åæ¹åç±»åå表 /// </summary> public static List<XhsSchemeChangeTypeCheckedViewModel> GetChangeTypes(Yw.Model.HydroModelInfo hydroInfo) { if (hydroInfo == null) { return default; } var list = new List<XhsSchemeChangeTypeCheckedViewModel>(); if (hydroInfo.Reservoirs != null && hydroInfo.Reservoirs.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Reservoir, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Reservoir), Description = "æ°´åº" }); } if (hydroInfo.Tanks != null && hydroInfo.Tanks.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Tank, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Tank), Description = "æ°´æ± " }); } if (hydroInfo.Waterboxs != null && hydroInfo.Waterboxs.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Waterbox, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Waterbox), Description = "æ°´ç®±" }); } if (hydroInfo.Bluntheads != null && hydroInfo.Bluntheads.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Blunthead, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Blunthead), Description = "é·å¤´" }); } if (hydroInfo.Elbows != null && hydroInfo.Elbows.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Elbow, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Elbow), Description = "弯头" }); } if (hydroInfo.Threelinks != null && hydroInfo.Threelinks.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Threelink, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Threelink), Description = "ä¸é" }); } if (hydroInfo.Fourlinks != null && hydroInfo.Fourlinks.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Fourlink, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Fourlink), Description = "åé" }); } if (hydroInfo.Meters != null && hydroInfo.Meters.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Meter, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Meter), Description = "水表" }); } if (hydroInfo.Flowmeters != null && hydroInfo.Flowmeters.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Flowmeter, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Flowmeter), Description = "æµé计" }); } if (hydroInfo.Pressmeters != null && hydroInfo.Pressmeters.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Pressmeter, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Pressmeter), Description = "åå表" }); } if (hydroInfo.Hydrants != null && hydroInfo.Hydrants.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Hydrant, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Hydrant), Description = "æ¶ç«æ " }); } if (hydroInfo.Nozzles != null && hydroInfo.Nozzles.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Nozzle, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Nozzle), Description = "å·å´" }); } if (hydroInfo.Pipes != null && hydroInfo.Pipes.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Pipe, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Pipe), Description = "管é" }); } if (hydroInfo.Translations != null && hydroInfo.Translations.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Translation, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Translation), Description = "è¿æ¸¡ä»¶" }); } if (hydroInfo.Pumps != null && hydroInfo.Pumps.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Pump, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Pump), Description = "æ°´æ³µ" }); } if (hydroInfo.Valves != null && hydroInfo.Valves.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Valve, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Valve), Description = "éé¨" }); } if (hydroInfo.Exchangers != null && hydroInfo.Exchangers.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Exchanger, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Exchanger), Description = "æ¢çå¨" }); } if (hydroInfo.Compressors != null && hydroInfo.Compressors.Count > 0) { list.Add(new XhsSchemeChangeTypeCheckedViewModel() { Code = Yw.Hydro.ParterCatalog.Compressor, Name = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Compressor), Description = "ç©ºåæº" }); } return list; } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/00-core/XhsSchemeChangeTypeCheckedListHorizCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,99 @@ namespace HStation.WinFrmUI { partial class XhsSchemeChangeTypeCheckedListHorizCtrl { /// <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(); DevExpress.XtraEditors.TableLayout.ItemTemplateBase itemTemplateBase1 = new DevExpress.XtraEditors.TableLayout.ItemTemplateBase(); DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition1 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition2 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition3 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); DevExpress.XtraEditors.TableLayout.TemplatedItemElement templatedItemElement1 = new DevExpress.XtraEditors.TableLayout.TemplatedItemElement(); DevExpress.XtraEditors.TableLayout.TableRowDefinition tableRowDefinition1 = new DevExpress.XtraEditors.TableLayout.TableRowDefinition(); DevExpress.XtraEditors.TableLayout.TableRowDefinition tableRowDefinition2 = new DevExpress.XtraEditors.TableLayout.TableRowDefinition(); DevExpress.XtraEditors.TableLayout.TableRowDefinition tableRowDefinition3 = new DevExpress.XtraEditors.TableLayout.TableRowDefinition(); checkedListBoxControl1 = new CheckedListBoxControl(); xhsSchemeChangeTypeCheckedViewModelBindingSource = new BindingSource(components); ((ISupportInitialize)checkedListBoxControl1).BeginInit(); ((ISupportInitialize)xhsSchemeChangeTypeCheckedViewModelBindingSource).BeginInit(); SuspendLayout(); // // checkedListBoxControl1 // checkedListBoxControl1.CheckMember = "Checked"; checkedListBoxControl1.DataSource = xhsSchemeChangeTypeCheckedViewModelBindingSource; checkedListBoxControl1.DisplayMember = "Name"; checkedListBoxControl1.Dock = DockStyle.Fill; checkedListBoxControl1.ItemHeight = 25; checkedListBoxControl1.Location = new Point(0, 0); checkedListBoxControl1.MultiColumn = true; checkedListBoxControl1.Name = "checkedListBoxControl1"; checkedListBoxControl1.ShowFocusRect = false; checkedListBoxControl1.Size = new Size(573, 123); checkedListBoxControl1.TabIndex = 0; itemTemplateBase1.Columns.Add(tableColumnDefinition1); itemTemplateBase1.Columns.Add(tableColumnDefinition2); itemTemplateBase1.Columns.Add(tableColumnDefinition3); templatedItemElement1.ColumnIndex = 1; templatedItemElement1.FieldName = "Name"; templatedItemElement1.ImageOptions.ImageAlignment = TileItemContentAlignment.MiddleCenter; templatedItemElement1.ImageOptions.ImageScaleMode = TileItemImageScaleMode.ZoomInside; templatedItemElement1.RowIndex = 1; templatedItemElement1.Text = "Name"; templatedItemElement1.TextAlignment = TileItemContentAlignment.MiddleCenter; itemTemplateBase1.Elements.Add(templatedItemElement1); itemTemplateBase1.Name = "template1"; itemTemplateBase1.Rows.Add(tableRowDefinition1); itemTemplateBase1.Rows.Add(tableRowDefinition2); itemTemplateBase1.Rows.Add(tableRowDefinition3); checkedListBoxControl1.Templates.Add(itemTemplateBase1); checkedListBoxControl1.ValueMember = "Id"; checkedListBoxControl1.ItemCheck += checkedListBoxControl1_ItemCheck; // // xhsSchemeChangeTypeCheckedViewModelBindingSource // xhsSchemeChangeTypeCheckedViewModelBindingSource.DataSource = typeof(XhsSchemeChangeTypeCheckedViewModel); // // XhsSchemeChangeTypeCheckedListHorizCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(checkedListBoxControl1); Name = "XhsSchemeChangeTypeCheckedListHorizCtrl"; Size = new Size(573, 123); ((ISupportInitialize)checkedListBoxControl1).EndInit(); ((ISupportInitialize)xhsSchemeChangeTypeCheckedViewModelBindingSource).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraEditors.CheckedListBoxControl checkedListBoxControl1; private BindingSource xhsSchemeChangeTypeCheckedViewModelBindingSource; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/00-core/XhsSchemeChangeTypeCheckedListHorizCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,56 @@ using System.Data; namespace HStation.WinFrmUI { public partial class XhsSchemeChangeTypeCheckedListHorizCtrl : DevExpress.XtraEditors.XtraUserControl { public XhsSchemeChangeTypeCheckedListHorizCtrl() { InitializeComponent(); } /// <summary> /// éæ©æ¹åäºä»¶ /// </summary> public event Action<List<string>> CheckedChangedEvent; private BindingList<XhsSchemeChangeTypeCheckedViewModel> _allBindingList = null;//ææç»å®å表 /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo) { var allList = XhsSchemeChangeTypeCheckedHelper.GetChangeTypes(hydroInfo); SetBindingData(allList); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(List<XhsSchemeChangeTypeCheckedViewModel> allList) { _allBindingList = new BindingList<XhsSchemeChangeTypeCheckedViewModel>(); allList?.ForEach(x => _allBindingList.Add(x)); this.xhsSchemeChangeTypeCheckedViewModelBindingSource.DataSource = _allBindingList; this.xhsSchemeChangeTypeCheckedViewModelBindingSource.ResetBindings(false); } /// <summary> /// è·åéæ©å表 /// </summary> public List<string> GetCheckedList() { return _allBindingList?.Where(x => x.Checked).Select(x => x.Code).ToList(); } //éæ©æ¹å private void checkedListBoxControl1_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) { var list = GetCheckedList(); this.CheckedChangedEvent?.Invoke(list); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/00-core/XhsSchemeChangeTypeCheckedListHorizCtrl.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="xhsSchemeChangeTypeCheckedViewModelBindingSource.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/04-scheme/01-info/00-core/XhsSchemeChangeTypeCheckedViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,54 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HStation.WinFrmUI { /// <summary> /// /// </summary> public class XhsSchemeChangeTypeCheckedViewModel { /// <summary> /// /// </summary> public XhsSchemeChangeTypeCheckedViewModel() { } /// <summary> /// /// </summary> public XhsSchemeChangeTypeCheckedViewModel(string code, string name, string description) { this.Code = code; this.Name = name; this.Checked = false; this.Description = description; } /// <summary> /// ç¼ç /// </summary> public string Code { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// éæ© /// </summary> public bool Checked { get; set; } /// <summary> /// 说æ /// </summary> public string Description { get; set; } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.Designer.cs
@@ -29,119 +29,95 @@ private void InitializeComponent() { components = new Container(); EditorButtonImageOptions editorButtonImageOptions1 = new EditorButtonImageOptions(); ComponentResourceManager resources = new ComponentResourceManager(typeof(CreateXhsSchemeInfoPage)); 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(); EditorButtonImageOptions editorButtonImageOptions2 = new EditorButtonImageOptions(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); ckAllowCustom = new CheckEdit(); setFlagsEditCtrl1 = new SetFlagsEditCtrl(); txtDescription = new MemoEdit(); txtTagNme = new TextEdit(); txtCustomer = new TextEdit(); txtNO = new TextEdit(); txtName = new TextEdit(); btnEditSelectModelFile = new ButtonEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); xhsSchemeChangeTypeCheckedListHorizCtrl1 = new XhsSchemeChangeTypeCheckedListHorizCtrl(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)ckAllowCustom.Properties).BeginInit(); ((ISupportInitialize)txtDescription.Properties).BeginInit(); ((ISupportInitialize)txtTagNme.Properties).BeginInit(); ((ISupportInitialize)txtCustomer.Properties).BeginInit(); ((ISupportInitialize)txtNO.Properties).BeginInit(); ((ISupportInitialize)txtName.Properties).BeginInit(); ((ISupportInitialize)btnEditSelectModelFile.Properties).BeginInit(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); ((ISupportInitialize)layoutControlItem7).BeginInit(); ((ISupportInitialize)layoutControlItem5).BeginInit(); ((ISupportInitialize)layoutControlItem8).BeginInit(); ((ISupportInitialize)layoutControlItem6).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)dxErrorProvider1).BeginInit(); ((ISupportInitialize)layoutControlItem4).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(xhsSchemeChangeTypeCheckedListHorizCtrl1); layoutControl1.Controls.Add(ckAllowCustom); layoutControl1.Controls.Add(setFlagsEditCtrl1); layoutControl1.Controls.Add(txtDescription); layoutControl1.Controls.Add(txtTagNme); layoutControl1.Controls.Add(txtCustomer); layoutControl1.Controls.Add(txtNO); layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(btnEditSelectModelFile); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1200, 175, 650, 400); layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(909, 193, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(859, 464); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // ckAllowCustom // ckAllowCustom.Location = new Point(486, 36); ckAllowCustom.Name = "ckAllowCustom"; ckAllowCustom.Properties.AutoWidth = true; ckAllowCustom.Properties.Caption = ""; ckAllowCustom.Size = new Size(20, 20); ckAllowCustom.StyleController = layoutControl1; ckAllowCustom.TabIndex = 8; ckAllowCustom.ToolTip = "æ¹æ¡å建åï¼æ¯å¦å è®¸è°æ´"; // // setFlagsEditCtrl1 // setFlagsEditCtrl1.Location = new Point(113, 36); setFlagsEditCtrl1.Location = new Point(67, 36); setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; setFlagsEditCtrl1.Size = new Size(314, 20); setFlagsEditCtrl1.Size = new Size(360, 20); setFlagsEditCtrl1.TabIndex = 5; // // txtDescription // txtDescription.Location = new Point(113, 87); txtDescription.Location = new Point(67, 129); txtDescription.Name = "txtDescription"; txtDescription.Size = new Size(734, 365); txtDescription.Size = new Size(780, 323); txtDescription.StyleController = layoutControl1; txtDescription.TabIndex = 7; // // txtTagNme // txtNO // txtTagNme.Location = new Point(532, 36); txtTagNme.Name = "txtTagNme"; txtTagNme.Size = new Size(315, 20); txtTagNme.StyleController = layoutControl1; txtTagNme.TabIndex = 4; // // txtCustomer // txtCustomer.Location = new Point(532, 12); txtCustomer.Name = "txtCustomer"; txtCustomer.Size = new Size(315, 20); txtCustomer.StyleController = layoutControl1; txtCustomer.TabIndex = 3; txtNO.Location = new Point(486, 12); txtNO.Name = "txtNO"; txtNO.Size = new Size(361, 20); txtNO.StyleController = layoutControl1; txtNO.TabIndex = 3; // // txtName // txtName.Location = new Point(113, 12); txtName.Location = new Point(67, 12); txtName.Name = "txtName"; txtName.Size = new Size(314, 20); txtName.Size = new Size(360, 20); txtName.StyleController = layoutControl1; txtName.TabIndex = 0; // // btnEditSelectModelFile // btnEditSelectModelFile.EditValue = ""; btnEditSelectModelFile.Location = new Point(113, 60); btnEditSelectModelFile.Name = "btnEditSelectModelFile"; editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); editorButtonImageOptions1.SvgImageSize = new Size(15, 15); editorButtonImageOptions2.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions2.SvgImage"); editorButtonImageOptions2.SvgImageSize = new Size(15, 15); btnEditSelectModelFile.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "æ¬å°æä»¶", "Local", null, DevExpress.Utils.ToolTipAnchor.Default), new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "äºæä»¶", "Http", null, DevExpress.Utils.ToolTipAnchor.Default) }); btnEditSelectModelFile.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; btnEditSelectModelFile.Size = new Size(734, 23); btnEditSelectModelFile.StyleController = layoutControl1; btnEditSelectModelFile.TabIndex = 6; // // Root // @@ -149,7 +125,7 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem7, layoutControlItem5, layoutControlItem8, layoutControlItem6, layoutControlItem3 }); Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem7, layoutControlItem5, layoutControlItem3, layoutControlItem1, layoutControlItem4 }); Root.Name = "Root"; Root.Size = new Size(859, 464); Root.TextVisible = false; @@ -162,16 +138,16 @@ layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(419, 24); layoutControlItem2.Text = "<color=red>*</color>åç§°ï¼"; layoutControlItem2.TextSize = new Size(89, 14); layoutControlItem2.TextSize = new Size(43, 14); // // layoutControlItem7 // layoutControlItem7.Control = txtDescription; layoutControlItem7.Location = new Point(0, 75); layoutControlItem7.Location = new Point(0, 117); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(839, 369); layoutControlItem7.Size = new Size(839, 327); layoutControlItem7.Text = "说æ"; layoutControlItem7.TextSize = new Size(89, 14); layoutControlItem7.TextSize = new Size(43, 14); // // layoutControlItem5 // @@ -180,63 +156,70 @@ layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(419, 24); layoutControlItem5.Text = "æ ç¾ï¼"; layoutControlItem5.TextSize = new Size(89, 14); // // layoutControlItem8 // layoutControlItem8.AppearanceItemCaption.FontSizeDelta = 1; layoutControlItem8.AppearanceItemCaption.Options.UseFont = true; layoutControlItem8.Control = btnEditSelectModelFile; layoutControlItem8.Location = new Point(0, 48); layoutControlItem8.Name = "layoutControlItem8"; layoutControlItem8.Size = new Size(839, 27); layoutControlItem8.Text = "éæ©æ¨¡åæä»¶:"; layoutControlItem8.TextSize = new Size(89, 17); // // layoutControlItem6 // layoutControlItem6.Control = txtTagNme; layoutControlItem6.Location = new Point(419, 24); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(420, 24); layoutControlItem6.Text = "æ å¿ï¼"; layoutControlItem6.TextSize = new Size(89, 14); layoutControlItem5.TextSize = new Size(43, 14); // // layoutControlItem3 // layoutControlItem3.Control = txtCustomer; layoutControlItem3.Control = txtNO; layoutControlItem3.Location = new Point(419, 0); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(420, 24); layoutControlItem3.Text = "客æ·ï¼"; layoutControlItem3.TextSize = new Size(89, 14); layoutControlItem3.Text = "ç¼å·ï¼"; layoutControlItem3.TextSize = new Size(43, 14); // // layoutControlItem1 // layoutControlItem1.Control = ckAllowCustom; layoutControlItem1.Location = new Point(419, 24); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(420, 24); layoutControlItem1.Text = "èªå®ä¹:"; layoutControlItem1.TextSize = new Size(43, 14); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // // InputXhsProjectInfoWizardPage // xhsSchemeChangeTypeCheckedListHorizCtrl1 // xhsSchemeChangeTypeCheckedListHorizCtrl1.Location = new Point(67, 60); xhsSchemeChangeTypeCheckedListHorizCtrl1.Name = "xhsSchemeChangeTypeCheckedListHorizCtrl1"; xhsSchemeChangeTypeCheckedListHorizCtrl1.Size = new Size(780, 65); xhsSchemeChangeTypeCheckedListHorizCtrl1.TabIndex = 9; // // layoutControlItem4 // layoutControlItem4.Control = xhsSchemeChangeTypeCheckedListHorizCtrl1; layoutControlItem4.Location = new Point(0, 48); layoutControlItem4.MaxSize = new Size(0, 69); layoutControlItem4.MinSize = new Size(109, 69); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(839, 69); layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem4.Text = "åæ´:"; layoutControlItem4.TextSize = new Size(43, 14); // // CreateXhsSchemeInfoPage // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "InputXhsProjectInfoWizardPage"; Name = "CreateXhsSchemeInfoPage"; Size = new Size(859, 464); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)ckAllowCustom.Properties).EndInit(); ((ISupportInitialize)txtDescription.Properties).EndInit(); ((ISupportInitialize)txtTagNme.Properties).EndInit(); ((ISupportInitialize)txtCustomer.Properties).EndInit(); ((ISupportInitialize)txtNO.Properties).EndInit(); ((ISupportInitialize)txtName.Properties).EndInit(); ((ISupportInitialize)btnEditSelectModelFile.Properties).EndInit(); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ((ISupportInitialize)layoutControlItem7).EndInit(); ((ISupportInitialize)layoutControlItem5).EndInit(); ((ISupportInitialize)layoutControlItem8).EndInit(); ((ISupportInitialize)layoutControlItem6).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)dxErrorProvider1).EndInit(); ((ISupportInitialize)layoutControlItem4).EndInit(); ResumeLayout(false); } @@ -247,15 +230,15 @@ private DevExpress.XtraEditors.TextEdit txtName; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; private DevExpress.XtraEditors.TextEdit txtCustomer; private DevExpress.XtraEditors.TextEdit txtNO; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraEditors.TextEdit txtTagNme; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraEditors.MemoEdit txtDescription; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private SetFlagsEditCtrl setFlagsEditCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraEditors.ButtonEdit btnEditSelectModelFile; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private CheckEdit ckAllowCustom; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private XhsSchemeChangeTypeCheckedListHorizCtrl xhsSchemeChangeTypeCheckedListHorizCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs
@@ -14,35 +14,33 @@ private CreateXhsSchemeViewModel _vm = null;//æä½å¯¹è±¡ private bool _isInitialize = false;//æ¯å¦åå§å private Lazy<HStation.BLL.XhsProject> _bllProject = new(() => new HStation.BLL.XhsProject());//项ç®bll private Lazy<Yw.BLL.SysFlag> _bllFlag = new(() => new Yw.BLL.SysFlag());//æ ç¾bll public static Action AutoAddItem; public static Action DeleteItem; public static bool AllowImport = false; public async void InitialPage(ImportXhsProjectViewModel t) /// <summary> /// åå§å /// </summary> public async void InitialPage(CreateXhsSchemeViewModel t) { if (_isInitialize) { return; } //_vm = t; //_isInitialize = true; //var allFlagList = await _bllFlag.Value.GetBySysType(HStation.Xhs.DataType.XhsProject); //if (allFlagList == null) //{ // return; //} //this.setFlagsEditCtrl1.SetBindingData(allFlagList.Select(x => x.Name).ToList(), null); } /// <summary> /// åå§å /// </summary> public void InitialPage(CreateXhsSchemeViewModel t) { throw new NotImplementedException(); _vm = t; _isInitialize = true; var allFlagList = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Xhs.DataType.XhsScheme); if (allFlagList == null) { return; } this.setFlagsEditCtrl1.SetBindingData(allFlagList.Select(x => x.Name).ToList(), null); this.xhsSchemeChangeTypeCheckedListHorizCtrl1.SetBindingData(t.HydroInfo); if (t.Scheme == null) { t.Scheme = new XhsSchemeVmo(); if (t.AllSchemeList != null && t.AllSchemeList.Count > 0) { t.Scheme.SortCode = t.AllSchemeList.Max(x => x.SortCode) + 1; } } } /// <summary> @@ -106,20 +104,12 @@ this.dxErrorProvider1.SetError(this.txtName, "å¿ å¡«é¡¹"); return false; } var tagName = this.txtTagNme.Text.Trim(); if (!string.IsNullOrEmpty(tagName)) { if (_bllProject.Value.IsExistTagName(tagName).Result) { this.dxErrorProvider1.SetError(this.txtTagNme, "æ è®°å·²åå¨"); return false; } } //_vm.Name = this.txtName.Text.Trim(); //_vm.Customer = this.txtCustomer.Text.Trim(); //_vm.Flags = this.setFlagsEditCtrl1.SelectedFlagList; //_vm.TagName = tagName; //_vm.Description = this.txtDescription.Text.Trim(); _vm.Scheme.Name = this.txtName.Text.Trim(); _vm.Scheme.NO = this.txtNO.Text.Trim(); _vm.Scheme.Flags = this.setFlagsEditCtrl1.SelectedFlagList; _vm.Scheme.AllowCustom = this.ckAllowCustom.Checked; _vm.Scheme.ChangeTypes = this.xhsSchemeChangeTypeCheckedListHorizCtrl1.GetCheckedList(); _vm.Scheme.Description = this.txtDescription.Text.Trim(); return true; } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.resx
@@ -117,44 +117,6 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJQCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh Y2U9InByZXNlcnZlIiBpZD0iT3BlbiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIg MzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJLnN0 MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8cGF0aCBkPSJN Mi4yLDI1LjJsNS41LTEyYzAuMy0wLjcsMS0xLjIsMS44LTEuMkgyNlY5YzAtMC42LTAuNC0xLTEtMUgx MlY1YzAtMC42LTAuNC0xLTEtMUgzQzIuNCw0LDIsNC40LDIsNXYyMCAgIGMwLDAuMiwwLDAuMywwLjEs MC40QzIuMSwyNS4zLDIuMiwyNS4zLDIuMiwyNS4yeiIgY2xhc3M9IlllbGxvdyIgLz4NCiAgPC9nPg0K ICA8cGF0aCBkPSJNMzEuMywxNEg5LjZMNCwyNmgyMS44YzAuNSwwLDEuMS0wLjMsMS4zLTAuN0wzMiwx NC43QzMyLjEsMTQuMywzMS44LDE0LDMxLjMsMTR6IiBjbGFzcz0iWWVsbG93IiAvPg0KPC9zdmc+Cw== </value> </data> <data name="editorButtonImageOptions2.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKsCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5C bGFja3tmaWxsOiM3MjcyNzI7fQoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJLlJlZHtmaWxsOiNEMTFD MUM7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2xvdWR5XzFfIj4NCiAgICA8cGF0aCBkPSJNMjcsMThjLTAu NCwwLTAuOCwwLjEtMS4yLDAuMmMwLjEtMC40LDAuMi0wLjgsMC4yLTEuMmMwLTIuOC0yLjItNS01LTVj LTAuNSwwLTEuMSwwLjEtMS42LDAuMyAgIEMxOC40LDkuOCwxNS45LDgsMTMsOGMtMy45LDAtNywzLjEt Nyw3YzAsMC4zLDAsMC43LDAuMSwxYzAsMC0wLjEsMC0wLjEsMGMtMi4yLDAtNCwxLjgtNCw0YzAsMi4y LDEuOCw0LDQsNGgyMWMxLjcsMCwzLTEuMywzLTMgICBTMjguNywxOCwyNywxOHoiIGNsYXNzPSJCbHVl IiAvPg0KICA8L2c+DQo8L3N2Zz4L </value> </data> <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj
@@ -57,8 +57,6 @@ <Compile Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶%284%29.Designer.cs" /> <Compile Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶.cs" /> <Compile Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶.Designer.cs" /> <Compile Remove="03-simulation\04-scheme\01-info\CreateXhsSchemeInfoPage.cs" /> <Compile Remove="03-simulation\04-scheme\01-info\CreateXhsSchemeInfoPage.Designer.cs" /> <Compile Remove="03-simulation\07-matching\00-core\XhsProjectSimulationMatchingListCtrl.cs" /> <Compile Remove="03-simulation\07-matching\00-core\XhsProjectSimulationMatchingListCtrl.Designer.cs" /> <Compile Remove="03-simulation\07-matching\02-pump\01-pumpsinglematching\AssetsPumpMainChoicePage.cs" /> @@ -99,7 +97,6 @@ <EmbeddedResource Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶%283%29.resx" /> <EmbeddedResource Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶%284%29.resx" /> <EmbeddedResource Remove="03-simulation\04-scheme\01-add\AddXhsSchemeDlg - å¤å¶.resx" /> <EmbeddedResource Remove="03-simulation\04-scheme\01-info\CreateXhsSchemeInfoPage.resx" /> <EmbeddedResource Remove="03-simulation\07-matching\00-core\XhsProjectSimulationMatchingListCtrl.resx" /> <EmbeddedResource Remove="03-simulation\07-matching\02-pump\01-pumpsinglematching\AssetsPumpMainChoicePage.resx" /> <EmbeddedResource Remove="03-simulation\07-matching\02-pump\01-pumpsinglematching\AssetsPumpMainForm-bak.resx" /> @@ -149,7 +146,6 @@ </ItemGroup> <ItemGroup> <Folder Include="03-simulation\04-scheme\01-info\" /> <Folder Include="03-simulation\07-matching\00-core\" /> <Folder Include="map\gaode\css\" /> </ItemGroup> @@ -185,6 +181,9 @@ <Compile Update="03-simulation\04-scheme\01-add\01-set\03-pipe\SetSchemePipeListCtrl.cs" /> <Compile Update="03-simulation\04-scheme\01-add\01-set\01-pump\SetSchemePumpListCtrl.cs" /> <Compile Update="03-simulation\04-scheme\01-add\01-set\02-valve\SetSchemeValveListCtrl.cs" /> <Compile Update="03-simulation\04-scheme\01-info\00-core\XhsSchemeChangeTypeCheckedListHorizCtrl.cs"> <SubType>UserControl</SubType> </Compile> <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" /> WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
@@ -109,6 +109,9 @@ <Compile Update="03-simulation\04-scheme\01-add\AddXhsSchemeDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\04-scheme\01-info\CreateXhsSchemeInfoPage.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\05-function\SimulationFunctionCtrl.cs"> <SubType>UserControl</SubType> </Compile> WinFrmUI/HStation.WinFrmUI.Xhs.Core/Properties/DataSources/HStation.WinFrmUI.XhsSchemeChangeTypeCheckedViewModel.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="XhsSchemeChangeTypeCheckedViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>HStation.WinFrmUI.XhsSchemeChangeTypeCheckedViewModel, HStation.WinFrmUI.Xhs.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource>