BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IValveMain.cs
ÎļþÃû´Ó BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IPumpMain.cs ÐÞ¸Ä @@ -7,7 +7,10 @@ /// </summary> public interface IValveMain : IBaseCAL<AddValveMainInput, UpdateValveMainInput, ValveMainDto>, IUpdateSorter { // Task<List<ValveMainDto>> GetByValveSeriesID(long ID); /// <summary> /// éè¿ ç³»åID è·å /// </summary> public Task<List<ValveMainDto>> GetBySeriesID(long ID); Task<long> InsertEx(AddValveMainInput input, AddValveGroupAndMainMapInput map); BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IValveSeries.cs
BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/ValveGroup.cs
ÎļþÃû´Ó BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/PumpGroup.cs ÐÞ¸Ä @@ -61,6 +61,8 @@ #endregion Query #region Insert /// <summary> BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/ValveGroupAndMainMap.cs
BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/ValveMain.cs
ÎļþÃû´Ó BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/PumpMain.cs ÐÞ¸Ä @@ -1,4 +1,5 @@ using Yw.Dto; using System.Collections.Generic; using Yw.Dto; namespace HStation.CAL.LocalClient { @@ -37,6 +38,19 @@ } /// <summary> /// éè¿ ID è·å /// </summary> public async Task<List<ValveMainDto>> GetBySeriesID(long ID) { return await Task.Factory.StartNew(() => { var model = _service.GetBySeriesID(ID); var vm_list = model?.Select(x => new ValveMainDto(x)).ToList(); return vm_list; }); } /// <summary> /// éè¿ Ids è·å /// </summary> public async Task<List<ValveMainDto>> GetByIds(List<long> Ids) BLL/HStation.BLL.Assets.Core/03-localclient/03-ValveManage/ValveSeries.cs
BLL/HStation.BLL.Assets.Core/04-bll/02-ValveMange/03-PumpMain/PumpMain.cs
@@ -39,6 +39,20 @@ } /// <summary> /// éè¿ç³»åIDæ¥æ¾ /// </summary> /// <param name="ID"></param> /// <returns></returns> public async Task<List<Vmo.ValveMain>> GetBySeriesID(long ID) { var Dto = await _cal.GetBySeriesID(ID); var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.Assets.ValveMainDto, Vmo.ValveMain>() ).CreateMapper(); var vmo = mapper.Map<List<Dto.Assets.ValveMainDto>, List<Vmo.ValveMain>>(Dto); return vmo; } /// <summary> /// /// </summary> public async Task<List<Vmo.ValveMain>> GetByIds(List<long> Ids) BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj
@@ -6,6 +6,14 @@ <Nullable>enable</Nullable> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <NoWarn>1701;1702;8603</NoWarn> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <NoWarn>1701;1702;8603</NoWarn> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\..\Dto\HStation.Dto.Assets.Core\HStation.Dto.Assets.Core.csproj" /> <ProjectReference Include="..\..\Vmo\HStation.Vmo.Assets.Core\HStation.Vmo.Assets.Core.csproj" /> Dto/HStation.Dto.Assets.Core/01-ValveManage/03-ValveMain/AddValveMainInput.cs
@@ -3,9 +3,29 @@ public class AddValveMainInput { /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// å£å¾ /// </summary> public string Caliber { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// ææ @@ -23,6 +43,11 @@ public string? Description { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// æåºç /// </summary> public int SortCode { get; set; } Dto/HStation.Dto.Assets.Core/01-ValveManage/03-ValveMain/PumpValveDto.cs
ÎļþÒÑɾ³ý Dto/HStation.Dto.Assets.Core/01-ValveManage/03-ValveMain/UpdateValveMainInput.cs
@@ -11,9 +11,29 @@ public long ID { get; set; } /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// å£å¾ /// </summary> public string Caliber { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// ææ @@ -31,6 +51,11 @@ public string? Description { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// æåºç /// </summary> public int SortCode { get; set; } Dto/HStation.Dto.Assets.Core/01-ValveManage/03-ValveMain/ValveMainDto.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,79 @@ namespace HStation.Dto.Assets { public class ValveMainDto { public ValveMainDto() { } public ValveMainDto(Model.ValveMain rhs) { this.ID = rhs.ID; this.Description = rhs.Description; this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.Coefficient = rhs.Coefficient; this.SeriesID = rhs.SeriesID; this.Name = rhs.Name; this.Type = rhs.Type; this.CreateName = rhs.CreateName; this.CreateTime = rhs.CreateTime; this.SortCode = rhs.SortCode; } /// <summary> /// id /// </summary> public long ID { get; set; } /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// å£å¾ /// </summary> public string Caliber { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// ææ /// </summary> public string Material { get; set; } /// <summary> /// ç³»æ° /// </summary> public string Coefficient { get; set; } /// <summary> /// 说æ /// </summary> public string? Description { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// æåºç /// </summary> public int SortCode { get; set; } } } Dto/HStation.Dto.Assets.Core/02-EquipmentManage/AddEquipmentManageInput.cs
@@ -7,7 +7,7 @@ /// <summary> /// 设å¤ç±»å(弯头,ä¸é,åé....) /// </summary> public EequipmentType EquipmentType { get; set; } public eAdaptingType EquipmentType { get; set; } /// <summary> /// å£å¾ Dto/HStation.Dto.Assets.Core/02-EquipmentManage/EquipmentManageDto.cs
@@ -22,7 +22,7 @@ /// <summary> /// 设å¤ç±»å(弯头,ä¸é,åé....) /// </summary> public EequipmentType EquipmentType { get; set; } public eAdaptingType EquipmentType { get; set; } /// <summary> /// å£å¾ Dto/HStation.Dto.Assets.Core/02-EquipmentManage/UpdateEquipmentManageInput.cs
@@ -14,7 +14,7 @@ /// <summary> /// 设å¤ç±»å(弯头,ä¸é,åé....) /// </summary> public EequipmentType EquipmentType { get; set; } public eAdaptingType EquipmentType { get; set; } /// <summary> /// å£å¾ Service/HStation.Service.Assets.Core/00-core/EequipmentType.cs
ÎļþÒÑɾ³ý Service/HStation.Service.Assets.Core/00-core/eAdaptingType.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ namespace HStation.Service.Assets { public enum eAdaptingType { /// <summary> /// 弯头 /// </summary> Elbow = 0, /// <summary> /// ä¸é /// </summary> Tee = 1, /// <summary> /// åé /// </summary> Cross = 2 } } Service/HStation.Service.Assets.Core/01-entity/AdaptingManage/AdaptingManage.cs
ÎļþÃû´Ó Service/HStation.Service.Assets.Core/01-entity/EquipmentManage/EquipmentManage.cs ÐÞ¸Ä @@ -8,18 +8,18 @@ /// </summary> [SysType("xhs_equipmentmanage")] [SugarTable("xhs_equipmentmanage")] public class EquipmentManage : BaseEntity, System.ICloneable public class AdaptingManage : BaseEntity, System.ICloneable { /// <summary> /// /// </summary> public EquipmentManage() public AdaptingManage() { } /// <summary> /// 设å¤ç±»å(弯头,ä¸é,åé....) /// </summary> public EequipmentType EquipmentType { get; set; } public eAdaptingType AdaptingType { get; set; } /// <summary> /// å£å¾ Service/HStation.Service.Assets.Core/01-entity/ValveManage/ValveMain.cs
@@ -23,9 +23,34 @@ this.ID = rhs.ID; this.Description = rhs.Description; this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.Caliber = rhs.Caliber;//mm this.Coefficient = rhs.Coefficient; this.SeriesID = rhs.SeriesID; this.Name = rhs.Name; this.CreateName = rhs.CreateName; this.CreateTime = rhs.CreateTime; this.SortCode = rhs.SortCode; } /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// å£å¾ @@ -43,6 +68,11 @@ public string Coefficient { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// 说æ /// </summary> public string? Description { get; set; } Service/HStation.Service.Assets.Core/02-model/AdaptingManage/EquipmentManage.cs
ÎļþÃû´Ó Service/HStation.Service.Assets.Core/02-model/EquipmentManage/EquipmentManage.cs ÐÞ¸Ä @@ -36,7 +36,7 @@ /// <summary> /// 设å¤ç±»å(弯头,ä¸é,åé....) /// </summary> public EequipmentType EquipmentType { get; set; } public eAdaptingType EquipmentType { get; set; } /// <summary> /// å£å¾ Service/HStation.Service.Assets.Core/02-model/ValveManage/ValveMain.cs
@@ -25,6 +25,10 @@ this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.SortCode = rhs.SortCode; this.SeriesID = rhs.SeriesID; this.Name = rhs.Name; this.CreateName = rhs.CreateName; this.CreateTime = rhs.CreateTime; this.Coefficient = rhs.Coefficient; } @@ -35,8 +39,32 @@ this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.SortCode = rhs.SortCode; this.Name = rhs.Name; this.CreateName = rhs.CreateName; this.CreateTime = rhs.CreateTime; this.Coefficient = rhs.Coefficient; this.SeriesID = rhs.SeriesID; } /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// å£å¾ @@ -44,6 +72,11 @@ public string Caliber { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// ææ /// </summary> public string Material { get; set; } Service/HStation.Service.Assets.Core/04-dal/01-interface/02-IEquipmentManage/IEquipMentManage.cs
@@ -5,7 +5,7 @@ /// <summary> /// /// </summary> public interface IEquipmentManage : IBaseDAL<Entity.EquipmentManage> public interface IEquipmentManage : IBaseDAL<Entity.AdaptingManage> { } } Service/HStation.Service.Assets.Core/05-service/02-EquipmentManage/EquipmentManage.cs
@@ -105,7 +105,7 @@ /// <summary> /// éè¿ è®¾å¤ç±»åè·å /// </summary> public List<Model.EquipmentManage> GetByEquipmentType(EequipmentType type) public List<Model.EquipmentManage> GetByEquipmentType(eAdaptingType type) { var all = GetAll(); return all.Where(x => x.EquipmentType == type).ToList(); Service/HStation.Service.Assets.Core/05-service/02-EquipmentManage/EquipmentManage_Instance.cs
@@ -3,55 +3,55 @@ public partial class EquipmentManage { //Entity to GetModel internal static Model.EquipmentManage Entity2Model(Entity.EquipmentManage entity) internal static Model.EquipmentManage Entity2Model(Entity.AdaptingManage entity) { if (entity == null) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.EquipmentManage, Model.EquipmentManage>() var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AdaptingManage, Model.EquipmentManage>() ).CreateMapper(); var model = mapper.Map<Entity.EquipmentManage, Model.EquipmentManage>(entity); var model = mapper.Map<Entity.AdaptingManage, Model.EquipmentManage>(entity); return model; } //Entities to GetModels internal static List<Model.EquipmentManage> Entity2Models(List<Entity.EquipmentManage> entities) internal static List<Model.EquipmentManage> Entity2Models(List<Entity.AdaptingManage> entities) { if (entities == null || entities.Count < 1) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.EquipmentManage, Model.EquipmentManage>() var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AdaptingManage, Model.EquipmentManage>() ).CreateMapper(); var models = mapper.Map<List<Entity.EquipmentManage>, List<Model.EquipmentManage>>(entities); var models = mapper.Map<List<Entity.AdaptingManage>, List<Model.EquipmentManage>>(entities); return models; } //Model to Entity internal static Entity.EquipmentManage Model2Entity(Model.EquipmentManage model) internal static Entity.AdaptingManage Model2Entity(Model.EquipmentManage model) { if (model == null) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.EquipmentManage>() var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.AdaptingManage>() ).CreateMapper(); var entity = mapper.Map<Model.EquipmentManage, Entity.EquipmentManage>(model); var entity = mapper.Map<Model.EquipmentManage, Entity.AdaptingManage>(model); return entity; } //Models to Entities internal static List<Entity.EquipmentManage> Model2Entities(List<Model.EquipmentManage> models) internal static List<Entity.AdaptingManage> Model2Entities(List<Model.EquipmentManage> models) { if (models == null || models.Count < 1) return default; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.EquipmentManage>() var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.AdaptingManage>() ).CreateMapper(); var entities = mapper.Map<List<Model.EquipmentManage>, List<Entity.EquipmentManage>>(models); var entities = mapper.Map<List<Model.EquipmentManage>, List<Entity.AdaptingManage>>(models); return entities; } //Model to Entity internal static void Model2Entity(Model.EquipmentManage model, Entity.EquipmentManage entity) internal static void Model2Entity(Model.EquipmentManage model, Entity.AdaptingManage entity) { if (model == null || entity == null) return; var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.EquipmentManage>() var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.EquipmentManage, Entity.AdaptingManage>() ).CreateMapper(); mapper.Map(model, entity); } Service/HStation.Service.Assets.Core/05-service/03-ValveManage/03-PumpMain/ValveMain.cs
ÎļþÃû´Ó Service/HStation.Service.Assets.Core/05-service/03-ValveManage/03-PumpMain/PumpMain.cs ÐÞ¸Ä @@ -132,6 +132,19 @@ } /// <summary> /// éè¿ ç³»åID è·å /// </summary> public List<Model.ValveMain> GetBySeriesID(long id) { if (id < 1) { return default; } var all = GetAll(); return all.Where(x => x.SeriesID == id).ToList(); } /// <summary> /// è·åæå¤§æåºç /// </summary> public int GetMaxSortCode() Service/HStation.Service.Assets.Core/05-service/03-ValveManage/03-PumpMain/ValveMain_Instance.cs
Vmo/HStation.Vmo.Assets.Core/02-ValveManage/PumpMain.cs
@@ -8,9 +8,29 @@ public long ID { get; set; } /// <summary> /// ç³»åID /// </summary> public long SeriesID { get; set; } /// <summary> /// å£å¾ /// </summary> public string Caliber { get; set; } /// <summary> /// åç§° /// </summary> public string Name { get; set; } /// <summary> /// å建人 /// </summary> public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> public string CreateTime { get; set; } /// <summary> /// ææ @@ -28,6 +48,11 @@ public string? Description { get; set; } /// <summary> /// ç±»å /// </summary> public string Type { get; set; } /// <summary> /// æåºç /// </summary> public int SortCode { get; set; } WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs
@@ -113,7 +113,7 @@ NameTextEdit.StyleController = layoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(48, 56); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs
@@ -161,7 +161,7 @@ TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(20, 164); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs
@@ -145,7 +145,7 @@ NameTextEdit.StyleController = layoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(72, 104); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs
@@ -113,7 +113,7 @@ NameTextEdit.StyleController = layoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(48, 56); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs
@@ -140,7 +140,7 @@ TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(79, 128); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs
@@ -126,7 +126,7 @@ NameTextEdit.StyleController = layoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // TextEditDescription // DescriptionTextEdit.Location = new Point(72, 80); DescriptionTextEdit.Name = "DescriptionTextEdit"; WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/00-ViewModel/ValveMainViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,109 @@ using System.ComponentModel; namespace HStation.WinFrmUI.Assets { public class ValveMainViewModel { public ValveMainViewModel(Vmo.ValveMain rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.CreateTime = rhs.CreateTime; this.CreateName = rhs.CreateName; this.Description = rhs.Description; this.Material = rhs.Material; this.Caliber = rhs.Caliber;//mm this.Coefficient = rhs.Coefficient; this.SeriesID = rhs.SeriesID; this.SortCode = rhs.SortCode; } public void Reset(Vmo.ValveMain rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.CreateTime = rhs.CreateTime; this.CreateName = rhs.CreateName; this.Description = rhs.Description; this.Material = rhs.Material; this.Caliber = rhs.Caliber;//mm this.Coefficient = rhs.Coefficient; this.SeriesID = rhs.SeriesID; this.SortCode = rhs.SortCode; } [DisplayName("ID")] [Browsable(false)] public long ID { get; set; } /// <summary> /// ç³»åID /// </summary> [DisplayName("ç³»åID")] [Browsable(false)] public long SeriesID { get; set; } /// <summary> /// å£å¾ /// </summary> [DisplayName("å£å¾")] [Browsable(true)] public string Caliber { get; set; } /// <summary> /// ææ /// </summary> [DisplayName("ææ")] [Browsable(true)] public string Material { get; set; } /// <summary> /// ç³»æ° /// </summary> [DisplayName("ç³»æ°")] [Browsable(true)] public string Coefficient { get; set; } /// <summary> /// ç±»å /// </summary> [DisplayName("ç±»å")] [Browsable(true)] public string Type { get; set; } /// <summary> /// 说æ /// </summary> [DisplayName("说æ")] [Browsable(true)] public string? Description { get; set; } /// <summary> /// æåºç /// </summary> [DisplayName("æåºç ")] [Browsable(true)] public int SortCode { get; set; } /// <summary> /// åç§° /// </summary> [DisplayName("åç§°")] [Browsable(true)] public string Name { get; set; } /// <summary> /// å建人 /// </summary> [DisplayName("å建人")] [Browsable(true)] public string CreateName { get; set; } /// <summary> /// å建æ¶é´ /// </summary> [DisplayName("å建æ¶é´")] [Browsable(true)] public string CreateTime { get; set; } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/00-ViewModel/ValveSeriesViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ using DevExpress.XtraRichEdit.Model.History; namespace HStation.WinFrmUI.Assets { public class ValveSeriesViewModel { public ValveSeriesViewModel() { } public ValveSeriesViewModel(Vmo.ValveSeries rhs) { this.Name = rhs.Name; this.ID = rhs.ID; this.Description = rhs.Description; } public string Name { get; set; } public long ID { get; set; } public long ParentID { get; set; } public string Description { get; set; } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/AddValveMainDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,448 @@ namespace HStation.WinFrmUI.Assets { partial class AddValveMainDlg { /// <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() { components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); TextEditName = new DevExpress.XtraEditors.TextEdit(); TextEditDescription = new DevExpress.XtraEditors.MemoEdit(); textEditType = new DevExpress.XtraEditors.TextEdit(); TextEditMaterial = new DevExpress.XtraEditors.TextEdit(); TextEditCaliber = new DevExpress.XtraEditors.TextEdit(); TextEditCoefficient = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)textEditType.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(simpleButton1); layoutControl1.Controls.Add(TextEditName); layoutControl1.Controls.Add(TextEditDescription); layoutControl1.Controls.Add(textEditType); layoutControl1.Controls.Add(TextEditMaterial); layoutControl1.Controls.Add(TextEditCaliber); layoutControl1.Controls.Add(TextEditCoefficient); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(681, 482); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // BtnOk // BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; BtnOk.Appearance.Options.UseBackColor = true; BtnOk.Location = new Point(426, 452); BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(122, 22); BtnOk.StyleController = layoutControl1; BtnOk.TabIndex = 7; BtnOk.Text = "宿"; BtnOk.Click += BtnOk_ClickAsync; // // simpleButton1 // simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; simpleButton1.Appearance.Options.UseBackColor = true; simpleButton1.DialogResult = DialogResult.Cancel; simpleButton1.Location = new Point(552, 452); simpleButton1.Name = "simpleButton1"; simpleButton1.Size = new Size(121, 22); simpleButton1.StyleController = layoutControl1; simpleButton1.TabIndex = 8; simpleButton1.Text = "åæ¶"; // // TextEditName // TextEditName.Location = new Point(55, 8); TextEditName.Name = "TextEditName"; TextEditName.Size = new Size(618, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // TextEditDescription.Location = new Point(20, 164); TextEditDescription.Name = "TextEditDescription"; TextEditDescription.Size = new Size(641, 272); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 6; // // textEditType // textEditType.Location = new Point(55, 104); textEditType.Name = "textEditType"; textEditType.Size = new Size(618, 20); textEditType.StyleController = layoutControl1; textEditType.TabIndex = 4; // // TextEditMaterial // TextEditMaterial.Location = new Point(55, 80); TextEditMaterial.Name = "TextEditMaterial"; TextEditMaterial.Size = new Size(618, 20); TextEditMaterial.StyleController = layoutControl1; TextEditMaterial.TabIndex = 4; // // TextEditCaliber // TextEditCaliber.Location = new Point(55, 32); TextEditCaliber.Name = "TextEditCaliber"; TextEditCaliber.Size = new Size(618, 20); TextEditCaliber.StyleController = layoutControl1; TextEditCaliber.TabIndex = 2; // // TextEditCoefficient // TextEditCoefficient.Location = new Point(55, 56); TextEditCoefficient.Name = "TextEditCoefficient"; TextEditCoefficient.Size = new Size(618, 20); TextEditCoefficient.StyleController = layoutControl1; TextEditCoefficient.TabIndex = 3; // // Root // Root.AppearanceItemCaption.Options.UseTextOptions = true; 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, layoutControlItem4, emptySpaceItem1, layoutControlItem8, tabbedControlGroup1, layoutControlItem1, layoutControlItem3, layoutControlItem7, layoutControlItem6 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(681, 482); Root.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = TextEditCoefficient; layoutControlItem2.Location = new Point(0, 48); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(669, 24); layoutControlItem2.Text = "<color=red>*</color>ç³»æ°:"; layoutControlItem2.TextSize = new Size(35, 14); // // layoutControlItem4 // layoutControlItem4.Control = BtnOk; layoutControlItem4.Location = new Point(418, 444); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(126, 26); layoutControlItem4.TextSize = new Size(0, 0); layoutControlItem4.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; emptySpaceItem1.Location = new Point(0, 444); emptySpaceItem1.Name = "emptySpaceItem1"; emptySpaceItem1.Size = new Size(418, 26); emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlItem8 // layoutControlItem8.Control = simpleButton1; layoutControlItem8.Location = new Point(544, 444); layoutControlItem8.Name = "layoutControlItem8"; layoutControlItem8.Size = new Size(125, 26); layoutControlItem8.TextSize = new Size(0, 0); layoutControlItem8.TextVisible = false; // // tabbedControlGroup1 // tabbedControlGroup1.Location = new Point(0, 120); tabbedControlGroup1.Name = "tabbedControlGroup1"; tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; tabbedControlGroup1.Size = new Size(669, 324); tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); tabbedControlGroup1.Text = "说æ"; // // layoutControlGroup1 // layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Size = new Size(645, 276); layoutControlGroup1.Text = "说æ"; // // layoutControlItem5 // layoutControlItem5.Control = TextEditDescription; layoutControlItem5.Location = new Point(0, 0); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(645, 276); layoutControlItem5.Text = "说æ:"; layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; layoutControlItem5.TextSize = new Size(0, 0); layoutControlItem5.TextToControlDistance = 0; layoutControlItem5.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(669, 24); layoutControlItem1.Text = "<color=red>*</color>åç§°:"; layoutControlItem1.TextSize = new Size(35, 14); // // layoutControlItem3 // layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCaliber; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(669, 24); layoutControlItem3.Text = "<color=red>*</color>å£å¾:"; layoutControlItem3.TextSize = new Size(35, 14); // // layoutControlItem7 // layoutControlItem7.AllowHtmlStringInCaption = true; layoutControlItem7.Control = TextEditMaterial; layoutControlItem7.Location = new Point(0, 72); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(669, 24); layoutControlItem7.Text = "<color=red>*</color>ææ:"; layoutControlItem7.TextSize = new Size(35, 14); // // layoutControlItem6 // layoutControlItem6.Control = textEditType; layoutControlItem6.Location = new Point(0, 96); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(669, 24); layoutControlItem6.Text = "ç±»å:"; layoutControlItem6.TextSize = new Size(35, 14); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // // layoutControlItem13 // layoutControlItem13.Control = imageComboBoxEdit1; layoutControlItem13.Location = new Point(0, 72); layoutControlItem13.Name = "layoutControlItem8"; layoutControlItem13.Size = new Size(499, 24); layoutControlItem13.Text = "éæ©åç±»"; layoutControlItem13.TextSize = new Size(52, 14); // // imageComboBoxEdit1 // imageComboBoxEdit1.Location = new Point(0, 0); imageComboBoxEdit1.Name = "imageComboBoxEdit1"; imageComboBoxEdit1.Size = new Size(100, 20); imageComboBoxEdit1.TabIndex = 0; // // layoutControlItem15 // layoutControlItem15.Control = imageComboBoxEdit2; layoutControlItem15.Location = new Point(0, 72); layoutControlItem15.Name = "layoutControlItem8"; layoutControlItem15.Size = new Size(499, 24); layoutControlItem15.Text = "éæ©åç±»"; layoutControlItem15.TextSize = new Size(52, 14); // // imageComboBoxEdit2 // imageComboBoxEdit2.Location = new Point(0, 0); imageComboBoxEdit2.Name = "imageComboBoxEdit2"; imageComboBoxEdit2.Size = new Size(100, 20); imageComboBoxEdit2.TabIndex = 0; // // tabbedControlGroup2 // tabbedControlGroup2.Location = new Point(0, 354); tabbedControlGroup2.Name = "tabbedControlGroup1"; tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; tabbedControlGroup2.Size = new Size(669, 90); tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); tabbedControlGroup2.Text = "说æ"; // // layoutControlGroup3 // layoutControlGroup3.Location = new Point(0, 0); layoutControlGroup3.Name = "layoutControlGroup2"; layoutControlGroup3.Size = new Size(645, 56); layoutControlGroup3.Text = "屿§"; layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; // // layoutControlGroup4 // layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); layoutControlGroup4.Location = new Point(0, 0); layoutControlGroup4.Name = "layoutControlGroup1"; layoutControlGroup4.Size = new Size(645, 42); layoutControlGroup4.Text = "说æ"; // // layoutControlItem27 // layoutControlItem27.Control = TextEditDescription; layoutControlItem27.Location = new Point(0, 0); layoutControlItem27.Name = "layoutControlItem5"; layoutControlItem27.Size = new Size(645, 42); layoutControlItem27.Text = "说æ:"; layoutControlItem27.TextSize = new Size(59, 14); // // AddValveMainDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(681, 482); Controls.Add(layoutControl1); Name = "AddValveMainDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "æ·»å éé¨"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)textEditType.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit TextEditName; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraEditors.MemoEdit TextEditDescription; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; private DevExpress.XtraEditors.SimpleButton BtnOk; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraEditors.TextEdit TextEditMaterial; private DevExpress.XtraEditors.TextEdit TextEditCaliber; private DevExpress.XtraEditors.TextEdit TextEditCoefficient; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraEditors.SimpleButton simpleButton1; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraEditors.SimpleButton btnCancel; private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; private DevExpress.XtraEditors.TextEdit TagNameTextEdit; private DevExpress.XtraEditors.TextEdit NameTextEdit; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; private DevExpress.XtraEditors.TextEdit textEditType; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/AddValveMainDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,69 @@ namespace HStation.WinFrmUI.Assets { public partial class AddValveMainDlg : DevExpress.XtraEditors.XtraForm { public AddValveMainDlg() { InitializeComponent(); } private Vmo.ValveMain _ValveMain = null; //éé¨åå· public void SetBindingData(long SeriesID) { _ValveMain = new Vmo.ValveMain(); _ValveMain.SeriesID = SeriesID; } public event Func<Vmo.ValveMain, Task<bool>> ReloadDataEvent = null; //æ°æ®éªè¯ private bool Valid() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(TextEditName.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditName, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditCaliber.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditCaliber, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditCoefficient.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditCoefficient, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditMaterial.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditMaterial, "å¿ å¡«é¡¹"); return false; } return true; } //宿 private async void BtnOk_ClickAsync(object sender, EventArgs e) { if (!(Valid())) return; _ValveMain.Name = TextEditName.Text.Trim(); _ValveMain.Coefficient = TextEditCoefficient.Text.Trim(); _ValveMain.Material = TextEditMaterial.Text.Trim(); _ValveMain.Description = TextEditDescription.Text.Trim(); _ValveMain.Caliber = TextEditCaliber.Text.Trim(); if (await this.ReloadDataEvent.Invoke(_ValveMain)) { MessageBoxHelper.ShowSuccess("æ·»å æå!"); } else { MessageBoxHelper.ShowError("æ·»å 失败!"); } this.DialogResult = DialogResult.OK; this.Close(); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/AddValveMainDlg.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="dxErrorProvider1.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.Assets.Core/01-ValveManage/AddValveSeriesDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,180 @@ namespace HStation.WinFrmUI.Assets { partial class AddValveSeriesDlg { /// <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() { components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); btnCancel = new DevExpress.XtraEditors.SimpleButton(); NameTextEdit = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(btnCancel); layoutControl1.Controls.Add(NameTextEdit); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; layoutControl1.Size = new Size(396, 73); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // BtnOk // BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; BtnOk.Appearance.Options.UseBackColor = true; BtnOk.Location = new Point(252, 36); BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(63, 22); BtnOk.StyleController = layoutControl1; BtnOk.TabIndex = 2; BtnOk.Text = "宿"; BtnOk.Click += BtnOk_ClickAsync; // // btnCancel // btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; btnCancel.Location = new Point(319, 36); btnCancel.Name = "btnCancel"; btnCancel.Size = new Size(65, 22); btnCancel.StyleController = layoutControl1; btnCancel.TabIndex = 3; btnCancel.Text = "åæ¶"; // // NameTextEdit // NameTextEdit.Location = new Point(76, 12); NameTextEdit.Name = "NameTextEdit"; NameTextEdit.Size = new Size(308, 20); NameTextEdit.StyleController = layoutControl1; NameTextEdit.TabIndex = 0; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem3, layoutControlItem2, emptySpaceItem1 }); Root.Name = "Root"; Root.Size = new Size(396, 73); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = NameTextEdit; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(376, 24); layoutControlItem1.Text = "ç³»ååç§°:"; layoutControlItem1.TextSize = new Size(52, 14); // // layoutControlItem3 // layoutControlItem3.Control = btnCancel; layoutControlItem3.Location = new Point(307, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(69, 29); layoutControlItem3.TextSize = new Size(0, 0); layoutControlItem3.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = BtnOk; layoutControlItem2.Location = new Point(240, 24); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(67, 29); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; emptySpaceItem1.Location = new Point(0, 24); emptySpaceItem1.Name = "emptySpaceItem1"; emptySpaceItem1.Size = new Size(240, 29); emptySpaceItem1.TextSize = new Size(0, 0); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // // AddValveSeriesDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(396, 73); Controls.Add(layoutControl1); Name = "AddValveSeriesDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "æ·»å éé¨ç³»å"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit NameTextEdit; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.SimpleButton BtnOk; private DevExpress.XtraEditors.SimpleButton btnCancel; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/AddValveSeriesDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,48 @@ using DevExpress.XtraEditors.Controls; namespace HStation.WinFrmUI.Assets { public partial class AddValveSeriesDlg : DevExpress.XtraEditors.XtraForm { public AddValveSeriesDlg() { InitializeComponent(); } public event Func<Vmo.ValveSeries, Task<bool>> ReloadDataEvent = null; private Yw.BLL.SysCatalog _bll = null; //æ°æ®éªè¯ private bool Valid() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) { this.dxErrorProvider1.SetError(this.NameTextEdit, "å¿ å¡«é¡¹"); return false; } return true; } //宿 private async void BtnOk_ClickAsync(object sender, EventArgs e) { if (!Valid()) return; var model = new Vmo.ValveSeries(); model.Name = NameTextEdit.Text; if (await this.ReloadDataEvent.Invoke(model)) { MessageBoxHelper.ShowSuccess("æ·»å æå!"); } else { MessageBoxHelper.ShowError("æ·»å 失败!"); } this.DialogResult = DialogResult.OK; this.Close(); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/AddValveSeriesDlg.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="dxErrorProvider1.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.Assets.Core/01-ValveManage/EditValveMainDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,448 @@ namespace HStation.WinFrmUI.Assets { partial class EditValveMainDlg { /// <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() { components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); TextEditName = new DevExpress.XtraEditors.TextEdit(); TextEditDescription = new DevExpress.XtraEditors.MemoEdit(); textEditType = new DevExpress.XtraEditors.TextEdit(); TextEditMaterial = new DevExpress.XtraEditors.TextEdit(); TextEditCaliber = new DevExpress.XtraEditors.TextEdit(); TextEditCoefficient = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)textEditType.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(simpleButton1); layoutControl1.Controls.Add(TextEditName); layoutControl1.Controls.Add(TextEditDescription); layoutControl1.Controls.Add(textEditType); layoutControl1.Controls.Add(TextEditMaterial); layoutControl1.Controls.Add(TextEditCaliber); layoutControl1.Controls.Add(TextEditCoefficient); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(681, 482); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // BtnOk // BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; BtnOk.Appearance.Options.UseBackColor = true; BtnOk.Location = new Point(426, 452); BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(122, 22); BtnOk.StyleController = layoutControl1; BtnOk.TabIndex = 7; BtnOk.Text = "宿"; BtnOk.Click += BtnOk_ClickAsync; // // simpleButton1 // simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; simpleButton1.Appearance.Options.UseBackColor = true; simpleButton1.DialogResult = DialogResult.Cancel; simpleButton1.Location = new Point(552, 452); simpleButton1.Name = "simpleButton1"; simpleButton1.Size = new Size(121, 22); simpleButton1.StyleController = layoutControl1; simpleButton1.TabIndex = 8; simpleButton1.Text = "åæ¶"; // // TextEditName // TextEditName.Location = new Point(55, 8); TextEditName.Name = "TextEditName"; TextEditName.Size = new Size(618, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // TextEditDescription.Location = new Point(20, 164); TextEditDescription.Name = "TextEditDescription"; TextEditDescription.Size = new Size(641, 272); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 6; // // textEditType // textEditType.Location = new Point(55, 104); textEditType.Name = "textEditType"; textEditType.Size = new Size(618, 20); textEditType.StyleController = layoutControl1; textEditType.TabIndex = 4; // // TextEditMaterial // TextEditMaterial.Location = new Point(55, 80); TextEditMaterial.Name = "TextEditMaterial"; TextEditMaterial.Size = new Size(618, 20); TextEditMaterial.StyleController = layoutControl1; TextEditMaterial.TabIndex = 4; // // TextEditCaliber // TextEditCaliber.Location = new Point(55, 32); TextEditCaliber.Name = "TextEditCaliber"; TextEditCaliber.Size = new Size(618, 20); TextEditCaliber.StyleController = layoutControl1; TextEditCaliber.TabIndex = 2; // // TextEditCoefficient // TextEditCoefficient.Location = new Point(55, 56); TextEditCoefficient.Name = "TextEditCoefficient"; TextEditCoefficient.Size = new Size(618, 20); TextEditCoefficient.StyleController = layoutControl1; TextEditCoefficient.TabIndex = 3; // // Root // Root.AppearanceItemCaption.Options.UseTextOptions = true; 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, layoutControlItem4, emptySpaceItem1, layoutControlItem8, tabbedControlGroup1, layoutControlItem1, layoutControlItem3, layoutControlItem7, layoutControlItem6 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(681, 482); Root.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = TextEditCoefficient; layoutControlItem2.Location = new Point(0, 48); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(669, 24); layoutControlItem2.Text = "<color=red>*</color>ç³»æ°:"; layoutControlItem2.TextSize = new Size(35, 14); // // layoutControlItem4 // layoutControlItem4.Control = BtnOk; layoutControlItem4.Location = new Point(418, 444); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(126, 26); layoutControlItem4.TextSize = new Size(0, 0); layoutControlItem4.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; emptySpaceItem1.Location = new Point(0, 444); emptySpaceItem1.Name = "emptySpaceItem1"; emptySpaceItem1.Size = new Size(418, 26); emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlItem8 // layoutControlItem8.Control = simpleButton1; layoutControlItem8.Location = new Point(544, 444); layoutControlItem8.Name = "layoutControlItem8"; layoutControlItem8.Size = new Size(125, 26); layoutControlItem8.TextSize = new Size(0, 0); layoutControlItem8.TextVisible = false; // // tabbedControlGroup1 // tabbedControlGroup1.Location = new Point(0, 120); tabbedControlGroup1.Name = "tabbedControlGroup1"; tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; tabbedControlGroup1.Size = new Size(669, 324); tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); tabbedControlGroup1.Text = "说æ"; // // layoutControlGroup1 // layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Size = new Size(645, 276); layoutControlGroup1.Text = "说æ"; // // layoutControlItem5 // layoutControlItem5.Control = TextEditDescription; layoutControlItem5.Location = new Point(0, 0); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(645, 276); layoutControlItem5.Text = "说æ:"; layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; layoutControlItem5.TextSize = new Size(0, 0); layoutControlItem5.TextToControlDistance = 0; layoutControlItem5.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(669, 24); layoutControlItem1.Text = "<color=red>*</color>åç§°:"; layoutControlItem1.TextSize = new Size(35, 14); // // layoutControlItem3 // layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCaliber; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(669, 24); layoutControlItem3.Text = "<color=red>*</color>å£å¾:"; layoutControlItem3.TextSize = new Size(35, 14); // // layoutControlItem7 // layoutControlItem7.AllowHtmlStringInCaption = true; layoutControlItem7.Control = TextEditMaterial; layoutControlItem7.Location = new Point(0, 72); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(669, 24); layoutControlItem7.Text = "<color=red>*</color>ææ:"; layoutControlItem7.TextSize = new Size(35, 14); // // layoutControlItem6 // layoutControlItem6.Control = textEditType; layoutControlItem6.Location = new Point(0, 96); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(669, 24); layoutControlItem6.Text = "ç±»å:"; layoutControlItem6.TextSize = new Size(35, 14); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // // layoutControlItem13 // layoutControlItem13.Control = imageComboBoxEdit1; layoutControlItem13.Location = new Point(0, 72); layoutControlItem13.Name = "layoutControlItem8"; layoutControlItem13.Size = new Size(499, 24); layoutControlItem13.Text = "éæ©åç±»"; layoutControlItem13.TextSize = new Size(52, 14); // // imageComboBoxEdit1 // imageComboBoxEdit1.Location = new Point(0, 0); imageComboBoxEdit1.Name = "imageComboBoxEdit1"; imageComboBoxEdit1.Size = new Size(100, 20); imageComboBoxEdit1.TabIndex = 0; // // layoutControlItem15 // layoutControlItem15.Control = imageComboBoxEdit2; layoutControlItem15.Location = new Point(0, 72); layoutControlItem15.Name = "layoutControlItem8"; layoutControlItem15.Size = new Size(499, 24); layoutControlItem15.Text = "éæ©åç±»"; layoutControlItem15.TextSize = new Size(52, 14); // // imageComboBoxEdit2 // imageComboBoxEdit2.Location = new Point(0, 0); imageComboBoxEdit2.Name = "imageComboBoxEdit2"; imageComboBoxEdit2.Size = new Size(100, 20); imageComboBoxEdit2.TabIndex = 0; // // tabbedControlGroup2 // tabbedControlGroup2.Location = new Point(0, 354); tabbedControlGroup2.Name = "tabbedControlGroup1"; tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; tabbedControlGroup2.Size = new Size(669, 90); tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); tabbedControlGroup2.Text = "说æ"; // // layoutControlGroup3 // layoutControlGroup3.Location = new Point(0, 0); layoutControlGroup3.Name = "layoutControlGroup2"; layoutControlGroup3.Size = new Size(645, 56); layoutControlGroup3.Text = "屿§"; layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; // // layoutControlGroup4 // layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); layoutControlGroup4.Location = new Point(0, 0); layoutControlGroup4.Name = "layoutControlGroup1"; layoutControlGroup4.Size = new Size(645, 42); layoutControlGroup4.Text = "说æ"; // // layoutControlItem27 // layoutControlItem27.Control = TextEditDescription; layoutControlItem27.Location = new Point(0, 0); layoutControlItem27.Name = "layoutControlItem5"; layoutControlItem27.Size = new Size(645, 42); layoutControlItem27.Text = "说æ:"; layoutControlItem27.TextSize = new Size(59, 14); // // EditValveMainDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(681, 482); Controls.Add(layoutControl1); Name = "EditValveMainDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "ç¼è¾éé¨"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)textEditType.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit TextEditName; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraEditors.MemoEdit TextEditDescription; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; private DevExpress.XtraEditors.SimpleButton BtnOk; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraEditors.TextEdit TextEditMaterial; private DevExpress.XtraEditors.TextEdit TextEditCaliber; private DevExpress.XtraEditors.TextEdit TextEditCoefficient; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraEditors.SimpleButton simpleButton1; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraEditors.SimpleButton btnCancel; private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; private DevExpress.XtraEditors.TextEdit TagNameTextEdit; private DevExpress.XtraEditors.TextEdit NameTextEdit; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; private DevExpress.XtraEditors.TextEdit textEditType; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/EditValveMainDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,77 @@ namespace HStation.WinFrmUI.Assets { public partial class EditValveMainDlg : DevExpress.XtraEditors.XtraForm { public EditValveMainDlg() { InitializeComponent(); } private Vmo.ValveMain _ValveMain = null; //éé¨åå· public async void SetBindingData(long ValveID) { var bll = new BLL.ValveMain(); _ValveMain = await bll.GetByID(ValveID); if (_ValveMain == null) return; this.textEditType.Text = _ValveMain.Type; this.TextEditCaliber.Text = _ValveMain.Caliber; this.TextEditCoefficient.Text = _ValveMain.Coefficient; this.TextEditMaterial.Text = _ValveMain.Material; this.TextEditName.Text = _ValveMain.Name; this.TextEditDescription.Text = _ValveMain.Description; } public event Func<Vmo.ValveMain, Task<bool>> ReloadDataEvent = null; //æ°æ®éªè¯ private bool Valid() { this.dxErrorProvider1.ClearErrors(); if (string.IsNullOrEmpty(TextEditName.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditName, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditCaliber.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditCaliber, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditCoefficient.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditCoefficient, "å¿ å¡«é¡¹"); return false; } if (string.IsNullOrEmpty(TextEditMaterial.Text.Trim())) { this.dxErrorProvider1.SetError(this.TextEditMaterial, "å¿ å¡«é¡¹"); return false; } return true; } //宿 private async void BtnOk_ClickAsync(object sender, EventArgs e) { if (!(Valid())) return; _ValveMain.Name = TextEditName.Text.Trim(); _ValveMain.Coefficient = TextEditCoefficient.Text.Trim(); _ValveMain.Material = TextEditMaterial.Text.Trim(); _ValveMain.Description = TextEditDescription.Text.Trim(); _ValveMain.Caliber = TextEditCaliber.Text.Trim(); if (await this.ReloadDataEvent.Invoke(_ValveMain)) { MessageBoxHelper.ShowSuccess("ä¿®æ¹æå!"); } else { MessageBoxHelper.ShowError("ä¿®æ¹å¤±è´¥!"); } this.DialogResult = DialogResult.OK; this.Close(); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/EditValveMainDlg.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="dxErrorProvider1.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.Assets.Core/01-ValveManage/ValveManageMainPanel.Designer.cs
@@ -40,7 +40,17 @@ svgImageCollection1 = new DevExpress.Utils.SvgImageCollection(components); sidePanel1 = new DevExpress.XtraEditors.SidePanel(); gridControl1 = new DevExpress.XtraGrid.GridControl(); valveMainViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colCaliber = new DevExpress.XtraGrid.Columns.GridColumn(); colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); colCoefficient = new DevExpress.XtraGrid.Columns.GridColumn(); colType = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); colCreateName = new DevExpress.XtraGrid.Columns.GridColumn(); colCreateTime = new DevExpress.XtraGrid.Columns.GridColumn(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); dockPanel1 = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); @@ -49,6 +59,7 @@ ((System.ComponentModel.ISupportInitialize)svgImageCollection1).BeginInit(); sidePanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)valveMainViewModelBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).BeginInit(); dockPanel1.SuspendLayout(); @@ -74,21 +85,23 @@ // // BtnAdd // BtnAdd.Caption = "æ·»å åå·"; BtnAdd.Caption = "æ·»å éé¨"; BtnAdd.Id = 1; BtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnAdd.ImageOptions.SvgImage"); BtnAdd.Name = "BtnAdd"; BtnAdd.ItemClick += BtnAdd_ItemClick; // // BtnEdit // BtnEdit.Caption = "ç¼è¾åå·"; BtnEdit.Caption = "ç¼è¾éé¨"; BtnEdit.Id = 2; BtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnEdit.ImageOptions.SvgImage"); BtnEdit.Name = "BtnEdit"; BtnEdit.ItemClick += BtnEdit_ItemClick; // // BtnDelete // BtnDelete.Caption = "å é¤åå·"; BtnDelete.Caption = "å é¤éé¨"; BtnDelete.Id = 3; BtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnDelete.ImageOptions.SvgImage"); BtnDelete.Name = "BtnDelete"; @@ -130,6 +143,7 @@ // // gridControl1 // gridControl1.DataSource = valveMainViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; gridControl1.Location = new Point(0, 101); gridControl1.MainView = gridView1; @@ -139,11 +153,108 @@ gridControl1.TabIndex = 1; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // valveMainViewModelBindingSource // valveMainViewModelBindingSource.DataSource = typeof(ValveMainViewModel); // // gridView1 // gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colCaliber, colMaterial, colCoefficient, colType, colDescription, colSortCode, colCreateName, colCreateTime }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; // // colName // colName.AppearanceCell.Options.UseTextOptions = true; colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colName.FieldName = "Name"; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; colName.Width = 130; // // colCaliber // colCaliber.AppearanceCell.Options.UseTextOptions = true; colCaliber.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCaliber.FieldName = "Caliber"; colCaliber.Name = "colCaliber"; colCaliber.Visible = true; colCaliber.VisibleIndex = 3; colCaliber.Width = 130; // // colMaterial // colMaterial.AppearanceCell.Options.UseTextOptions = true; colMaterial.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colMaterial.FieldName = "Material"; colMaterial.Name = "colMaterial"; colMaterial.Visible = true; colMaterial.VisibleIndex = 4; colMaterial.Width = 130; // // colCoefficient // colCoefficient.AppearanceCell.Options.UseTextOptions = true; colCoefficient.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCoefficient.FieldName = "Coefficient"; colCoefficient.Name = "colCoefficient"; colCoefficient.Visible = true; colCoefficient.VisibleIndex = 5; colCoefficient.Width = 130; // // colType // colType.AppearanceCell.Options.UseTextOptions = true; colType.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colType.FieldName = "Type"; colType.Name = "colType"; colType.Visible = true; colType.VisibleIndex = 6; colType.Width = 130; // // colDescription // colDescription.AppearanceCell.Options.UseTextOptions = true; colDescription.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 7; colDescription.Width = 198; // // colSortCode // colSortCode.AppearanceCell.Options.UseTextOptions = true; colSortCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colSortCode.FieldName = "SortCode"; colSortCode.Name = "colSortCode"; colSortCode.Visible = true; colSortCode.VisibleIndex = 8; colSortCode.Width = 62; // // colCreateName // colCreateName.AppearanceCell.Options.UseTextOptions = true; colCreateName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCreateName.FieldName = "CreateName"; colCreateName.Name = "colCreateName"; colCreateName.Visible = true; colCreateName.VisibleIndex = 1; colCreateName.Width = 130; // // colCreateTime // colCreateTime.AppearanceCell.Options.UseTextOptions = true; colCreateTime.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCreateTime.FieldName = "CreateTime"; colCreateTime.Name = "colCreateTime"; colCreateTime.Visible = true; colCreateTime.VisibleIndex = 2; colCreateTime.Width = 130; // // dockManager1 // @@ -197,6 +308,7 @@ sidePanel1.ResumeLayout(false); sidePanel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)valveMainViewModelBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).EndInit(); dockPanel1.ResumeLayout(false); @@ -221,5 +333,15 @@ private DevExpress.XtraBars.Docking.DockPanel dockPanel1; private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; private ValveTypeTreeListCtrl valveTypeTreeListCtrl1; private BindingSource valveMainViewModelBindingSource; private DevExpress.XtraGrid.Columns.GridColumn colCaliber; private DevExpress.XtraGrid.Columns.GridColumn colMaterial; private DevExpress.XtraGrid.Columns.GridColumn colCoefficient; private DevExpress.XtraGrid.Columns.GridColumn colType; private DevExpress.XtraGrid.Columns.GridColumn colDescription; private DevExpress.XtraGrid.Columns.GridColumn colSortCode; private DevExpress.XtraGrid.Columns.GridColumn colName; private DevExpress.XtraGrid.Columns.GridColumn colCreateName; private DevExpress.XtraGrid.Columns.GridColumn colCreateTime; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/ValveManageMainPanel.cs
@@ -8,12 +8,80 @@ this.PageTitle.Caption = "éé¨ç®¡ç"; this.PageTitle.HeaderSvgImage = this.svgImageCollection1[0]; this.PageTitle.SvgImageSize = new Size(24, 24); this.valveTypeTreeListCtrl1.RloadEvent += ValveTypeTreeListCtrl1_RloadEvent; } private BLL.ValveMain _Bll = null; private List<ValveMainViewModel> _allBindingList = new List<ValveMainViewModel>(); //åå§åæ°æ® public override void InitialDataSource() { _Bll = new BLL.ValveMain(); this.valveTypeTreeListCtrl1.SetBindingData(); this.valveMainViewModelBindingSource.DataSource = _allBindingList; } private async void ValveTypeTreeListCtrl1_RloadEvent(long SeriesID) { var alllist = await _Bll.GetBySeriesID(SeriesID); _allBindingList.Clear(); foreach (var item in alllist) { _allBindingList.Add(new ValveMainViewModel(item)); } this.valveMainViewModelBindingSource.ResetBindings(false); } //æ·»å éé¨ private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddValveMainDlg(); var seriesid = this.valveTypeTreeListCtrl1.GetCurrentSeriesID(); if (seriesid <= 0) { MessageBoxHelper.ShowWarning("请å éæ©éé¨ç³»å!"); return; } dlg.SetBindingData(seriesid); dlg.ReloadDataEvent += async (rhs) => { var id = await _Bll.Insert(rhs); if (id > 0) { rhs.ID = id; _allBindingList.Add(new ValveMainViewModel(rhs)); this.valveMainViewModelBindingSource.ResetBindings(false); return true; } return false; }; dlg.ShowDialog(); } //ç¼è¾éé¨ private void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var vm = this.gridView1.GetCurrentViewModel(_allBindingList); if (vm == null) { MessageBoxHelper.ShowWarning("è¯·éæ©æ°æ®è¡!"); return; } var dlg = new EditValveMainDlg(); dlg.SetBindingData(vm.ID); dlg.ReloadDataEvent += async (rhs) => { if (await _Bll.Update(rhs)) { vm.Reset(rhs); this.valveMainViewModelBindingSource.ResetBindings(false); return true; } return false; }; dlg.ShowDialog(); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/ValveManageMainPanel.resx
@@ -192,6 +192,9 @@ <metadata name="svgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> <metadata name="valveMainViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>337, 17</value> </metadata> <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>193, 17</value> </metadata> WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/ValveTypeTreeListCtrl.cs
@@ -14,11 +14,61 @@ this.treeList1.SelectImageList = ImageLib.Lib; } //èç¦æ¹åäºä»¶ public event Action<long> RloadEvent = null; private List<ValveSeriesViewModel> _allBindingList = new List<ValveSeriesViewModel>(); public async void SetBindingData() { var alllist = await new BLL.ValveSeries().GetAll(); this.treeList1.DataSource = alllist; this.treeList1.Refresh(); foreach (var item in alllist) { _allBindingList.Add(new ValveSeriesViewModel(item)); } this.treeList1.DataSource = _allBindingList; this.treeList1.RefreshDataSource(); } //è·åç³»åID public long GetCurrentSeriesID() { var vm = this.treeList1.GetCurrentViewModel(_allBindingList); if (vm == null) return default; return vm.ID; } //æ·»å éé¨ç³»å private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddValveSeriesDlg(); dlg.ReloadDataEvent += async (rhs) => { var bll = new BLL.ValveSeries(); var id = await bll.Insert(rhs); if (id > 0) { rhs.ID = id; _allBindingList.Add(new ValveSeriesViewModel(rhs)); this.treeList1.RefreshDataSource(); return true; } return false; }; dlg.ShowDialog(); } //èç¦åæ¢ private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) { var vm = this.treeList1.GetCurrentViewModel(_allBindingList); if (vm == null) { MessageBoxHelper.ShowWarning("è¯·éæ©æ°æ®è¡!"); return; } RloadEvent.Invoke(vm.ID); } } } WinFrmUI/HStation.WinFrmUI.Assets.Core/01-ValveManage/ValveTypeTreeListCtrl.designer.cs
@@ -33,6 +33,8 @@ barManager1 = new DevExpress.XtraBars.BarManager(components); bar1 = new DevExpress.XtraBars.Bar(); BtnAdd = new DevExpress.XtraBars.BarButtonItem(); barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); barDockControlTop = new DevExpress.XtraBars.BarDockControl(); barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); @@ -51,8 +53,6 @@ Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); barRootBasicInfoMgr = new DevExpress.XtraBars.BarSubItem(); barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); barButtonItem2 = new DevExpress.XtraBars.BarButtonItem(); ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); @@ -93,6 +93,21 @@ BtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnAdd.ImageOptions.SvgImage"); BtnAdd.ImageOptions.SvgImageSize = new Size(20, 20); BtnAdd.Name = "BtnAdd"; BtnAdd.ItemClick += BtnAdd_ItemClick; // // barButtonItem1 // barButtonItem1.Caption = "ç¼è¾"; barButtonItem1.Id = 60; barButtonItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); barButtonItem1.Name = "barButtonItem1"; // // barButtonItem2 // barButtonItem2.Caption = "å é¤"; barButtonItem2.Id = 61; barButtonItem2.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem2.ImageOptions.SvgImage"); barButtonItem2.Name = "barButtonItem2"; // // barDockControlTop // @@ -192,6 +207,7 @@ treeList1.Size = new Size(239, 541); treeList1.TabIndex = 7; treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; // // colName // @@ -229,20 +245,6 @@ barRootBasicInfoMgr.Id = 20; barRootBasicInfoMgr.Name = "barRootBasicInfoMgr"; // // barButtonItem1 // barButtonItem1.Caption = "ç¼è¾"; barButtonItem1.Id = 60; barButtonItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); barButtonItem1.Name = "barButtonItem1"; // // barButtonItem2 // barButtonItem2.Caption = "å é¤"; barButtonItem2.Id = 61; barButtonItem2.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem2.ImageOptions.SvgImage"); barButtonItem2.Name = "barButtonItem2"; // // ValveTypeTreeListCtrl // Appearance.BackColor = SystemColors.Control; @@ -273,10 +275,7 @@ private DevExpress.XtraBars.BarDockControl barDockControlLeft; private DevExpress.XtraBars.BarDockControl barDockControlRight; private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraTreeList.TreeList treeList1; private DevExpress.XtraTreeList.Columns.TreeListColumn colName; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraBars.BarSubItem barRoot; private DevExpress.XtraBars.BarSubItem barRootBasicInfoMgr; private DevExpress.XtraBars.BarCheckItem barCkSearch; @@ -290,5 +289,8 @@ private DevExpress.XtraBars.BarButtonItem BtnAdd; private DevExpress.XtraBars.BarButtonItem barButtonItem1; private DevExpress.XtraBars.BarButtonItem barButtonItem2; private DevExpress.XtraTreeList.TreeList treeList1; private DevExpress.XtraTreeList.Columns.TreeListColumn colName; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj
@@ -49,6 +49,12 @@ <Compile Update="00-PumpProductManage\AddPumpProductGroupDlg.cs" /> <Compile Update="00-PumpProductManage\AddPumpProductMainDlg.cs" /> <Compile Update="00-PumpProductManage\EditPumpProductSeriesDlg.cs" /> <Compile Update="01-ValveManage\EditValveMainDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="01-ValveManage\AddValveMainDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="01-ValveManage\ValveTypeTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user
@@ -41,6 +41,9 @@ <Compile Update="01-ValveManage\ValveManageMainPanel.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="01-ValveManage\AddValveSeriesDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="02-UICore\00-DocumentPage\DocumentPage.cs"> <SubType>UserControl</SubType> </Compile> WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Assets.ValveMainViewModel.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="ValveMainViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>HStation.WinFrmUI.Assets.ValveMainViewModel, HStation.WinFrmUI.Assets.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource>