From 56e4b8aab223072bef1e1749b8ee9e499dd04f83 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期四, 19 十二月 2024 09:16:36 +0800 Subject: [PATCH] 修改阀门表 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.Designer.cs | 226 + WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.resx | 332 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.cs | 407 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.Designer.cs | 302 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.resx | 151 + WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.cs | 177 + WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrViewModel.cs | 81 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.cs | 5 Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveCoefficient.cs | 17 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.cs | 124 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.Designer.cs | 442 ++ Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/AddValveSeriesInput.cs | 5 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.Designer.cs | 241 + WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj | 23 Service/HStation.Service.Assets.Core/05-service/03-Valve/01-ValveSeries/ValveSeries.cs | 148 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.cs | 33 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.resx | 378 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/01-ValveSeries/AssetsValveSeries.cs | 92 Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveMain.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AssetsCoolingMainMgrPage.cs | 5 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.Designer.cs | 200 + WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user | 10 BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveSeries.cs | 154 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrViewModel.cs | 95 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.resx | 359 ++ Service/HStation.Service.Assets.Core/05-service/03-Valve/02-ValveMain/ValveMain.cs | 78 Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveMain.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrViewModel.cs | 135 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.resx | 120 Service/HStation.Service.Assets.Core/00-core/DataType.cs | 20 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.Designer.cs | 399 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.cs | 88 Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveSeriesVmo.cs | 38 Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveSeries.cs | 2 Vmo/HStation.Vmo.PhartRelation.Core.zip | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.Designer.cs | 336 ++ Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveCoefficient.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.cs | 442 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveSeriesViewModel.cs | 4 BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveSeries.cs | 12 Service/HStation.Service.Assets.Core/04-dal/03-sqlite/02-Valve/ValveSeries.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.cs | 47 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.resx | 120 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.cs | 92 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.designer.cs | 24 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.cs | 103 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.Designer.cs | 0 Service/HStation.Service.Assets.Core/04-dal/02-postgresql/02-Valve/AssetsValveSeries.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.resx | 120 Service/HStation.Service.Assets.Core/04-dal/01-interface/04-IValve/IAssetsValveSeries.cs | 2 Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveSeries.cs | 2 Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/ValveSeriesDto.cs | 7 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.cs | 56 Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs | 32 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.Designer.cs | 379 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.cs | 405 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.resx | 0 Service/HStation.Service.Assets.Core/05-service/03-Elbow/02-ElbowMain/ElbowManage.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.Designer.cs | 226 + WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.Designer.cs | 366 ++ BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveMain.cs | 173 Service/HStation.Service.Assets.Core/05-service/03-Elbow/01-ElbowSeries/ElbowSeries.cs | 22 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.cs | 43 BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/02-ValveMain/AssetsValveMain.cs | 94 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.Designer.cs | 302 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.Designer.cs | 120 Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/UpdateValveSeriesInput.cs | 5 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.cs | 105 BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveMain.cs | 12 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.Designer.cs | 344 ++ 87 files changed, 8,690 insertions(+), 239 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveMain.cs index 76ff003..b64862a 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveMain.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveMain.cs @@ -5,7 +5,7 @@ /// <summary> /// 鎶ヨ绛夌骇 /// </summary> - public interface IAssetsValveMain : IBaseCAL<AddAssetsValveMainInput, UpdateAssetsValveMainInput, AssetsValveMainDto>, IUpdateSorter + public interface IAssetsValveMain : IBaseCAL<AddAssetsValveMainInput, UpdateAssetsValveMainInput, AssetsValveMainDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter { /// <summary> /// 閫氳繃 绯诲垪ID 鑾峰彇 @@ -13,9 +13,13 @@ public Task<List<AssetsValveMainDto>> GetBySeriesID(long ID); /// <summary> - /// 鏇存柊榛樿鍊肩姸鎬� + /// /// </summary> - /// <returns></returns> - // public Task<bool> UpdateDefaultStatus(long ID, bool status); + Task<bool> IsExistTagName(string TagName); + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID); } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveSeries.cs b/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveSeries.cs index 0da3bbe..4432082 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/03-IValveManage/IAssetsValveSeries.cs @@ -5,7 +5,15 @@ /// <summary> /// 鎶ヨ绛夌骇 /// </summary> - public interface IAssetsValveSeries : IBaseCAL<AddAssetsValveSeriesInput, UpdateAssetsValveSeriesInput, AssetsValveSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter - { + public interface IAssetsValveSeries : IBaseCAL<AddAssetsValveSeriesInput, UpdateAssetsValveSeriesInput, AssetsValveSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter + { /// <summary> + /// + /// </summary> + Task<bool> IsExistTagName(string TagName); + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID); } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveMain.cs index 9e4d470..78c5a19 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveMain.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveMain.cs @@ -1,10 +1,7 @@ -锘縰sing System.Collections.Generic; -using Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> - /// 鎶ヨ绛夌骇 + /// 鍐峰嵈濉斿瀷鍙� /// </summary> public class AssetsValveMain : IAssetsValveMain { @@ -38,19 +35,6 @@ } /// <summary> - /// 閫氳繃 ID 鑾峰彇 - /// </summary> - public async Task<List<AssetsValveMainDto>> GetBySeriesID(long ID) - { - return await Task.Factory.StartNew(() => - { - var model = _service.GetBySeriesID(ID); - var vm_list = model?.Select(x => new AssetsValveMainDto(x)).ToList(); - return vm_list; - }); - } - - /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> public async Task<List<AssetsValveMainDto>> GetByIds(List<long> Ids) @@ -63,7 +47,22 @@ }); } + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + public async Task<List<AssetsValveMainDto>> GetBySeriesID(long SeriesID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetBySeriesID(SeriesID); + var vm_list = list?.Select(x => new AssetsValveMainDto(x)).ToList(); + return vm_list; + }); + } + #endregion Query + + #region Insert @@ -74,8 +73,20 @@ { return await Task.Factory.StartNew(() => { + var series = new HStation.Service.AssetsValveSeries().GetByID(input.SeriesID); + if (series == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"SeriesID:{input.SeriesID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } var model = input.Adapt<AddAssetsValveMainInput, Model.AssetsValveMain>(); - model.SortCode = _service.GetMaxSortCode() + 1; + model.SortCode = _service.GetMaxSortCode(input.SeriesID) + 1; var id = _service.Insert(model); return id; }); @@ -88,13 +99,7 @@ { return await Task.Factory.StartNew(() => { - var list = inputList.Select(x => x.Adapt<AddAssetsValveMainInput, Model.AssetsValveMain>()).ToList(); - list.ForEach(x => - { - x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); - }); - var bol = _service.Inserts(list); - return bol; + return false; }); } @@ -108,23 +113,6 @@ return false; }); } - - /* /// <summary> - /// 鏇存柊榛樿鍊肩姸鎬� - /// </summary> - public async Task<bool> UpdateDefaultStatus(long ID, bool status) - { - return await Task.Factory.StartNew(() => - { - var model = _service.GetByID(ID); - if (model == null) - { - throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{ID} 鏁版嵁涓嶅瓨鍦�"); - } - var bol = _service.UpdateDefaultStatus(ID, status); - return bol; - }); - }*/ #endregion Insert @@ -142,7 +130,13 @@ { throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); } - + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } var rhs = new Model.AssetsValveMain(model); input.Adapt(rhs); var bol = _service.Update(rhs); @@ -157,13 +151,7 @@ { return await Task.Factory.StartNew(() => { - if (inputList == null || inputList.Count < 1) - { - return false; - } - var list = inputList.Select(x => x.Adapt<UpdateAssetsValveMainInput, Model.AssetsValveMain>()).ToList(); - var bol = _service.Updates(list); - return bol; + return false; }); } @@ -171,17 +159,6 @@ /// 澶ф壒閲忔洿鏂� /// </summary> public async Task<bool> BulkUpdates(List<UpdateAssetsValveMainInput> list) - { - return await Task.Factory.StartNew(() => - { - return false; - }); - } - - /// <summary> - /// 鏇存柊缂栫爜 - /// </summary> - public async Task<bool> UpdateCode(long ID, string Code) { return await Task.Factory.StartNew(() => { @@ -214,7 +191,78 @@ }); } + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateParas(ID, Paras); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateFlags(ID, Flags); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public async Task<bool> UpdateTagName(long ID, string TagName) + { + return await Task.Factory.StartNew(() => + { + if (!string.IsNullOrEmpty(TagName)) + { + if (_service.IsExistTagNameExceptID(TagName, ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{TagName}", "鏍囪鍚嶇О宸插瓨鍦�"); + } + } + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + #endregion Update + + #region Exist + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagName(TagName); + return bol; + }); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagNameExceptID(TagName, ExceptID); + return bol; + }); + } + + #endregion Exist #region Delete @@ -258,5 +306,6 @@ } #endregion Delete + } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveSeries.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveSeries.cs index 8503116..40a36f8 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/03-Valve/AssetsValveSeries.cs @@ -1,9 +1,7 @@ -锘縰sing Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> - /// 鎶ヨ绛夌骇 + /// 鍐峰嵈濉旂郴鍒� /// </summary> public class AssetsValveSeries : IAssetsValveSeries { @@ -51,6 +49,8 @@ #endregion Query + + #region Insert /// <summary> @@ -60,8 +60,26 @@ { return await Task.Factory.StartNew(() => { + var parentIds = new List<long>(); + if (input.ParentID > 0) + { + var parent = _service.GetByID(input.ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{input.ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } var model = input.Adapt<AddAssetsValveSeriesInput, Model.AssetsValveSeries>(); - model.SortCode = _service.GetMaxSortCode() + 1; + model.ParentIds = parentIds; + model.SortCode = _service.GetMaxSortCode(input.ParentID) + 1; var id = _service.Insert(model); return id; }); @@ -74,13 +92,7 @@ { return await Task.Factory.StartNew(() => { - var list = inputList.Select(x => x.Adapt<AddAssetsValveSeriesInput, Model.AssetsValveSeries>()).ToList(); - list.ForEach(x => - { - x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); - }); - var bol = _service.Inserts(list); - return bol; + return false; }); } @@ -111,7 +123,13 @@ { throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); } - + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } var rhs = new Model.AssetsValveSeries(model); input.Adapt(rhs); var bol = _service.Update(rhs); @@ -126,13 +144,7 @@ { return await Task.Factory.StartNew(() => { - if (inputList == null || inputList.Count < 1) - { - return false; - } - var list = inputList.Select(x => x.Adapt<UpdateAssetsValveSeriesInput, Model.AssetsValveSeries>()).ToList(); - var bol = _service.Updates(list); - return bol; + return false; }); } @@ -140,17 +152,6 @@ /// 澶ф壒閲忔洿鏂� /// </summary> public async Task<bool> BulkUpdates(List<UpdateAssetsValveSeriesInput> list) - { - return await Task.Factory.StartNew(() => - { - return false; - }); - } - - /// <summary> - /// 鏇存柊缂栫爜 - /// </summary> - public async Task<bool> UpdateCode(long ID, string Code) { return await Task.Factory.StartNew(() => { @@ -179,6 +180,61 @@ { var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); var bol = _service.UpdateSorter(list); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + public async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{ID} 鏁版嵁涓嶅瓨鍦�"); + } + var parentIds = new List<long>(); + if (ParentID > 0) + { + var parent = _service.GetByID(ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + var sorterList = new List<Yw.Model.TreeSorter>() + { + new Yw.Model.TreeSorter() + { + ID=ID, + ParentIds=parentIds, + SortCode=SortCode + } + }; + if (TreeParentIdsHelper.ToString(parentIds) != TreeParentIdsHelper.ToString(model.ParentIds)) + { + var children = _service.GetChildrenByID(ID); + if (children != null && children.Count > 0) + { + foreach (var item in children) + { + var itemParent = sorterList.Find(x => x.ID == item.ParentIds.Last()); + var itemParentIds = TreeParentIdsHelper.GetChildParentIds(itemParent.ID, itemParent.ParentIds); + var sorter = new Yw.Model.TreeSorter() + { + ID = item.ID, + ParentIds = itemParentIds, + SortCode = item.SortCode + }; + sorterList.Add(sorter); + } + } + } + var bol = _service.UpdateTreeSorter(sorterList); return bol; }); } @@ -214,12 +270,47 @@ { return await Task.Factory.StartNew(() => { + if (!string.IsNullOrEmpty(TagName)) + { + if (_service.IsExistTagNameExceptID(TagName, ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{TagName}", "鏍囪鍚嶇О宸插瓨鍦�"); + } + } var bol = _service.UpdateTagName(ID, TagName); return bol; }); } #endregion Update + + #region Exist + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagName(TagName); + return bol; + }); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagNameExceptID(TagName, ExceptID); + return bol; + }); + } + + #endregion Exist #region Delete @@ -263,5 +354,6 @@ } #endregion Delete + } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/01-ValveSeries/AssetsValveSeries.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/01-ValveSeries/AssetsValveSeries.cs index f23f574..a2f4740 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/01-ValveSeries/AssetsValveSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/01-ValveSeries/AssetsValveSeries.cs @@ -1,8 +1,4 @@ -锘縰sing AutoMapper; -using HStation.Vmo; -using System.Collections.Generic; -using Yw; -using Yw.Dto; +锘縰sing Yw.BLL; namespace HStation.BLL { @@ -90,18 +86,81 @@ return bol; } - #endregion Update - - #region Delete - /// <summary> - /// 鍏ㄩ儴鍒犻櫎 + /// 鏇存柊鎺掑簭鐮� /// </summary> - public virtual async Task<bool> DeleteAll() + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) { - var bol = await _cal.DeleteAll(); + var bol = await _cal.UpdateSortCode(ID, SortCode); return bol; } + + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + { + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + public virtual async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) + { + var bol = await _cal.UpdateTreeSortCode(ID, ParentID, SortCode); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public virtual async Task<bool> UpdateTagName(long ID, string TagName) + { + return await _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public virtual async Task<bool> IsExistTagName(string TagName) + { + return await _cal.IsExistTagName(TagName); + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await _cal.IsExistTagNameExceptID(TagName, ExceptID); + } + + #endregion Exist + + #region Delete /// <summary> /// 閫氳繃 ID 鍒犻櫎 @@ -109,15 +168,6 @@ public virtual async Task<bool> DeleteByID(long ID) { var bol = await _cal.DeleteByID(ID); - return bol; - } - - /// <summary> - /// 閫氳繃 Ids 鍒犻櫎 - /// </summary> - public virtual async Task<bool> DeleteByIds(List<long> Ids) - { - var bol = await _cal.DeleteByIds(Ids); return bol; } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/02-ValveMain/AssetsValveMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/02-ValveMain/AssetsValveMain.cs index 04cd357..04952b5 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/02-ValveMain/AssetsValveMain.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-Valve/02-ValveMain/AssetsValveMain.cs @@ -1,8 +1,4 @@ -锘縰sing AutoMapper; -using HStation.Vmo; -using System.Collections.Generic; -using Yw; -using Yw.Dto; +锘縰sing Yw.BLL; namespace HStation.BLL { @@ -43,15 +39,12 @@ } /// <summary> - /// 閫氳繃绯诲垪ID鏌ユ壘 + /// 閫氳繃 SeriesID 鑾峰彇 /// </summary> - /// <param name="ID"></param> - /// <returns></returns> - public async Task<List<Vmo.AssetsValveMainVmo>> GetBySeriesID(long ID) + public virtual async Task<List<AssetsValveMainVmo>> GetBySeriesID(long SeriesID) { - var Dto = await _cal.GetBySeriesID(ID); - var dtoList = Dto2Vmos(Dto); - return dtoList; + var dtoList = await _cal.GetBySeriesID(SeriesID); + return Dto2Vmos(dtoList); } #endregion Query @@ -102,18 +95,72 @@ return bol; } - #endregion Update - - #region Delete - /// <summary> - /// 鍏ㄩ儴鍒犻櫎 + /// 鏇存柊鎺掑簭鐮� /// </summary> - public virtual async Task<bool> DeleteAll() + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) { - var bol = await _cal.DeleteAll(); + var bol = await _cal.UpdateSortCode(ID, SortCode); return bol; } + + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + { + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public virtual async Task<bool> UpdateTagName(long ID, string TagName) + { + return await _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public virtual async Task<bool> IsExistTagName(string TagName) + { + return await _cal.IsExistTagName(TagName); + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await _cal.IsExistTagNameExceptID(TagName, ExceptID); + } + + #endregion Exist + + #region Delete /// <summary> /// 閫氳繃 ID 鍒犻櫎 @@ -121,15 +168,6 @@ public virtual async Task<bool> DeleteByID(long ID) { var bol = await _cal.DeleteByID(ID); - return bol; - } - - /// <summary> - /// 閫氳繃 Ids 鍒犻櫎 - /// </summary> - public virtual async Task<bool> DeleteByIds(List<long> Ids) - { - var bol = await _cal.DeleteByIds(Ids); return bol; } diff --git a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/AddValveSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/AddValveSeriesInput.cs index a065df2..ef1b67a 100644 --- a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/AddValveSeriesInput.cs +++ b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/AddValveSeriesInput.cs @@ -8,9 +8,10 @@ public string Name { get; set; } /// <summary> - /// 鐖剁骇ID + /// 鐖剁骇id /// </summary> - public List<long> ParentIds { get; set; } + [Required] + public long ParentID { get; set; } /// <summary> /// 鎵�灞炵被鍒獻D diff --git a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/UpdateValveSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/UpdateValveSeriesInput.cs index 97380a5..4e87153 100644 --- a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/UpdateValveSeriesInput.cs +++ b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/UpdateValveSeriesInput.cs @@ -11,9 +11,10 @@ public long ID { get; set; } /// <summary> - /// 鐖剁骇ID + /// 鐖剁骇id /// </summary> - public List<long> ParentIds { get; set; } + [Required] + public long ParentID { get; set; } /// <summary> /// 鎵�灞炵被鍒獻D diff --git a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/ValveSeriesDto.cs b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/ValveSeriesDto.cs index 605b4ee..09d03a1 100644 --- a/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/ValveSeriesDto.cs +++ b/Dto/HStation.Dto.Assets.Core/01-Valve/01-ValveSeries/ValveSeriesDto.cs @@ -9,7 +9,7 @@ public AssetsValveSeriesDto(Model.AssetsValveSeries rhs) { this.ID = rhs.ID; - this.ParentIds = rhs.ParentIds; + this.ParentID = rhs.ParentIds.LastOrDefault(); this.CatalogID = rhs.CatalogID; this.Name = rhs.Name; this.Paras = rhs.Paras; @@ -25,9 +25,10 @@ public long ID { get; set; } /// <summary> - /// 鐖剁骇ID + /// 鐖剁骇id /// </summary> - public List<long> ParentIds { get; set; } + [Required] + public long ParentID { get; set; } /// <summary> /// 鎵�灞炵被鍒獻D diff --git a/Service/HStation.Service.Assets.Core/00-core/DataType.cs b/Service/HStation.Service.Assets.Core/00-core/DataType.cs index 14579dc..3b1a563 100644 --- a/Service/HStation.Service.Assets.Core/00-core/DataType.cs +++ b/Service/HStation.Service.Assets.Core/00-core/DataType.cs @@ -22,7 +22,25 @@ /// </summary> public const string CoolingFactor = "assets-cooling-factor"; - #endregion + #endregion 鍐峰嵈濉� + #region 闃�闂� + + /// <summary> + /// 闃�闂ㄧ郴鍒� + /// </summary> + public const string ValveSeries = "assets-valve-series"; + + /// <summary> + /// 闃�闂ㄥ瀷鍙� + /// </summary> + public const string ValveMain = "assets-valve-main"; + + /// <summary> + /// 闃�闂ㄧ郴鏁� + /// </summary> + public const string ValveFactor = "assets-valve-factor"; + + #endregion 闃�闂� } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveCoefficient.cs b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveCoefficient.cs index 02fb458..9c4bb2c 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveCoefficient.cs @@ -7,7 +7,7 @@ /// </summary> [SysType("assets_valve_coefficient")] [SugarTable("assets_valve_coefficient")] - public class AssetsValveCoefficient : BaseEntity, System.ICloneable + public class AssetsValveCoefficient : BaseEntity, ISorter, System.ICloneable { /// <summary> /// @@ -71,6 +71,17 @@ public string OpenLossCurve { get; set; } /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] + public string Description { get; set; } + + /// <summary> /// /// </summary> public AssetsValveCoefficient Clone() diff --git a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveMain.cs b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveMain.cs index 0cc3f55..4558b80 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveMain.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveMain.cs @@ -7,7 +7,7 @@ /// </summary> [SysType("assets_valve_main")] [SugarTable("assets_valve_main")] - public class AssetsValveMain : BaseEntity, ISorter, IFlags, IParas, ITagName, System.ICloneable + public class AssetsValveMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveSeries.cs index ebab05e..f99c678 100644 --- a/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/08-Valve/AssetsValveSeries.cs @@ -7,7 +7,7 @@ /// </summary> [SysType("assets_valve_series")] [SugarTable("assets_valve_series")] - public class AssetsValveSeries : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable + public class AssetsValveSeries : BaseEntity, IParas, IFlags, ITagName, ITreeSorter, System.ICloneable { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveCoefficient.cs b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveCoefficient.cs index d921ce1..e1d7a1e 100644 --- a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveCoefficient.cs @@ -6,7 +6,7 @@ /// 涓氬姟绔� /// </summary> [SysType("assets_valve_coefficient")] - public class AssetsValveCoefficient : BaseModel, System.ICloneable + public class AssetsValveCoefficient : BaseModel, ISorter, System.ICloneable { /// <summary> /// @@ -24,6 +24,8 @@ this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; } public void Reset(AssetsValveCoefficient rhs) @@ -36,6 +38,8 @@ this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; } /// <summary> @@ -74,6 +78,17 @@ public double MinorLoss { get; set; } /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] + public string Description { get; set; } + + /// <summary> /// /// </summary> public AssetsValveCoefficient Clone() diff --git a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveMain.cs b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveMain.cs index 6a23776..60b18e9 100644 --- a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveMain.cs +++ b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveMain.cs @@ -7,7 +7,7 @@ /// 涓氬姟绔� /// </summary> [SysType("assets_valve_main")] - public class AssetsValveMain : BaseModel, ISorter, IFlags, IParas, ITagName, System.ICloneable + public class AssetsValveMain : BaseModel, IParas, IFlags, ITagName, ISorter, System.ICloneable { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveSeries.cs b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveSeries.cs index 583cf29..65222ba 100644 --- a/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/02-model/08-Valve/AssetsValveSeries.cs @@ -6,7 +6,7 @@ /// 闃�闂ㄧ郴鍒� /// </summary> [SysType("assets_valve_series")] - public class AssetsValveSeries : BaseModel, IParas, IFlags, ITagName, ISorter, System.ICloneable + public class AssetsValveSeries : BaseModel, IParas, IFlags, ITagName, ITreeSorter, System.ICloneable { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/04-IValve/IAssetsValveSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/04-IValve/IAssetsValveSeries.cs index a56edf9..0d5574b 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/01-interface/04-IValve/IAssetsValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/01-interface/04-IValve/IAssetsValveSeries.cs @@ -5,7 +5,7 @@ /// <summary> /// /// </summary> - public interface IAssetsValveSeries : IBaseDAL<Entity.AssetsValveSeries>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + public interface IAssetsValveSeries : IBaseDAL<Entity.AssetsValveSeries>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter { } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/02-Valve/AssetsValveSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/02-Valve/AssetsValveSeries.cs index b538881..3b1119e 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/02-Valve/AssetsValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/02-Valve/AssetsValveSeries.cs @@ -5,7 +5,7 @@ /// <summary> /// /// </summary> - public partial class AssetsValveSeries : BaseDAL_Paras_Flags_TagName_Sorter<Entity.AssetsValveSeries>, IAssetsValveSeries + public partial class AssetsValveSeries : BaseDAL_Paras_Flags_TagName_TreeSorter<Entity.AssetsValveSeries>, IAssetsValveSeries { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/02-Valve/ValveSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/02-Valve/ValveSeries.cs index cf7552f..13e6681 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/02-Valve/ValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/02-Valve/ValveSeries.cs @@ -5,7 +5,7 @@ /// <summary> /// /// </summary> - public partial class AssetsValveSeries : BaseDAL_Paras_Flags_TagName_Sorter<Entity.AssetsValveSeries>, IAssetsValveSeries + public partial class AssetsValveSeries : BaseDAL_Paras_Flags_TagName_TreeSorter<Entity.AssetsValveSeries>, IAssetsValveSeries { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/05-service/03-Elbow/01-ElbowSeries/ElbowSeries.cs b/Service/HStation.Service.Assets.Core/05-service/03-Elbow/01-ElbowSeries/ElbowSeries.cs index 8713ead..cf68340 100644 --- a/Service/HStation.Service.Assets.Core/05-service/03-Elbow/01-ElbowSeries/ElbowSeries.cs +++ b/Service/HStation.Service.Assets.Core/05-service/03-Elbow/01-ElbowSeries/ElbowSeries.cs @@ -339,6 +339,15 @@ return all.Exists(x => x.TagName == TagName && x.ID != ExceptID); } + /// <summary> + /// 鏄惁鍖呭惈瀛愰」 + /// </summary> + public bool HasChildren(long ID) + { + var all = GetAll(); + return all.Exists(x => x.ParentIds.Contains(ID)); + } + #endregion Exist #region Delete @@ -349,7 +358,18 @@ public bool DeleteByID(long ID, out string Msg) { Msg = string.Empty; - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsElbowSeries>(); + if (HasChildren(ID)) + { + Msg = "瀛樺湪瀛愮骇锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } + var serviceMain = new AssetsElbowMain(); + if (serviceMain.IsExistBySeriesID(ID)) + { + Msg = "瀛樺湪鍨嬪彿淇℃伅锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsCoolingSeries>(); var bol = dal.DeleteByID(ID); if (bol) { diff --git a/Service/HStation.Service.Assets.Core/05-service/03-Elbow/02-ElbowMain/ElbowManage.cs b/Service/HStation.Service.Assets.Core/05-service/03-Elbow/02-ElbowMain/ElbowManage.cs index 9c03ac7..0a0feaf 100644 --- a/Service/HStation.Service.Assets.Core/05-service/03-Elbow/02-ElbowMain/ElbowManage.cs +++ b/Service/HStation.Service.Assets.Core/05-service/03-Elbow/02-ElbowMain/ElbowManage.cs @@ -141,6 +141,19 @@ #endregion Query + #region Exist + + /// <summary> + /// 閫氳繃 SeriesID 鍒ゆ柇鏄惁瀛樺湪 + /// </summary> + public bool IsExistBySeriesID(long SeriesID) + { + var all = GetAll(); + return all.Exists(x => x.SeriesID == SeriesID); + } + + #endregion Exist + #region Insert /// <summary> diff --git a/Service/HStation.Service.Assets.Core/05-service/03-Valve/01-ValveSeries/ValveSeries.cs b/Service/HStation.Service.Assets.Core/05-service/03-Valve/01-ValveSeries/ValveSeries.cs index 9af494b..0d89a80 100644 --- a/Service/HStation.Service.Assets.Core/05-service/03-Valve/01-ValveSeries/ValveSeries.cs +++ b/Service/HStation.Service.Assets.Core/05-service/03-Valve/01-ValveSeries/ValveSeries.cs @@ -80,6 +80,8 @@ #endregion Cache + + #region Query /// <summary> @@ -88,7 +90,7 @@ public List<Model.AssetsValveSeries> GetAll() { var all = GetCache(); - return all.OrderBy(x => x.SortCode).ToList(); + return all.OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> @@ -110,23 +112,100 @@ return default; } var all = GetAll(); - return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.SortCode).ToList(); + return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇瀛愮骇鍙婅嚜韬� + /// </summary> + public List<Model.AssetsValveSeries> GetChildAndSelfByID(long ID) + { + var all = GetAll(); + var list = all.Where(x => x.ID == ID || x.ParentIds.Contains(ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + return list; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇瀛愮骇 + /// </summary> + public List<Model.AssetsValveSeries> GetChildrenByID(long ID) + { + var all = GetAll(); + var list = all.Where(x => x.ParentIds.Contains(ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + return list; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇鐖剁骇 + /// </summary> + public List<Model.AssetsValveSeries> GetParentByID(long ID) + { + var all = GetAll(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + return default; + } + return all.Where(x => model.ParentIds.Contains(x.ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇鐖剁骇鍙婅嚜韬� + /// </summary> + public List<Model.AssetsValveSeries> GetParentAndSelfByID(long ID) + { + var all = GetAll(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + return default; + } + return all.Where(x => model.ParentIds.Contains(x.ID) || x.ID == ID).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 閫氳繃 ParentID 鑾峰彇 + /// </summary> + public List<Model.AssetsValveSeries> GetByParentID(long ParentID) + { + var all = GetAll(); + return all.Where(x => x.ParentIds.LastOrDefault() == ParentID).OrderBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 鏄惁鍖呭惈瀛愰」 + /// </summary> + public bool HasChildren(long ID) + { + var all = GetAll(); + return all.Exists(x => x.ParentIds.Contains(ID)); } /// <summary> /// 鑾峰彇鏈�澶ф帓搴忕爜 /// </summary> - public int GetMaxSortCode() + public int GetMaxSortCode(long ParentID) { - var all = GetAll(); - if (all == null || all.Count < 1) + List<Model.AssetsValveSeries> list = null; + if (ParentID < 1) + { + list = GetAll(); + list = list?.Where(x => x.ParentIds.Count < 1).ToList(); + } + else + { + list = GetByParentID(ParentID); + } + if (list == null || list.Count < 1) { return 0; } - return all.Max(x => x.SortCode); + return list.Max(x => x.SortCode); } #endregion Query + + #region Insert @@ -170,6 +249,8 @@ } #endregion Insert + + #region Update @@ -256,6 +337,46 @@ } /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + public bool UpdateTreeSortCode(long ID, List<long> ParentIds, int SortCode) + { + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsValveSeries>(); + var bol = dal.UpdateTreeSortCode(ID, TreeParentIdsHelper.ToString(ParentIds), SortCode); + if (bol) + { + UpdateCache(ID); + } + return bol; + } + + /// <summary> + /// 鏇存柊鏍戞帓搴� + /// </summary> + public bool UpdateTreeSorter(List<Yw.Model.TreeSorter> sorters) + { + if (sorters == null || sorters.Count < 1) + { + return false; + } + if (sorters.Exists(x => x.ID < 1)) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsValveSeries>(); + var bol = dal.UpdateTreeSorter(sorters.ToEntityList()); + if (bol) + { + UpdateCache(sorters.Select(x => x.ID).ToList()); + } + return bol; + } + + /// <summary> /// 鏇存柊 Paras /// </summary> public bool UpdateParas(long ID, Dictionary<string, string> Paras) @@ -311,6 +432,8 @@ #endregion Update + + #region Exist /// <summary> @@ -341,6 +464,8 @@ #endregion Exist + + #region Delete /// <summary> @@ -349,6 +474,17 @@ public bool DeleteByID(long ID, out string Msg) { Msg = string.Empty; + if (HasChildren(ID)) + { + Msg = "瀛樺湪瀛愮骇锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } + var serviceMain = new AssetsValveMain(); + if (serviceMain.IsExistBySeriesID(ID)) + { + Msg = "瀛樺湪鍨嬪彿淇℃伅锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsValveSeries>(); var bol = dal.DeleteByID(ID); if (bol) diff --git a/Service/HStation.Service.Assets.Core/05-service/03-Valve/02-ValveMain/ValveMain.cs b/Service/HStation.Service.Assets.Core/05-service/03-Valve/02-ValveMain/ValveMain.cs index a1b5e9c..e0ebd87 100644 --- a/Service/HStation.Service.Assets.Core/05-service/03-Valve/02-ValveMain/ValveMain.cs +++ b/Service/HStation.Service.Assets.Core/05-service/03-Valve/02-ValveMain/ValveMain.cs @@ -40,7 +40,7 @@ { model.Reset(model_ds); } - AssetsValveSeriesCacheHelper.Trigger(); + AssetsValveMainCacheHelper.Trigger(); } //閫氳繃 Ids 鏇存柊缂撳瓨 @@ -59,7 +59,7 @@ { all.AddRange(model_list); } - AssetsValveSeriesCacheHelper.Trigger(); + AssetsValveMainCacheHelper.Trigger(); } //绉婚櫎缂撳瓨 @@ -67,7 +67,7 @@ { var all = GetCache(); all.RemoveAll(x => x.ID == ID); - AssetsValveSeriesCacheHelper.Trigger(); + AssetsValveMainCacheHelper.Trigger(); } /// <summary> @@ -75,10 +75,12 @@ /// </summary> public static void PublishCache(string key) { - AssetsValveSeriesCacheHelper.Publish(key); + AssetsValveMainCacheHelper.Publish(key); } #endregion Cache + + #region Query @@ -114,24 +116,33 @@ } /// <summary> - /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// 閫氳繃 SeriesID 鑾峰彇 /// </summary> - public List<Model.AssetsValveMain> GetBySeriesID(long id) + public List<Model.AssetsValveMain> GetBySeriesID(long SeriesID) { - if (id < 1) + var all = GetAll(); + return all.Where(x => x.SeriesID == SeriesID).OrderBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 閫氳繃 SeriesIds 鑾峰彇 + /// </summary> + public List<Model.AssetsValveMain> GetBySeriesIds(List<long> SeriesIds) + { + if (SeriesIds == null || SeriesIds.Count < 1) { return default; } var all = GetAll(); - return all.Where(x => x.SeriesID == id).ToList(); + return all.Where(x => SeriesIds.Contains(x.SeriesID)).OrderBy(x => x.SortCode).ToList(); } /// <summary> /// 鑾峰彇鏈�澶ф帓搴忕爜 /// </summary> - public int GetMaxSortCode() + public int GetMaxSortCode(long SeriesID) { - var all = GetAll(); + var all = GetBySeriesID(SeriesID); if (all == null || all.Count < 1) { return 0; @@ -140,6 +151,8 @@ } #endregion Query + + #region Insert @@ -183,6 +196,8 @@ } #endregion Insert + + #region Update @@ -324,6 +339,49 @@ #endregion Update + + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public bool IsExistTagName(string TagName) + { + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName); + } + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 ExceptID + /// </summary> + public bool IsExistTagNameExceptID(string TagName, long ExceptID) + { + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName && x.ID != ExceptID); + } + + /// <summary> + /// 閫氳繃 SeriesID 鍒ゆ柇鏄惁瀛樺湪 + /// </summary> + public bool IsExistBySeriesID(long SeriesID) + { + var all = GetAll(); + return all.Exists(x => x.SeriesID == SeriesID); + } + + #endregion Exist + + + #region Delete /// <summary> diff --git a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs index 1da6f78..d05871d 100644 --- a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveCoefficientVmo.cs @@ -2,25 +2,32 @@ { public class AssetsValveCoefficientVmo { + public AssetsValveCoefficientVmo() + { } + + public AssetsValveCoefficientVmo(AssetsValveCoefficientVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Caliber = rhs.Caliber; + this.MinorLoss = rhs.MinorLoss; + this.Material = rhs.Material; + } + /// <summary> /// id /// </summary> public long ID { get; set; } /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } - - /// <summary> - /// 寮�搴︽崯澶辨洸绾� - /// </summary> - public string OpenLossCurve { get; set; } - - /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } + + public long MainID { get; set; } + + public string OpenLossCurve { get; set; } + public string MinorLossCurve { get; set; } /// <summary> /// 鍙e緞 @@ -36,10 +43,5 @@ /// 灞�闃荤郴鏁� /// </summary> public double MinorLoss { get; set; } - - /// <summary> - /// 姘村ご鎹熷け鏇茬嚎 - /// </summary> - public string MinorLossCurve { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveSeriesVmo.cs b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveSeriesVmo.cs index ef1c182..b093010 100644 --- a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveSeriesVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveSeriesVmo.cs @@ -1,16 +1,48 @@ -锘縩amespace HStation.Vmo +锘縰sing HStation.Dto.Assets; + +namespace HStation.Vmo { public class AssetsValveSeriesVmo { + public AssetsValveSeriesVmo() + { } + + public AssetsValveSeriesVmo(AssetsValveSeriesDto rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentID; + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// + /// </summary> + public AssetsValveSeriesVmo(AssetsValveSeriesVmo rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentID; + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + /// <summary> /// id /// </summary> public long ID { get; set; } /// <summary> - /// 鐖剁骇ID + /// 鐖剁骇id /// </summary> - public List<long> ParentIds { get; set; } + public long ParentID { get; set; } /// <summary> /// 鎵�灞炵被鍒獻D diff --git a/Vmo/HStation.Vmo.PhartRelation.Core.zip b/Vmo/HStation.Vmo.PhartRelation.Core.zip new file mode 100644 index 0000000..a26248d --- /dev/null +++ b/Vmo/HStation.Vmo.PhartRelation.Core.zip Binary files differ diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveSeriesViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveSeriesViewModel.cs index ef0072d..6bed695 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveSeriesViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveSeriesViewModel.cs @@ -12,7 +12,7 @@ { this.Name = rhs.Name; this.ID = rhs.ID; - this.ParentID = TreeParentIdsHelper.GetLastParentID(rhs.ParentIds); + this.ParentID = rhs.ParentID; this.Description = rhs.Description; } @@ -20,7 +20,7 @@ { this.Name = rhs.Name; this.ID = rhs.ID; - this.ParentID = TreeParentIdsHelper.GetLastParentID(rhs.ParentIds); + this.ParentID = rhs.ParentID; this.Description = rhs.Description; } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/AddValveSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.cs similarity index 93% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.cs index 16ea7fb..3256dd3 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.cs @@ -26,10 +26,7 @@ _assetsValveSeriesViews.Add(new AssetsValveSeriesViewModel(item)); } treeListLookUpEdit1TreeList.DataSource = _assetsValveSeriesViews; - if (_AssetsValveSeries.ParentIds.Count > 0) - { - TextEditParentList.EditValue = _AssetsValveSeries.ParentIds.Last(); - } + TextEditParentList.EditValue = _AssetsValveSeries.ParentID; } //鏁版嵁楠岃瘉 diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditValveSeriesDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/EditValveSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.cs similarity index 91% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.cs index db1e3fb..737fc13 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.cs @@ -49,12 +49,11 @@ private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddAssetsValveSeriesDlg(); - dlg.ReloadDataEvent += async (rhs, currentId) => + dlg.ReloadDataEvent += async (rhs, parentId) => { - if (currentId != null) + if (parentId != null) { - var select = await _bll.GetByID(Convert.ToInt64(currentId)); - rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + rhs.ParentID = Convert.ToInt64(parentId); } var bll = new BLL.AssetsValveSeries(); var id = await bll.Insert(rhs); @@ -86,8 +85,10 @@ dlg.SetBindingData(AssetsValveSeries); dlg.ReloadDataEvent += async (rhs, parentId) => { - var select = await _bll.GetByID(Convert.ToInt64(parentId)); - rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + if (parentId != null) + { + rhs.ParentID = Convert.ToInt64(parentId); + } if (await BLLFactory<BLL.AssetsValveSeries>.Instance.Update(rhs)) { vm.Reset(rhs); diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.designer.cs similarity index 92% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.designer.cs index 06ec795..c809ec2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.designer.cs @@ -28,8 +28,8 @@ /// </summary> private void InitializeComponent() { - components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ValveTypeTreeListCtrl)); + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(ValveTypeTreeListCtrl)); barManager1 = new DevExpress.XtraBars.BarManager(components); bar1 = new DevExpress.XtraBars.Bar(); BtnAdd = new DevExpress.XtraBars.BarButtonItem(); @@ -51,12 +51,12 @@ Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); barRootBasicInfoMgr = new DevExpress.XtraBars.BarSubItem(); - ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + ((ISupportInitialize)barManager1).BeginInit(); + ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)treeList1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)treeList1).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); SuspendLayout(); // // barManager1 @@ -249,12 +249,12 @@ Controls.Add(barDockControlTop); Name = "ValveTypeTreeListCtrl"; Size = new Size(239, 569); - ((System.ComponentModel.ISupportInitialize)barManager1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + ((ISupportInitialize)barManager1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)treeList1).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)treeList1).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); ResumeLayout(false); PerformLayout(); } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ValveTypeTreeListCtrl.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series-----bak/ValveTypeTreeListCtrl.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.Designer.cs new file mode 100644 index 0000000..9a42095 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.Designer.cs @@ -0,0 +1,226 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AddAssetsValveSeriesDlg + { + /// <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 Container(); + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + SuspendLayout(); + // + // treeListColumn1 + // + treeListColumn1.Caption = "treeListColumn1"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(420, 342); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 304); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(396, 26); + generalOkAndCancelCtrl1.TabIndex = 6; + // + // txtDescription + // + txtDescription.Location = new Point(59, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(349, 216); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 5; + // + // txtTagName + // + txtTagName.Location = new Point(59, 60); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(349, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 4; + // + // setFlagsEditCtrl1 + // + setFlagsEditCtrl1.Location = new Point(59, 36); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(349, 20); + setFlagsEditCtrl1.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(59, 12); + txtName.Name = "txtName"; + txtName.Size = new Size(349, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5 }); + Root.Name = "Root"; + Root.Size = new Size(420, 342); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(400, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = setFlagsEditCtrl1; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(400, 24); + layoutControlItem2.Text = "鏍囩:"; + layoutControlItem2.TextSize = new Size(35, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtTagName; + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(400, 24); + layoutControlItem3.Text = "鏍囧織:"; + layoutControlItem3.TextSize = new Size(35, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtDescription; + layoutControlItem4.Location = new Point(0, 72); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(400, 220); + layoutControlItem4.Text = "璇存槑:"; + layoutControlItem4.TextSize = new Size(35, 14); + // + // layoutControlItem5 + // + layoutControlItem5.Control = generalOkAndCancelCtrl1; + layoutControlItem5.Location = new Point(0, 292); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(400, 30); + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextVisible = false; + // + // AddAssetsValveSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(420, 342); + Controls.Add(layoutControl1); + Name = "AddAssetsValveSeriesDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ResumeLayout(false); + } + + #endregion + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtTagName; + private SetFlagsEditCtrl setFlagsEditCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.cs new file mode 100644 index 0000000..98dda31 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.cs @@ -0,0 +1,92 @@ +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AddAssetsValveSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsValveSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + private static AssetsValveSeriesVmo _last = null; + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<AssetsValveSeriesVmo> ReloadDataEvent; + + private AssetsValveSeriesVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(long parentId) + { + _vmo = new AssetsValveSeriesVmo(); + _vmo.ParentID = parentId; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ValveSeries); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null); + if (_last != null) + { + this.txtName.EditValue = _last.Name; + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), _last.Flags); + this.txtTagName.EditValue = _last.TagName; + this.txtDescription.EditValue = _last.Description; + } + } + + //楠岃瘉 + private async Task<bool> Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.IsExistTagName(tagname)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_vmo == null) + { + return; + } + if (!await Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; + _vmo.TagName = this.txtTagName.Text.Trim(); + _vmo.Description = this.txtDescription.Text.Trim(); + var id = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.GetByID(id); + _last = vmo; + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddAssetsValveSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.Designer.cs new file mode 100644 index 0000000..bfcd020 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.Designer.cs @@ -0,0 +1,379 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTreeList; +using DevExpress.XtraTreeList.Columns; +using System.ComponentModel; + +namespace HStation.WinFrmUI +{ + partial class AssetsValveSeriesMgrTreeCtrl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(AssetsValveSeriesMgrTreeCtrl)); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + SerializableAppearanceObject serializableAppearanceObject9 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject10 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject11 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject12 = new SerializableAppearanceObject(); + layoutControl1 = new LayoutControl(); + treeList1 = new TreeList(); + colName = new TreeListColumn(); + barManager1 = new DevExpress.XtraBars.BarManager(components); + bar1 = new DevExpress.XtraBars.Bar(); + barBtnExpandAll = new DevExpress.XtraBars.BarButtonItem(); + barBtnCollpseAll = new DevExpress.XtraBars.BarButtonItem(); + barBtnSearchBox = new DevExpress.XtraBars.BarButtonItem(); + barCkTreeLine = new DevExpress.XtraBars.BarCheckItem(); + barCkDrag = new DevExpress.XtraBars.BarCheckItem(); + barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + barDockControlTop = new DevExpress.XtraBars.BarDockControl(); + barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); + barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); + barDockControlRight = new DevExpress.XtraBars.BarDockControl(); + barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); + barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); + barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + barBtnInfo = new DevExpress.XtraBars.BarButtonItem(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + searchControl1 = new SearchControl(); + Root = new LayoutControlGroup(); + layoutControlItem1 = new LayoutControlItem(); + layoutControlItem2 = new LayoutControlItem(); + popupMenu1 = new DevExpress.XtraBars.PopupMenu(components); + behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); + dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)treeList1).BeginInit(); + ((ISupportInitialize)barManager1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); + ((ISupportInitialize)searchControl1.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)popupMenu1).BeginInit(); + ((ISupportInitialize)behaviorManager1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(treeList1); + layoutControl1.Controls.Add(searchControl1); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 24); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(539, 371, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(235, 636); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // treeList1 + // + behaviorManager1.SetBehaviors(treeList1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.Utils.DragDrop.DragDropBehavior.Create(typeof(TreeListDragDropSource), true, true, true, true, dragDropEvents1) }); + treeList1.Columns.AddRange(new TreeListColumn[] { colName }); + treeList1.Location = new Point(0, 24); + treeList1.MenuManager = barManager1; + treeList1.Name = "treeList1"; + treeList1.OptionsMenu.EnableNodeMenu = false; + treeList1.OptionsSelection.EnableAppearanceFocusedCell = false; + treeList1.OptionsView.FocusRectStyle = DrawFocusRectStyle.None; + treeList1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); + treeList1.Size = new Size(235, 611); + treeList1.TabIndex = 5; + treeList1.TreeViewColumn = colName; + treeList1.TreeViewFieldName = "Name"; + treeList1.ViewStyle = TreeListViewStyle.TreeView; + treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; + treeList1.MouseClick += treeList1_MouseClick; + // + // colName + // + colName.Caption = "鍚嶇О"; + colName.FieldName = "Name"; + colName.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colName.ImageOptions.SvgImage"); + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + colName.Width = 172; + // + // barManager1 + // + barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] { bar1 }); + barManager1.DockControls.Add(barDockControlTop); + barManager1.DockControls.Add(barDockControlBottom); + barManager1.DockControls.Add(barDockControlLeft); + barManager1.DockControls.Add(barDockControlRight); + barManager1.Form = this; + barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { barBtnExpandAll, barBtnCollpseAll, barBtnSearchBox, barCkTreeLine, barBtnAdd, barBtnEdit, barBtnDelete, barBtnInfo, barCkDrag, barBtnRefresh }); + barManager1.MaxItemId = 13; + // + // bar1 + // + bar1.BarName = "Custom1"; + bar1.DockCol = 0; + bar1.DockRow = 0; + bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnExpandAll), new DevExpress.XtraBars.LinkPersistInfo(barBtnCollpseAll), new DevExpress.XtraBars.LinkPersistInfo(barBtnSearchBox), new DevExpress.XtraBars.LinkPersistInfo(barCkTreeLine), new DevExpress.XtraBars.LinkPersistInfo(barCkDrag), new DevExpress.XtraBars.LinkPersistInfo(barBtnRefresh) }); + bar1.OptionsBar.AllowQuickCustomization = false; + bar1.OptionsBar.DrawBorder = false; + bar1.OptionsBar.MultiLine = true; + bar1.OptionsBar.UseWholeRow = true; + bar1.Text = "Custom1"; + // + // barBtnExpandAll + // + barBtnExpandAll.Caption = "灞曞紑"; + barBtnExpandAll.Id = 0; + barBtnExpandAll.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnExpandAll.ImageOptions.SvgImage"); + barBtnExpandAll.Name = "barBtnExpandAll"; + barBtnExpandAll.ItemClick += barBtnExpandAll_ItemClick; + // + // barBtnCollpseAll + // + barBtnCollpseAll.Caption = "鎶樺彔"; + barBtnCollpseAll.Id = 1; + barBtnCollpseAll.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnCollpseAll.ImageOptions.SvgImage"); + barBtnCollpseAll.Name = "barBtnCollpseAll"; + barBtnCollpseAll.ItemClick += barBtnCollpseAll_ItemClick; + // + // barBtnSearchBox + // + barBtnSearchBox.Caption = "鎼滅储"; + barBtnSearchBox.Id = 2; + barBtnSearchBox.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnSearchBox.ImageOptions.SvgImage"); + barBtnSearchBox.Name = "barBtnSearchBox"; + barBtnSearchBox.ItemClick += barBtnSearch_ItemClick; + // + // barCkTreeLine + // + barCkTreeLine.Caption = "鏍戠嚎"; + barCkTreeLine.Id = 4; + barCkTreeLine.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCkTreeLine.ImageOptions.SvgImage"); + barCkTreeLine.Name = "barCkTreeLine"; + barCkTreeLine.CheckedChanged += barCkTreeLine_CheckedChanged; + // + // barCkDrag + // + barCkDrag.Caption = "鎷栨嫿鎺掑簭"; + barCkDrag.Id = 11; + barCkDrag.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCkDrag.ImageOptions.SvgImage"); + barCkDrag.Name = "barCkDrag"; + barCkDrag.CheckedChanged += barCkDrag_CheckedChanged; + // + // barBtnRefresh + // + barBtnRefresh.Caption = "鍒锋柊"; + barBtnRefresh.Id = 12; + barBtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnRefresh.ImageOptions.SvgImage"); + barBtnRefresh.Name = "barBtnRefresh"; + barBtnRefresh.ItemClick += barBtnRefresh_ItemClick; + // + // barDockControlTop + // + barDockControlTop.CausesValidation = false; + barDockControlTop.Dock = DockStyle.Top; + barDockControlTop.Location = new Point(0, 0); + barDockControlTop.Manager = barManager1; + barDockControlTop.Size = new Size(235, 24); + // + // barDockControlBottom + // + barDockControlBottom.CausesValidation = false; + barDockControlBottom.Dock = DockStyle.Bottom; + barDockControlBottom.Location = new Point(0, 660); + barDockControlBottom.Manager = barManager1; + barDockControlBottom.Size = new Size(235, 0); + // + // barDockControlLeft + // + barDockControlLeft.CausesValidation = false; + barDockControlLeft.Dock = DockStyle.Left; + barDockControlLeft.Location = new Point(0, 24); + barDockControlLeft.Manager = barManager1; + barDockControlLeft.Size = new Size(0, 636); + // + // barDockControlRight + // + barDockControlRight.CausesValidation = false; + barDockControlRight.Dock = DockStyle.Right; + barDockControlRight.Location = new Point(235, 24); + barDockControlRight.Manager = barManager1; + barDockControlRight.Size = new Size(0, 636); + // + // barBtnAdd + // + barBtnAdd.Caption = "鏂板"; + barBtnAdd.Id = 6; + barBtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAdd.ImageOptions.SvgImage"); + barBtnAdd.Name = "barBtnAdd"; + // + // barBtnEdit + // + barBtnEdit.Caption = "缂栬緫"; + barBtnEdit.Id = 7; + barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); + barBtnEdit.Name = "barBtnEdit"; + // + // barBtnDelete + // + barBtnDelete.Caption = "鍒犻櫎"; + barBtnDelete.Id = 8; + barBtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDelete.ImageOptions.SvgImage"); + barBtnDelete.Name = "barBtnDelete"; + // + // barBtnInfo + // + barBtnInfo.Caption = "璇︾粏淇℃伅"; + barBtnInfo.Id = 9; + barBtnInfo.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnInfo.ImageOptions.SvgImage"); + barBtnInfo.Name = "barBtnInfo"; + // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions3.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions3.SvgImage"); + editorButtonImageOptions3.SvgImageSize = new Size(20, 20); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions3, new KeyShortcut(Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, ToolTipAnchor.Default) }); + repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; + // + // searchControl1 + // + searchControl1.Client = treeList1; + searchControl1.Location = new Point(0, 2); + searchControl1.MenuManager = barManager1; + searchControl1.Name = "searchControl1"; + searchControl1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Repository.ClearButton(), new DevExpress.XtraEditors.Repository.SearchButton() }); + searchControl1.Properties.Client = treeList1; + searchControl1.Size = new Size(235, 20); + searchControl1.StyleController = layoutControl1; + searchControl1.TabIndex = 4; + // + // Root + // + Root.EnableIndentsWithoutBorders = DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new BaseLayoutItem[] { layoutControlItem1, layoutControlItem2 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(235, 636); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.Control = searchControl1; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 2, 1); + layoutControlItem1.Size = new Size(235, 23); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = treeList1; + layoutControlItem2.Location = new Point(0, 23); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 1, 1); + layoutControlItem2.Size = new Size(235, 613); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // popupMenu1 + // + popupMenu1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnAdd), new DevExpress.XtraBars.LinkPersistInfo(barBtnEdit), new DevExpress.XtraBars.LinkPersistInfo(barBtnDelete), new DevExpress.XtraBars.LinkPersistInfo(barBtnInfo) }); + popupMenu1.Manager = barManager1; + popupMenu1.Name = "popupMenu1"; + popupMenu1.BeforePopup += popupMenu1_BeforePopup; + // + // dragDropEvents1 + // + dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; + // + // AssetsValveSeriesMgrTreeCtrl + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(layoutControl1); + Controls.Add(barDockControlLeft); + Controls.Add(barDockControlRight); + Controls.Add(barDockControlBottom); + Controls.Add(barDockControlTop); + Name = "AssetsValveSeriesMgrTreeCtrl"; + Size = new Size(235, 660); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)treeList1).EndInit(); + ((ISupportInitialize)barManager1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).EndInit(); + ((ISupportInitialize)searchControl1.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)popupMenu1).EndInit(); + ((ISupportInitialize)behaviorManager1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraBars.BarManager barManager1; + private DevExpress.XtraBars.BarButtonItem barBtnExpandAll; + private DevExpress.XtraBars.BarDockControl barDockControlTop; + private DevExpress.XtraBars.BarDockControl barDockControlBottom; + private DevExpress.XtraBars.BarDockControl barDockControlLeft; + private DevExpress.XtraBars.BarDockControl barDockControlRight; + private DevExpress.XtraEditors.SearchControl searchControl1; + private DevExpress.XtraBars.BarButtonItem barBtnCollpseAll; + private DevExpress.XtraBars.BarButtonItem barBtnSearchBox; + private DevExpress.XtraBars.BarCheckItem barCkTreeLine; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraEditors.SimpleButton btnImportProject; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraBars.BarButtonItem barBtnAdd; + private DevExpress.XtraBars.BarButtonItem barBtnEdit; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.BarButtonItem barBtnInfo; + private DevExpress.XtraBars.PopupMenu popupMenu1; + private DevExpress.XtraBars.Bar bar1; + private DevExpress.XtraBars.BarCheckItem barCkDrag; + private DevExpress.XtraBars.BarButtonItem barBtnRefresh; + private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; + private DevExpress.Utils.DragDrop.DragDropEvents dragDropEvents1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.cs new file mode 100644 index 0000000..ff7a8a5 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.cs @@ -0,0 +1,405 @@ +锘縰sing DevExpress.Utils; +using DevExpress.Utils.Design; +using DevExpress.Utils.DragDrop; +using DevExpress.XtraEditors; +using DevExpress.XtraTreeList; +using DevExpress.XtraTreeList.Nodes; +using HStation.Vmo; +using System.ComponentModel; +using System.Windows.Media.Imaging; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AssetsValveSeriesMgrTreeCtrl : DevExpress.XtraEditors.XtraUserControl + { + /// <summary> + /// + /// </summary> + public AssetsValveSeriesMgrTreeCtrl() + { + InitializeComponent(); + this.treeList1.InitialDefaultSettings(); + this.layoutControl1.SetupLayoutControl(); + this.barBtnAdd.ItemClick += BarBtnAdd_ItemClick; + this.barBtnEdit.ItemClick += BarBtnEdit_ItemClick; + this.barBtnDelete.ItemClick += BarBtnDelete_ItemClick; + this.barBtnInfo.ItemClick += BarBtnInfo_ItemClick; + } + + /// <summary> + /// 鑱氱劍鏀瑰彉浜嬩欢 + /// </summary> + public event Action<AssetsValveSeriesVmo> FocusedChangedEvent; + + /// <summary> + /// 鎵�鏈夌粦瀹氬垪琛� + /// </summary> + private List<AssetsValveSeriesMgrViewModel> _allBindingList = null; + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public async void InitialData() + { + var overlay = this.ShowOverlay(); + var allList = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.GetAll(); + _allBindingList = new List<AssetsValveSeriesMgrViewModel>(); + allList?.ForEach(x => + { + var vm = new AssetsValveSeriesMgrViewModel(x); + _allBindingList.Add(vm); + }); + this.treeList1.DataSource = _allBindingList; + this.treeList1.ForceInitialize(); + this.treeList1.ExpandAll(); + overlay.Close(); + SetDragEnable(this.barCkDrag.Checked); + } + + //鍏ㄩ儴灞曞紑 + private void barBtnExpandAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.ExpandAll(); + } + + //鍏ㄩ儴鎶樺彔 + private void barBtnCollpseAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.CollapseAll(); + } + + //妫�绱紙menu锛� + private void barBtnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (this.layoutControlItem1.Visibility == DevExpress.XtraLayout.Utils.LayoutVisibility.Always) + this.layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + else + this.layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; + } + + //鏍戠嚎 + private void barCkTreeLine_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.OptionsView.ShowTreeLines = this.barCkTreeLine.Checked ? DefaultBoolean.True : DefaultBoolean.False; + } + + //鑱氱劍鑺傜偣鏀瑰彉 + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetDataRecordByNode(e.Node) as AssetsValveSeriesMgrViewModel; + this.FocusedChangedEvent?.Invoke(vm.Vmo); + } + + //鍒锋柊 + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + InitialData(); + } + + //鍙抽敭鑿滃崟 + private void treeList1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Right) + { + return; + } + _calcHitInfo = this.treeList1.CalcHitInfo(e.Location); + this.popupMenu1.ShowPopup(MousePosition); + } + + private TreeListHitInfo _calcHitInfo = null; + + //鍙抽敭鑿滃崟寮瑰嚭鍓嶉獙璇� + private void popupMenu1_BeforePopup(object sender, CancelEventArgs e) + { + if (_calcHitInfo == null) + { + return; + } + if (_calcHitInfo.InRow) + { + this.barBtnAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; + this.barBtnEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; + this.barBtnDelete.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; + this.barBtnInfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; + } + else + { + this.barBtnAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; + this.barBtnEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + this.barBtnDelete.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + this.barBtnInfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; + } + } + + //鑾峰彇褰撳墠 + private AssetsValveSeriesMgrViewModel GetCurrentViewModel() + { + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栭敊璇紒"); + return null; + } + if (_allBindingList.Count < 1) + { + TipFormHelper.ShowInfo("鏃犳暟鎹紒"); + return null; + } + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛岋紒"); + return null; + } + return vm; + } + + //娣诲姞 + private void Add() + { + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栧け璐ワ紒"); + return; + } + if (_calcHitInfo == null) + { + return; + } + long parentId = 0; + if (_calcHitInfo.InRow) + { + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + if (vm != null) + { + parentId = vm.ID; + } + } + var dlg = new AddAssetsValveSeriesDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsValveSeriesMgrViewModel(rhs); + _allBindingList.Add(vm); + this.treeList1.RefreshDataSource(); + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛锛�"); + }; + dlg.SetBindingData(parentId); + dlg.ShowDialog(); + } + + //缂栬緫 + private void Edit() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new EditAssetsValveSeriesDlg(); + dlg.ReloadDataEvent += (rhs) => + { + vm.Reset(rhs); + this.treeList1.RefreshNode(this.treeList1.FocusedNode); + TipFormHelper.ShowSucceed("鏇存柊鎴愬姛"); + }; + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //鍒犻櫎 + private async void Delete() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var result = XtraMessageBox.Show("璇烽棶纭鍒犻櫎褰撳墠鏁版嵁鍚楋紵", "璇㈤棶", MessageBoxButtons.YesNo) == DialogResult.Yes; + if (!result) + { + return; + } + var bol = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.DeleteByID(vm.ID); + if (!bol) + { + TipFormHelper.ShowError("鍒犻櫎澶辫触锛�"); + return; + } + _allBindingList.Remove(vm); + this.treeList1.RefreshDataSource(); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); + } + + //鏌ョ湅 + private void View() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new ViewAssetsValveSeriesDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //娣诲姞 + private void BarBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Add(); + } + + //缂栬緫 + private void BarBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Edit(); + } + + //璇︾粏淇℃伅 + private void BarBtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + View(); + } + + //鍒犻櫎 + private void BarBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Delete(); + } + + #region 鎷栨嫿 + + private async void dragDropEvents1_DragDrop(object sender, DevExpress.Utils.DragDrop.DragDropEventArgs e) + { + var nodes = e.Data as List<TreeListNode>; + if (nodes == null || nodes.Count < 1) + { + e.Handled = true; + return; + } + var sourceNode = nodes[0]; + var sourceNodeObj = this.treeList1.GetDataRecordByNode(sourceNode) as AssetsValveSeriesMgrViewModel; + if (sourceNodeObj == null) + { + e.Handled = true; + return; + } + var destNode = this.treeList1.GetNodeByCP(e.Location); + if (destNode == null) + { + e.Handled = true; + return; + } + var destNodeObj = this.treeList1.GetDataRecordByNode(destNode) as AssetsValveSeriesMgrViewModel; + if (destNode == null) + { + e.Handled = true; + return; + } + + long id = sourceNodeObj.ID; + long parentId = 0; + int sortCode = 0; + + var sorters = new List<Yw.Vmo.Sorter>(); + + if (e.InsertType == InsertType.Before) + { + parentId = destNodeObj.ParentID; + sortCode = destNodeObj.SortCode; + _allBindingList.ForEach(x => + { + if (x.ParentID == destNodeObj.ParentID) + { + if (x.SortCode >= destNodeObj.SortCode) + { + if (x != sourceNodeObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + } + }); + } + else if (e.InsertType == InsertType.After) + { + parentId = destNodeObj.ParentID; + sortCode = destNodeObj.SortCode + 1; + _allBindingList.ForEach(x => + { + if (x.ParentID == destNodeObj.ParentID) + { + if (x.SortCode > destNodeObj.SortCode) + { + if (x != sourceNodeObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + } + }); + } + else if (e.InsertType == InsertType.AsChild) + { + parentId = destNodeObj.ID; + var allChildList = _allBindingList.Where(x => x.ParentID == destNodeObj.ParentID).ToList(); + sortCode = allChildList.Count < 1 ? 1 : allChildList.Max(x => x.SortCode) + 1; + } + else + { + e.Handled = true; + return; + } + + var bll = BLLFactory<HStation.BLL.AssetsValveSeries>.Instance; + var bol = await bll.UpdateTreeSortCode(id, parentId, sortCode); + if (!bol) + { + e.Handled = true; + return; + } + if (sorters != null && sorters.Count > 0) + { + bol = await bll.UpdateSorter(sorters); + if (!bol) + { + e.Handled = true; + return; + } + } + + _allBindingList.ForEach(x => + { + if (x.ID == id) + { + x.ParentID = parentId; + x.SortCode = sortCode; + } + if (sorters.Count > 0) + { + var sorter = sorters.Find(t => t.ID == x.ID); + if (sorter != null) + { + x.SortCode = sorter.SortCode; + } + } + }); + } + + //鎷栨嫿鎺掑簭 + private void barCkDrag_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.SetDragEnable(this.barCkDrag.Checked); + } + + //璁剧疆鎷栧姩鍙敤鎬� + private void SetDragEnable(bool allowDrag) + { + var be = this.behaviorManager1.GetBehavior<DevExpress.Utils.DragDrop.DragDropBehavior>(this.treeList1); + be.Properties.AllowDrag = allowDrag; + } + + #endregion 鎷栨嫿 + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.resx new file mode 100644 index 0000000..08c7ee3 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrTreeCtrl.resx @@ -0,0 +1,378 @@ +锘�<?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="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>286, 17</value> + </metadata> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="colName.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAOMCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTmV3VGFibGVTdHlsZSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5l + dyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3 + O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJLnN0MHtvcGFj + aXR5OjAuNTt9Cjwvc3R5bGU+DQogIDxnIGNsYXNzPSJzdDAiPg0KICAgIDxwYXRoIGQ9Ik0wLDIwaDh2 + NkgwVjIweiBNMTAsMjZoOHYtNmgtOFYyNnogTTIwLDEydjZoOHYtNkgyMHogTTIwLDI2aDh2LTZoLThW + MjZ6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGggZD0iTTAsNGg4djZIMFY0eiBNMCwx + OGg4di02SDBWMTh6IE0xMCwxMGg4VjRoLThWMTB6IE0xMCwxOGg4di02aC04VjE4eiIgY2xhc3M9IkJs + dWUiIC8+DQogIDxwb2x5Z29uIHBvaW50cz0iMjUsMiAyNywwIDI3LDMgMzAsMyAyOCw1IDMwLDcgMjcs + NyAyNywxMCAyNSw4IDIzLDEwIDIzLDcgMjAsNyAyMiw1IDIwLDMgMjMsMyAyMywwICIgY2xhc3M9Illl + bGxvdyIgLz4NCjwvc3ZnPgs= +</value> + </data> + <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="barBtnExpandAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALACAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iRXhwYW5kX0ZpZWxkIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3 + IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDojNzI3Mjcy + O30KCS5HcmVlbntmaWxsOiMwMzlDMjM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cG9seWdvbiBwb2ludHM9IjE0LDYgMTAsNiAxMCwyIDYsMiA2LDYgMiw2IDIsMTAgNiwxMCA2LDE0IDEw + LDE0IDEwLDEwIDE0LDEwICIgY2xhc3M9IkdyZWVuIiAvPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8 + cGF0aCBkPSJNMjIsNmgxMHYySDIyVjZ6IE0yMiwxMmgxMHYtMkgyMlYxMnogTTIyLDIwaDEwdi0ySDIy + VjIweiBNMjIsMjRoMTB2LTJIMjJWMjR6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGgg + ZD0iTTE4LDJoMTR2MkgxOFYyeiBNMTgsMTZoMTR2LTJIMThWMTZ6IE0xOCwyOGgxNHYtMkgxOFYyOHoi + IGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnCollpseAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ29sbGFwc2VfRmllbGQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpu + ZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tmaWxsOiM3Mjcy + NzI7fQoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cmVjdCB4PSIyIiB5PSI2IiB3aWR0aD0iMTIiIGhlaWdodD0iNCIgY2xhc3M9IlJlZCIgLz4NCiAgPGcg + Y2xhc3M9InN0MCI+DQogICAgPHBhdGggZD0iTTIyLDZoMTB2MkgyMlY2eiBNMjIsMTJoMTB2LTJIMjJW + MTJ6IE0yMiwyMGgxMHYtMkgyMlYyMHogTTIyLDI0aDEwdi0ySDIyVjI0eiIgY2xhc3M9IkJsYWNrIiAv + Pg0KICA8L2c+DQogIDxwYXRoIGQ9Ik0xOCwyaDE0djJIMThWMnogTTE4LDE2aDE0di0ySDE4VjE2eiBN + MTgsMjhoMTR2LTJIMThWMjh6IiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L +</value> + </data> + <data name="barBtnSearchBox.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barCkTreeLine.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iSW5zZXJ0VHJl + ZVZpZXciPg0KICAgIDxwYXRoIGQ9Ik0xMyw4SDVDNC40LDgsNCw3LjYsNCw3VjNjMC0wLjUsMC40LTEs + MS0xaDhjMC42LDAsMSwwLjUsMSwxdjRDMTQsNy42LDEzLjYsOCwxMyw4eiBNMjYsMTd2LTQgICBjMC0w + LjYtMC41LTEtMS0xaC04Yy0wLjUsMC0xLDAuNC0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoOEMyNS41LDE4 + LDI2LDE3LjUsMjYsMTd6IE0yNiwyN3YtNGMwLTAuNS0wLjUtMS0xLTFoLThjLTAuNSwwLTEsMC41LTEs + MSAgIHY0YzAsMC41LDAuNSwxLDEsMWg4QzI1LjUsMjgsMjYsMjcuNSwyNiwyN3oiIGNsYXNzPSJZZWxs + b3ciIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxNCwxNiAxNCwxNCAxMCwxNCAxMCwxMCA4LDEwIDgs + MjYgMTQsMjYgMTQsMjQgMTAsMjQgMTAsMTYgICIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <data name="barBtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnEdit.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 + cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog + TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu + OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt + MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 + LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw + LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x + NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 + LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu + MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu + NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw + YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu + NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy + NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnInfo.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barCkDrag.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAMDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUmV2ZXJzU29ydCI+DQogICAgPHBv + bHlnb24gcG9pbnRzPSIyNCw0IDIwLDQgMjAsMjAgMTYsMjAgMjIsMjggMjgsMjAgMjQsMjAgICIgY2xh + c3M9IkJsdWUiIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxMCw0IDQsMTIgOCwxMiA4LDI4IDEyLDI4 + IDEyLDEyIDE2LDEyICAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnRefresh.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2hhbmdlVmlldyI+DQogICAgPHBh + dGggZD0iTTI0LjUsNy41QzIyLjMsNS4zLDE5LjMsNCwxNiw0QzEwLjEsNCw1LjEsOC4zLDQuMiwxNGg0 + LjFjMC45LTMuNCw0LTYsNy43LTZjMi4yLDAsNC4yLDAuOSw1LjYsMi40TDE4LDE0ICAgaDUuN2g0LjFI + MjhWNEwyNC41LDcuNXogTTE2LDI0Yy0yLjIsMC00LjItMC45LTUuNi0yLjRMMTQsMThIOC4yaC00SDR2 + MTBsMy41LTMuNUM5LjcsMjYuNywxMi43LDI4LDE2LDI4YzUuOSwwLDEwLjgtNC4zLDExLjgtMTAgICBo + LTQuMUMyMi44LDIxLjQsMTkuNywyNCwxNiwyNHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <data name="editorButtonImageOptions3.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAK4BAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXIxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAz + MiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkJLkJsdWUKCQl7CgkJCWZpbGw6IzExNzdE + NzsgCgkJCWZvbnQtZmFtaWx5OidkeC1mb250LWljb25zJzsgCgkJCWZvbnQtc2l6ZTozMnB4OwoJCX0K + CTwvc3R5bGU+DQogIDx0ZXh0IHg9IjBweCIgeT0iMzJweCIgY2xhc3M9IkJsdWUiPu6drDwvdGV4dD4N + Cjwvc3ZnPgs= +</value> + </data> + <metadata name="popupMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>152, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrViewModel.cs new file mode 100644 index 0000000..c04ba4a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AssetsValveSeriesMgrViewModel.cs @@ -0,0 +1,95 @@ +锘縰sing HStation.Service; + +namespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsValveSeriesMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsValveSeriesMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsValveSeriesMgrViewModel(HStation.Vmo.AssetsValveSeriesVmo rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentID; + this.Name = rhs.Name; + this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); + this.TagName = rhs.TagName; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// + /// </summary> + public void Reset(HStation.Vmo.AssetsValveSeriesVmo rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentID; + this.Name = rhs.Name; + this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); + this.TagName = rhs.TagName; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// id + /// </summary> + [Display(Name = "ID")] + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇id + /// </summary> + [Display(Name = "鐖剁骇ID")] + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + [Display(Name = "鏍囩")] + public string Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + [Display(Name = "鏍囧織")] + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode + { + get { return this.Vmo.SortCode; } + set { this.Vmo.SortCode = value; } + } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public HStation.Vmo.AssetsValveSeriesVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.Designer.cs new file mode 100644 index 0000000..26e8e57 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.Designer.cs @@ -0,0 +1,226 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class EditAssetsValveSeriesDlg + { + /// <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 Container(); + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + SuspendLayout(); + // + // treeListColumn1 + // + treeListColumn1.Caption = "treeListColumn1"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(420, 342); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 304); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(396, 26); + generalOkAndCancelCtrl1.TabIndex = 6; + // + // txtDescription + // + txtDescription.Location = new Point(59, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(349, 216); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 5; + // + // txtTagName + // + txtTagName.Location = new Point(59, 60); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(349, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 4; + // + // setFlagsEditCtrl1 + // + setFlagsEditCtrl1.Location = new Point(59, 36); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(349, 20); + setFlagsEditCtrl1.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(59, 12); + txtName.Name = "txtName"; + txtName.Size = new Size(349, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5 }); + Root.Name = "Root"; + Root.Size = new Size(420, 342); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(400, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = setFlagsEditCtrl1; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(400, 24); + layoutControlItem2.Text = "鏍囩:"; + layoutControlItem2.TextSize = new Size(35, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtTagName; + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(400, 24); + layoutControlItem3.Text = "鏍囧織:"; + layoutControlItem3.TextSize = new Size(35, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtDescription; + layoutControlItem4.Location = new Point(0, 72); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(400, 220); + layoutControlItem4.Text = "璇存槑:"; + layoutControlItem4.TextSize = new Size(35, 14); + // + // layoutControlItem5 + // + layoutControlItem5.Control = generalOkAndCancelCtrl1; + layoutControlItem5.Location = new Point(0, 292); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(400, 30); + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextVisible = false; + // + // EditAssetsValveSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(420, 342); + Controls.Add(layoutControl1); + Name = "EditAssetsValveSeriesDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ResumeLayout(false); + } + + #endregion + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtTagName; + private SetFlagsEditCtrl setFlagsEditCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.cs new file mode 100644 index 0000000..eeaaa3b --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.cs @@ -0,0 +1,88 @@ +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class EditAssetsValveSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsValveSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<AssetsValveSeriesVmo> ReloadDataEvent; + + private AssetsValveSeriesVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(AssetsValveSeriesVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new AssetsValveSeriesVmo(vmo); + this.txtName.EditValue = vmo.Name; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ValveSeries); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; + } + + //楠岃瘉 + private async Task<bool> Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.IsExistTagNameExceptID(tagname, _vmo.ID)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_vmo == null) + { + return; + } + if (!await Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; + _vmo.TagName = this.txtTagName.Text.Trim(); + _vmo.Description = this.txtDescription.Text.Trim(); + var bol = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveSeries>.Instance.GetByID(_vmo.ID); + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/EditAssetsValveSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.Designer.cs new file mode 100644 index 0000000..339dd35 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.Designer.cs @@ -0,0 +1,200 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsValveSeriesDlg + { + /// <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() + { + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + txtFlags = new DevExpress.XtraEditors.TextEdit(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)txtFlags.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + SuspendLayout(); + // + // treeListColumn1 + // + treeListColumn1.Caption = "treeListColumn1"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtFlags); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(420, 342); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // txtDescription + // + txtDescription.Location = new Point(52, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Properties.ReadOnly = true; + txtDescription.Properties.UseReadOnlyAppearance = false; + txtDescription.Size = new Size(356, 246); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 4; + // + // txtTagName + // + txtTagName.Location = new Point(52, 60); + txtTagName.Name = "txtTagName"; + txtTagName.Properties.ReadOnly = true; + txtTagName.Properties.UseReadOnlyAppearance = false; + txtTagName.Size = new Size(356, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(52, 12); + txtName.Name = "txtName"; + txtName.Properties.ReadOnly = true; + txtName.Properties.UseReadOnlyAppearance = false; + txtName.Size = new Size(356, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem2 }); + Root.Name = "Root"; + Root.Size = new Size(420, 342); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(400, 24); + layoutControlItem1.Text = "鍚嶇О:"; + layoutControlItem1.TextSize = new Size(28, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtTagName; + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(400, 24); + layoutControlItem3.Text = "鏍囧織:"; + layoutControlItem3.TextSize = new Size(28, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtDescription; + layoutControlItem4.Location = new Point(0, 72); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(400, 250); + layoutControlItem4.Text = "璇存槑:"; + layoutControlItem4.TextSize = new Size(28, 14); + // + // txtFlags + // + txtFlags.Location = new Point(52, 36); + txtFlags.Name = "txtFlags"; + txtFlags.Properties.ReadOnly = true; + txtFlags.Properties.UseReadOnlyAppearance = false; + txtFlags.Size = new Size(356, 20); + txtFlags.StyleController = layoutControl1; + txtFlags.TabIndex = 2; + // + // layoutControlItem2 + // + layoutControlItem2.Control = txtFlags; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(400, 24); + layoutControlItem2.Text = "鏍囩:"; + layoutControlItem2.TextSize = new Size(28, 14); + // + // ViewAssetsValveSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(420, 342); + Controls.Add(layoutControl1); + Name = "ViewAssetsValveSeriesDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "璇︾粏淇℃伅"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)txtFlags.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ResumeLayout(false); + } + + #endregion + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtTagName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TextEdit txtFlags; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.cs new file mode 100644 index 0000000..8bc7a94 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.cs @@ -0,0 +1,33 @@ +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class ViewAssetsValveSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsValveSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private AssetsValveSeriesVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(AssetsValveSeriesVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new AssetsValveSeriesVmo(vmo); + this.txtName.EditValue = vmo.Name; + this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/ViewAssetsValveSeriesDlg.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddValveMainDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/AddValveMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditValveMainDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main---bak/EditValveMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.Designer.cs new file mode 100644 index 0000000..d99c773 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.Designer.cs @@ -0,0 +1,336 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AddAssetsValveMainDlg + { + /// <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 Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + ((ISupportInitialize)layoutControlItem10).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(665, 381); + layoutControl1.TabIndex = 1; + layoutControl1.Text = "layoutControl1"; + // + // txtKeyWord + // + txtKeyWord.Location = new Point(405, 12); + txtKeyWord.Name = "txtKeyWord"; + txtKeyWord.Properties.NullValuePrompt = ",鍒嗛殧 渚嬪 A,B"; + txtKeyWord.Size = new Size(248, 20); + txtKeyWord.StyleController = layoutControl1; + txtKeyWord.TabIndex = 2; + // + // txtTagName + // + txtTagName.Location = new Point(405, 60); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(248, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 8; + // + // setFlagsEditCtrl1 + // + setFlagsEditCtrl1.Location = new Point(83, 84); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(570, 21); + setFlagsEditCtrl1.TabIndex = 7; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 343); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(641, 26); + generalOkAndCancelCtrl1.TabIndex = 10; + // + // txtDescription + // + txtDescription.Location = new Point(83, 109); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(570, 230); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 9; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(83, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Size = new Size(247, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(405, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Size = new Size(248, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + txtCaliber.EditValueChanged += txtCaliber_EditValueChanged; + // + // txtMaterial + // + txtMaterial.Location = new Point(83, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(247, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + txtMaterial.EditValueChanged += txtMaterial_EditValueChanged; + // + // txtName + // + txtName.Location = new Point(83, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(247, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem2, layoutControlItem6, layoutControlItem7, layoutControlItem9, layoutControlItem10, layoutControlItem8 }); + Root.Name = "Root"; + Root.Size = new Size(665, 381); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(322, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(322, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(323, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(322, 24); + layoutControlItem4.Text = "<color=red>*</color>娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(322, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 97); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(645, 234); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 331); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(645, 30); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; + // + // layoutControlItem8 + // + layoutControlItem8.Control = setFlagsEditCtrl1; + layoutControlItem8.Location = new Point(0, 72); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(645, 25); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(59, 14); + // + // layoutControlItem9 + // + layoutControlItem9.Control = txtTagName; + layoutControlItem9.Location = new Point(322, 48); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(323, 24); + layoutControlItem9.Text = "鏍囧織:"; + layoutControlItem9.TextSize = new Size(59, 14); + // + // layoutControlItem10 + // + layoutControlItem10.Control = txtKeyWord; + layoutControlItem10.Location = new Point(322, 0); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(323, 24); + layoutControlItem10.Text = "鍏抽敭瀛�:"; + layoutControlItem10.TextSize = new Size(59, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // AddAssetsValveMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(665, 381); + Controls.Add(layoutControl1); + Name = "AddAssetsValveMainDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ((ISupportInitialize)layoutControlItem10).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private SetFlagsEditCtrl setFlagsEditCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.TextEdit txtKeyWord; + private DevExpress.XtraEditors.TextEdit txtTagName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.cs new file mode 100644 index 0000000..2402e3f --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.cs @@ -0,0 +1,177 @@ +锘縰sing HStation.Service.Assets; +using HStation.Vmo; +using System.Data; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AddAssetsValveMainDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsValveMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + private static AssetsValveMainVmo _last = null; + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsValveMainVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsValveSeriesVmo _series = null; + private HStation.Vmo.AssetsValveMainVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(HStation.Vmo.AssetsValveSeriesVmo series) + { + if (series == null) + { + return; + } + _series = series; + _vmo = new Vmo.AssetsValveMainVmo(); + _vmo.SeriesID = series.ID; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ValveMain); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null); + if (_last != null) + { + this.txtName.EditValue = _last.Name; + this.txtMaterial.EditValue = _last.Material; + this.txtKeyWord.EditValue = KeyWordHelper.ToString(_last.KeyWord); + this.txtCaliber.EditValue = _last.Caliber; + this.txtCoefficient.EditValue = _last.MinorLoss; + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), _last.Flags); + this.txtTagName.EditValue = _last.TagName; + this.txtDescription.EditValue = _last.Description; + } + } + + //楠岃瘉 + private async Task<bool> Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtMaterial.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMaterial, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtCoefficient, "蹇呭~椤�"); + return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.IsExistTagName(tagname)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_series == null) + { + return; + } + if (_vmo == null) + { + return; + } + if (!await Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Material = this.txtMaterial.Text.Trim(); + _vmo.Caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue?.ToString()); + _vmo.MinorLoss = double.Parse(this.txtCoefficient.EditValue?.ToString()); + _vmo.KeyWord = HStation.Service.Assets.KeyWordHelper.ToList(this.txtKeyWord.Text.Trim()); + _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; + _vmo.TagName = this.txtTagName.Text.Trim(); + _vmo.Description = this.txtDescription.Text.Trim(); + + var id = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.GetByID(id); + _last = vmo; + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + + //鑾峰彇鎵�鏈夌郴鏁板垪琛� + private async Task<List<AssetsValveCoefficientVmo>> GetAllFactorList() + { + if (_allFactorList == null) + { + _allFactorList = await BLLFactory<HStation.BLL.AssetsValveCoefficient>.Instance.GetAll(); + if (_allFactorList == null) + { + _allFactorList = new List<AssetsValveCoefficientVmo>(); + } + } + return _allFactorList; + } + + private List<AssetsValveCoefficientVmo> _allFactorList = null; + + //鍖归厤绯绘暟 + private async void MatchingFactor() + { + if (this.txtCoefficient.EditValue == null) + { + var allFactorList = await GetAllFactorList(); + if (allFactorList != null && allFactorList.Count > 0) + { + var material = this.txtMaterial.Text.Trim(); + double? caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue.ToString()); + var factorList = allFactorList.ToList(); + if (!string.IsNullOrEmpty(material)) + { + factorList = factorList.Where(x => !string.IsNullOrEmpty(x.Material) && x.Material.Contains(material)).ToList(); + } + if (caliber.HasValue) + { + factorList = factorList.Where(x => x.Caliber.HasValue && x.Caliber.Value == caliber.Value).ToList(); + } + var factor = factorList.FirstOrDefault(); + if (factor != null) + { + this.txtCoefficient.EditValue = factor.MinorLoss; + } + } + } + } + + private void txtMaterial_EditValueChanged(object sender, EventArgs e) + { + MatchingFactor(); + } + + private void txtCaliber_EditValueChanged(object sender, EventArgs e) + { + MatchingFactor(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AddAssetsCoolingMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.Designer.cs new file mode 100644 index 0000000..0fe7abc --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.Designer.cs @@ -0,0 +1,442 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsValveMainMgrPage + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(AssetsValveMainMgrPage)); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); + ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); + barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); + barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + barBtnInfo = new DevExpress.XtraBars.BarButtonItem(); + barBtnSearch = new DevExpress.XtraBars.BarButtonItem(); + barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + barBtnUp = new DevExpress.XtraBars.BarButtonItem(); + barBtnDown = new DevExpress.XtraBars.BarButtonItem(); + barCkDrag = new DevExpress.XtraBars.BarCheckItem(); + barBtnFactor = new DevExpress.XtraBars.BarButtonItem(); + ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); + ribPageGroupForBasic = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + ribPageGroupForMore = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + panelControl1 = new DevExpress.XtraEditors.PanelControl(); + gridControl1 = new DevExpress.XtraGrid.GridControl(); + assetsValveMainMgrViewModelBindingSource = new BindingSource(components); + gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colID = new DevExpress.XtraGrid.Columns.GridColumn(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); + colCaliber = new DevExpress.XtraGrid.Columns.GridColumn(); + colCoefficient = new DevExpress.XtraGrid.Columns.GridColumn(); + colLowerLimit = new DevExpress.XtraGrid.Columns.GridColumn(); + colKeyWords = new DevExpress.XtraGrid.Columns.GridColumn(); + colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); + colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + colDetail = new DevExpress.XtraGrid.Columns.GridColumn(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + svgImg32 = new DevExpress.Utils.SvgImageCollection(components); + behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); + dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); + ((ISupportInitialize)ribbonControl1).BeginInit(); + ((ISupportInitialize)panelControl1).BeginInit(); + panelControl1.SuspendLayout(); + ((ISupportInitialize)gridControl1).BeginInit(); + ((ISupportInitialize)assetsValveMainMgrViewModelBindingSource).BeginInit(); + ((ISupportInitialize)gridView1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); + ((ISupportInitialize)svgImg32).BeginInit(); + ((ISupportInitialize)behaviorManager1).BeginInit(); + SuspendLayout(); + // + // ribbonControl1 + // + ribbonControl1.ExpandCollapseItem.Id = 0; + ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnDelete, barBtnInfo, barBtnSearch, barBtnRefresh, barBtnUp, barBtnDown, barCkDrag, barBtnFactor }); + ribbonControl1.Location = new Point(1, 1); + ribbonControl1.MaxItemId = 19; + ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); + ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; + ribbonControl1.ShowToolbarCustomizeItem = false; + ribbonControl1.Size = new Size(1107, 128); + ribbonControl1.Toolbar.ShowCustomizeItem = false; + ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barBtnAdd + // + barBtnAdd.Caption = "娣诲姞"; + barBtnAdd.Id = 1; + barBtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAdd.ImageOptions.SvgImage"); + barBtnAdd.Name = "barBtnAdd"; + barBtnAdd.ItemClick += barBtnAdd_ItemClick; + // + // barBtnEdit + // + barBtnEdit.Caption = "缂栬緫"; + barBtnEdit.Id = 2; + barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); + barBtnEdit.Name = "barBtnEdit"; + barBtnEdit.ItemClick += barBtnEdit_ItemClick; + // + // barBtnDelete + // + barBtnDelete.Caption = "鍒犻櫎"; + barBtnDelete.Id = 3; + barBtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDelete.ImageOptions.SvgImage"); + barBtnDelete.Name = "barBtnDelete"; + barBtnDelete.ItemClick += barBtnDelete_ItemClick; + // + // barBtnInfo + // + barBtnInfo.Caption = "璇︾粏淇℃伅"; + barBtnInfo.Id = 4; + barBtnInfo.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnInfo.ImageOptions.SvgImage"); + barBtnInfo.Name = "barBtnInfo"; + barBtnInfo.ItemClick += barBtnInfo_ItemClick; + // + // barBtnSearch + // + barBtnSearch.Caption = "鏌ヨ"; + barBtnSearch.Id = 12; + barBtnSearch.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnSearch.ImageOptions.SvgImage"); + barBtnSearch.Name = "barBtnSearch"; + barBtnSearch.ItemClick += barBtnSearch_ItemClick; + // + // barBtnRefresh + // + barBtnRefresh.Caption = "鍒锋柊"; + barBtnRefresh.Id = 13; + barBtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnRefresh.ImageOptions.SvgImage"); + barBtnRefresh.Name = "barBtnRefresh"; + barBtnRefresh.ItemClick += barBtnRefresh_ItemClick; + // + // barBtnUp + // + barBtnUp.Caption = "涓婄Щ"; + barBtnUp.Id = 14; + barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUp.ImageOptions.SvgImage"); + barBtnUp.Name = "barBtnUp"; + barBtnUp.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; + barBtnUp.ItemClick += barBtnUp_ItemClick; + // + // barBtnDown + // + barBtnDown.Caption = "涓嬬Щ"; + barBtnDown.Id = 15; + barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDown.ImageOptions.SvgImage"); + barBtnDown.Name = "barBtnDown"; + barBtnDown.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; + barBtnDown.ItemClick += barBtnDown_ItemClick; + // + // barCkDrag + // + barCkDrag.Caption = "鎷栨嫿鎺掑簭"; + barCkDrag.Id = 17; + barCkDrag.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCkDrag.ImageOptions.SvgImage"); + barCkDrag.Name = "barCkDrag"; + barCkDrag.CheckedChanged += barCkDrag_CheckedChanged; + // + // barBtnFactor + // + barBtnFactor.Caption = "绯绘暟"; + barBtnFactor.Id = 18; + barBtnFactor.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnFactor.ImageOptions.SvgImage"); + barBtnFactor.Name = "barBtnFactor"; + barBtnFactor.ItemClick += barBtnFactor_ItemClick; + // + // ribbonPage1 + // + ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribPageGroupForBasic, ribbonPageGroup1, ribPageGroupForMore }); + ribbonPage1.Name = "ribbonPage1"; + ribbonPage1.Text = "ribbonPage1"; + // + // ribPageGroupForBasic + // + ribPageGroupForBasic.ItemLinks.Add(barBtnAdd); + ribPageGroupForBasic.ItemLinks.Add(barBtnEdit); + ribPageGroupForBasic.ItemLinks.Add(barBtnDelete); + ribPageGroupForBasic.ItemLinks.Add(barBtnInfo); + ribPageGroupForBasic.Name = "ribPageGroupForBasic"; + ribPageGroupForBasic.Text = "鍩虹"; + // + // ribbonPageGroup1 + // + ribbonPageGroup1.ItemLinks.Add(barCkDrag); + ribbonPageGroup1.ItemLinks.Add(barBtnUp); + ribbonPageGroup1.ItemLinks.Add(barBtnDown); + ribbonPageGroup1.Name = "ribbonPageGroup1"; + ribbonPageGroup1.Text = "鎺掑簭"; + // + // ribPageGroupForMore + // + ribPageGroupForMore.ItemLinks.Add(barBtnFactor); + ribPageGroupForMore.ItemLinks.Add(barBtnSearch); + ribPageGroupForMore.ItemLinks.Add(barBtnRefresh); + ribPageGroupForMore.Name = "ribPageGroupForMore"; + ribPageGroupForMore.Text = "鏇村"; + // + // panelControl1 + // + panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + panelControl1.Controls.Add(gridControl1); + panelControl1.Dock = DockStyle.Fill; + panelControl1.Location = new Point(1, 129); + panelControl1.Name = "panelControl1"; + panelControl1.Padding = new Padding(0, 1, 0, 0); + panelControl1.Size = new Size(1107, 540); + panelControl1.TabIndex = 3; + // + // gridControl1 + // + gridControl1.DataSource = assetsValveMainMgrViewModelBindingSource; + gridControl1.Dock = DockStyle.Fill; + gridControl1.Location = new Point(0, 1); + gridControl1.MainView = gridView1; + gridControl1.MenuManager = ribbonControl1; + gridControl1.Name = "gridControl1"; + gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); + gridControl1.Size = new Size(1107, 539); + gridControl1.TabIndex = 0; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // assetsValveMainMgrViewModelBindingSource + // + assetsValveMainMgrViewModelBindingSource.DataSource = typeof(AssetsValveMainMgrViewModel); + // + // gridView1 + // + behaviorManager1.SetBehaviors(gridView1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.Utils.DragDrop.DragDropBehavior.Create(typeof(DevExpress.XtraGrid.Extensions.ColumnViewDragDropSource), true, true, true, true, dragDropEvents1) }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colID, colName, colMaterial, colCaliber, colCoefficient, colLowerLimit, colKeyWords, colFlags, colTagName, colSortCode, colDescription, colDetail }); + gridView1.GridControl = gridControl1; + gridView1.Name = "gridView1"; + // + // colID + // + colID.FieldName = "ID"; + colID.MaxWidth = 100; + colID.MinWidth = 150; + colID.Name = "colID"; + colID.Width = 100; + // + // colName + // + colName.FieldName = "Name"; + colName.MaxWidth = 100; + colName.MinWidth = 150; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + colName.Width = 150; + // + // colMaterial + // + colMaterial.FieldName = "Material"; + colMaterial.MaxWidth = 100; + colMaterial.MinWidth = 150; + colMaterial.Name = "colMaterial"; + colMaterial.Visible = true; + colMaterial.VisibleIndex = 1; + colMaterial.Width = 150; + // + // colCaliber + // + colCaliber.FieldName = "Caliber"; + colCaliber.MaxWidth = 100; + colCaliber.MinWidth = 100; + colCaliber.Name = "colCaliber"; + colCaliber.Visible = true; + colCaliber.VisibleIndex = 2; + colCaliber.Width = 100; + // + // colCoefficient + // + colCoefficient.FieldName = "Coefficient"; + colCoefficient.MaxWidth = 100; + colCoefficient.MinWidth = 100; + colCoefficient.Name = "colCoefficient"; + colCoefficient.Visible = true; + colCoefficient.VisibleIndex = 3; + colCoefficient.Width = 100; + // + // colLowerLimit + // + colLowerLimit.FieldName = "LowerLimit"; + colLowerLimit.MaxWidth = 100; + colLowerLimit.MinWidth = 100; + colLowerLimit.Name = "colLowerLimit"; + colLowerLimit.Visible = true; + colLowerLimit.VisibleIndex = 4; + colLowerLimit.Width = 100; + // + // colKeyWords + // + colKeyWords.FieldName = "KeyWords"; + colKeyWords.MinWidth = 100; + colKeyWords.Name = "colKeyWords"; + colKeyWords.Visible = true; + colKeyWords.VisibleIndex = 5; + colKeyWords.Width = 100; + // + // colFlags + // + colFlags.FieldName = "Flags"; + colFlags.MinWidth = 100; + colFlags.Name = "colFlags"; + colFlags.Visible = true; + colFlags.VisibleIndex = 6; + colFlags.Width = 100; + // + // colTagName + // + colTagName.FieldName = "TagName"; + colTagName.MinWidth = 100; + colTagName.Name = "colTagName"; + colTagName.Visible = true; + colTagName.VisibleIndex = 7; + colTagName.Width = 100; + // + // colSortCode + // + colSortCode.FieldName = "SortCode"; + colSortCode.MaxWidth = 100; + colSortCode.MinWidth = 100; + colSortCode.Name = "colSortCode"; + colSortCode.Width = 100; + // + // colDescription + // + colDescription.FieldName = "Description"; + colDescription.MinWidth = 100; + colDescription.Name = "colDescription"; + colDescription.Visible = true; + colDescription.VisibleIndex = 8; + colDescription.Width = 100; + // + // colDetail + // + colDetail.Caption = "璇︾粏淇℃伅"; + colDetail.ColumnEdit = repositoryItemButtonEdit1; + colDetail.MaxWidth = 60; + colDetail.MinWidth = 60; + colDetail.Name = "colDetail"; + colDetail.Visible = true; + colDetail.VisibleIndex = 9; + colDetail.Width = 60; + // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(20, 20); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; + // + // svgImg32 + // + svgImg32.ImageSize = new Size(32, 32); + svgImg32.Add("menu", "image://svgimages/pdf viewer/menu.svg"); + // + // dragDropEvents1 + // + dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; + // + // AssetsValveMainMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(panelControl1); + Controls.Add(ribbonControl1); + Name = "AssetsValveMainMgrPage"; + Padding = new Padding(1); + Size = new Size(1109, 670); + ((ISupportInitialize)ribbonControl1).EndInit(); + ((ISupportInitialize)panelControl1).EndInit(); + panelControl1.ResumeLayout(false); + ((ISupportInitialize)gridControl1).EndInit(); + ((ISupportInitialize)assetsValveMainMgrViewModelBindingSource).EndInit(); + ((ISupportInitialize)gridView1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).EndInit(); + ((ISupportInitialize)svgImg32).EndInit(); + ((ISupportInitialize)behaviorManager1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribPageGroupForBasic; + private DevExpress.XtraBars.BarButtonItem barBtnAdd; + private DevExpress.XtraBars.BarButtonItem barBtnEdit; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.BarButtonItem barBtnInfo; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribPageGroupForMore; + private DevExpress.XtraBars.BarButtonItem barBtnSearch; + private DevExpress.XtraBars.BarButtonItem barBtnRefresh; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.Utils.SvgImageCollection svgImg32; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraBars.BarButtonItem barBtnUp; + private DevExpress.XtraBars.BarButtonItem barBtnDown; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colMaterial; + private DevExpress.XtraGrid.Columns.GridColumn colCaliber; + private DevExpress.XtraGrid.Columns.GridColumn colCoefficient; + private DevExpress.XtraGrid.Columns.GridColumn colLowerLimit; + private DevExpress.XtraGrid.Columns.GridColumn colSortCode; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + private DevExpress.XtraGrid.Columns.GridColumn colID; + private DevExpress.XtraGrid.Columns.GridColumn colDetail; + private DevExpress.XtraBars.BarCheckItem barCkDrag; + private DevExpress.XtraBars.BarButtonItem barBtnFactor; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private BindingSource assetsValveMainMgrViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colKeyWords; + private DevExpress.XtraGrid.Columns.GridColumn colFlags; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; + private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; + private DevExpress.Utils.DragDrop.DragDropEvents dragDropEvents1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.cs new file mode 100644 index 0000000..5c545e1 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.cs @@ -0,0 +1,442 @@ +锘縰sing DevExpress.Drawing; +using DevExpress.Utils.DragDrop; +using DevExpress.Utils.Svg; +using DevExpress.XtraEditors; +using DevExpress.XtraTreeList.Nodes; +using HStation.Vmo; +using Yw; +using Yw.WinFrmUI.Page; + +namespace HStation.WinFrmUI +{ + public partial class AssetsValveMainMgrPage : DocumentPage + { + public AssetsValveMainMgrPage() + { + InitializeComponent(); + this.gridView1.SetNormalView(30); + this.PageTitle.Caption = "鍐峰嵈濉斿瀷鍙�"; + this.PageTitle.HeaderSvgImage = this.svgImg32[0]; + this.PageTitle.SvgImageSize = new Size(24, 24); + } + + private AssetsValveSeriesVmo _series = null;//绯诲垪 + private List<AssetsValveMainMgrViewModel> _allBindingList = null;//鏁版嵁缁戝畾鍒楄〃 + private readonly object _locker = new();//閿佸畾瀵硅薄 + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(AssetsValveSeriesVmo series) + { + if (series == null) + { + return; + } + _series = series; + InitialData(); + } + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + InitialData(); + } + + //鍒濆鍖栨暟鎹� + private async void InitialData() + { + if (_series == null) + { + return; + } + var overlay = this.ShowOverlay(); + var allBindingList = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.GetBySeriesID(_series.ID); + _allBindingList = new List<AssetsValveMainMgrViewModel>(); + if (allBindingList != null && allBindingList.Count > 0) + { + foreach (var item in allBindingList) + { + var vm = new AssetsValveMainMgrViewModel(item); + _allBindingList.Add(vm); + } + } + this.assetsValveMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveMainMgrViewModelBindingSource.ResetBindings(false); + overlay.Close(); + SetDragEnable(this.barCkDrag.Checked); + } + + /// <summary> + /// 鍒锋柊鏁版嵁 + /// </summary> + public override void RefreshData() + { + base.RefreshData(); + InitialData(); + } + + //娣诲姞 + private void Add() + { + if (_series == null) + { + return; + } + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栧け璐ワ紒"); + return; + } + var dlg = new AddAssetsValveMainDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsValveMainMgrViewModel(rhs); + _allBindingList.Add(vm); + this.assetsValveMainMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛锛�"); + }; + dlg.SetBindingData(_series); + dlg.ShowDialog(); + } + + //缂栬緫 + private void Edit() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new EditAssetsValveMainDlg(); + dlg.ReloadDataEvent += (rhs) => + { + vm.Reset(rhs); + this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); + TipFormHelper.ShowSucceed("鏇存柊鎴愬姛"); + }; + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //鍒犻櫎 + private async void Delete() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var result = XtraMessageBox.Show("璇烽棶纭鍒犻櫎褰撳墠鏁版嵁鍚楋紵", "璇㈤棶", MessageBoxButtons.YesNo) == DialogResult.Yes; + if (!result) + { + return; + } + var bol = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.DeleteByID(vm.ID); + if (!bol) + { + TipFormHelper.ShowError("鍒犻櫎澶辫触锛�"); + return; + } + _allBindingList.Remove(vm); + this.assetsValveMainMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); + } + + //鏌ョ湅 + private void View() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new ViewAssetsValveMainDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //涓婄Щ + private async void Up() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var rowHandle = this.gridView1.FocusedRowHandle; + if (rowHandle == 0) + { + TipFormHelper.ShowWarn("涓婄Щ澶辫触锛�"); + return; + } + var current = this.gridView1.GetRow(rowHandle) as AssetsValveMainMgrViewModel; + if (current == null) + { + return; + } + var prevHandle = rowHandle - 1; + var prev = this.gridView1.GetRow(prevHandle) as AssetsValveMainMgrViewModel; + if (prev == null) + { + return; + } + var sorters = new List<Yw.Vmo.Sorter>(); + sorters.Add(new Yw.Vmo.Sorter() { ID = current.ID, SortCode = prev.SortCode }); + sorters.Add(new Yw.Vmo.Sorter() { ID = prev.ID, SortCode = current.SortCode }); + var bol = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.UpdateSorter(sorters); + if (!bol) + { + TipFormHelper.ShowError("涓婄Щ澶辫触锛�"); + return; + } + var sortCode = current.SortCode; + current.SortCode = prev.SortCode; + prev.SortCode = sortCode; + _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); + this.assetsValveMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveMainMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = prevHandle; + } + + //涓嬬Щ + private async void Down() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var rowHandle = this.gridView1.FocusedRowHandle; + if (rowHandle == _allBindingList.Count - 1) + { + TipFormHelper.ShowWarn("涓嬬Щ澶辫触锛�"); + return; + } + var current = this.gridView1.GetRow(rowHandle) as AssetsValveMainMgrViewModel; + if (current == null) + { + return; + } + var nextHandle = rowHandle + 1; + var next = this.gridView1.GetRow(nextHandle) as AssetsValveMainMgrViewModel; + if (next == null) + { + return; + } + var sorters = new List<Yw.Vmo.Sorter>(); + sorters.Add(new Yw.Vmo.Sorter() { ID = current.ID, SortCode = next.SortCode }); + sorters.Add(new Yw.Vmo.Sorter() { ID = next.ID, SortCode = current.SortCode }); + var bol = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.UpdateSorter(sorters); + if (!bol) + { + TipFormHelper.ShowError("涓嬬Щ澶辫触锛�"); + return; + } + var sortCode = current.SortCode; + current.SortCode = next.SortCode; + next.SortCode = sortCode; + _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); + this.assetsValveMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveMainMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = nextHandle; + } + + #region 褰撳墠 + + //鑾峰彇褰撳墠 + private AssetsValveMainMgrViewModel GetCurrentViewModel() + { + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栭敊璇紒"); + return null; + } + if (_allBindingList.Count < 1) + { + TipFormHelper.ShowInfo("鏃犳暟鎹紒"); + return null; + } + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛岋紒"); + return null; + } + return vm; + } + + #endregion 褰撳墠 + + #region Ribbon + + //娣诲姞 + private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Add(); + } + + //缂栬緫 + private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Edit(); + } + + //鍒犻櫎 + private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Delete(); + } + + //璇︾粏淇℃伅 + private void barBtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + View(); + } + + //涓婄Щ + private void barBtnUp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Up(); + } + + //涓嬬Щ + private void barBtnDown_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Down(); + } + + //鏌ヨ + private void barBtnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.gridView1.OptionsFind.AlwaysVisible = !this.gridView1.OptionsFind.AlwaysVisible; + } + + //鍒锋柊 + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.RefreshData(); + } + + #endregion Ribbon + + //绯绘暟 + private void barBtnFactor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + lock (_locker) + { + var guid = new PageGuid() + { + Modular = AssetsFunctionHelper.Modular, + MoudingType = eMoudingType.Tab, + Function = AssetsFunctionHelper.ValveFactorMgr, + TagName = string.Empty + }; + if (!IsExistPage(guid, true)) + { + var page = new AssetsValveFactorMgrPage(); + CreatePage(page, guid); + } + } + } + + private async void dragDropEvents1_DragDrop(object sender, DevExpress.Utils.DragDrop.DragDropEventArgs e) + { + var indexs = e.Data as int[]; + if (indexs == null || indexs.Length < 1) + { + e.Handled = true; + return; + } + var sourceIndex = indexs[0]; + var sourceObj = this.gridView1.GetRow(sourceIndex) as AssetsValveMainMgrViewModel; + if (sourceObj == null) + { + e.Handled = true; + return; + } + + var destIndex = this.gridView1.GetRowHandleByCP(e.Location); + if (destIndex < 0) + { + e.Handled = true; + return; + } + + var destObj = this.gridView1.GetRow(destIndex) as AssetsValveMainMgrViewModel; + if (destObj == null) + { + e.Handled = true; + return; + } + + var sorters = new List<Yw.Vmo.Sorter>(); + + if (e.InsertType == InsertType.Before) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = sourceObj.ID, SortCode = destObj.SortCode }); + _allBindingList.ForEach(x => + { + if (x.SortCode >= destObj.SortCode) + { + if (x != sourceObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + }); + } + else if (e.InsertType == InsertType.After) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = sourceObj.ID, SortCode = destObj.SortCode + 1 }); + _allBindingList.ForEach(x => + { + if (x.SortCode > destObj.SortCode) + { + if (x != sourceObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + }); + } + else + { + e.Handled = true; + return; + } + + var bll = BLLFactory<HStation.BLL.AssetsValveMain>.Instance; + var bol = await bll.UpdateSorter(sorters); + if (!bol) + { + e.Handled = true; + return; + } + + _allBindingList.ForEach(x => + { + var sorter = sorters.Find(t => t.ID == x.ID); + if (sorter != null) + { + x.SortCode = sorter.SortCode; + } + }); + } + + private void barCkDrag_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetDragEnable(this.barCkDrag.Checked); + } + + //璁剧疆鎷栨嫿鍙敤鎬� + private void SetDragEnable(bool allowArag) + { + var be = this.behaviorManager1.GetBehavior<DevExpress.Utils.DragDrop.DragDropBehavior>(this.gridView1); + be.Properties.AllowDrag = allowArag; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.resx new file mode 100644 index 0000000..214ae2c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrPage.resx @@ -0,0 +1,359 @@ +锘�<?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> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barBtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnEdit.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 + cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog + TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu + OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt + MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 + LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw + LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x + NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 + LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu + MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu + NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw + YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu + NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy + NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnInfo.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnSearch.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barBtnRefresh.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2hhbmdlVmlldyI+DQogICAgPHBh + dGggZD0iTTI0LjUsNy41QzIyLjMsNS4zLDE5LjMsNCwxNiw0QzEwLjEsNCw1LjEsOC4zLDQuMiwxNGg0 + LjFjMC45LTMuNCw0LTYsNy43LTZjMi4yLDAsNC4yLDAuOSw1LjYsMi40TDE4LDE0ICAgaDUuN2g0LjFI + MjhWNEwyNC41LDcuNXogTTE2LDI0Yy0yLjIsMC00LjItMC45LTUuNi0yLjRMMTQsMThIOC4yaC00SDR2 + MTBsMy41LTMuNUM5LjcsMjYuNywxMi43LDI4LDE2LDI4YzUuOSwwLDEwLjgtNC4zLDExLjgtMTAgICBo + LTQuMUMyMi44LDIxLjQsMTkuNywyNCwxNiwyNHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <data name="barBtnUp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIoBAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z + dHlsZT4NCiAgPHBvbHlnb24gcG9pbnRzPSIyMCwzMCAxMiwzMCAxMiwxNCA0LDE0IDE2LDIgMjgsMTQg + MjAsMTQgIiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnDown.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkBAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z + dHlsZT4NCiAgPHBvbHlnb24gcG9pbnRzPSIxMiwyIDIwLDIgMjAsMTggMjgsMTggMTYsMzAgNCwxOCAx + MiwxOCAiIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barCkDrag.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAMDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUmV2ZXJzU29ydCI+DQogICAgPHBv + bHlnb24gcG9pbnRzPSIyNCw0IDIwLDQgMjAsMjAgMTYsMjAgMjIsMjggMjgsMjAgMjQsMjAgICIgY2xh + c3M9IkJsdWUiIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxMCw0IDQsMTIgOCwxMiA4LDI4IDEyLDI4 + IDEyLDEyIDE2LDEyICAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnFactor.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJgEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iVG9wXzEwX1BlcmNlbnQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpu + ZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tmaWxsOiM3Mjcy + NzI7fQoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cjwvc3R5bGU+DQogIDxwYXRoIGQ9Ik0zMSwySDFDMC41 + LDIsMCwyLjUsMCwzdjI0YzAsMC41LDAuNSwxLDEsMWgzMGMwLjUsMCwxLTAuNSwxLTFWM0MzMiwyLjUs + MzEuNSwyLDMxLDJ6IE04LDEydjEwSDZWMTJIM2w0LTYgIGw0LDZIOHogTTMwLDI2SDE0VjRoMTZWMjZ6 + IiBjbGFzcz0iR3JlZW4iIC8+DQogIDxwYXRoIGQ9Ik0xOC42LDE1LjFjLTAuOCwwLTEuNC0wLjItMS45 + LTAuN2MtMC41LTAuNC0wLjctMS0wLjctMS44YzAtMC44LDAuMi0xLjUsMC43LTEuOXMxLjItMC43LDIt + MC43ICBjMC44LDAsMS40LDAuMiwxLjksMC42YzAuNCwwLjQsMC43LDEsMC43LDEuOGMwLDAuOC0wLjIs + MS40LTAuNywxLjlDMjAsMTQuOCwxOS40LDE1LjEsMTguNiwxNS4xeiBNMjYsMTBsLTYuMiwxMEgxOGw2 + LjItMTBIMjZ6ICAgTTE4LjcsMTEuMmMtMC43LDAtMS4xLDAuNS0xLjEsMS40YzAsMC45LDAuMywxLjMs + MSwxLjNjMC43LDAsMS4xLTAuNSwxLjEtMS40QzE5LjcsMTEuNiwxOS40LDExLjIsMTguNywxMS4yeiBN + MjUuMywyMCAgYy0wLjgsMC0xLjQtMC4yLTEuOS0wLjdzLTAuNy0xLTAuNy0xLjhjMC0wLjgsMC4yLTEu + NSwwLjctMS45YzAuNS0wLjUsMS4yLTAuNywyLTAuN2MwLjgsMCwxLjQsMC4yLDEuOSwwLjZzMC43LDEs + MC43LDEuOCAgYzAsMC44LTAuMiwxLjQtMC43LDEuOUMyNi44LDE5LjgsMjYuMSwyMCwyNS4zLDIweiBN + MjUuNCwxNi4xYy0wLjcsMC0xLjEsMC41LTEuMSwxLjRjMCwwLjksMC40LDEuMywxLjEsMS4zYzAuNyww + LDEuMS0wLjUsMS4xLTEuNCAgYzAtMC40LTAuMS0wLjctMC4zLTFDMjYsMTYuMiwyNS43LDE2LjEsMjUu + NCwxNi4xeiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw== +</value> + </data> + <metadata name="assetsCoolingMainMgrViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>417, 17</value> + </metadata> + <metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>756, 17</value> + </metadata> + <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <metadata name="svgImg32.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>305, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrViewModel.cs new file mode 100644 index 0000000..d18ab1e --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/AssetsCoolingMainMgrViewModel.cs @@ -0,0 +1,135 @@ +锘縰sing HStation.Service.Assets; + +namespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsValveMainMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsValveMainMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsValveMainMgrViewModel(HStation.Vmo.AssetsValveMainVmo rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.KeyWords = KeyWordHelper.ToString(rhs.KeyWords); + this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); + this.TagName = rhs.TagName; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// + /// </summary> + public void Reset(HStation.Vmo.AssetsValveMainVmo rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.KeyWords = KeyWordHelper.ToString(rhs.KeyWords); + this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); + this.TagName = rhs.TagName; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// id + /// </summary> + [Display(Name = "ID")] + public long ID { get; set; } + + /// <summary> + /// 绯诲垪id + /// </summary> + [Display(Name = "绯诲垪ID")] + public long SeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [Display(Name = "鏉愭枡")] + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + [Display(Name = "鍙e緞(mm)")] + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Display(Name = "鍠峰皠绯绘暟")] + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� + /// </summary> + [Display(Name = "鏈�灏忓帇鍔�(m)")] + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + [Display(Name = "鍏抽敭瀛�")] + public string KeyWords { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + [Display(Name = "鏍囩")] + public string Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + [Display(Name = "鏍囧織")] + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode + { + get { return this.Vmo.SortCode; } + set { this.Vmo.SortCode = value; } + } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public HStation.Vmo.AssetsValveMainVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.Designer.cs new file mode 100644 index 0000000..aee9e77 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.Designer.cs @@ -0,0 +1,366 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class EditAssetsValveMainDlg + { + /// <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 Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtLowerLimit = new DevExpress.XtraEditors.TextEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtLowerLimit.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + ((ISupportInitialize)layoutControlItem10).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtLowerLimit); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(665, 381); + layoutControl1.TabIndex = 1; + layoutControl1.Text = "layoutControl1"; + // + // txtKeyWord + // + txtKeyWord.Location = new Point(405, 12); + txtKeyWord.Name = "txtKeyWord"; + txtKeyWord.Properties.NullValuePrompt = ",鍒嗛殧锛屼緥濡� A,B"; + txtKeyWord.Size = new Size(248, 20); + txtKeyWord.StyleController = layoutControl1; + txtKeyWord.TabIndex = 2; + // + // txtTagName + // + txtTagName.Location = new Point(405, 84); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(248, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 8; + // + // setFlagsEditCtrl1 + // + setFlagsEditCtrl1.Location = new Point(83, 84); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(247, 20); + setFlagsEditCtrl1.TabIndex = 7; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 343); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(641, 26); + generalOkAndCancelCtrl1.TabIndex = 10; + // + // txtDescription + // + txtDescription.Location = new Point(83, 108); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(570, 231); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 9; + // + // txtLowerLimit + // + txtLowerLimit.Location = new Point(405, 60); + txtLowerLimit.Name = "txtLowerLimit"; + txtLowerLimit.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtLowerLimit.Properties.DisplayFormat.FormatString = "{0}m"; + txtLowerLimit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtLowerLimit.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtLowerLimit.Properties.NullValuePrompt = "m"; + txtLowerLimit.Size = new Size(248, 20); + txtLowerLimit.StyleController = layoutControl1; + txtLowerLimit.TabIndex = 6; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(83, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Size = new Size(247, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(405, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Size = new Size(248, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(83, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(247, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(83, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(247, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem2, layoutControlItem6, layoutControlItem7, layoutControlItem8, layoutControlItem9, layoutControlItem10 }); + Root.Name = "Root"; + Root.Size = new Size(665, 381); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(322, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(322, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(323, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(322, 24); + layoutControlItem4.Text = "<color=red>*</color>娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem5 + // + layoutControlItem5.AllowHtmlStringInCaption = true; + layoutControlItem5.Control = txtLowerLimit; + layoutControlItem5.Location = new Point(322, 48); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(323, 24); + layoutControlItem5.Text = "<color=red>*</color>鏈�灏忓帇鍔�:"; + layoutControlItem5.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(322, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 96); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(645, 235); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 331); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(645, 30); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; + // + // layoutControlItem8 + // + layoutControlItem8.Control = setFlagsEditCtrl1; + layoutControlItem8.Location = new Point(0, 72); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(322, 24); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(59, 14); + // + // layoutControlItem9 + // + layoutControlItem9.Control = txtTagName; + layoutControlItem9.Location = new Point(322, 72); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(323, 24); + layoutControlItem9.Text = "鏍囧織:"; + layoutControlItem9.TextSize = new Size(59, 14); + // + // layoutControlItem10 + // + layoutControlItem10.Control = txtKeyWord; + layoutControlItem10.Location = new Point(322, 0); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(323, 24); + layoutControlItem10.Text = "鍏抽敭瀛�:"; + layoutControlItem10.TextSize = new Size(59, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // EditAssetsValveMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(665, 381); + Controls.Add(layoutControl1); + Name = "EditAssetsValveMainDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtLowerLimit.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ((ISupportInitialize)layoutControlItem10).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private SetFlagsEditCtrl setFlagsEditCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.TextEdit txtKeyWord; + private DevExpress.XtraEditors.TextEdit txtTagName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.cs new file mode 100644 index 0000000..2a8478a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.cs @@ -0,0 +1,124 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.Vmo; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class EditAssetsValveMainDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsValveMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsValveMainVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsValveMainVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(HStation.Vmo.AssetsValveMainVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new Vmo.AssetsValveMainVmo(vmo); + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtCaliber.EditValue = vmo.Caliber; + this.txtCoefficient.EditValue = vmo.Coefficient; + this.txtLowerLimit.EditValue = vmo.LowerLimit; + this.txtKeyWord.EditValue = HStation.Service.Assets.KeyWordHelper.ToString(vmo.KeyWords); + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ValveMain); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; + } + + //楠岃瘉 + private async Task<bool> Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtMaterial.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMaterial, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtCoefficient, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtLowerLimit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtLowerLimit, "蹇呭~椤�"); + return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.IsExistTagNameExceptID(tagname, _vmo.ID)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_vmo == null) + { + return; + } + if (!await Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Material = this.txtMaterial.Text.Trim(); + _vmo.Caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue?.ToString()); + _vmo.Coefficient = double.Parse(this.txtCoefficient.EditValue?.ToString()); + _vmo.LowerLimit = double.Parse(this.txtLowerLimit.EditValue?.ToString()); + _vmo.KeyWords = HStation.Service.Assets.KeyWordHelper.ToList(this.txtKeyWord.Text.Trim()); + _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; + _vmo.TagName = this.txtTagName.Text.Trim(); + _vmo.Description = this.txtDescription.Text.Trim(); + + var bol = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.GetByID(_vmo.ID); + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/EditAssetsCoolingMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.Designer.cs new file mode 100644 index 0000000..7a09eea --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.Designer.cs @@ -0,0 +1,344 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsValveMainDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtLowerLimit = new DevExpress.XtraEditors.TextEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + txtFlags = new DevExpress.XtraEditors.TextEdit(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtLowerLimit.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)layoutControlItem10).BeginInit(); + ((ISupportInitialize)txtFlags.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(txtFlags); + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtLowerLimit); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(665, 381); + layoutControl1.TabIndex = 1; + layoutControl1.Text = "layoutControl1"; + // + // txtKeyWord + // + txtKeyWord.Location = new Point(398, 12); + txtKeyWord.Name = "txtKeyWord"; + txtKeyWord.Properties.ReadOnly = true; + txtKeyWord.Properties.UseReadOnlyAppearance = false; + txtKeyWord.Size = new Size(255, 20); + txtKeyWord.StyleController = layoutControl1; + txtKeyWord.TabIndex = 2; + // + // txtDescription + // + txtDescription.Location = new Point(76, 108); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(577, 261); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 9; + // + // txtLowerLimit + // + txtLowerLimit.Location = new Point(398, 60); + txtLowerLimit.Name = "txtLowerLimit"; + txtLowerLimit.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtLowerLimit.Properties.DisplayFormat.FormatString = "{0}m"; + txtLowerLimit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtLowerLimit.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtLowerLimit.Properties.NullValuePrompt = "m"; + txtLowerLimit.Properties.ReadOnly = true; + txtLowerLimit.Properties.UseReadOnlyAppearance = false; + txtLowerLimit.Size = new Size(255, 20); + txtLowerLimit.StyleController = layoutControl1; + txtLowerLimit.TabIndex = 6; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(76, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Properties.ReadOnly = true; + txtCoefficient.Properties.UseReadOnlyAppearance = false; + txtCoefficient.Size = new Size(254, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(398, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Properties.ReadOnly = true; + txtCaliber.Properties.UseReadOnlyAppearance = false; + txtCaliber.Size = new Size(255, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(76, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Properties.ReadOnly = true; + txtMaterial.Properties.UseReadOnlyAppearance = false; + txtMaterial.Size = new Size(254, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(76, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Properties.ReadOnly = true; + txtName.Properties.UseReadOnlyAppearance = false; + txtName.Size = new Size(254, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem2, layoutControlItem6, layoutControlItem8, layoutControlItem9, layoutControlItem10 }); + Root.Name = "Root"; + Root.Size = new Size(665, 381); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(322, 24); + layoutControlItem1.Text = "鍚嶇О:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(322, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(323, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(322, 24); + layoutControlItem4.Text = "娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(52, 14); + // + // layoutControlItem5 + // + layoutControlItem5.Control = txtLowerLimit; + layoutControlItem5.Location = new Point(322, 48); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(323, 24); + layoutControlItem5.Text = "鏈�灏忓帇鍔�:"; + layoutControlItem5.TextSize = new Size(52, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(322, 24); + layoutControlItem2.Text = "鏉愯川:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 96); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(645, 265); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // layoutControlItem10 + // + layoutControlItem10.Control = txtKeyWord; + layoutControlItem10.Location = new Point(322, 0); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(323, 24); + layoutControlItem10.Text = "鍏抽敭瀛�:"; + layoutControlItem10.TextSize = new Size(52, 14); + // + // txtFlags + // + txtFlags.Location = new Point(76, 84); + txtFlags.Name = "txtFlags"; + txtFlags.Properties.ReadOnly = true; + txtFlags.Properties.UseReadOnlyAppearance = false; + txtFlags.Size = new Size(254, 20); + txtFlags.StyleController = layoutControl1; + txtFlags.TabIndex = 7; + // + // layoutControlItem8 + // + layoutControlItem8.Control = txtFlags; + layoutControlItem8.Location = new Point(0, 72); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(322, 24); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(52, 14); + // + // txtTagName + // + txtTagName.Location = new Point(398, 84); + txtTagName.Name = "txtTagName"; + txtTagName.Properties.ReadOnly = true; + txtTagName.Properties.UseReadOnlyAppearance = false; + txtTagName.Size = new Size(255, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 8; + // + // layoutControlItem9 + // + layoutControlItem9.Control = txtTagName; + layoutControlItem9.Location = new Point(322, 72); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(323, 24); + layoutControlItem9.Text = "鏍囧織:"; + layoutControlItem9.TextSize = new Size(52, 14); + // + // ViewAssetsValveMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(665, 381); + Controls.Add(layoutControl1); + Name = "ViewAssetsValveMainDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "璇︾粏淇℃伅"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtLowerLimit.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)layoutControlItem10).EndInit(); + ((ISupportInitialize)txtFlags.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraEditors.TextEdit txtKeyWord; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraEditors.TextEdit txtTagName; + private DevExpress.XtraEditors.TextEdit txtFlags; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.cs new file mode 100644 index 0000000..aec85d5 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.cs @@ -0,0 +1,47 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class ViewAssetsValveMainDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsValveMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private HStation.Vmo.AssetsValveMainVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsValveMainVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = vmo; + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtCaliber.EditValue = vmo.Caliber; + this.txtCoefficient.EditValue = vmo.Coefficient; + this.txtLowerLimit.EditValue = vmo.LowerLimit; + this.txtKeyWord.EditValue = HStation.Service.Assets.KeyWordHelper.ToString(vmo.KeyWords); + this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/02-main/ViewAssetsCoolingMainDlg.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.Designer.cs new file mode 100644 index 0000000..e6ed528 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.Designer.cs @@ -0,0 +1,302 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AddAssetsValveFactorDlg + { + /// <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 Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtLowerLimit = new DevExpress.XtraEditors.TextEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtLowerLimit.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)emptySpaceItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtLowerLimit); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(525, 316); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 278); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(501, 26); + generalOkAndCancelCtrl1.TabIndex = 8; + // + // txtDescription + // + txtDescription.Location = new Point(83, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(430, 190); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtLowerLimit + // + txtLowerLimit.Location = new Point(335, 60); + txtLowerLimit.Name = "txtLowerLimit"; + txtLowerLimit.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtLowerLimit.Properties.DisplayFormat.FormatString = "{0}m"; + txtLowerLimit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtLowerLimit.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtLowerLimit.Properties.NullValuePrompt = "m"; + txtLowerLimit.Size = new Size(178, 20); + txtLowerLimit.StyleController = layoutControl1; + txtLowerLimit.TabIndex = 6; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(83, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Size = new Size(177, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(335, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Size = new Size(178, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(83, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(177, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(83, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(177, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem2, layoutControlItem6, emptySpaceItem1, layoutControlItem7 }); + Root.Name = "Root"; + Root.Size = new Size(525, 316); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(252, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(252, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(253, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(252, 24); + layoutControlItem4.Text = "<color=red>*</color>娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem5 + // + layoutControlItem5.AllowHtmlStringInCaption = true; + layoutControlItem5.Control = txtLowerLimit; + layoutControlItem5.Location = new Point(252, 48); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(253, 24); + layoutControlItem5.Text = "<color=red>*</color>鏈�灏忓帇鍔�:"; + layoutControlItem5.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(252, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 72); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 194); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(252, 0); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(253, 24); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 266); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(505, 30); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // AddAssetsValveFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "AddAssetsValveFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtLowerLimit.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)emptySpaceItem1).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.cs new file mode 100644 index 0000000..09387a0 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.cs @@ -0,0 +1,105 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.Vmo; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AddAssetsValveFactorDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsValveFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + private static AssetsValveCoefficientVmo _last = null; + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsValveCoefficientVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsValveCoefficientVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData() + { + _vmo = new Vmo.AssetsValveCoefficientVmo(); + if (_last != null) + { + this.txtName.EditValue = _last.Name; + this.txtMaterial.EditValue = _last.Material; + this.txtCaliber.EditValue = _last.Caliber; + this.txtCoefficient.EditValue = _last.MinorLoss; + } + } + + //楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtMaterial.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMaterial, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtCoefficient, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtLowerLimit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtLowerLimit, "蹇呭~椤�"); + return false; + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_vmo == null) + { + return; + } + if (!Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Material = this.txtMaterial.Text.Trim(); + _vmo.Caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue?.ToString()); + _vmo.MinorLoss = double.Parse(this.txtCoefficient.EditValue?.ToString()); + var id = await BLLFactory<HStation.BLL.AssetsValveCoefficient>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveCoefficient>.Instance.GetByID(id); + _last = vmo; + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AddAssetsCoolingFactorDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.Designer.cs new file mode 100644 index 0000000..c58c3c9 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.Designer.cs @@ -0,0 +1,399 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsValveFactorMgrPage + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(AssetsValveFactorMgrPage)); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); + ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); + barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); + barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + barBtnInfo = new DevExpress.XtraBars.BarButtonItem(); + barBtnSearch = new DevExpress.XtraBars.BarButtonItem(); + barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); + barBtnUp = new DevExpress.XtraBars.BarButtonItem(); + barBtnDown = new DevExpress.XtraBars.BarButtonItem(); + barCkDrag = new DevExpress.XtraBars.BarCheckItem(); + ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); + ribPageGroupForBasic = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + ribPageGroupForMore = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + panelControl1 = new DevExpress.XtraEditors.PanelControl(); + gridControl1 = new DevExpress.XtraGrid.GridControl(); + assetsValveFactorMgrViewModelBindingSource = new BindingSource(components); + gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colID = new DevExpress.XtraGrid.Columns.GridColumn(); + colName = new DevExpress.XtraGrid.Columns.GridColumn(); + colMaterial = new DevExpress.XtraGrid.Columns.GridColumn(); + colCaliber = new DevExpress.XtraGrid.Columns.GridColumn(); + colCoefficient = new DevExpress.XtraGrid.Columns.GridColumn(); + colLowerLimit = new DevExpress.XtraGrid.Columns.GridColumn(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + colDetail = new DevExpress.XtraGrid.Columns.GridColumn(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + svgImg32 = new DevExpress.Utils.SvgImageCollection(components); + behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); + dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); + ((ISupportInitialize)ribbonControl1).BeginInit(); + ((ISupportInitialize)panelControl1).BeginInit(); + panelControl1.SuspendLayout(); + ((ISupportInitialize)gridControl1).BeginInit(); + ((ISupportInitialize)assetsValveFactorMgrViewModelBindingSource).BeginInit(); + ((ISupportInitialize)gridView1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); + ((ISupportInitialize)svgImg32).BeginInit(); + ((ISupportInitialize)behaviorManager1).BeginInit(); + SuspendLayout(); + // + // ribbonControl1 + // + ribbonControl1.ExpandCollapseItem.Id = 0; + ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnDelete, barBtnInfo, barBtnSearch, barBtnRefresh, barBtnUp, barBtnDown, barCkDrag }); + ribbonControl1.Location = new Point(1, 1); + ribbonControl1.MaxItemId = 18; + ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); + ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; + ribbonControl1.ShowToolbarCustomizeItem = false; + ribbonControl1.Size = new Size(996, 128); + ribbonControl1.Toolbar.ShowCustomizeItem = false; + ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barBtnAdd + // + barBtnAdd.Caption = "娣诲姞"; + barBtnAdd.Id = 1; + barBtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAdd.ImageOptions.SvgImage"); + barBtnAdd.Name = "barBtnAdd"; + barBtnAdd.ItemClick += barBtnAdd_ItemClick; + // + // barBtnEdit + // + barBtnEdit.Caption = "缂栬緫"; + barBtnEdit.Id = 2; + barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); + barBtnEdit.Name = "barBtnEdit"; + barBtnEdit.ItemClick += barBtnEdit_ItemClick; + // + // barBtnDelete + // + barBtnDelete.Caption = "鍒犻櫎"; + barBtnDelete.Id = 3; + barBtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDelete.ImageOptions.SvgImage"); + barBtnDelete.Name = "barBtnDelete"; + barBtnDelete.ItemClick += barBtnDelete_ItemClick; + // + // barBtnInfo + // + barBtnInfo.Caption = "璇︾粏淇℃伅"; + barBtnInfo.Id = 4; + barBtnInfo.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnInfo.ImageOptions.SvgImage"); + barBtnInfo.Name = "barBtnInfo"; + barBtnInfo.ItemClick += barBtnInfo_ItemClick; + // + // barBtnSearch + // + barBtnSearch.Caption = "鏌ヨ"; + barBtnSearch.Id = 12; + barBtnSearch.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnSearch.ImageOptions.SvgImage"); + barBtnSearch.Name = "barBtnSearch"; + barBtnSearch.ItemClick += barBtnSearch_ItemClick; + // + // barBtnRefresh + // + barBtnRefresh.Caption = "鍒锋柊"; + barBtnRefresh.Id = 13; + barBtnRefresh.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnRefresh.ImageOptions.SvgImage"); + barBtnRefresh.Name = "barBtnRefresh"; + barBtnRefresh.ItemClick += barBtnRefresh_ItemClick; + // + // barBtnUp + // + barBtnUp.Caption = "涓婄Щ"; + barBtnUp.Id = 14; + barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUp.ImageOptions.SvgImage"); + barBtnUp.Name = "barBtnUp"; + barBtnUp.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; + barBtnUp.ItemClick += barBtnUp_ItemClick; + // + // barBtnDown + // + barBtnDown.Caption = "涓嬬Щ"; + barBtnDown.Id = 15; + barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDown.ImageOptions.SvgImage"); + barBtnDown.Name = "barBtnDown"; + barBtnDown.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; + barBtnDown.ItemClick += barBtnDown_ItemClick; + // + // barCkDrag + // + barCkDrag.Caption = "鎷栨嫿鎺掑簭"; + barCkDrag.Id = 17; + barCkDrag.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCkDrag.ImageOptions.SvgImage"); + barCkDrag.Name = "barCkDrag"; + barCkDrag.CheckedChanged += barCkDrag_CheckedChanged; + // + // ribbonPage1 + // + ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribPageGroupForBasic, ribbonPageGroup1, ribPageGroupForMore }); + ribbonPage1.Name = "ribbonPage1"; + ribbonPage1.Text = "ribbonPage1"; + // + // ribPageGroupForBasic + // + ribPageGroupForBasic.ItemLinks.Add(barBtnAdd); + ribPageGroupForBasic.ItemLinks.Add(barBtnEdit); + ribPageGroupForBasic.ItemLinks.Add(barBtnDelete); + ribPageGroupForBasic.ItemLinks.Add(barBtnInfo); + ribPageGroupForBasic.Name = "ribPageGroupForBasic"; + ribPageGroupForBasic.Text = "鍩虹"; + // + // ribbonPageGroup1 + // + ribbonPageGroup1.ItemLinks.Add(barCkDrag); + ribbonPageGroup1.ItemLinks.Add(barBtnUp); + ribbonPageGroup1.ItemLinks.Add(barBtnDown); + ribbonPageGroup1.Name = "ribbonPageGroup1"; + ribbonPageGroup1.Text = "鎺掑簭"; + // + // ribPageGroupForMore + // + ribPageGroupForMore.ItemLinks.Add(barBtnSearch); + ribPageGroupForMore.ItemLinks.Add(barBtnRefresh); + ribPageGroupForMore.Name = "ribPageGroupForMore"; + ribPageGroupForMore.Text = "鏇村"; + // + // panelControl1 + // + panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + panelControl1.Controls.Add(gridControl1); + panelControl1.Dock = DockStyle.Fill; + panelControl1.Location = new Point(1, 129); + panelControl1.Name = "panelControl1"; + panelControl1.Padding = new Padding(0, 1, 0, 0); + panelControl1.Size = new Size(996, 540); + panelControl1.TabIndex = 3; + // + // gridControl1 + // + gridControl1.DataSource = assetsValveFactorMgrViewModelBindingSource; + gridControl1.Dock = DockStyle.Fill; + gridControl1.Location = new Point(0, 1); + gridControl1.MainView = gridView1; + gridControl1.MenuManager = ribbonControl1; + gridControl1.Name = "gridControl1"; + gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); + gridControl1.Size = new Size(996, 539); + gridControl1.TabIndex = 0; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // assetsValveFactorMgrViewModelBindingSource + // + assetsValveFactorMgrViewModelBindingSource.DataSource = typeof(AssetsValveFactorMgrViewModel); + // + // gridView1 + // + behaviorManager1.SetBehaviors(gridView1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.Utils.DragDrop.DragDropBehavior.Create(typeof(DevExpress.XtraGrid.Extensions.ColumnViewDragDropSource), true, true, true, true, dragDropEvents1) }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colID, colName, colMaterial, colCaliber, colCoefficient, colLowerLimit, colSortCode, colDescription, colDetail }); + gridView1.GridControl = gridControl1; + gridView1.Name = "gridView1"; + gridView1.RowCellClick += gridView1_RowCellClick; + // + // colID + // + colID.FieldName = "ID"; + colID.MaxWidth = 100; + colID.MinWidth = 150; + colID.Name = "colID"; + colID.Width = 150; + // + // colName + // + colName.FieldName = "Name"; + colName.MaxWidth = 100; + colName.MinWidth = 150; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + colName.Width = 150; + // + // colMaterial + // + colMaterial.FieldName = "Material"; + colMaterial.MaxWidth = 100; + colMaterial.MinWidth = 150; + colMaterial.Name = "colMaterial"; + colMaterial.Visible = true; + colMaterial.VisibleIndex = 1; + colMaterial.Width = 150; + // + // colCaliber + // + colCaliber.FieldName = "Caliber"; + colCaliber.MaxWidth = 100; + colCaliber.MinWidth = 100; + colCaliber.Name = "colCaliber"; + colCaliber.Visible = true; + colCaliber.VisibleIndex = 2; + colCaliber.Width = 100; + // + // colCoefficient + // + colCoefficient.FieldName = "Coefficient"; + colCoefficient.MaxWidth = 100; + colCoefficient.MinWidth = 100; + colCoefficient.Name = "colCoefficient"; + colCoefficient.Visible = true; + colCoefficient.VisibleIndex = 3; + colCoefficient.Width = 100; + // + // colLowerLimit + // + colLowerLimit.FieldName = "LowerLimit"; + colLowerLimit.MaxWidth = 100; + colLowerLimit.MinWidth = 100; + colLowerLimit.Name = "colLowerLimit"; + colLowerLimit.Visible = true; + colLowerLimit.VisibleIndex = 4; + colLowerLimit.Width = 100; + // + // colSortCode + // + colSortCode.FieldName = "SortCode"; + colSortCode.MaxWidth = 100; + colSortCode.MinWidth = 100; + colSortCode.Name = "colSortCode"; + colSortCode.Width = 100; + // + // colDescription + // + colDescription.FieldName = "Description"; + colDescription.MinWidth = 100; + colDescription.Name = "colDescription"; + colDescription.Visible = true; + colDescription.VisibleIndex = 5; + colDescription.Width = 100; + // + // colDetail + // + colDetail.Caption = "璇︾粏淇℃伅"; + colDetail.ColumnEdit = repositoryItemButtonEdit1; + colDetail.MaxWidth = 60; + colDetail.MinWidth = 60; + colDetail.Name = "colDetail"; + colDetail.Visible = true; + colDetail.VisibleIndex = 6; + colDetail.Width = 60; + // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(20, 20); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; + // + // svgImg32 + // + svgImg32.ImageSize = new Size(32, 32); + svgImg32.Add("top10percent", "image://svgimages/spreadsheet/top10percent.svg"); + // + // dragDropEvents1 + // + dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; + // + // AssetsValveFactorMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(panelControl1); + Controls.Add(ribbonControl1); + Name = "AssetsValveFactorMgrPage"; + Padding = new Padding(1); + Size = new Size(998, 670); + ((ISupportInitialize)ribbonControl1).EndInit(); + ((ISupportInitialize)panelControl1).EndInit(); + panelControl1.ResumeLayout(false); + ((ISupportInitialize)gridControl1).EndInit(); + ((ISupportInitialize)assetsValveFactorMgrViewModelBindingSource).EndInit(); + ((ISupportInitialize)gridView1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).EndInit(); + ((ISupportInitialize)svgImg32).EndInit(); + ((ISupportInitialize)behaviorManager1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribPageGroupForBasic; + private DevExpress.XtraBars.BarButtonItem barBtnAdd; + private DevExpress.XtraBars.BarButtonItem barBtnEdit; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.BarButtonItem barBtnInfo; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribPageGroupForMore; + private DevExpress.XtraBars.BarButtonItem barBtnSearch; + private DevExpress.XtraBars.BarButtonItem barBtnRefresh; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.Utils.SvgImageCollection svgImg32; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraBars.BarButtonItem barBtnUp; + private DevExpress.XtraBars.BarButtonItem barBtnDown; + private BindingSource assetsValveFactorMgrViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colMaterial; + private DevExpress.XtraGrid.Columns.GridColumn colCaliber; + private DevExpress.XtraGrid.Columns.GridColumn colCoefficient; + private DevExpress.XtraGrid.Columns.GridColumn colLowerLimit; + private DevExpress.XtraGrid.Columns.GridColumn colSortCode; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + private DevExpress.XtraGrid.Columns.GridColumn colID; + private DevExpress.XtraGrid.Columns.GridColumn colDetail; + private DevExpress.XtraBars.BarCheckItem barCkDrag; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; + private DevExpress.Utils.DragDrop.DragDropEvents dragDropEvents1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.cs new file mode 100644 index 0000000..183c76c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.cs @@ -0,0 +1,407 @@ +锘縰sing DevExpress.Utils.DragDrop; +using DevExpress.XtraEditors; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AssetsValveFactorMgrPage : DocumentPage + { + public AssetsValveFactorMgrPage() + { + InitializeComponent(); + this.gridView1.SetLimitView(30); + this.PageTitle.Caption = "鍐峰嵈濉旂郴鏁�"; + this.PageTitle.HeaderSvgImage = this.svgImg32[0]; + this.PageTitle.SvgImageSize = new Size(24, 24); + } + + //鏁版嵁缁戝畾鍒楄〃 + private List<AssetsValveFactorMgrViewModel> _allBindingList = null; + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + InitialData(); + } + + //鍒濆鍖栨暟鎹� + private async void InitialData() + { + var overlay = this.ShowOverlay(); + var allBindingList = await BLLFactory<HStation.BLL.AssetsValveFactor>.Instance.GetAll(); + _allBindingList = new List<AssetsValveFactorMgrViewModel>(); + if (allBindingList != null && allBindingList.Count > 0) + { + foreach (var item in allBindingList) + { + var vm = new AssetsValveFactorMgrViewModel(item); + _allBindingList.Add(vm); + } + } + this.assetsValveFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveFactorMgrViewModelBindingSource.ResetBindings(false); + overlay.Close(); + SetDragEnable(this.barCkDrag.Checked); + } + + /// <summary> + /// 鍒锋柊鏁版嵁 + /// </summary> + public override void RefreshData() + { + base.RefreshData(); + InitialData(); + } + + //娣诲姞 + private void Add() + { + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栧け璐ワ紒"); + return; + } + var dlg = new AddAssetsValveFactorDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsValveFactorMgrViewModel(rhs); + _allBindingList.Add(vm); + this.assetsValveFactorMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛锛�"); + }; + dlg.SetBindingData(); + dlg.ShowDialog(); + } + + //缂栬緫 + private void Edit() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new EditAssetsValveFactorDlg(); + dlg.ReloadDataEvent += (rhs) => + { + vm.Reset(rhs); + this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); + TipFormHelper.ShowSucceed("鏇存柊鎴愬姛"); + }; + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //鍒犻櫎 + private async void Delete() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var result = XtraMessageBox.Show("璇烽棶纭鍒犻櫎褰撳墠鏁版嵁鍚楋紵", "璇㈤棶", MessageBoxButtons.YesNo) == DialogResult.Yes; + if (!result) + { + return; + } + var bol = await BLLFactory<HStation.BLL.AssetsValveFactor>.Instance.DeleteByID(vm.ID); + if (!bol) + { + TipFormHelper.ShowError("鍒犻櫎澶辫触锛�"); + return; + } + _allBindingList.Remove(vm); + this.assetsValveFactorMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); + } + + //鏌ョ湅 + private void View() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new ViewAssetsValveFactorDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //涓婄Щ + private async void Up() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var rowHandle = this.gridView1.FocusedRowHandle; + if (rowHandle == 0) + { + TipFormHelper.ShowWarn("涓婄Щ澶辫触锛�"); + return; + } + var current = this.gridView1.GetRow(rowHandle) as AssetsValveFactorMgrViewModel; + if (current == null) + { + return; + } + var prevHandle = rowHandle - 1; + var prev = this.gridView1.GetRow(prevHandle) as AssetsValveFactorMgrViewModel; + if (prev == null) + { + return; + } + var sorters = new List<Yw.Vmo.Sorter>(); + sorters.Add(new Yw.Vmo.Sorter() { ID = current.ID, SortCode = prev.SortCode }); + sorters.Add(new Yw.Vmo.Sorter() { ID = prev.ID, SortCode = current.SortCode }); + var bol = await BLLFactory<HStation.BLL.AssetsValveFactor>.Instance.UpdateSorter(sorters); + if (!bol) + { + TipFormHelper.ShowError("涓婄Щ澶辫触锛�"); + return; + } + var sortCode = current.SortCode; + current.SortCode = prev.SortCode; + prev.SortCode = sortCode; + _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); + this.assetsValveFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveFactorMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = prevHandle; + } + + //涓嬬Щ + private async void Down() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var rowHandle = this.gridView1.FocusedRowHandle; + if (rowHandle == _allBindingList.Count - 1) + { + TipFormHelper.ShowWarn("涓嬬Щ澶辫触锛�"); + return; + } + var current = this.gridView1.GetRow(rowHandle) as AssetsValveFactorMgrViewModel; + if (current == null) + { + return; + } + var nextHandle = rowHandle + 1; + var next = this.gridView1.GetRow(nextHandle) as AssetsValveFactorMgrViewModel; + if (next == null) + { + return; + } + var sorters = new List<Yw.Vmo.Sorter>(); + sorters.Add(new Yw.Vmo.Sorter() { ID = current.ID, SortCode = next.SortCode }); + sorters.Add(new Yw.Vmo.Sorter() { ID = next.ID, SortCode = current.SortCode }); + var bol = await BLLFactory<HStation.BLL.AssetsValveFactor>.Instance.UpdateSorter(sorters); + if (!bol) + { + TipFormHelper.ShowError("涓嬬Щ澶辫触锛�"); + return; + } + var sortCode = current.SortCode; + current.SortCode = next.SortCode; + next.SortCode = sortCode; + _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); + this.assetsValveFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsValveFactorMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = nextHandle; + } + + #region 褰撳墠 + + //鑾峰彇褰撳墠 + private AssetsValveFactorMgrViewModel GetCurrentViewModel() + { + if (_allBindingList == null) + { + TipFormHelper.ShowError("鏁版嵁鍒濆鍖栧け璐ワ紒"); + return null; + } + if (_allBindingList.Count < 1) + { + TipFormHelper.ShowInfo("鏃犳暟鎹紒"); + return null; + } + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛岋紒"); + return null; + } + return vm; + } + + #endregion 褰撳墠 + + #region Ribbon + + //娣诲姞 + private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Add(); + } + + //缂栬緫 + private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Edit(); + } + + //鍒犻櫎 + private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Delete(); + } + + //璇︾粏淇℃伅 + private void barBtnInfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + View(); + } + + //涓婄Щ + private void barBtnUp_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Up(); + } + + //涓嬬Щ + private void barBtnDown_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Down(); + } + + //鏌ヨ + private void barBtnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.gridView1.OptionsFind.AlwaysVisible = !this.gridView1.OptionsFind.AlwaysVisible; + } + + //鍒锋柊 + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.RefreshData(); + } + + #endregion Ribbon + + #region GridView + + private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) + { + if (e.Column == this.colDetail) + { + View(); + } + } + + #endregion GridView + + private async void dragDropEvents1_DragDrop(object sender, DevExpress.Utils.DragDrop.DragDropEventArgs e) + { + var indexs = e.Data as int[]; + if (indexs == null || indexs.Length < 1) + { + e.Handled = true; + return; + } + var sourceIndex = indexs[0]; + var sourceObj = this.gridView1.GetRow(sourceIndex) as AssetsValveFactorMgrViewModel; + if (sourceObj == null) + { + e.Handled = true; + return; + } + + var destIndex = this.gridView1.GetRowHandleByCP(e.Location); + if (destIndex < 0) + { + e.Handled = true; + return; + } + + var destObj = this.gridView1.GetRow(destIndex) as AssetsValveFactorMgrViewModel; + if (destObj == null) + { + e.Handled = true; + return; + } + + var sorters = new List<Yw.Vmo.Sorter>(); + + if (e.InsertType == InsertType.Before) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = sourceObj.ID, SortCode = destObj.SortCode }); + _allBindingList.ForEach(x => + { + if (x.SortCode >= destObj.SortCode) + { + if (x != sourceObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + }); + } + else if (e.InsertType == InsertType.After) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = sourceObj.ID, SortCode = destObj.SortCode + 1 }); + _allBindingList.ForEach(x => + { + if (x.SortCode > destObj.SortCode) + { + if (x != sourceObj) + { + sorters.Add(new Yw.Vmo.Sorter() { ID = x.ID, SortCode = x.SortCode + 1 }); + } + } + }); + } + else + { + e.Handled = true; + return; + } + + var bll = BLLFactory<HStation.BLL.AssetsValveFactor>.Instance; + var bol = await bll.UpdateSorter(sorters); + if (!bol) + { + e.Handled = true; + return; + } + + _allBindingList.ForEach(x => + { + var sorter = sorters.Find(t => t.ID == x.ID); + if (sorter != null) + { + x.SortCode = sorter.SortCode; + } + }); + } + + private void barCkDrag_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetDragEnable(this.barCkDrag.Checked); + } + + //璁剧疆鎷栨嫿鍙敤鎬� + private void SetDragEnable(bool allowArag) + { + var be = this.behaviorManager1.GetBehavior<DevExpress.Utils.DragDrop.DragDropBehavior>(this.gridView1); + be.Properties.AllowDrag = allowArag; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.resx new file mode 100644 index 0000000..0ea21df --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrPage.resx @@ -0,0 +1,332 @@ +锘�<?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> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barBtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnEdit.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 + cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog + TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu + OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt + MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 + LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw + LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x + NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 + LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu + MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu + NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw + YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu + NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy + NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnInfo.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnSearch.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barBtnRefresh.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2hhbmdlVmlldyI+DQogICAgPHBh + dGggZD0iTTI0LjUsNy41QzIyLjMsNS4zLDE5LjMsNCwxNiw0QzEwLjEsNCw1LjEsOC4zLDQuMiwxNGg0 + LjFjMC45LTMuNCw0LTYsNy43LTZjMi4yLDAsNC4yLDAuOSw1LjYsMi40TDE4LDE0ICAgaDUuN2g0LjFI + MjhWNEwyNC41LDcuNXogTTE2LDI0Yy0yLjIsMC00LjItMC45LTUuNi0yLjRMMTQsMThIOC4yaC00SDR2 + MTBsMy41LTMuNUM5LjcsMjYuNywxMi43LDI4LDE2LDI4YzUuOSwwLDEwLjgtNC4zLDExLjgtMTAgICBo + LTQuMUMyMi44LDIxLjQsMTkuNywyNCwxNiwyNHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> + <data name="barBtnUp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIoBAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z + dHlsZT4NCiAgPHBvbHlnb24gcG9pbnRzPSIyMCwzMCAxMiwzMCAxMiwxNCA0LDE0IDE2LDIgMjgsMTQg + MjAsMTQgIiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnDown.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkBAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z + dHlsZT4NCiAgPHBvbHlnb24gcG9pbnRzPSIxMiwyIDIwLDIgMjAsMTggMjgsMTggMTYsMzAgNCwxOCAx + MiwxOCAiIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barCkDrag.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAMDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUmV2ZXJzU29ydCI+DQogICAgPHBv + bHlnb24gcG9pbnRzPSIyNCw0IDIwLDQgMjAsMjAgMTYsMjAgMjIsMjggMjgsMjAgMjQsMjAgICIgY2xh + c3M9IkJsdWUiIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxMCw0IDQsMTIgOCwxMiA4LDI4IDEyLDI4 + IDEyLDEyIDE2LDEyICAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <metadata name="assetsCoolingFactorMgrViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>417, 17</value> + </metadata> + <metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>763, 17</value> + </metadata> + <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== +</value> + </data> + <metadata name="svgImg32.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>305, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrViewModel.cs new file mode 100644 index 0000000..488cf77 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/AssetsCoolingFactorMgrViewModel.cs @@ -0,0 +1,81 @@ +锘縩amespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsValveFactorMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsValveFactorMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsValveFactorMgrViewModel(HStation.Vmo.AssetsValveCoefficientVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.MinorLoss; + this.Vmo = rhs; + } + + /// <summary> + /// + /// </summary> + public void Reset(HStation.Vmo.AssetsValveCoefficientVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.MinorLoss; + this.Vmo = rhs; + } + + /// <summary> + /// id + /// </summary> + [Display(Name = "ID")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [Display(Name = "鏉愭枡")] + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + [Display(Name = "鍙e緞(mm)")] + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Display(Name = "鍠峰皠绯绘暟")] + public double Coefficient { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public HStation.Vmo.AssetsValveCoefficientVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.Designer.cs new file mode 100644 index 0000000..5750531 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.Designer.cs @@ -0,0 +1,302 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class EditAssetsValveFactorDlg + { + /// <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 Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtLowerLimit = new DevExpress.XtraEditors.TextEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtLowerLimit.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)emptySpaceItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtLowerLimit); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(525, 316); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); + generalOkAndCancelCtrl1.Location = new Point(12, 278); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(501, 26); + generalOkAndCancelCtrl1.TabIndex = 8; + // + // txtDescription + // + txtDescription.Location = new Point(83, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(430, 190); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtLowerLimit + // + txtLowerLimit.Location = new Point(335, 60); + txtLowerLimit.Name = "txtLowerLimit"; + txtLowerLimit.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtLowerLimit.Properties.DisplayFormat.FormatString = "{0}m"; + txtLowerLimit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtLowerLimit.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtLowerLimit.Properties.NullValuePrompt = "m"; + txtLowerLimit.Size = new Size(178, 20); + txtLowerLimit.StyleController = layoutControl1; + txtLowerLimit.TabIndex = 6; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(83, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Size = new Size(177, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(335, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Size = new Size(178, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(83, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(177, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(83, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(177, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem5, layoutControlItem2, layoutControlItem6, emptySpaceItem1, layoutControlItem7 }); + Root.Name = "Root"; + Root.Size = new Size(525, 316); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(252, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(252, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(253, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(252, 24); + layoutControlItem4.Text = "<color=red>*</color>娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem5 + // + layoutControlItem5.AllowHtmlStringInCaption = true; + layoutControlItem5.Control = txtLowerLimit; + layoutControlItem5.Location = new Point(252, 48); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(253, 24); + layoutControlItem5.Text = "<color=red>*</color>鏈�灏忓帇鍔�:"; + layoutControlItem5.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(252, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 72); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 194); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(252, 0); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(253, 24); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 266); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(505, 30); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // EditAssetsValveFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "EditAssetsValveFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtLowerLimit.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)emptySpaceItem1).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.cs new file mode 100644 index 0000000..fe2555c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.cs @@ -0,0 +1,103 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw; +using Yw.DAL.Basic; + +namespace HStation.WinFrmUI +{ + public partial class EditAssetsValveFactorDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsValveFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsValveCoefficientVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsValveCoefficientVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsValveCoefficientVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new Vmo.AssetsValveCoefficientVmo(vmo); + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtCaliber.EditValue = vmo.Caliber; + this.txtCoefficient.EditValue = vmo.MinorLoss; + } + + //楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtMaterial.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMaterial, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtCoefficient, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtLowerLimit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtLowerLimit, "蹇呭~椤�"); + return false; + } + return true; + } + + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (_vmo == null) + { + return; + } + if (!Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + _vmo.Material = this.txtMaterial.Text.Trim(); + _vmo.Caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue?.ToString()); + _vmo.MinorLoss = double.Parse(this.txtCoefficient.EditValue?.ToString()); + var bol = await BLLFactory<HStation.BLL.AssetsValveCoefficient>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsValveCoefficient>.Instance.GetByID(_vmo.ID); + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/01-series/AddValveSeriesDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/EditAssetsCoolingFactorDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.Designer.cs new file mode 100644 index 0000000..dbeb83f --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.Designer.cs @@ -0,0 +1,241 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsValveFactorDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtCoefficient = new DevExpress.XtraEditors.TextEdit(); + txtCaliber = new DevExpress.XtraEditors.TextEdit(); + txtMaterial = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtCoefficient.Properties).BeginInit(); + ((ISupportInitialize)txtCaliber.Properties).BeginInit(); + ((ISupportInitialize)txtMaterial.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)layoutControlItem4).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)emptySpaceItem1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtCoefficient); + layoutControl1.Controls.Add(txtCaliber); + layoutControl1.Controls.Add(txtMaterial); + layoutControl1.Controls.Add(txtName); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(525, 316); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // txtDescription + // + txtDescription.Location = new Point(76, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Properties.ReadOnly = true; + txtDescription.Properties.UseReadOnlyAppearance = false; + txtDescription.Size = new Size(437, 220); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtCoefficient + // + txtCoefficient.Location = new Point(76, 60); + txtCoefficient.Name = "txtCoefficient"; + txtCoefficient.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtCoefficient.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCoefficient.Properties.ReadOnly = true; + txtCoefficient.Properties.UseReadOnlyAppearance = false; + txtCoefficient.Size = new Size(437, 20); + txtCoefficient.StyleController = layoutControl1; + txtCoefficient.TabIndex = 5; + // + // txtCaliber + // + txtCaliber.Location = new Point(328, 36); + txtCaliber.Name = "txtCaliber"; + txtCaliber.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtCaliber.Properties.DisplayFormat.FormatString = "{0}mm"; + txtCaliber.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtCaliber.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtCaliber.Properties.NullValuePrompt = "mm"; + txtCaliber.Properties.ReadOnly = true; + txtCaliber.Properties.UseReadOnlyAppearance = false; + txtCaliber.Size = new Size(185, 20); + txtCaliber.StyleController = layoutControl1; + txtCaliber.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(76, 36); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Properties.ReadOnly = true; + txtMaterial.Properties.UseReadOnlyAppearance = false; + txtMaterial.Size = new Size(184, 20); + txtMaterial.StyleController = layoutControl1; + txtMaterial.TabIndex = 3; + // + // txtName + // + txtName.Location = new Point(76, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Properties.ReadOnly = true; + txtName.Properties.UseReadOnlyAppearance = false; + txtName.Size = new Size(184, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; + // + // 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[] { layoutControlItem1, layoutControlItem3, layoutControlItem4, layoutControlItem2, layoutControlItem6, emptySpaceItem1 }); + Root.Name = "Root"; + Root.Size = new Size(525, 316); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.Control = txtName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(252, 24); + layoutControlItem1.Text = "鍚嶇О:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = txtCaliber; + layoutControlItem3.Location = new Point(252, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(253, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtCoefficient; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(505, 24); + layoutControlItem4.Text = "娴侀噺绯绘暟:"; + layoutControlItem4.TextSize = new Size(52, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(0, 24); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(252, 24); + layoutControlItem2.Text = "鏉愯川:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 72); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 224); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(252, 0); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(253, 24); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // ViewAssetsValveFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "ViewAssetsValveFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "璇︾粏淇℃伅"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtCoefficient.Properties).EndInit(); + ((ISupportInitialize)txtCaliber.Properties).EndInit(); + ((ISupportInitialize)txtMaterial.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)layoutControlItem4).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)emptySpaceItem1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.TextEdit txtMaterial; + private DevExpress.XtraEditors.TextEdit txtName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit txtCaliber; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.cs new file mode 100644 index 0000000..0619175 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.cs @@ -0,0 +1,43 @@ +锘縰sing DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw; +using Yw.DAL.Basic; + +namespace HStation.WinFrmUI +{ + public partial class ViewAssetsValveFactorDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsValveFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private HStation.Vmo.AssetsValveCoefficientVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsValveCoefficientVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = vmo; + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtCaliber.EditValue = vmo.Caliber; + this.txtCoefficient.EditValue = vmo.MinorLoss; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/03-factor/ViewAssetsCoolingFactorDlg.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.Designer.cs new file mode 100644 index 0000000..0011211 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.Designer.cs @@ -0,0 +1,120 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsValveMgrPage + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + PageTitle pageTitle1 = new PageTitle(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(AssetsValveMgrPage)); + dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); + dockPnlLeft = new DevExpress.XtraBars.Docking.DockPanel(); + dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); + assetsValveSeriesMgrTreeCtrl1 = new AssetsValveSeriesMgrTreeCtrl(); + assetsValveMainMgrPage1 = new AssetsValveMainMgrPage(); + ((ISupportInitialize)dockManager1).BeginInit(); + dockPnlLeft.SuspendLayout(); + dockPanel1_Container.SuspendLayout(); + SuspendLayout(); + // + // dockManager1 + // + dockManager1.Form = this; + dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPnlLeft }); + dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl" }); + // + // dockPnlLeft + // + dockPnlLeft.Controls.Add(dockPanel1_Container); + dockPnlLeft.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; + dockPnlLeft.ID = new Guid("af70ba13-cbf2-4ab4-b38b-d7b6d71a8bd6"); + dockPnlLeft.Location = new Point(0, 0); + dockPnlLeft.Name = "dockPnlLeft"; + dockPnlLeft.Options.ShowCloseButton = false; + dockPnlLeft.OriginalSize = new Size(200, 200); + dockPnlLeft.Size = new Size(200, 592); + dockPnlLeft.Text = "绯诲垪鍒楄〃"; + // + // dockPanel1_Container + // + dockPanel1_Container.Controls.Add(assetsValveSeriesMgrTreeCtrl1); + dockPanel1_Container.Location = new Point(3, 26); + dockPanel1_Container.Name = "dockPanel1_Container"; + dockPanel1_Container.Size = new Size(193, 563); + dockPanel1_Container.TabIndex = 0; + // + // assetsValveSeriesMgrTreeCtrl1 + // + assetsValveSeriesMgrTreeCtrl1.Dock = DockStyle.Fill; + assetsValveSeriesMgrTreeCtrl1.Location = new Point(0, 0); + assetsValveSeriesMgrTreeCtrl1.Name = "assetsValveSeriesMgrTreeCtrl1"; + assetsValveSeriesMgrTreeCtrl1.Size = new Size(193, 563); + assetsValveSeriesMgrTreeCtrl1.TabIndex = 0; + // + // assetsValveMainMgrPage1 + // + assetsValveMainMgrPage1.Appearance.BackColor = SystemColors.Control; + assetsValveMainMgrPage1.Appearance.Options.UseBackColor = true; + assetsValveMainMgrPage1.Dock = DockStyle.Fill; + assetsValveMainMgrPage1.Location = new Point(200, 0); + assetsValveMainMgrPage1.Name = "assetsValveMainMgrPage1"; + assetsValveMainMgrPage1.Padding = new Padding(1); + assetsValveMainMgrPage1.PageGuid = null; + pageTitle1.AllowClose = true; + pageTitle1.Caption = "鍐峰嵈濉�"; + pageTitle1.HeaderImage = null; + pageTitle1.HeaderSvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("pageTitle1.HeaderSvgImage"); + pageTitle1.SvgImageSize = new Size(24, 24); + assetsValveMainMgrPage1.PageTitle = pageTitle1; + assetsValveMainMgrPage1.Size = new Size(825, 592); + assetsValveMainMgrPage1.TabIndex = 1; + // + // AssetsValveMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(assetsValveMainMgrPage1); + Controls.Add(dockPnlLeft); + Name = "AssetsValveMgrPage"; + Size = new Size(1025, 592); + ((ISupportInitialize)dockManager1).EndInit(); + dockPnlLeft.ResumeLayout(false); + dockPanel1_Container.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraBars.Docking.DockManager dockManager1; + private DevExpress.XtraBars.Docking.DockPanel dockPnlLeft; + private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; + private AssetsValveSeriesMgrTreeCtrl assetsValveSeriesMgrTreeCtrl1; + private AssetsValveMainMgrPage assetsValveMainMgrPage1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.cs new file mode 100644 index 0000000..55a617f --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.cs @@ -0,0 +1,56 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.Vmo; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw.WinFrmUI.Page; + +namespace HStation.WinFrmUI +{ + public partial class AssetsValveMgrPage : DocumentPage + { + public AssetsValveMgrPage() + { + InitializeComponent(); + this.PageTitle.Caption = "鍐峰嵈濉斿瀷鍙风鐞�"; + this.assetsValveSeriesMgrTreeCtrl1.FocusedChangedEvent += assetsValveSeriesMgrTreeCtrl1_FocusedChangedEvent; + } + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + InitialMainPage(); + this.assetsValveSeriesMgrTreeCtrl1.InitialData(); + } + + //鍒濆鍖栧瀷鍙烽〉闈� + private void InitialMainPage() + { + this.assetsValveMainMgrPage1.PageGuid = new PageGuid() + { + Modular = AssetsFunctionHelper.Modular, + MoudingType = eMoudingType.Tab, + Function = AssetsFunctionHelper.ValveFactorMgr, + TagName = string.Empty + }; + this.assetsValveMainMgrPage1.IsExistPageEvent += this.IsExistPage; + this.assetsValveMainMgrPage1.CreatePageEvent += this.CreatePage; + this.assetsValveMainMgrPage1.FindPageEvent += this.FindPage; + } + + //鑱氱劍鏀瑰彉 + private void assetsValveSeriesMgrTreeCtrl1_FocusedChangedEvent(AssetsValveSeriesVmo series) + { + this.assetsValveMainMgrPage1.SetBindingData(series); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.resx new file mode 100644 index 0000000..6331e59 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/AssetsCoolingMgrPage.resx @@ -0,0 +1,151 @@ +锘�<?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="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="pageTitle1.HeaderSvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJgEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iVG9wXzEwX1BlcmNlbnQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpu + ZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tmaWxsOiM3Mjcy + NzI7fQoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cjwvc3R5bGU+DQogIDxwYXRoIGQ9Ik0zMSwySDFDMC41 + LDIsMCwyLjUsMCwzdjI0YzAsMC41LDAuNSwxLDEsMWgzMGMwLjUsMCwxLTAuNSwxLTFWM0MzMiwyLjUs + MzEuNSwyLDMxLDJ6IE04LDEydjEwSDZWMTJIM2w0LTYgIGw0LDZIOHogTTMwLDI2SDE0VjRoMTZWMjZ6 + IiBjbGFzcz0iR3JlZW4iIC8+DQogIDxwYXRoIGQ9Ik0xOC42LDE1LjFjLTAuOCwwLTEuNC0wLjItMS45 + LTAuN2MtMC41LTAuNC0wLjctMS0wLjctMS44YzAtMC44LDAuMi0xLjUsMC43LTEuOXMxLjItMC43LDIt + MC43ICBjMC44LDAsMS40LDAuMiwxLjksMC42YzAuNCwwLjQsMC43LDEsMC43LDEuOGMwLDAuOC0wLjIs + MS40LTAuNywxLjlDMjAsMTQuOCwxOS40LDE1LjEsMTguNiwxNS4xeiBNMjYsMTBsLTYuMiwxMEgxOGw2 + LjItMTBIMjZ6ICAgTTE4LjcsMTEuMmMtMC43LDAtMS4xLDAuNS0xLjEsMS40YzAsMC45LDAuMywxLjMs + MSwxLjNjMC43LDAsMS4xLTAuNSwxLjEtMS40QzE5LjcsMTEuNiwxOS40LDExLjIsMTguNywxMS4yeiBN + MjUuMywyMCAgYy0wLjgsMC0xLjQtMC4yLTEuOS0wLjdzLTAuNy0xLTAuNy0xLjhjMC0wLjgsMC4yLTEu + NSwwLjctMS45YzAuNS0wLjUsMS4yLTAuNywyLTAuN2MwLjgsMCwxLjQsMC4yLDEuOSwwLjZzMC43LDEs + MC43LDEuOCAgYzAsMC44LTAuMiwxLjQtMC43LDEuOUMyNi44LDE5LjgsMjYuMSwyMCwyNS4zLDIweiBN + MjUuNCwxNi4xYy0wLjcsMC0xLjEsMC41LTEuMSwxLjRjMCwwLjksMC40LDEuMywxLjEsMS4zYzAuNyww + LDEuMS0wLjUsMS4xLTEuNCAgYzAtMC40LTAuMS0wLjctMC4zLTFDMjYsMTYuMiwyNS43LDE2LjEsMjUu + NCwxNi4xeiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw== +</value> + </data> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AssetsCoolingMainMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AssetsCoolingMainMgrPage.cs index 198e2c1..db9646b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AssetsCoolingMainMgrPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AssetsCoolingMainMgrPage.cs @@ -245,7 +245,6 @@ this.gridView1.FocusedRowHandle = nextHandle; } - #region 褰撳墠 //鑾峰彇褰撳墠 @@ -270,7 +269,7 @@ return vm; } - #endregion + #endregion 褰撳墠 #region Ribbon @@ -322,7 +321,7 @@ this.RefreshData(); } - #endregion + #endregion Ribbon //绯绘暟 private void barBtnFactor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj index 5b093a8..45310ac 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj @@ -9,12 +9,24 @@ <ItemGroup> <Compile Remove="02-UICore\**" /> + <Compile Remove="03-valve\01-series\**" /> + <Compile Remove="03-valve\02-main\**" /> + <Compile Remove="03-valve\03-factor\**" /> <Compile Remove="10-equipment\**" /> <EmbeddedResource Remove="02-UICore\**" /> + <EmbeddedResource Remove="03-valve\01-series\**" /> + <EmbeddedResource Remove="03-valve\02-main\**" /> + <EmbeddedResource Remove="03-valve\03-factor\**" /> <EmbeddedResource Remove="10-equipment\**" /> <None Remove="02-UICore\**" /> + <None Remove="03-valve\01-series\**" /> + <None Remove="03-valve\02-main\**" /> + <None Remove="03-valve\03-factor\**" /> <None Remove="10-equipment\**" /> <Page Remove="02-UICore\**" /> + <Page Remove="03-valve\01-series\**" /> + <Page Remove="03-valve\02-main\**" /> + <Page Remove="03-valve\03-factor\**" /> <Page Remove="10-equipment\**" /> </ItemGroup> @@ -23,6 +35,8 @@ <Compile Remove="01-pump\AddPumpProductMainDlg - 澶嶅埗.Designer.cs" /> <Compile Remove="01-pump\PumpProductMainPanel - 澶嶅埗.cs" /> <Compile Remove="01-pump\PumpProductMainPanel - 澶嶅埗.Designer.cs" /> + <Compile Remove="03-valve\AssetsCoolingMgrPage.cs" /> + <Compile Remove="03-valve\AssetsCoolingMgrPage.Designer.cs" /> <Compile Remove="12-package\02-main\01-EditPumpPartProp\EquipmentProductListBox.cs" /> <Compile Remove="12-package\02-main\01-EditPumpPartProp\EquipmentProductListBox.Designer.cs" /> <Compile Remove="12-package\02-main\01-EditPumpPartProp\PropGroupChoiceViewModel.cs" /> @@ -31,6 +45,7 @@ <ItemGroup> <EmbeddedResource Remove="01-pump\AddPumpProductMainDlg - 澶嶅埗.resx" /> <EmbeddedResource Remove="01-pump\PumpProductMainPanel - 澶嶅埗.resx" /> + <EmbeddedResource Remove="03-valve\AssetsCoolingMgrPage.resx" /> <EmbeddedResource Remove="12-package\02-main\01-EditPumpPartProp\EquipmentProductListBox.resx" /> </ItemGroup> @@ -61,19 +76,13 @@ <Compile Update="01-pump\AddPumpProductGroupDlg.cs" /> <Compile Update="01-pump\AddPumpProductMainDlg.cs" /> <Compile Update="01-pump\EditPumpProductSeriesDlg.cs" /> - <Compile Update="03-valve\01-series\EditAssetsValveSeriesDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="03-valve\01-series\AddAssetsValveSeriesDlg.cs"> - <SubType>Form</SubType> - </Compile> <Compile Update="03-valve\04-chart-edit\ValvePerform2dEditChart.cs" /> <Compile Update="03-valve\04-chart-edit\ValvePerform2dEditCtrl.cs" /> <Compile Update="03-valve\04-chart-edit\ValvePerform2dEditDlg.cs" /> <Compile Update="03-valve\05-import\01-excel\ImportValvePerform2dByExcelCtrl.cs" /> <Compile Update="03-valve\05-import\01-excel\ImportValvePerform2dByExcelDlg.cs" /> <Compile Update="03-valve\SetValveCoefficientDlg.cs" /> - <Compile Update="03-valve\01-series\ValveTypeTreeListCtrl.cs" /> + <Compile Update="03-valve\01-series-----bak\ValveTypeTreeListCtrl.cs" /> <Compile Update="02-adapting\AdaptingManageMainPage.cs" /> <Compile Update="03-valve\04-chart-edit\XhsValveMainPhartMinorLossPanel.cs" /> <Compile Update="04-pipe\03-coefficient\SetPipeLineCoefficientDlg.cs" /> diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user index e7565db..aed633a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user @@ -65,19 +65,19 @@ <Compile Update="02-adapting\EditAdaptingMainDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="03-valve\01-series\AddValveSeriesDlg.cs"> + <Compile Update="03-valve\01-series-----bak\AddValveSeriesDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="03-valve\01-series\EditValveSeriesDlg.cs"> + <Compile Update="03-valve\01-series-----bak\EditValveSeriesDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="03-valve\01-series\ValveTypeTreeListCtrl.cs"> + <Compile Update="03-valve\01-series-----bak\ValveTypeTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="03-valve\02-main\AddValveMainDlg.cs"> + <Compile Update="03-valve\02-main---bak\AddValveMainDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="03-valve\02-main\EditValveMainDlg.cs"> + <Compile Update="03-valve\02-main---bak\EditValveMainDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-valve\04-chart-edit\ValvePerform2dEditChart.cs"> -- Gitblit v1.9.3