From f1fac249aec3a5390152fa2a9a13e8da98283c3b Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 20 十二月 2024 18:19:21 +0800 Subject: [PATCH] 水池修改 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.Designer.cs | 258 + BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs | 4 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.cs | 43 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.resx | 8 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.cs | 64 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.Designer.cs | 200 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.resx | 30 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.cs | 33 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.resx | 25 Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankMainVmo.cs | 21 BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankFactor.cs | 12 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj | 50 Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain_Instance.cs | 10 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.Designer.cs | 378 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.cs | 6 Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs | 104 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.cs | 102 Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankSeries.cs | 10 Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankFactor.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.cs | 474 ++ Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs | 123 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries.cs | 75 Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankMain.cs | 6 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.Designer.cs | 331 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.cs | 64 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.resx | 378 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.Designer.cs | 597 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.Designer.cs | 258 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankViewModel.cs | 4 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.Designer.cs | 379 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.Designer.cs | 120 Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AddAssetsTankSeriesInput.cs | 42 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.cs | 137 Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/UpdateAssetsValveFactorInput.cs | 15 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.cs | 88 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.cs | 100 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.cs | 98 Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/AddAssetsValveFactorInput.cs | 15 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.cs | 407 + Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AssetsTankSeriesDto.cs | 83 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/UpdateAssetsTankFactorInput.cs | 16 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries_Instance.cs | 43 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.cs | 254 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.resx | 384 + Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveFactorVmo.cs | 5 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingViewModel.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.resx | 8 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.resx | 24 Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain.cs | 467 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.resx | 329 + Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankFactor.cs | 11 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AddAssetsTankFactorInput.cs | 16 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor_Instance.cs | 83 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.Designer.cs | 583 ++ WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.cs | 44 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.resx | 24 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.cs | 154 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor.cs | 49 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.resx | 25 Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankFactor.cs | 2 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.cs | 58 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.Designer.cs | 313 + BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankSeries.cs | 5 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user | 13 Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/UpdateAssetsTankSeriesInput.cs | 80 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.Designer.cs | 291 + Desktop/HStation.Desktop.Xhs.Core/MainForm.cs | 2 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain_Instance.cs | 43 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.resx | 30 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.resx | 24 Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankFactorVmo.cs | 74 Dto/HStation.Dto.Assets.Core/15-Tank/02-AssetsTankMain/AssetsTankMainDto.cs | 4 Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AssetsTankFactorDto.cs | 24 BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankMain.cs | 51 BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain.cs | 33 Service/HStation.Service.Assets.Core/05-service/15-Tank/01-TankSeries/AssetsTankSeries.cs | 558 +- Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankFactorCacheHelper.cs | 70 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AssetsTankSeriesViewModel.cs | 4 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrViewModel.cs | 95 BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs | 71 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.resx | 24 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.cs | 87 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.Designer.cs | 329 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.cs | 408 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrViewModel.cs | 93 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.Designer.cs | 441 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.Designer.cs | 291 + WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.Designer.cs | 229 + /dev/null | 78 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.Designer.cs | 741 +-- WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrViewModel.cs | 143 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.resx | 25 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.resx | 34 Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankSeriesVmo.cs | 98 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs | 8 BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankSeries.cs | 121 WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.Designer.cs | 718 +-- WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankManageMainPage.cs | 3 100 files changed, 10,452 insertions(+), 2,939 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs deleted file mode 100644 index e23fbcb..0000000 --- a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankCoefficient.cs +++ /dev/null @@ -1,12 +0,0 @@ -锘縰sing HStation.Dto; -using Yw.CAL; - -namespace HStation.CAL -{ - /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public interface IAssetsTankCoefficient : IBaseCAL<AddAssetsTankCoefficientInput, UpdateAssetsTankCoefficientInput, AssetsTankCoefficientDto> - { - } -} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankFactor.cs b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankFactor.cs new file mode 100644 index 0000000..b71c46b --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankFactor.cs @@ -0,0 +1,12 @@ +锘縰sing HStation.Dto; +using Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 姘存睜绯绘暟 + ///</summary> + public interface IAssetsTankFactor : IBaseCAL<AddAssetsTankFactorInput, UpdateAssetsTankFactorInput, AssetsTankFactorDto>, IUpdateSorter + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankSeries.cs b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankSeries.cs index 93e81ed..b39dfdf 100644 --- a/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/01-interface/15-ITank/IAssetsTankSeries.cs @@ -9,11 +9,6 @@ public interface IAssetsTankSeries : IBaseCAL<AddAssetsTankSeriesInput, UpdateAssetsTankSeriesInput, AssetsTankSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter { /// <summary> - /// 鏇存柊鏍戞帓搴忕爜 - /// </summary> - Task<bool> UpdateTreeSortCode(long ID, List<long> ParentIds, int SortCode); - - /// <summary> /// 鍒ゆ柇TagName鏄惁瀛樺湪 /// </summary> Task<bool> IsExistTagName(string TagName); diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs index 117c86a..1adbd7c 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs @@ -9,14 +9,14 @@ /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class AssetsTankCoefficient : BaseCAL<AddAssetsTankCoefficientInput, UpdateAssetsTankCoefficientInput, AssetsTankCoefficientDto>, IAssetsTankCoefficient + public class AssetsTankCoefficient : BaseCAL_Sorter<AddAssetsTankFactorInput, UpdateAssetsTankFactorInput, AssetsTankFactorDto>, IAssetsTankFactor { protected override string Prefix { get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankCoefficient"; } } - public Task<List<AssetsTankCoefficientDto>> GetByMainID(long ID) + public Task<List<AssetsTankFactorDto>> GetByMainID(long ID) { throw new NotImplementedException(); } diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs index 95d5a1c..48c516b 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankCoefficient.cs @@ -1,26 +1,23 @@ -锘縰sing HStation.Dto; -using Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public class AssetsTankCoefficient : IAssetsTankCoefficient + /// 鍐峰嵈濉旂郴鏁� + /// </summary> + public class AssetsTankFactor : IAssetsTankFactor { - private readonly Service.AssetsTankCoefficient _service = new(); + private readonly HStation.Service.AssetsTankFactor _service = new(); #region Query /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public async Task<List<AssetsTankCoefficientDto>> GetAll() + public async Task<List<AssetsTankFactorDto>> GetAll() { return await Task.Factory.StartNew(() => { var list = _service.GetAll(); - var vm_list = list?.Select(x => new AssetsTankCoefficientDto(x)).ToList(); + var vm_list = list?.Select(x => new AssetsTankFactorDto(x)).ToList(); return vm_list; }); } @@ -28,40 +25,43 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public async Task<AssetsTankCoefficientDto> GetByID(long ID) + public async Task<AssetsTankFactorDto> GetByID(long ID) { return await Task.Factory.StartNew(() => { var model = _service.GetByID(ID); - return model == null ? null : new AssetsTankCoefficientDto(model); + return model == null ? null : new AssetsTankFactorDto(model); }); } /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public async Task<List<AssetsTankCoefficientDto>> GetByIds(List<long> Ids) + public async Task<List<AssetsTankFactorDto>> GetByIds(List<long> Ids) { return await Task.Factory.StartNew(() => { var list = _service.GetByIds(Ids); - var vm_list = list?.Select(x => new AssetsTankCoefficientDto(x)).ToList(); + var vm_list = list?.Select(x => new AssetsTankFactorDto(x)).ToList(); return vm_list; }); } #endregion Query + + #region Insert /// <summary> /// 鎻掑叆涓�鏉� /// </summary> - public async Task<long> Insert(AddAssetsTankCoefficientInput input) + public async Task<long> Insert(AddAssetsTankFactorInput input) { return await Task.Factory.StartNew(() => { - var model = input.Adapt<AddAssetsTankCoefficientInput, Model.AssetsTankFactor>(); + var model = input.Adapt<AddAssetsTankFactorInput, Model.AssetsTankFactor>(); + model.SortCode = _service.GetMaxSortCode() + 1; var id = _service.Insert(model); return id; }); @@ -70,7 +70,7 @@ /// <summary> /// 鎵归噺鎻掑叆 /// </summary> - public async Task<bool> Inserts(List<AddAssetsTankCoefficientInput> inputList) + public async Task<bool> Inserts(List<AddAssetsTankFactorInput> inputList) { return await Task.Factory.StartNew(() => { @@ -81,7 +81,7 @@ /// <summary> /// 澶ф壒閲忔彃鍏� /// </summary> - public async Task<bool> BulkInserts(List<AddAssetsTankCoefficientInput> list) + public async Task<bool> BulkInserts(List<AddAssetsTankFactorInput> list) { return await Task.Factory.StartNew(() => { @@ -96,7 +96,7 @@ /// <summary> /// 鏇存柊涓�鏉� /// </summary> - public async Task<bool> Update(UpdateAssetsTankCoefficientInput input) + public async Task<bool> Update(UpdateAssetsTankFactorInput input) { return await Task.Factory.StartNew(() => { @@ -115,7 +115,7 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public async Task<bool> Updates(List<UpdateAssetsTankCoefficientInput> inputList) + public async Task<bool> Updates(List<UpdateAssetsTankFactorInput> inputList) { return await Task.Factory.StartNew(() => { @@ -126,11 +126,36 @@ /// <summary> /// 澶ф壒閲忔洿鏂� /// </summary> - public async Task<bool> BulkUpdates(List<UpdateAssetsTankCoefficientInput> list) + public async Task<bool> BulkUpdates(List<UpdateAssetsTankFactorInput> list) { return await Task.Factory.StartNew(() => { return false; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateSortCode(ID, SortCode); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; }); } @@ -173,11 +198,11 @@ { return await Task.Factory.StartNew(() => { - var bol = _service.DeleteAll(); - return bol; + return false; }); } #endregion Delete + } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankMain.cs index 7a3bbd4..73f4562 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankMain.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankMain.cs @@ -1,15 +1,11 @@ -锘縰sing HStation.Dto; -using System.Linq; -using Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> - /// 姘存睜 - ///</summary> + /// 鍐峰嵈濉斿瀷鍙� + /// </summary> public class AssetsTankMain : IAssetsTankMain { - private readonly Service.AssetsTankMain _service = new(); + private readonly HStation.Service.AssetsTankMain _service = new(); #region Query @@ -52,31 +48,32 @@ } /// <summary> - /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// 鑾峰彇鏁伴噺 /// </summary> - public async Task<List<AssetsTankMainDto>> GetBySeriesID(long ID) + public async Task<int> GetCount() { return await Task.Factory.StartNew(() => { - var model = _service.GetAll(); - var vm_list = model?.Where(x => x.SeriesID == ID).Select(x => new AssetsTankMainDto(x)).ToList(); - return vm_list; + return _service.GetCount(); }); } /// <summary> - /// 鑾峰彇鏈�澶ф帓搴忕爜 + /// 閫氳繃 SeriesID 鑾峰彇 /// </summary> - public async Task<int> GetMaxSortCode() + public async Task<List<AssetsTankMainDto>> GetBySeriesID(long SeriesID) { return await Task.Factory.StartNew(() => { - var sort_code = _service.GetMaxSortCode(); - return sort_code; + var list = _service.GetBySeriesID(SeriesID); + var vm_list = list?.Select(x => new AssetsTankMainDto(x)).ToList(); + return vm_list; }); } #endregion Query + + #region Insert @@ -87,15 +84,20 @@ { return await Task.Factory.StartNew(() => { + var series = new HStation.Service.AssetsTankSeries().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}", "鏍囪宸插瓨鍦�"); + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); } } var model = input.Adapt<AddAssetsTankMainInput, Model.AssetsTankMain>(); - model.SortCode = _service.GetMaxSortCode() + 1; + model.SortCode = _service.GetMaxSortCode(input.SeriesID) + 1; var id = _service.Insert(model); return id; }); @@ -139,12 +141,11 @@ { 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}", "鏍囪宸插瓨鍦�"); + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); } } var rhs = new Model.AssetsTankMain(model); @@ -249,7 +250,7 @@ #region Exist /// <summary> - /// 鍒ゆ柇TagName鏄惁瀛樺湪 + /// /// </summary> public async Task<bool> IsExistTagName(string TagName) { @@ -261,7 +262,7 @@ } /// <summary> - /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// /// </summary> public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) { @@ -304,8 +305,9 @@ } /// <summary> - /// 鍏ㄩ儴鍒犻櫎 + /// 鍒犻櫎鍏ㄩ儴 /// </summary> + /// <returns></returns> public async Task<bool> DeleteAll() { return await Task.Factory.StartNew(() => @@ -315,5 +317,6 @@ } #endregion Delete + } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankSeries.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankSeries.cs index b5679d6..87d9c05 100644 --- a/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/15-Tank/AssetsTankSeries.cs @@ -1,14 +1,11 @@ -锘縰sing HStation.Dto; -using Yw.Dto; - -namespace HStation.CAL.LocalClient +锘縩amespace HStation.CAL.LocalClient { /// <summary> /// 姘存睜绯诲垪 - ///</summary> + /// </summary> public class AssetsTankSeries : IAssetsTankSeries { - private readonly Service.AssetsTankSeries _service = new(); + private readonly HStation.Service.AssetsTankSeries _service = new(); #region Query @@ -50,31 +47,9 @@ }); } - /// <summary> - /// 鑾峰彇鏈�澶ф帓搴忕爜 - /// </summary> - public async Task<int> GetMaxSortCode() - { - return await Task.Factory.StartNew(() => - { - var sort_code = _service.GetMaxSortCode(); - return sort_code; - }); - } - - /// <summary> - /// 鑾峰彇鏈�澶ф帓搴忕爜 - /// </summary> - public async Task<int> GetMaxSortCode(long ParentID) - { - return await Task.Factory.StartNew(() => - { - var sort_code = _service.GetMaxSortCode(ParentID); - return sort_code; - }); - } - #endregion Query + + #region Insert @@ -85,16 +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}", "鏍囪宸插瓨鍦�"); + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); } } var model = input.Adapt<AddAssetsTankSeriesInput, Model.AssetsTankSeries>(); - var parent_id = Yw.Untity.TreeParentIdsHelper.GetLastParentID(input.ParentIds); - model.SortCode = _service.GetMaxSortCode(parent_id) + 1; + model.ParentIds = parentIds; + model.SortCode = _service.GetMaxSortCode(input.ParentID) + 1; var id = _service.Insert(model); return id; }); @@ -138,12 +123,11 @@ { 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}", "鏍囪宸插瓨鍦�"); + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); } } var rhs = new Model.AssetsTankSeries(model); @@ -201,25 +185,56 @@ } /// <summary> - /// 鏇存柊鏍戞帓搴� + /// 鏇存柊鏍戞帓搴忕爜 /// </summary> public async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) { return await Task.Factory.StartNew(() => { - var bol = _service.UpdateTreeSortCode(ID, new List<long>() { ParentID }, SortCode); - return bol; - }); - } - - /// <summary> - /// 鏇存柊鏍戞帓搴忕爜 - /// </summary> - public async Task<bool> UpdateTreeSortCode(long ID, List<long> ParentIds, int SortCode) - { - return await Task.Factory.StartNew(() => - { - var bol = _service.UpdateTreeSortCode(ID, ParentIds, SortCode); + 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; }); } @@ -272,7 +287,7 @@ #region Exist /// <summary> - /// 鍒ゆ柇TagName鏄惁瀛樺湪 + /// /// </summary> public async Task<bool> IsExistTagName(string TagName) { @@ -284,7 +299,7 @@ } /// <summary> - /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// /// </summary> public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) { @@ -327,8 +342,9 @@ } /// <summary> - /// 鍏ㄩ儴鍒犻櫎 + /// 鍒犻櫎鍏ㄩ儴 /// </summary> + /// <returns></returns> public async Task<bool> DeleteAll() { return await Task.Factory.StartNew(() => @@ -338,5 +354,6 @@ } #endregion Delete + } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries.cs index 3204287..eb61fef 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries.cs @@ -3,19 +3,18 @@ namespace HStation.BLL { /// <summary> - /// 姘存睜绯诲垪 - ///</summary> + /// + /// </summary> public partial class AssetsTankSeries - { - - private readonly CAL.IAssetsTankSeries _cal = CALCreateHelper.CreateCAL<CAL.IAssetsTankSeries>(); - + { + private readonly HStation.CAL.IAssetsTankSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsTankSeries>(); + #region Query /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public async virtual Task<List<Vmo.AssetsTankSeriesVmo>> GetAll() + public virtual async Task<List<AssetsTankSeriesVmo>> GetAll() { var dtoList = await _cal.GetAll(); return Dto2Vmos(dtoList); @@ -24,7 +23,7 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public async virtual Task<Vmo.AssetsTankSeriesVmo> GetByID(long ID) + public virtual async Task<AssetsTankSeriesVmo> GetByID(long ID) { var dto = await _cal.GetByID(ID); return Dto2Vmo(dto); @@ -33,20 +32,20 @@ /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public async virtual Task<List<Vmo.AssetsTankSeriesVmo>> GetByIds(List<long> Ids) + public virtual async Task<List<AssetsTankSeriesVmo>> GetByIds(List<long> Ids) { var dtoList = await _cal.GetByIds(Ids); return Dto2Vmos(dtoList); } - #endregion + #endregion Query #region Insert /// <summary> /// 鎻掑叆涓�鏉� /// </summary> - public async virtual Task<long> Insert(Vmo.AssetsTankSeriesVmo vmo) + public virtual async Task<long> Insert(AssetsTankSeriesVmo vmo) { var dto = Vmo2AddDto(vmo); var id = await _cal.Insert(dto); @@ -56,21 +55,21 @@ /// <summary> /// 鎻掑叆澶氭潯 /// </summary> - public async virtual Task<bool> Inserts(List<Vmo.AssetsTankSeriesVmo> vmoList) + public virtual async Task<bool> Inserts(List<AssetsTankSeriesVmo> vmoList) { var dtoList = Vmo2AddDtos(vmoList); var bol = await _cal.Inserts(dtoList); return bol; } - #endregion + #endregion Insert #region Update /// <summary> /// 鏇存柊 /// </summary> - public async virtual Task<bool> Update(Vmo.AssetsTankSeriesVmo vmo) + public virtual async Task<bool> Update(AssetsTankSeriesVmo vmo) { var dto = Vmo2UpdateDto(vmo); var bol = await _cal.Update(dto); @@ -80,27 +79,26 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public async virtual Task<bool> Updates(List<Vmo.AssetsTankSeriesVmo> vmoList) + public virtual async Task<bool> Updates(List<AssetsTankSeriesVmo> vmoList) { var dtoList = Vmo2UpdateDtos(vmoList); var bol = await _cal.Updates(dtoList); return bol; } - /// <summary> /// 鏇存柊鎺掑簭鐮� /// </summary> - public async virtual Task<bool> UpdateSortCode(long ID, int SortCode) + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) { var bol = await _cal.UpdateSortCode(ID, SortCode); return bol; - } + } /// <summary> /// 鎵归噺鏇存柊鎺掑簭鐮� /// </summary> - public async virtual Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) { var dtoList = Sorters.ToDtoList(); var bol = await _cal.UpdateSorter(dtoList); @@ -110,70 +108,69 @@ /// <summary> /// 鏇存柊鏍戞帓搴忕爜 /// </summary> - public async virtual Task<bool> UpdateTreeSortCode(long ID, List<long> ParentIds, int SortCode) + public virtual async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) { - var bol = await _cal.UpdateTreeSortCode(ID, ParentIds, SortCode); + var bol = await _cal.UpdateTreeSortCode(ID, ParentID, SortCode); return bol; } - + /// <summary> /// 鏇存柊 Flags /// </summary> - public async virtual Task<bool> UpdateFlags(long ID, List<string> Flags) + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) { return await _cal.UpdateFlags(ID, Flags); } - + /// <summary> /// 鏇存柊 Paras /// </summary> - public async virtual Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) { return await _cal.UpdateParas(ID, Paras); } - + /// <summary> /// 鏇存柊 TagName /// </summary> - public async virtual Task<bool> UpdateTagName(long ID, string TagName) + public virtual async Task<bool> UpdateTagName(long ID, string TagName) { return await _cal.UpdateTagName(ID, TagName); } - - #endregion + + #endregion Update #region Exist /// <summary> /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 /// </summary> - public async virtual Task<bool> IsExistTagName(string TagName) + public virtual async Task<bool> IsExistTagName(string TagName) { return await _cal.IsExistTagName(TagName); } /// <summary> - /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 ExceptID + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID /// </summary> - public async virtual Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) { return await _cal.IsExistTagNameExceptID(TagName, ExceptID); } - #endregion - - #region Delete + #endregion Exist + + #region Delete /// <summary> /// 閫氳繃 ID 鍒犻櫎 /// </summary> - public async virtual Task<bool> DeleteByID(long ID) + public virtual async Task<bool> DeleteByID(long ID) { var bol = await _cal.DeleteByID(ID); return bol; - } + } - #endregion - + #endregion Delete } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries_Instance.cs index d93760f..0585538 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries_Instance.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/01-TankSeries/AssetsTankSeries_Instance.cs @@ -1,87 +1,82 @@ -锘縰sing AutoMapper; - -namespace HStation.BLL +锘縩amespace HStation.BLL { - /// <summary> - /// 姘存睜绯诲垪 - ///</summary> public partial class AssetsTankSeries { //dto to vmo - internal static Vmo.AssetsTankSeriesVmo Dto2Vmo(Dto.AssetsTankSeriesDto dto) + internal static HStation.Vmo.AssetsTankSeriesVmo Dto2Vmo(HStation.Dto.AssetsTankSeriesDto dto) { if (dto == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankSeriesDto, Vmo.AssetsTankSeriesVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankSeriesDto, HStation.Vmo.AssetsTankSeriesVmo>() ).CreateMapper(); - var vmo = mapper.Map<Dto.AssetsTankSeriesDto, Vmo.AssetsTankSeriesVmo>(dto); + var vmo = mapper.Map<HStation.Dto.AssetsTankSeriesDto, HStation.Vmo.AssetsTankSeriesVmo>(dto); return vmo; } //dto to vmos - internal static List<Vmo.AssetsTankSeriesVmo> Dto2Vmos(List<Dto.AssetsTankSeriesDto> dtos) + internal static List<HStation.Vmo.AssetsTankSeriesVmo> Dto2Vmos(List<HStation.Dto.AssetsTankSeriesDto> dtos) { if (dtos == null || dtos.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankSeriesDto, Vmo.AssetsTankSeriesVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankSeriesDto, HStation.Vmo.AssetsTankSeriesVmo>() ).CreateMapper(); - var vmos = mapper.Map<List<Dto.AssetsTankSeriesDto>, List<Vmo.AssetsTankSeriesVmo>>(dtos); + var vmos = mapper.Map<List<HStation.Dto.AssetsTankSeriesDto>, List<HStation.Vmo.AssetsTankSeriesVmo>>(dtos); return vmos; } //vmo to add dto - internal static Dto.AddAssetsTankSeriesInput Vmo2AddDto(Vmo.AssetsTankSeriesVmo vmo) + internal static HStation.Dto.AddAssetsTankSeriesInput Vmo2AddDto(HStation.Vmo.AssetsTankSeriesVmo vmo) { if (vmo == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankSeriesVmo, Dto.AddAssetsTankSeriesInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.AddAssetsTankSeriesInput>() ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankSeriesVmo, Dto.AddAssetsTankSeriesInput>(vmo); + var dto = mapper.Map<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.AddAssetsTankSeriesInput>(vmo); return dto; } //vmo to add dtos - internal static List<Dto.AddAssetsTankSeriesInput> Vmo2AddDtos(List<Vmo.AssetsTankSeriesVmo> vmoList) + internal static List<HStation.Dto.AddAssetsTankSeriesInput> Vmo2AddDtos(List<HStation.Vmo.AssetsTankSeriesVmo> vmoList) { if (vmoList == null || vmoList.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankSeriesVmo, Dto.AddAssetsTankSeriesInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.AddAssetsTankSeriesInput>() ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankSeriesVmo>, List<Dto.AddAssetsTankSeriesInput>>(vmoList); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankSeriesVmo>, List<HStation.Dto.AddAssetsTankSeriesInput>>(vmoList); return dtoList; } //vmo to update dto - internal static Dto.UpdateAssetsTankSeriesInput Vmo2UpdateDto(Vmo.AssetsTankSeriesVmo vmo) + internal static HStation.Dto.UpdateAssetsTankSeriesInput Vmo2UpdateDto(HStation.Vmo.AssetsTankSeriesVmo vmo) { if (vmo == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankSeriesVmo, Dto.UpdateAssetsTankSeriesInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.UpdateAssetsTankSeriesInput>() ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankSeriesVmo, Dto.UpdateAssetsTankSeriesInput>(vmo); + var dto = mapper.Map<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.UpdateAssetsTankSeriesInput>(vmo); return dto; } //vmo to update dtos - internal static List<Dto.UpdateAssetsTankSeriesInput> Vmo2UpdateDtos(List<Vmo.AssetsTankSeriesVmo> vmoList) + internal static List<HStation.Dto.UpdateAssetsTankSeriesInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsTankSeriesVmo> vmoList) { if (vmoList == null || vmoList.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankSeriesVmo, Dto.UpdateAssetsTankSeriesInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankSeriesVmo, HStation.Dto.UpdateAssetsTankSeriesInput>() ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankSeriesVmo>, List<Dto.UpdateAssetsTankSeriesInput>>(vmoList); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankSeriesVmo>, List<HStation.Dto.UpdateAssetsTankSeriesInput>>(vmoList); return dtoList; } } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain.cs index c1e97e4..1874203 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain.cs @@ -3,18 +3,18 @@ namespace HStation.BLL { /// <summary> - /// 姘存睜 - ///</summary> + /// + /// </summary> public partial class AssetsTankMain { - private readonly CAL.IAssetsTankMain _cal = CALCreateHelper.CreateCAL<CAL.IAssetsTankMain>(); + private readonly HStation.CAL.IAssetsTankMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsTankMain>(); #region Query /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public virtual async Task<List<Vmo.AssetsTankMainVmo>> GetAll() + public virtual async Task<List<AssetsTankMainVmo>> GetAll() { var dtoList = await _cal.GetAll(); return Dto2Vmos(dtoList); @@ -23,7 +23,7 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public virtual async Task<Vmo.AssetsTankMainVmo> GetByID(long ID) + public virtual async Task<AssetsTankMainVmo> GetByID(long ID) { var dto = await _cal.GetByID(ID); return Dto2Vmo(dto); @@ -32,22 +32,19 @@ /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public virtual async Task<List<Vmo.AssetsTankMainVmo>> GetByIds(List<long> Ids) + public virtual async Task<List<AssetsTankMainVmo>> GetByIds(List<long> Ids) { var dtoList = await _cal.GetByIds(Ids); return Dto2Vmos(dtoList); } /// <summary> - /// 閫氳繃绯诲垪ID鏌ユ壘 + /// 閫氳繃 SeriesID 鑾峰彇 /// </summary> - /// <param name="ID"></param> - /// <returns></returns> - public async Task<List<Vmo.AssetsTankMainVmo>> GetBySeriesID(long ID) + public virtual async Task<List<AssetsTankMainVmo>> 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 @@ -57,7 +54,7 @@ /// <summary> /// 鎻掑叆涓�鏉� /// </summary> - public virtual async Task<long> Insert(Vmo.AssetsTankMainVmo vmo) + public virtual async Task<long> Insert(AssetsTankMainVmo vmo) { var dto = Vmo2AddDto(vmo); var id = await _cal.Insert(dto); @@ -67,7 +64,7 @@ /// <summary> /// 鎻掑叆澶氭潯 /// </summary> - public virtual async Task<bool> Inserts(List<Vmo.AssetsTankMainVmo> vmoList) + public virtual async Task<bool> Inserts(List<AssetsTankMainVmo> vmoList) { var dtoList = Vmo2AddDtos(vmoList); var bol = await _cal.Inserts(dtoList); @@ -81,7 +78,7 @@ /// <summary> /// 鏇存柊 /// </summary> - public virtual async Task<bool> Update(Vmo.AssetsTankMainVmo vmo) + public virtual async Task<bool> Update(AssetsTankMainVmo vmo) { var dto = Vmo2UpdateDto(vmo); var bol = await _cal.Update(dto); @@ -91,7 +88,7 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public virtual async Task<bool> Updates(List<Vmo.AssetsTankMainVmo> vmoList) + public virtual async Task<bool> Updates(List<AssetsTankMainVmo> vmoList) { var dtoList = Vmo2UpdateDtos(vmoList); var bol = await _cal.Updates(dtoList); @@ -154,7 +151,7 @@ } /// <summary> - /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 ExceptID + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID /// </summary> public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) { diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain_Instance.cs index 8631501..d0748c5 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain_Instance.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/02-TankMain/AssetsTankMain_Instance.cs @@ -1,87 +1,82 @@ -锘縰sing AutoMapper; - -namespace HStation.BLL +锘縩amespace HStation.BLL { - /// <summary> - /// 姘存睜 - ///</summary> public partial class AssetsTankMain { //dto to vmo - internal static Vmo.AssetsTankMainVmo Dto2Vmo(Dto.AssetsTankMainDto dto) + internal static HStation.Vmo.AssetsTankMainVmo Dto2Vmo(HStation.Dto.AssetsTankMainDto dto) { if (dto == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankMainDto, Vmo.AssetsTankMainVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankMainDto, HStation.Vmo.AssetsTankMainVmo>() ).CreateMapper(); - var vmo = mapper.Map<Dto.AssetsTankMainDto, Vmo.AssetsTankMainVmo>(dto); + var vmo = mapper.Map<HStation.Dto.AssetsTankMainDto, HStation.Vmo.AssetsTankMainVmo>(dto); return vmo; } //dto to vmos - internal static List<Vmo.AssetsTankMainVmo> Dto2Vmos(List<Dto.AssetsTankMainDto> dtos) + internal static List<HStation.Vmo.AssetsTankMainVmo> Dto2Vmos(List<HStation.Dto.AssetsTankMainDto> dtos) { if (dtos == null || dtos.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankMainDto, Vmo.AssetsTankMainVmo>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankMainDto, HStation.Vmo.AssetsTankMainVmo>() ).CreateMapper(); - var vmos = mapper.Map<List<Dto.AssetsTankMainDto>, List<Vmo.AssetsTankMainVmo>>(dtos); + var vmos = mapper.Map<List<HStation.Dto.AssetsTankMainDto>, List<HStation.Vmo.AssetsTankMainVmo>>(dtos); return vmos; } //vmo to add dto - internal static Dto.AddAssetsTankMainInput Vmo2AddDto(Vmo.AssetsTankMainVmo vmo) + internal static HStation.Dto.AddAssetsTankMainInput Vmo2AddDto(HStation.Vmo.AssetsTankMainVmo vmo) { if (vmo == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankMainVmo, Dto.AddAssetsTankMainInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.AddAssetsTankMainInput>() ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankMainVmo, Dto.AddAssetsTankMainInput>(vmo); + var dto = mapper.Map<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.AddAssetsTankMainInput>(vmo); return dto; } //vmo to add dtos - internal static List<Dto.AddAssetsTankMainInput> Vmo2AddDtos(List<Vmo.AssetsTankMainVmo> vmoList) + internal static List<HStation.Dto.AddAssetsTankMainInput> Vmo2AddDtos(List<HStation.Vmo.AssetsTankMainVmo> vmoList) { if (vmoList == null || vmoList.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankMainVmo, Dto.AddAssetsTankMainInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.AddAssetsTankMainInput>() ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankMainVmo>, List<Dto.AddAssetsTankMainInput>>(vmoList); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankMainVmo>, List<HStation.Dto.AddAssetsTankMainInput>>(vmoList); return dtoList; } //vmo to update dto - internal static Dto.UpdateAssetsTankMainInput Vmo2UpdateDto(Vmo.AssetsTankMainVmo vmo) + internal static HStation.Dto.UpdateAssetsTankMainInput Vmo2UpdateDto(HStation.Vmo.AssetsTankMainVmo vmo) { if (vmo == null) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankMainVmo, Dto.UpdateAssetsTankMainInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.UpdateAssetsTankMainInput>() ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankMainVmo, Dto.UpdateAssetsTankMainInput>(vmo); + var dto = mapper.Map<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.UpdateAssetsTankMainInput>(vmo); return dto; } //vmo to update dtos - internal static List<Dto.UpdateAssetsTankMainInput> Vmo2UpdateDtos(List<Vmo.AssetsTankMainVmo> vmoList) + internal static List<HStation.Dto.UpdateAssetsTankMainInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsTankMainVmo> vmoList) { if (vmoList == null || vmoList.Count < 1) { return default; } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankMainVmo, Dto.UpdateAssetsTankMainInput>() + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankMainVmo, HStation.Dto.UpdateAssetsTankMainInput>() ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankMainVmo>, List<Dto.UpdateAssetsTankMainInput>>(vmoList); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankMainVmo>, List<HStation.Dto.UpdateAssetsTankMainInput>>(vmoList); return dtoList; } } diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs deleted file mode 100644 index c9b2565..0000000 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs +++ /dev/null @@ -1,88 +0,0 @@ -锘縰sing AutoMapper; - -namespace HStation.BLL -{ - /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public partial class AssetsTankCoefficient - { - //dto to vmo - internal static Vmo.AssetsTankCoefficientVmo Dto2Vmo(Dto.AssetsTankCoefficientDto dto) - { - if (dto == null) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankCoefficientDto, Vmo.AssetsTankCoefficientVmo>() - ).CreateMapper(); - var vmo = mapper.Map<Dto.AssetsTankCoefficientDto, Vmo.AssetsTankCoefficientVmo>(dto); - return vmo; - } - - //dto to vmos - internal static List<Vmo.AssetsTankCoefficientVmo> Dto2Vmos(List<Dto.AssetsTankCoefficientDto> dtos) - { - if (dtos == null || dtos.Count < 1) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.AssetsTankCoefficientDto, Vmo.AssetsTankCoefficientVmo>() - ).CreateMapper(); - var vmos = mapper.Map<List<Dto.AssetsTankCoefficientDto>, List<Vmo.AssetsTankCoefficientVmo>>(dtos); - return vmos; - } - - //vmo to add dto - internal static Dto.AddAssetsTankCoefficientInput Vmo2AddDto(Vmo.AssetsTankCoefficientVmo vmo) - { - if (vmo == null) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankCoefficientVmo, Dto.AddAssetsTankCoefficientInput>() - ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankCoefficientVmo, Dto.AddAssetsTankCoefficientInput>(vmo); - return dto; - } - - //vmo to add dtos - internal static List<Dto.AddAssetsTankCoefficientInput> Vmo2AddDtos(List<Vmo.AssetsTankCoefficientVmo> vmoList) - { - if (vmoList == null || vmoList.Count < 1) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankCoefficientVmo, Dto.AddAssetsTankCoefficientInput>() - ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankCoefficientVmo>, List<Dto.AddAssetsTankCoefficientInput>>(vmoList); - return dtoList; - } - - //vmo to update dto - internal static Dto.UpdateAssetsTankCoefficientInput Vmo2UpdateDto(Vmo.AssetsTankCoefficientVmo vmo) - { - if (vmo == null) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankCoefficientVmo, Dto.UpdateAssetsTankCoefficientInput>() - ).CreateMapper(); - var dto = mapper.Map<Vmo.AssetsTankCoefficientVmo, Dto.UpdateAssetsTankCoefficientInput>(vmo); - return dto; - } - - //vmo to update dtos - internal static List<Dto.UpdateAssetsTankCoefficientInput> Vmo2UpdateDtos(List<Vmo.AssetsTankCoefficientVmo> vmoList) - { - if (vmoList == null || vmoList.Count < 1) - { - return default; - } - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.AssetsTankCoefficientVmo, Dto.UpdateAssetsTankCoefficientInput>() - ).CreateMapper(); - var dtoList = mapper.Map<List<Vmo.AssetsTankCoefficientVmo>, List<Dto.UpdateAssetsTankCoefficientInput>>(vmoList); - return dtoList; - } - } -} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor.cs similarity index 60% rename from BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs rename to BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor.cs index c1cf224..a5606cb 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor.cs @@ -3,18 +3,18 @@ namespace HStation.BLL { /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public partial class AssetsTankCoefficient + /// + /// </summary> + public partial class AssetsTankFactor { - private readonly CAL.IAssetsTankCoefficient _cal = CALCreateHelper.CreateCAL<CAL.IAssetsTankCoefficient>(); + private readonly HStation.CAL.IAssetsTankFactor _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsTankFactor>(); #region Query /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public virtual async Task<List<Vmo.AssetsTankCoefficientVmo>> GetAll() + public virtual async Task<List<AssetsTankFactorVmo>> GetAll() { var dtoList = await _cal.GetAll(); return Dto2Vmos(dtoList); @@ -23,7 +23,7 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public virtual async Task<Vmo.AssetsTankCoefficientVmo> GetByID(long ID) + public virtual async Task<AssetsTankFactorVmo> GetByID(long ID) { var dto = await _cal.GetByID(ID); return Dto2Vmo(dto); @@ -32,7 +32,7 @@ /// <summary> /// 閫氳繃 Ids 鑾峰彇 /// </summary> - public virtual async Task<List<Vmo.AssetsTankCoefficientVmo>> GetByIds(List<long> Ids) + public virtual async Task<List<AssetsTankFactorVmo>> GetByIds(List<long> Ids) { var dtoList = await _cal.GetByIds(Ids); return Dto2Vmos(dtoList); @@ -45,7 +45,7 @@ /// <summary> /// 鎻掑叆涓�鏉� /// </summary> - public virtual async Task<long> Insert(Vmo.AssetsTankCoefficientVmo vmo) + public virtual async Task<long> Insert(AssetsTankFactorVmo vmo) { var dto = Vmo2AddDto(vmo); var id = await _cal.Insert(dto); @@ -55,7 +55,7 @@ /// <summary> /// 鎻掑叆澶氭潯 /// </summary> - public virtual async Task<bool> Inserts(List<Vmo.AssetsTankCoefficientVmo> vmoList) + public virtual async Task<bool> Inserts(List<AssetsTankFactorVmo> vmoList) { var dtoList = Vmo2AddDtos(vmoList); var bol = await _cal.Inserts(dtoList); @@ -69,7 +69,7 @@ /// <summary> /// 鏇存柊 /// </summary> - public virtual async Task<bool> Update(Vmo.AssetsTankCoefficientVmo vmo) + public virtual async Task<bool> Update(AssetsTankFactorVmo vmo) { var dto = Vmo2UpdateDto(vmo); var bol = await _cal.Update(dto); @@ -79,10 +79,29 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public virtual async Task<bool> Updates(List<Vmo.AssetsTankCoefficientVmo> vmoList) + public virtual async Task<bool> Updates(List<AssetsTankFactorVmo> vmoList) { var dtoList = Vmo2UpdateDtos(vmoList); var bol = await _cal.Updates(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) + { + 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; } @@ -97,14 +116,6 @@ { var bol = await _cal.DeleteByID(ID); return bol; - } - - /// <summary> - ///鍒犻櫎鍏ㄩ儴 - /// </summary> - public async Task<bool> DeleteAll() - { - return await _cal.DeleteAll(); } #endregion Delete diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor_Instance.cs new file mode 100644 index 0000000..8bfaa59 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/15-Tank/03-TankCoefficient/AssetsTankFactor_Instance.cs @@ -0,0 +1,83 @@ +锘縩amespace HStation.BLL +{ + public partial class AssetsTankFactor + { + //dto to vmo + internal static HStation.Vmo.AssetsTankFactorVmo Dto2Vmo(HStation.Dto.AssetsTankFactorDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankFactorDto, HStation.Vmo.AssetsTankFactorVmo>() + ).CreateMapper(); + var vmo = mapper.Map<HStation.Dto.AssetsTankFactorDto, HStation.Vmo.AssetsTankFactorVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.AssetsTankFactorVmo> Dto2Vmos(List<HStation.Dto.AssetsTankFactorDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsTankFactorDto, HStation.Vmo.AssetsTankFactorVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<HStation.Dto.AssetsTankFactorDto>, List<HStation.Vmo.AssetsTankFactorVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.AddAssetsTankFactorInput Vmo2AddDto(HStation.Vmo.AssetsTankFactorVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.AddAssetsTankFactorInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.AddAssetsTankFactorInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.AddAssetsTankFactorInput> Vmo2AddDtos(List<HStation.Vmo.AssetsTankFactorVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.AddAssetsTankFactorInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankFactorVmo>, List<HStation.Dto.AddAssetsTankFactorInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.UpdateAssetsTankFactorInput Vmo2UpdateDto(HStation.Vmo.AssetsTankFactorVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.UpdateAssetsTankFactorInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.UpdateAssetsTankFactorInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.UpdateAssetsTankFactorInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsTankFactorVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsTankFactorVmo, HStation.Dto.UpdateAssetsTankFactorInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsTankFactorVmo>, List<HStation.Dto.UpdateAssetsTankFactorInput>>(vmoList); + return dtoList; + } + } +} \ No newline at end of file diff --git a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs index a093358..dd09cc5 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs +++ b/Desktop/HStation.Desktop.Xhs.Core/MainForm.cs @@ -1045,7 +1045,7 @@ }; if (!IsExistPage(guid, true)) { - var page = new TankManageMainPage(); + var page = new AssetsTankMgrPage(); CreatePage(page, guid); } } diff --git a/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/AddAssetsValveFactorInput.cs b/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/AddAssetsValveFactorInput.cs index bd9d59c..c9ceec4 100644 --- a/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/AddAssetsValveFactorInput.cs +++ b/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/AddAssetsValveFactorInput.cs @@ -8,21 +8,6 @@ public string Name { get; set; } /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } - - /// <summary> - /// 姘村ご鎹熷け鏇茬嚎 - /// </summary> - public string MinorLossCurve { get; set; } - - /// <summary> - /// 寮�搴︽崯澶辨洸绾� - /// </summary> - public string OpenLossCurve { get; set; } - - /// <summary> /// 鍙e緞 /// </summary> public double? Caliber { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/UpdateAssetsValveFactorInput.cs b/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/UpdateAssetsValveFactorInput.cs index e415140..2769c8e 100644 --- a/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/UpdateAssetsValveFactorInput.cs +++ b/Dto/HStation.Dto.Assets.Core/01-Valve/03-VavleFactor/UpdateAssetsValveFactorInput.cs @@ -11,21 +11,6 @@ public long ID { get; set; } /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } - - /// <summary> - /// 姘村ご鎹熷け鏇茬嚎 - /// </summary> - public string MinorLossCurve { get; set; } - - /// <summary> - /// 寮�搴︽崯澶辨洸绾� - /// </summary> - public string OpenLossCurve { get; set; } - - /// <summary> /// 鍚嶇О /// </summary> public string Name { get; set; } diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AddAssetsTankSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AddAssetsTankSeriesInput.cs index c4a1943..23d5658 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AddAssetsTankSeriesInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AddAssetsTankSeriesInput.cs @@ -4,47 +4,45 @@ { /// <summary> /// 姘存睜绯诲垪 - ///</summary> + ///</summary> public class AddAssetsTankSeriesInput - { + { /// <summary> /// 鎵�灞炵被鍒獻D - ///</summary> - [Required, Range(1, long.MaxValue, ErrorMessage ="CatalogID 蹇呴』澶т簬0")] + ///</summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "CatalogID 蹇呴』澶т簬0")] public long CatalogID { get; set; } - + /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> [Required] public string Name { get; set; } - + /// <summary> - /// 鐖剁骇id鍒楄〃锛堢増鏈帶鍒� - ///</summary> - public List<long> ParentIds { get; set; } - + /// 鐖剁骇id + /// </summary> + [Required] + public long ParentID { get; set; } + /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } - + /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } - + /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } - + /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AssetsTankSeriesDto.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AssetsTankSeriesDto.cs index 20d6377..465c1ff 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AssetsTankSeriesDto.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/AssetsTankSeriesDto.cs @@ -2,76 +2,75 @@ { /// <summary> /// 姘存睜绯诲垪 - ///</summary> + ///</summary> public class AssetsTankSeriesDto { - /// <summary> - /// - /// </summary> - public AssetsTankSeriesDto() { } + /// <summary> + /// + /// </summary> + public AssetsTankSeriesDto() + { } - /// <summary> - /// - /// </summary> - public AssetsTankSeriesDto(Model.AssetsTankSeries rhs) - { - this.ID=rhs.ID; - this.CatalogID=rhs.CatalogID; - this.Name=rhs.Name; - this.ParentIds = rhs.ParentIds?.ToList(); - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); + /// <summary> + /// + /// </summary> + public AssetsTankSeriesDto(Model.AssetsTankSeries rhs) + { + this.ID = rhs.ID; + this.CatalogID = rhs.CatalogID; + this.Name = rhs.Name; + this.ParentID = rhs.ParentIds.LastOrDefault(); + this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } /// <summary> /// ID - ///</summary> + ///</summary> public long ID { get; set; } - + /// <summary> /// 鎵�灞炵被鍒獻D - ///</summary> + ///</summary> public long CatalogID { get; set; } - + /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } - + /// <summary> - /// 鐖剁骇id鍒楄〃锛堢増鏈帶鍒� - ///</summary> - public List<long> ParentIds { get; set; } - + /// 鐖剁骇id + /// </summary> + [Required] + public long ParentID { get; set; } + /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } - + /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } - + /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } - + /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } - + /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/UpdateAssetsTankSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/UpdateAssetsTankSeriesInput.cs index cd07662..65b4838 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/UpdateAssetsTankSeriesInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/01-AssetsTankSeries/UpdateAssetsTankSeriesInput.cs @@ -4,53 +4,51 @@ { /// <summary> /// 姘存睜绯诲垪 - ///</summary> + ///</summary> public class UpdateAssetsTankSeriesInput - { + { /// <summary> - /// ID - ///</summary> - [Required, Range(1, long.MaxValue, ErrorMessage ="ID 蹇呴』澶т簬0")] + /// ID + ///</summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] public long ID { get; set; } - + /// <summary> - /// 鎵�灞炵被鍒獻D - ///</summary> - [Required, Range(1, long.MaxValue, ErrorMessage ="CatalogID 蹇呴』澶т簬0")] + /// 鎵�灞炵被鍒獻D + ///</summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "CatalogID 蹇呴』澶т簬0")] public long CatalogID { get; set; } - + /// <summary> - /// 鍚嶇О - ///</summary> + /// 鍚嶇О + ///</summary> [Required] public string Name { get; set; } - - /// <summary> - /// 鐖剁骇id鍒楄〃锛堢増鏈帶鍒� - ///</summary> - public List<long> ParentIds { get; set; } - - /// <summary> - /// 鍙傛暟 - ///</summary> - public Dictionary<string, string> Paras { get; set; } - - /// <summary> - /// 鏍囩 - ///</summary> - public List<string> Flags { get; set; } - - /// <summary> - /// 鏍囧織 - ///</summary> - public string TagName { get; set; } - - /// <summary> - /// 璇存槑 - ///</summary> - public string Description { get; set; } - - - } -} + /// <summary> + /// 鐖剁骇id + /// </summary> + [Required] + public long ParentID { get; set; } + + /// <summary> + /// 鍙傛暟 + ///</summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + ///</summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + ///</summary> + public string TagName { get; set; } + + /// <summary> + /// 璇存槑 + ///</summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/02-AssetsTankMain/AssetsTankMainDto.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/02-AssetsTankMain/AssetsTankMainDto.cs index eb6480c..2f355aa 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/02-AssetsTankMain/AssetsTankMainDto.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/02-AssetsTankMain/AssetsTankMainDto.cs @@ -23,7 +23,7 @@ this.MaxLevel = rhs.MaxLevel; this.DN = rhs.DN; this.OverFlow = rhs.OverFlow; - this.KeyWord = rhs.KeyWord; + this.KeyWords = rhs.KeyWords; this.MinVol = rhs.MinVol; this.Flags = rhs.Flags; this.Paras = rhs.Paras; @@ -75,7 +75,7 @@ /// <summary> /// 璇嗗埆鍏抽敭瀛� ///</summary> - public List<string> KeyWord { get; set; } + public List<string> KeyWords { get; set; } /// <summary> /// 鍙傛暟 diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs deleted file mode 100644 index 8772cca..0000000 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AssetsTankCoefficientDto.cs +++ /dev/null @@ -1,51 +0,0 @@ -锘縩amespace HStation.Dto -{ - /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public class AssetsTankCoefficientDto - { - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientDto() - { } - - /// <summary> - /// - /// </summary> - public AssetsTankCoefficientDto(Model.AssetsTankFactor rhs) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.Caliber = rhs.Caliber; - this.Material = rhs.Material; - this.MinorLoss = rhs.MinorLoss; - } - - /// <summary> - /// ID - ///</summary> - public long ID { get; set; } - - /// <summary> - /// 鍚嶇О - ///</summary> - public string Name { get; set; } - - /// <summary> - /// 鍙e緞 - ///</summary> - public double? Caliber { get; set; } - - /// <summary> - /// 鏉愭枡 - ///</summary> - public string Material { get; set; } - - /// <summary> - /// 灞�闃荤郴鏁� - ///</summary> - public double MinorLoss { get; set; } - } -} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AddAssetsTankFactorInput.cs similarity index 78% rename from Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs rename to Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AddAssetsTankFactorInput.cs index 72adb9a..46fc934 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/AddAssetsTankCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AddAssetsTankFactorInput.cs @@ -5,18 +5,13 @@ /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class AddAssetsTankCoefficientInput + public class AddAssetsTankFactorInput { /// <summary> /// 鍚嶇О ///</summary> [Required] public string Name { get; set; } - - /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } /// <summary> /// 鍙e緞 @@ -34,8 +29,13 @@ public double MinorLoss { get; set; } /// <summary> - /// 瀹圭Н鏇茬嚎 + /// 鎺掑簭 /// </summary> - public string VolCurve { get; set; } + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AssetsTankFactorDto.cs similarity index 72% rename from Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs rename to Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AssetsTankFactorDto.cs index a72a29b..00faabc 100644 --- a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankCoefficientVmo.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/AssetsTankFactorDto.cs @@ -1,37 +1,34 @@ -锘縩amespace HStation.Vmo +锘縩amespace HStation.Dto { /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class AssetsTankCoefficientVmo + public class AssetsTankFactorDto { /// <summary> /// /// </summary> - public AssetsTankCoefficientVmo() + public AssetsTankFactorDto() { } /// <summary> /// /// </summary> - public AssetsTankCoefficientVmo(Dto.AssetsTankCoefficientDto rhs) + public AssetsTankFactorDto(Model.AssetsTankFactor rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.Caliber = rhs.Caliber; this.Material = rhs.Material; this.MinorLoss = rhs.MinorLoss; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; } /// <summary> /// ID ///</summary> public long ID { get; set; } - - /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } /// <summary> /// 鍚嶇О @@ -54,8 +51,13 @@ public double MinorLoss { get; set; } /// <summary> - /// 瀹圭Н鏇茬嚎 + /// 鎺掑簭 /// </summary> - public string VolCurve { get; set; } + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } } } \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/UpdateAssetsTankFactorInput.cs similarity index 82% rename from Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs rename to Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/UpdateAssetsTankFactorInput.cs index fff5c83..3bd0d4a 100644 --- a/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankCoefficient/UpdateAssetsTankCoefficientInput.cs +++ b/Dto/HStation.Dto.Assets.Core/15-Tank/03-AssetsTankFactor/UpdateAssetsTankFactorInput.cs @@ -5,18 +5,13 @@ /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class UpdateAssetsTankCoefficientInput + public class UpdateAssetsTankFactorInput { /// <summary> /// ID ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] public long ID { get; set; } - - /// <summary> - /// 鍨嬪彿ID - /// </summary> - public long MainID { get; set; } /// <summary> /// 鍚嶇О @@ -40,8 +35,13 @@ public double MinorLoss { get; set; } /// <summary> - /// 瀹圭Н鏇茬嚎 + /// 鎺掑簭 /// </summary> - public string VolCurve { get; set; } + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankMain.cs b/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankMain.cs index b552b97..dd9d2cc 100644 --- a/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankMain.cs +++ b/Service/HStation.Service.Assets.Core/02-model/15-Tank/AssetsTankMain.cs @@ -25,7 +25,7 @@ this.MaxLevel = rhs.MaxLevel; this.DN = rhs.DN; this.OverFlow = rhs.OverFlow; - this.KeyWord = rhs.KeyWord; + this.KeyWords = rhs.KeyWords; this.MinVol=rhs.MinVol; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); @@ -47,7 +47,7 @@ this.DN = rhs.DN; this.MinVol = rhs.MinVol; this.OverFlow = rhs.OverFlow; - this.KeyWord = rhs.KeyWord; + this.KeyWords = rhs.KeyWords; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -93,7 +93,7 @@ /// <summary> /// 璇嗗埆鍏抽敭瀛� ///</summary> - public List<string> KeyWord { get; set; } + public List<string> KeyWords { get; set; } /// <summary> /// 鍙傛暟 diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankCoefficient.cs deleted file mode 100644 index f442e04..0000000 --- a/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankCoefficient.cs +++ /dev/null @@ -1,13 +0,0 @@ -锘縰sing Yw.DAL; - -namespace HStation.DAL -{ - /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public interface IAssetsTankCoefficient :IBaseDAL<Entity.AssetsTankFactor> - { - - } -} - diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankFactor.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankFactor.cs new file mode 100644 index 0000000..c14055c --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankFactor.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.DAL; + +namespace HStation.DAL +{ + /// <summary> + /// 姘存睜绯绘暟 + ///</summary> + public interface IAssetsTankFactor : IBaseDAL<Entity.AssetsTankFactor>, IUpdateSorter + { + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankSeries.cs index 6a6ecec..001dda5 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankSeries.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/01-interface/14-ITank/IAssetsTankSeries.cs @@ -1,13 +1,11 @@ -锘縰sing Yw.DAL; +锘縰sing Yw.DAL; namespace HStation.DAL { /// <summary> /// 姘存睜绯诲垪 - ///</summary> - public interface IAssetsTankSeries :IBaseDAL<Entity.AssetsTankSeries> , IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter + ///</summary> + public interface IAssetsTankSeries : IBaseDAL<Entity.AssetsTankSeries>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter { - } -} - +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankFactor.cs similarity index 76% rename from Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankCoefficient.cs rename to Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankFactor.cs index 1627f2e..fd19285 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/14-Tank/AssetsTankFactor.cs @@ -5,7 +5,7 @@ /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class AssetsTankCoefficient : BaseDAL<Entity.AssetsTankFactor>, IAssetsTankCoefficient + public class AssetsTankFactor : BaseDAL_Sorter<Entity.AssetsTankFactor>, IAssetsTankFactor { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankFactor.cs similarity index 76% rename from Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankCoefficient.cs rename to Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankFactor.cs index 4118ed0..143efe3 100644 --- a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/14-Tank/AssetsTankFactor.cs @@ -5,7 +5,7 @@ /// <summary> /// 姘存睜绯绘暟 ///</summary> - public class AssetsTankCoefficient : BaseDAL<Entity.AssetsTankFactor>, IAssetsTankCoefficient + public class AssetsTankFactor : BaseDAL_Sorter<Entity.AssetsTankFactor>, IAssetsTankFactor { /// <summary> /// diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/01-TankSeries/AssetsTankSeries.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/01-TankSeries/AssetsTankSeries.cs index 4e8ca2e..6c7d447 100644 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/01-TankSeries/AssetsTankSeries.cs +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/01-TankSeries/AssetsTankSeries.cs @@ -1,75 +1,73 @@ -锘縰sing Yw.Service; - -namespace HStation.Service +锘縩amespace HStation.Service { /// <summary> - /// 姘存睜绯诲垪 - ///</summary> - public partial class AssetsTankSeries + /// + /// </summary> + public partial class AssetsTankSeries { #region Cache //鑾峰彇缂撳瓨 private static List<Model.AssetsTankSeries> GetCache() { - var all = AssetsTankSeriesCacheHelper.GetSet(() => - { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var entity_list = dal.GetAll(); - var model_list = Entity2Models(entity_list); - if (model_list == null) - { - model_list = new List<Model.AssetsTankSeries>(); - } - return model_list; - }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); - return all; + var all = AssetsTankSeriesCacheHelper.GetSet(() => + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var entity_list = dal.GetAll(); + var model_list = Entity2Models(entity_list); + if (model_list == null) + { + model_list = new List<Model.AssetsTankSeries>(); + } + return model_list; + }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); + return all; } //閫氳繃 ID 鏇存柊缂撳瓨 private static void UpdateCache(long ID) { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var entity_ds = dal.GetByID(ID); - var model_ds = Entity2Model(entity_ds); - var all = GetCache(); - var model = all.Find(x => x.ID == ID); - if (model == null) - { - all.Add(model_ds); - } - else - { - model.Reset(model_ds); - } - AssetsTankSeriesCacheHelper.Trigger(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var entity_ds = dal.GetByID(ID); + var model_ds = Entity2Model(entity_ds); + var all = GetCache(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + all.Add(model_ds); + } + else + { + model.Reset(model_ds); + } + AssetsTankSeriesCacheHelper.Trigger(); } //閫氳繃 Ids 鏇存柊缂撳瓨 private static void UpdateCache(List<long> Ids) { - if (Ids == null || Ids.Count < 1) - { - return; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var entity_list = dal.GetByIds(Ids); - var model_list = Entity2Models(entity_list); - var all = GetCache(); - all.RemoveAll(x => Ids.Contains(x.ID)); - if (model_list != null && model_list.Count > 0) - { - all.AddRange(model_list); - } - AssetsTankSeriesCacheHelper.Trigger(); + if (Ids == null || Ids.Count < 1) + { + return; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var entity_list = dal.GetByIds(Ids); + var model_list = Entity2Models(entity_list); + var all = GetCache(); + all.RemoveAll(x => Ids.Contains(x.ID)); + if (model_list != null && model_list.Count > 0) + { + all.AddRange(model_list); + } + AssetsTankSeriesCacheHelper.Trigger(); } //绉婚櫎缂撳瓨 private static void RemoveCache(long ID) { - var all = GetCache(); - all.RemoveAll(x => x.ID == ID); - AssetsTankSeriesCacheHelper.Trigger(); + var all = GetCache(); + all.RemoveAll(x => x.ID == ID); + AssetsTankSeriesCacheHelper.Trigger(); } /// <summary> @@ -77,10 +75,12 @@ /// </summary> public static void PublishCache(string key) { - AssetsTankSeriesCacheHelper.Publish(key); + AssetsTankSeriesCacheHelper.Publish(key); } - #endregion + #endregion Cache + + #region Query @@ -89,8 +89,8 @@ /// </summary> public List<Model.AssetsTankSeries> GetAll() { - var all = GetCache(); - return all.OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + var all = GetCache(); + return all.OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> @@ -98,8 +98,8 @@ /// </summary> public Model.AssetsTankSeries GetByID(long ID) { - var all = GetAll(); - return all.Find(x => x.ID == ID); + var all = GetAll(); + return all.Find(x => x.ID == ID); } /// <summary> @@ -107,22 +107,22 @@ /// </summary> public List<Model.AssetsTankSeries> GetByIds(List<long> Ids) { - if (Ids == null || Ids.Count < 1) - { - return default; - } - var all = GetAll(); - return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); + if (Ids == null || Ids.Count < 1) + { + return default; + } + var all = GetAll(); + return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } - + /// <summary> /// 閫氳繃 ID 鑾峰彇瀛愮骇鍙婅嚜韬� /// </summary> public List<Model.AssetsTankSeries> 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; + 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> @@ -130,9 +130,9 @@ /// </summary> public List<Model.AssetsTankSeries> 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; + 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> @@ -140,13 +140,13 @@ /// </summary> public List<Model.AssetsTankSeries> 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(); + 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> @@ -154,13 +154,13 @@ /// </summary> public List<Model.AssetsTankSeries> 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(); + 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> @@ -168,8 +168,8 @@ /// </summary> public List<Model.AssetsTankSeries> GetByParentID(long ParentID) { - var all = GetAll(); - return all.Where(x => x.ParentIds.LastOrDefault() == ParentID).OrderBy(x => x.SortCode).ToList(); + var all = GetAll(); + return all.Where(x => x.ParentIds.LastOrDefault() == ParentID).OrderBy(x => x.SortCode).ToList(); } /// <summary> @@ -177,37 +177,35 @@ /// </summary> public bool HasChildren(long ID) { - var all = GetAll(); - return all.Exists(x => x.ParentIds.Contains(ID)); - } - - /// <summary> - /// 鑾峰彇鏈�澶ф帓搴忕爜 - /// </summary> - public int GetMaxSortCode() - { - var list = GetAll(); - if (list == null || list.Count < 1) - { - return 0; - } - return list.Max(x => x.SortCode); + var all = GetAll(); + return all.Exists(x => x.ParentIds.Contains(ID)); } - + /// <summary> /// 鑾峰彇鏈�澶ф帓搴忕爜 /// </summary> public int GetMaxSortCode(long ParentID) { - var list = GetByParentID(ParentID); + List<Model.AssetsTankSeries> 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 list.Max(x => x.SortCode); } - - #endregion + + #endregion Query + + #region Insert @@ -216,18 +214,18 @@ /// </summary> public long Insert(Model.AssetsTankSeries model) { - if (model == null) - { - return default; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var entity = Model2Entity(model); - var id = dal.Insert(entity); - if (id > 0) - { - UpdateCache(id); - } - return id; + if (model == null) + { + return default; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var entity = Model2Entity(model); + var id = dal.Insert(entity); + if (id > 0) + { + UpdateCache(id); + } + return id; } /// <summary> @@ -235,22 +233,24 @@ /// </summary> public bool Inserts(List<Model.AssetsTankSeries> list) { - if (list == null || list.Count < 1) - { - return false; + if (list == null || list.Count < 1) + { + return false; } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var entity_list = Model2Entities(list); - var ids = dal.InsertsR(entity_list); - if (ids != null && ids.Count > 0) - { - UpdateCache(ids); - return true; - } - return false; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var entity_list = Model2Entities(list); + var ids = dal.InsertsR(entity_list); + if (ids != null && ids.Count > 0) + { + UpdateCache(ids); + return true; + } + return false; } - - #endregion + + #endregion Insert + + #region Update @@ -259,18 +259,18 @@ /// </summary> public bool Update(Model.AssetsTankSeries model) { - if (model == null) - { - return false; - } - var entity = Model2Entity(model); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.Update(entity); - if (bol) - { - UpdateCache(model.ID); - } - return bol; + if (model == null) + { + return false; + } + var entity = Model2Entity(model); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.Update(entity); + if (bol) + { + UpdateCache(model.ID); + } + return bol; } /// <summary> @@ -278,41 +278,40 @@ /// </summary> public bool Updates(List<Model.AssetsTankSeries> list) { - if (list == null || list.Count < 1) - { - return false; - } - if (list.Exists(x => x.ID < 1)) - { - return false; - } - var entity_list = Model2Entities(list); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.Updates(entity_list); - if (bol) - { - UpdateCache(list.Select(x => x.ID).ToList()); - } - return bol; + if (list == null || list.Count < 1) + { + return false; + } + if (list.Exists(x => x.ID < 1)) + { + return false; + } + var entity_list = Model2Entities(list); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.Updates(entity_list); + if (bol) + { + UpdateCache(list.Select(x => x.ID).ToList()); + } + return bol; } - /// <summary> /// 鏇存柊鎺掑簭鐮� /// </summary> public bool UpdateSortCode(long ID, int SortCode) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateSortCode(ID, SortCode); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateSortCode(ID, SortCode); + if (bol) + { + UpdateCache(ID); + } + return bol; } /// <summary> @@ -320,40 +319,39 @@ /// </summary> public bool UpdateSorter(List<Yw.Model.Sorter> sorters) { - if (sorters == null || sorters.Count < 1) - { - return false; - } - if (sorters.Exists(x => x.ID < 1)) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateSorter(sorters.ToEntityList()); - if (bol) - { - UpdateCache(sorters.Select(x => x.ID).ToList()); - } - return bol; + if (sorters == null || sorters.Count < 1) + { + return false; + } + if (sorters.Exists(x => x.ID < 1)) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateSorter(sorters.ToEntityList()); + if (bol) + { + UpdateCache(sorters.Select(x => x.ID).ToList()); + } + return bol; } - /// <summary> /// 鏇存柊鏍戞帓搴忕爜 /// </summary> public bool UpdateTreeSortCode(long ID, List<long> ParentIds, int SortCode) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateTreeSortCode(ID, TreeParentIdsHelper.ToString(ParentIds), SortCode); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateTreeSortCode(ID, TreeParentIdsHelper.ToString(ParentIds), SortCode); + if (bol) + { + UpdateCache(ID); + } + return bol; } /// <summary> @@ -361,77 +359,80 @@ /// </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<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateTreeSorter(sorters.ToEntityList()); - if (bol) - { - UpdateCache(sorters.Select(x => x.ID).ToList()); - } - return bol; + if (sorters == null || sorters.Count < 1) + { + return false; + } + if (sorters.Exists(x => x.ID < 1)) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + 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) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateParas(ID, ParasHelper.ToString(Paras)); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateParas(ID, ParasHelper.ToString(Paras)); + if (bol) + { + UpdateCache(ID); + } + return bol; } - + /// <summary> /// 鏇存柊 Flags /// </summary> public bool UpdateFlags(long ID, List<string> Flags) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateFlags(ID, FlagsHelper.ToString(Flags)); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateFlags(ID, FlagsHelper.ToString(Flags)); + if (bol) + { + UpdateCache(ID); + } + return bol; } - + /// <summary> /// 鏇存柊 TagName /// </summary> public bool UpdateTagName(long ID, string TagName) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.UpdateTagName(ID, TagName); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.UpdateTagName(ID, TagName); + if (bol) + { + UpdateCache(ID); + } + return bol; } - #endregion + + #endregion Update + + #region Exist @@ -440,12 +441,12 @@ /// </summary> public bool IsExistTagName(string TagName) { - if (string.IsNullOrEmpty(TagName)) - { - return false; - } - var all = GetAll(); - return all.Exists(x => x.TagName == TagName); + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName); } /// <summary> @@ -453,15 +454,17 @@ /// </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); + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName && x.ID != ExceptID); } - #endregion + #endregion Exist + + #region Delete @@ -470,18 +473,27 @@ /// </summary> public bool DeleteByID(long ID, out string Msg) { - Msg = string.Empty; - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankSeries>(); - var bol = dal.DeleteByID(ID); - if (bol) - { - RemoveCache(ID); - } - return bol; + Msg = string.Empty; + if (HasChildren(ID)) + { + Msg = "瀛樺湪瀛愮骇锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } + var serviceMain = new AssetsTankMain(); + if (serviceMain.IsExistBySeriesID(ID)) + { + Msg = "瀛樺湪鍨嬪彿淇℃伅锛岃鍒犻櫎鍚庨噸璇曪紒"; + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankSeries>(); + var bol = dal.DeleteByID(ID); + if (bol) + { + RemoveCache(ID); + } + return bol; } - - #endregion - - + + #endregion Delete } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain.cs index fb4655f..acaa53b 100644 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain.cs +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain.cs @@ -1,75 +1,73 @@ -锘縰sing Yw.Service; - -namespace HStation.Service +锘縩amespace HStation.Service { /// <summary> - /// 姘存睜 - ///</summary> - public partial class AssetsTankMain + /// + /// </summary> + public partial class AssetsTankMain { #region Cache //鑾峰彇缂撳瓨 private static List<Model.AssetsTankMain> GetCache() { - var all = AssetsTankMainCacheHelper.GetSet(() => - { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var entity_list = dal.GetAll(); - var model_list = Entity2Models(entity_list); - if (model_list == null) - { - model_list = new List<Model.AssetsTankMain>(); - } - return model_list; - }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); - return all; + var all = AssetsTankMainCacheHelper.GetSet(() => + { + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var entity_list = dal.GetAll(); + var model_list = Entity2Models(entity_list); + if (model_list == null) + { + model_list = new List<Model.AssetsTankMain>(); + } + return model_list; + }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); + return all; } //閫氳繃 ID 鏇存柊缂撳瓨 private static void UpdateCache(long ID) { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var entity_ds = dal.GetByID(ID); - var model_ds = Entity2Model(entity_ds); - var all = GetCache(); - var model = all.Find(x => x.ID == ID); - if (model == null) - { - all.Add(model_ds); - } - else - { - model.Reset(model_ds); - } - AssetsTankMainCacheHelper.Trigger(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var entity_ds = dal.GetByID(ID); + var model_ds = Entity2Model(entity_ds); + var all = GetCache(); + var model = all.Find(x => x.ID == ID); + if (model == null) + { + all.Add(model_ds); + } + else + { + model.Reset(model_ds); + } + AssetsTankMainCacheHelper.Trigger(); } //閫氳繃 Ids 鏇存柊缂撳瓨 private static void UpdateCache(List<long> Ids) { - if (Ids == null || Ids.Count < 1) - { - return; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var entity_list = dal.GetByIds(Ids); - var model_list = Entity2Models(entity_list); - var all = GetCache(); - all.RemoveAll(x => Ids.Contains(x.ID)); - if (model_list != null && model_list.Count > 0) - { - all.AddRange(model_list); - } - AssetsTankMainCacheHelper.Trigger(); + if (Ids == null || Ids.Count < 1) + { + return; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var entity_list = dal.GetByIds(Ids); + var model_list = Entity2Models(entity_list); + var all = GetCache(); + all.RemoveAll(x => Ids.Contains(x.ID)); + if (model_list != null && model_list.Count > 0) + { + all.AddRange(model_list); + } + AssetsTankMainCacheHelper.Trigger(); } //绉婚櫎缂撳瓨 private static void RemoveCache(long ID) { - var all = GetCache(); - all.RemoveAll(x => x.ID == ID); - AssetsTankMainCacheHelper.Trigger(); + var all = GetCache(); + all.RemoveAll(x => x.ID == ID); + AssetsTankMainCacheHelper.Trigger(); } /// <summary> @@ -77,10 +75,12 @@ /// </summary> public static void PublishCache(string key) { - AssetsTankMainCacheHelper.Publish(key); + AssetsTankMainCacheHelper.Publish(key); } - #endregion + #endregion Cache + + #region Query @@ -89,8 +89,8 @@ /// </summary> public List<Model.AssetsTankMain> GetAll() { - var all = GetCache(); - return all.OrderBy(x => x.SortCode).ToList(); + var all = GetCache(); + return all.OrderBy(x => x.SortCode).ToList(); } /// <summary> @@ -98,8 +98,8 @@ /// </summary> public Model.AssetsTankMain GetByID(long ID) { - var all = GetAll(); - return all.Find(x => x.ID == ID); + var all = GetAll(); + return all.Find(x => x.ID == ID); } /// <summary> @@ -107,28 +107,61 @@ /// </summary> public List<Model.AssetsTankMain> GetByIds(List<long> Ids) { - if (Ids == null || Ids.Count < 1) - { - return default; - } - var all = GetAll(); - return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.SortCode).ToList(); + if (Ids == null || Ids.Count < 1) + { + return default; + } + var all = GetAll(); + return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.SortCode).ToList(); } - + + /// <summary> + /// 鑾峰彇鏁伴噺 + /// </summary> + public int GetCount() + { + var all = GetAll(); + return all.Count; + } + + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + public List<Model.AssetsTankMain> GetBySeriesID(long SeriesID) + { + var all = GetAll(); + return all.Where(x => x.SeriesID == SeriesID).OrderBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 閫氳繃 SeriesIds 鑾峰彇 + /// </summary> + public List<Model.AssetsTankMain> GetBySeriesIds(List<long> SeriesIds) + { + if (SeriesIds == null || SeriesIds.Count < 1) + { + return default; + } + var all = GetAll(); + return all.Where(x => SeriesIds.Contains(x.SeriesID)).OrderBy(x => x.SortCode).ToList(); + } + /// <summary> /// 鑾峰彇鏈�澶ф帓搴忕爜 /// </summary> - public int GetMaxSortCode() + public int GetMaxSortCode(long SeriesID) { - var list = GetAll(); - if (list == null || list.Count < 1) + var all = GetBySeriesID(SeriesID); + if (all == null || all.Count < 1) { return 0; } - return list.Max(x => x.SortCode); + return all.Max(x => x.SortCode); } - - #endregion + + #endregion Query + + #region Insert @@ -137,18 +170,18 @@ /// </summary> public long Insert(Model.AssetsTankMain model) { - if (model == null) - { - return default; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var entity = Model2Entity(model); - var id = dal.Insert(entity); - if (id > 0) - { - UpdateCache(id); - } - return id; + if (model == null) + { + return default; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var entity = Model2Entity(model); + var id = dal.Insert(entity); + if (id > 0) + { + UpdateCache(id); + } + return id; } /// <summary> @@ -156,22 +189,24 @@ /// </summary> public bool Inserts(List<Model.AssetsTankMain> list) { - if (list == null || list.Count < 1) - { - return false; + if (list == null || list.Count < 1) + { + return false; } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var entity_list = Model2Entities(list); - var ids = dal.InsertsR(entity_list); - if (ids != null && ids.Count > 0) - { - UpdateCache(ids); - return true; - } - return false; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var entity_list = Model2Entities(list); + var ids = dal.InsertsR(entity_list); + if (ids != null && ids.Count > 0) + { + UpdateCache(ids); + return true; + } + return false; } - - #endregion + + #endregion Insert + + #region Update @@ -180,18 +215,18 @@ /// </summary> public bool Update(Model.AssetsTankMain model) { - if (model == null) - { - return false; - } - var entity = Model2Entity(model); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.Update(entity); - if (bol) - { - UpdateCache(model.ID); - } - return bol; + if (model == null) + { + return false; + } + var entity = Model2Entity(model); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.Update(entity); + if (bol) + { + UpdateCache(model.ID); + } + return bol; } /// <summary> @@ -199,41 +234,40 @@ /// </summary> public bool Updates(List<Model.AssetsTankMain> list) { - if (list == null || list.Count < 1) - { - return false; - } - if (list.Exists(x => x.ID < 1)) - { - return false; - } - var entity_list = Model2Entities(list); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.Updates(entity_list); - if (bol) - { - UpdateCache(list.Select(x => x.ID).ToList()); - } - return bol; + if (list == null || list.Count < 1) + { + return false; + } + if (list.Exists(x => x.ID < 1)) + { + return false; + } + var entity_list = Model2Entities(list); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.Updates(entity_list); + if (bol) + { + UpdateCache(list.Select(x => x.ID).ToList()); + } + return bol; } - /// <summary> /// 鏇存柊鎺掑簭鐮� /// </summary> public bool UpdateSortCode(long ID, int SortCode) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.UpdateSortCode(ID, SortCode); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.UpdateSortCode(ID, SortCode); + if (bol) + { + UpdateCache(ID); + } + return bol; } /// <summary> @@ -241,78 +275,80 @@ /// </summary> public bool UpdateSorter(List<Yw.Model.Sorter> sorters) { - if (sorters == null || sorters.Count < 1) - { - return false; - } - if (sorters.Exists(x => x.ID < 1)) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.UpdateSorter(sorters.ToEntityList()); - if (bol) - { - UpdateCache(sorters.Select(x => x.ID).ToList()); - } - return bol; + if (sorters == null || sorters.Count < 1) + { + return false; + } + if (sorters.Exists(x => x.ID < 1)) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.UpdateSorter(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) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.UpdateParas(ID, ParasHelper.ToString(Paras)); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.UpdateParas(ID, ParasHelper.ToString(Paras)); + if (bol) + { + UpdateCache(ID); + } + return bol; } - + /// <summary> /// 鏇存柊 Flags /// </summary> public bool UpdateFlags(long ID, List<string> Flags) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.UpdateFlags(ID, FlagsHelper.ToString(Flags)); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.UpdateFlags(ID, FlagsHelper.ToString(Flags)); + if (bol) + { + UpdateCache(ID); + } + return bol; } - + /// <summary> /// 鏇存柊 TagName /// </summary> public bool UpdateTagName(long ID, string TagName) { - if (ID < 1) - { - return false; - } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.UpdateTagName(ID, TagName); - if (bol) - { - UpdateCache(ID); - } - return bol; + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.UpdateTagName(ID, TagName); + if (bol) + { + UpdateCache(ID); + } + return bol; } - #endregion + + #endregion Update + + #region Exist @@ -321,12 +357,12 @@ /// </summary> public bool IsExistTagName(string TagName) { - if (string.IsNullOrEmpty(TagName)) - { - return false; - } - var all = GetAll(); - return all.Exists(x => x.TagName == TagName); + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName); } /// <summary> @@ -334,15 +370,26 @@ /// </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); + if (string.IsNullOrEmpty(TagName)) + { + return false; + } + var all = GetAll(); + return all.Exists(x => x.TagName == TagName && x.ID != ExceptID); } - #endregion + /// <summary> + /// 閫氳繃 SeriesID 鍒ゆ柇鏄惁瀛樺湪 + /// </summary> + public bool IsExistBySeriesID(long SeriesID) + { + var all = GetAll(); + return all.Exists(x => x.SeriesID == SeriesID); + } + + #endregion Exist + + #region Delete @@ -351,18 +398,16 @@ /// </summary> public bool DeleteByID(long ID, out string Msg) { - Msg = string.Empty; - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankMain>(); - var bol = dal.DeleteByID(ID); - if (bol) - { - RemoveCache(ID); - } - return bol; + Msg = string.Empty; + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankMain>(); + var bol = dal.DeleteByID(ID); + if (bol) + { + RemoveCache(ID); + } + return bol; } - - #endregion - - + + #endregion Delete } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain_Instance.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain_Instance.cs index d1955b3..458b21c 100644 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain_Instance.cs +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/02-TankMain/AssetsTankMain_Instance.cs @@ -13,7 +13,7 @@ var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankMain, Model.AssetsTankMain>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToDictionary(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) - .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToList(src.KeyWord))) + .ForMember(d => d.KeyWords, opt => opt.MapFrom(src => KeyWordHelper.ToList(src.KeyWord))) ).CreateMapper(); var model = mapper.Map<Entity.AssetsTankMain, Model.AssetsTankMain>(entity); return model; @@ -27,7 +27,7 @@ var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankMain, Model.AssetsTankMain>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToDictionary(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags))) - .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToList(src.KeyWord))) + .ForMember(d => d.KeyWords, opt => opt.MapFrom(src => KeyWordHelper.ToList(src.KeyWord))) ).CreateMapper(); var models = mapper.Map<List<Entity.AssetsTankMain>, List<Model.AssetsTankMain>>(entities); return models; @@ -41,7 +41,7 @@ var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankMain, Entity.AssetsTankMain>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) - .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWord))) + .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWords))) ).CreateMapper(); var entity = mapper.Map<Model.AssetsTankMain, Entity.AssetsTankMain>(model); return entity; @@ -55,7 +55,7 @@ var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankMain, Entity.AssetsTankMain>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) - .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWord))) + .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWords))) ).CreateMapper(); var entities = mapper.Map<List<Model.AssetsTankMain>, List<Entity.AssetsTankMain>>(models); return entities; @@ -69,7 +69,7 @@ var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankMain, Entity.AssetsTankMain>() .ForMember(d => d.Paras, opt => opt.MapFrom(src => ParasHelper.ToString(src.Paras))) .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags))) - .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWord))) + .ForMember(d => d.KeyWord, opt => opt.MapFrom(src => KeyWordHelper.ToString(src.KeyWords))) ).CreateMapper(); mapper.Map(model, entity); } diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs index 6ffbe69..3bf0896 100644 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient.cs @@ -1,20 +1,18 @@ -锘縰sing Yw.Service; - -namespace HStation.Service +锘縩amespace HStation.Service { /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - public partial class AssetsTankCoefficient + /// + /// </summary> + public partial class AssetsTankFactor { #region Cache //鑾峰彇缂撳瓨 private static List<Model.AssetsTankFactor> GetCache() { - var all = AssetsTankCoefficientCacheHelper.GetSet(() => + var all = AssetsTankFactorCacheHelper.GetSet(() => { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var entity_list = dal.GetAll(); var model_list = Entity2Models(entity_list); if (model_list == null) @@ -29,7 +27,7 @@ //閫氳繃 ID 鏇存柊缂撳瓨 private static void UpdateCache(long ID) { - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var entity_ds = dal.GetByID(ID); var model_ds = Entity2Model(entity_ds); var all = GetCache(); @@ -42,7 +40,7 @@ { model.Reset(model_ds); } - AssetsTankCoefficientCacheHelper.Trigger(); + AssetsTankFactorCacheHelper.Trigger(); } //閫氳繃 Ids 鏇存柊缂撳瓨 @@ -52,7 +50,7 @@ { return; } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var entity_list = dal.GetByIds(Ids); var model_list = Entity2Models(entity_list); var all = GetCache(); @@ -61,7 +59,7 @@ { all.AddRange(model_list); } - AssetsTankCoefficientCacheHelper.Trigger(); + AssetsTankFactorCacheHelper.Trigger(); } //绉婚櫎缂撳瓨 @@ -69,15 +67,7 @@ { var all = GetCache(); all.RemoveAll(x => x.ID == ID); - AssetsTankCoefficientCacheHelper.Trigger(); - } - - /// <summary> - /// 鍙戝竷缂撳瓨 - /// </summary> - public static void PublishCache(string key) - { - AssetsTankCoefficientCacheHelper.Publish(key); + AssetsTankFactorCacheHelper.Trigger(); } //绉婚櫎鎵�鏈夌紦瀛� @@ -85,7 +75,15 @@ { var all = GetCache(); all.Clear(); - AssetsTankCoefficientCacheHelper.Trigger(); + AssetsTankFactorCacheHelper.Trigger(); + } + + /// <summary> + /// 鍙戝竷缂撳瓨 + /// </summary> + public static void PublishCache(string key) + { + AssetsTankFactorCacheHelper.Publish(key); } #endregion Cache @@ -98,7 +96,7 @@ public List<Model.AssetsTankFactor> GetAll() { var all = GetCache(); - return all.ToList(); + return all?.OrderBy(x => x.SortCode).ToList(); } /// <summary> @@ -120,7 +118,20 @@ return default; } var all = GetAll(); - return all.Where(x => Ids.Contains(x.ID)).ToList(); + return all.Where(x => Ids.Contains(x.ID))?.OrderBy(x => x.SortCode).ToList(); + } + + /// <summary> + /// 鑾峰彇鏈�澶ф帓搴忕爜 + /// </summary> + public int GetMaxSortCode() + { + var all = GetAll(); + if (all == null || all.Count < 1) + { + return 0; + } + return all.Max(x => x.SortCode); } #endregion Query @@ -136,7 +147,7 @@ { return default; } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var entity = Model2Entity(model); var id = dal.Insert(entity); if (id > 0) @@ -155,7 +166,7 @@ { return false; } - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var entity_list = Model2Entities(list); var ids = dal.InsertsR(entity_list); if (ids != null && ids.Count > 0) @@ -180,7 +191,7 @@ return false; } var entity = Model2Entity(model); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var bol = dal.Update(entity); if (bol) { @@ -203,11 +214,51 @@ return false; } var entity_list = Model2Entities(list); - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var bol = dal.Updates(entity_list); if (bol) { UpdateCache(list.Select(x => x.ID).ToList()); + } + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public bool UpdateSortCode(long ID, int SortCode) + { + if (ID < 1) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); + var bol = dal.UpdateSortCode(ID, SortCode); + if (bol) + { + UpdateCache(ID); + } + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public bool UpdateSorter(List<Yw.Model.Sorter> sorters) + { + if (sorters == null || sorters.Count < 1) + { + return false; + } + if (sorters.Exists(x => x.ID < 1)) + { + return false; + } + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); + var bol = dal.UpdateSorter(sorters.ToEntityList()); + if (bol) + { + UpdateCache(sorters.Select(x => x.ID).ToList()); } return bol; } @@ -222,25 +273,11 @@ public bool DeleteByID(long ID, out string Msg) { Msg = string.Empty; - var dal = DALCreateHelper.CreateDAL<DAL.IAssetsTankCoefficient>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankFactor>(); var bol = dal.DeleteByID(ID); if (bol) { RemoveCache(ID); - } - return bol; - } - - /// <summary> - /// 鍒犻櫎鍏ㄩ儴 - /// </summary> - public bool DeleteAll() - { - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsTankCoefficient>(); - var bol = dal.DeleteAll(); - if (bol) - { - RemoveAllCache(); } return bol; } diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficientCacheHelper.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficientCacheHelper.cs deleted file mode 100644 index ece0375..0000000 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficientCacheHelper.cs +++ /dev/null @@ -1,74 +0,0 @@ -锘縩amespace HStation.Service -{ - /// <summary> - /// 姘存睜绯绘暟 - ///</summary> - internal class AssetsTankCoefficientCacheHelper - { - - private const string _contentKey = "AssetsTankCoefficientList"; - - internal static string GetCacheKey() - { - return CacheHelper.GetCacheKey(_contentKey); - } - - /// <summary> - /// 璁剧疆缂撳瓨 - /// </summary> - public static void Set(List<Model.AssetsTankFactor> list, int Minites = 30, int RandomSeconds = 0) - { - var cacheKey = GetCacheKey(); - MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); - } - - /// <summary> - /// 鑾峰彇缂撳瓨 - /// </summary> - /// <returns></returns> - public static List<Model.AssetsTankFactor> Get() - { - var cacheKey = GetCacheKey(); - return MemoryCacheHelper.Get<List<Model.AssetsTankFactor>>(cacheKey); - } - - /// <summary> - /// 鑾峰彇璁剧疆缂撳瓨 - /// </summary> - public static List<Model.AssetsTankFactor> GetSet(Func<List<Model.AssetsTankFactor>> func, int Minites = 30, int RandomSeconds = 0) - { - var cacheKey = GetCacheKey(); - return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); - } - - /// <summary> - /// 绉婚櫎缂撳瓨 - /// </summary> - public static void Remove() - { - var cacheKey = GetCacheKey(); - MemoryCacheHelper.Remove(cacheKey); - } - - /// <summary> - /// 鍙戝竷 - /// </summary> - public static void Publish(string key) - { - var cacheKey = GetCacheKey(); - MemoryCacheWipeRelationHelper.Set(key, cacheKey); - } - - /// <summary> - /// 瑙﹀彂 - /// </summary> - public static void Trigger() - { - var cacheKey = GetCacheKey(); - MemoryCacheWipeRelationHelper.Trigger(cacheKey); - } - - } -} - - \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs index a93acbd..036ad90 100644 --- a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankCoefficient_Instance.cs @@ -2,63 +2,61 @@ { /// <summary> /// 姘存睜绯绘暟 - ///</summary> - public partial class AssetsTankCoefficient + ///</summary> + public partial class AssetsTankFactor { - - //Entity to GetModel - internal static Model.AssetsTankFactor Entity2Model(Entity.AssetsTankFactor entity) - { - if (entity == null) - return default; - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankFactor, Model.AssetsTankFactor>() - ).CreateMapper(); - var model = mapper.Map<Entity.AssetsTankFactor, Model.AssetsTankFactor>(entity); - return model; - } - - //Entities to GetModels - internal static List<Model.AssetsTankFactor> Entity2Models(List<Entity.AssetsTankFactor> entities) - { - if (entities == null || entities.Count < 1) - return default; - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankFactor, Model.AssetsTankFactor>() - ).CreateMapper(); - var models = mapper.Map<List<Entity.AssetsTankFactor>, List<Model.AssetsTankFactor>>(entities); - return models; - } + //Entity to GetModel + internal static Model.AssetsTankFactor Entity2Model(Entity.AssetsTankFactor entity) + { + if (entity == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankFactor, Model.AssetsTankFactor>() + ).CreateMapper(); + var model = mapper.Map<Entity.AssetsTankFactor, Model.AssetsTankFactor>(entity); + return model; + } - //Model to Entity - internal static Entity.AssetsTankFactor Model2Entity(Model.AssetsTankFactor model) - { - if (model == null) - return default; - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() - ).CreateMapper(); - var entity = mapper.Map<Model.AssetsTankFactor, Entity.AssetsTankFactor>(model); - return entity; - } + //Entities to GetModels + internal static List<Model.AssetsTankFactor> Entity2Models(List<Entity.AssetsTankFactor> entities) + { + if (entities == null || entities.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.AssetsTankFactor, Model.AssetsTankFactor>() + ).CreateMapper(); + var models = mapper.Map<List<Entity.AssetsTankFactor>, List<Model.AssetsTankFactor>>(entities); + return models; + } - //Models to Entities - internal static List<Entity.AssetsTankFactor> Model2Entities(List<Model.AssetsTankFactor> models) - { - if (models == null || models.Count < 1) - return default; - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() - ).CreateMapper(); - var entities = mapper.Map<List<Model.AssetsTankFactor>, List<Entity.AssetsTankFactor>>(models); - return entities; - } + //Model to Entity + internal static Entity.AssetsTankFactor Model2Entity(Model.AssetsTankFactor model) + { + if (model == null) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() + ).CreateMapper(); + var entity = mapper.Map<Model.AssetsTankFactor, Entity.AssetsTankFactor>(model); + return entity; + } - //Model to Entity - internal static void Model2Entity(Model.AssetsTankFactor model, Entity.AssetsTankFactor entity) - { - if (model == null || entity == null) - return; - var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() - ).CreateMapper(); - mapper.Map(model, entity); - } + //Models to Entities + internal static List<Entity.AssetsTankFactor> Model2Entities(List<Model.AssetsTankFactor> models) + { + if (models == null || models.Count < 1) + return default; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() + ).CreateMapper(); + var entities = mapper.Map<List<Model.AssetsTankFactor>, List<Entity.AssetsTankFactor>>(models); + return entities; + } + //Model to Entity + internal static void Model2Entity(Model.AssetsTankFactor model, Entity.AssetsTankFactor entity) + { + if (model == null || entity == null) + return; + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.AssetsTankFactor, Entity.AssetsTankFactor>() + ).CreateMapper(); + mapper.Map(model, entity); + } } } \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankFactorCacheHelper.cs b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankFactorCacheHelper.cs new file mode 100644 index 0000000..02e5347 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/05-service/15-Tank/03-TankCoefficient/AssetsTankFactorCacheHelper.cs @@ -0,0 +1,70 @@ +锘縩amespace HStation.Service +{ + /// <summary> + /// 姘存睜绯绘暟 + ///</summary> + internal class AssetsTankFactorCacheHelper + { + private const string _contentKey = "AssetsTankFactorList"; + + internal static string GetCacheKey() + { + return CacheHelper.GetCacheKey(_contentKey); + } + + /// <summary> + /// 璁剧疆缂撳瓨 + /// </summary> + public static void Set(List<Model.AssetsTankFactor> list, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 鑾峰彇缂撳瓨 + /// </summary> + /// <returns></returns> + public static List<Model.AssetsTankFactor> Get() + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.Get<List<Model.AssetsTankFactor>>(cacheKey); + } + + /// <summary> + /// 鑾峰彇璁剧疆缂撳瓨 + /// </summary> + public static List<Model.AssetsTankFactor> GetSet(Func<List<Model.AssetsTankFactor>> func, int Minites = 30, int RandomSeconds = 0) + { + var cacheKey = GetCacheKey(); + return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); + } + + /// <summary> + /// 绉婚櫎缂撳瓨 + /// </summary> + public static void Remove() + { + var cacheKey = GetCacheKey(); + MemoryCacheHelper.Remove(cacheKey); + } + + /// <summary> + /// 鍙戝竷 + /// </summary> + public static void Publish(string key) + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Set(key, cacheKey); + } + + /// <summary> + /// 瑙﹀彂 + /// </summary> + public static void Trigger() + { + var cacheKey = GetCacheKey(); + MemoryCacheWipeRelationHelper.Trigger(cacheKey); + } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveFactorVmo.cs b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveFactorVmo.cs index 8f4fd18..e7311f2 100644 --- a/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveFactorVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/02-Valve/AssetsValveFactorVmo.cs @@ -26,11 +26,6 @@ /// </summary> public string Name { get; set; } - public long MainID { get; set; } - - public string OpenLossCurve { get; set; } - public string MinorLossCurve { get; set; } - /// <summary> /// 鍙e緞 /// </summary> diff --git a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankFactorVmo.cs b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankFactorVmo.cs new file mode 100644 index 0000000..575551b --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankFactorVmo.cs @@ -0,0 +1,74 @@ +锘縩amespace HStation.Vmo +{ + /// <summary> + /// 姘存睜绯绘暟 + ///</summary> + public class AssetsTankFactorVmo + { + /// <summary> + /// + /// </summary> + public AssetsTankFactorVmo() + { } + + /// <summary> + /// + /// </summary> + public AssetsTankFactorVmo(Dto.AssetsTankFactorDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public AssetsTankFactorVmo(AssetsTankFactorVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Caliber = rhs.Caliber; + this.Material = rhs.Material; + this.MinorLoss = rhs.MinorLoss; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// ID + ///</summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + ///</summary> + public string Name { get; set; } + + /// <summary> + /// 鍙e緞 + ///</summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鏉愭枡 + ///</summary> + public string Material { get; set; } + + /// <summary> + /// 灞�闃荤郴鏁� + ///</summary> + public double MinorLoss { get; set; } + + /// <summary> + /// 鎺掑簭 + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankMainVmo.cs b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankMainVmo.cs index 39f134e..ce275db 100644 --- a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankMainVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankMainVmo.cs @@ -23,7 +23,24 @@ this.MaxLevel = rhs.MaxLevel; this.DN = rhs.DN; this.OverFlow = rhs.OverFlow; - this.KeyWord = rhs.KeyWord; + this.KeyWords = rhs.KeyWords; + this.Paras = rhs.Paras == null ? null : new(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public AssetsTankMainVmo(AssetsTankMainVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.SeriesID = rhs.SeriesID; + this.MinLevel = rhs.MinLevel; + this.MaxLevel = rhs.MaxLevel; + this.DN = rhs.DN; + this.OverFlow = rhs.OverFlow; + this.KeyWords = rhs.KeyWords; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -74,7 +91,7 @@ /// <summary> /// 璇嗗埆鍏抽敭瀛� ///</summary> - public List<string> KeyWord { get; set; } + public List<string> KeyWords { get; set; } /// <summary> /// 鍙傛暟 diff --git a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankSeriesVmo.cs b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankSeriesVmo.cs index 5d78636..31134b3 100644 --- a/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankSeriesVmo.cs +++ b/Vmo/HStation.Vmo.Assets.Core/15-Tank/AssetsTankSeriesVmo.cs @@ -2,76 +2,88 @@ { /// <summary> /// 姘存睜绯诲垪 - ///</summary> + ///</summary> public class AssetsTankSeriesVmo { - /// <summary> - /// - /// </summary> - public AssetsTankSeriesVmo() { } + /// <summary> + /// + /// </summary> + public AssetsTankSeriesVmo() + { } - /// <summary> - /// - /// </summary> - public AssetsTankSeriesVmo(Dto.AssetsTankSeriesDto rhs) - { - this.ID=rhs.ID; - this.CatalogID=rhs.CatalogID; - this.Name=rhs.Name; - this.ParentIds = rhs.ParentIds?.ToList(); - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); - this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } + /// <summary> + /// + /// </summary> + public AssetsTankSeriesVmo(AssetsTankSeriesDto 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 AssetsTankSeriesVmo(AssetsTankSeriesVmo 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> + ///</summary> public long ID { get; set; } - + /// <summary> /// 鎵�灞炵被鍒獻D - ///</summary> + ///</summary> public long CatalogID { get; set; } - + /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } - + /// <summary> - /// 鐖剁骇id鍒楄〃锛堢増鏈帶鍒� - ///</summary> - public List<long> ParentIds { get; set; } - + /// 鐖剁骇id + /// </summary> + public long ParentID { get; set; } + /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } - + /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } - + /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } - + /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } - + /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.Designer.cs new file mode 100644 index 0000000..2c03a77 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.Designer.cs @@ -0,0 +1,291 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class AddAssetsTankSeriesDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit(); + treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + btnCancel = new DevExpress.XtraEditors.SimpleButton(); + TagNameTextEdit = new DevExpress.XtraEditors.TextEdit(); + NameTextEdit = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(textEditParentList); + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(btnCancel); + layoutControl1.Controls.Add(TagNameTextEdit); + layoutControl1.Controls.Add(NameTextEdit); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(511, 275); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // textEditParentList + // + textEditParentList.Location = new Point(55, 56); + textEditParentList.Name = "textEditParentList"; + textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + textEditParentList.Properties.DisplayMember = "Name"; + textEditParentList.Properties.NullText = ""; + textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList; + textEditParentList.Properties.ValueMember = "ID"; + textEditParentList.Size = new Size(448, 20); + textEditParentList.StyleController = layoutControl1; + textEditParentList.TabIndex = 11; + // + // treeListLookUpEdit1TreeList + // + treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); + treeListLookUpEdit1TreeList.Location = new Point(7, 37); + treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; + treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; + treeListLookUpEdit1TreeList.Size = new Size(400, 200); + treeListLookUpEdit1TreeList.TabIndex = 0; + treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; + // + // treeListColumn1 + // + treeListColumn1.Caption = "treeListColumn1"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(356, 245); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(70, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 5; + BtnOk.Text = "纭畾"; + BtnOk.Click += BtnOk_ClickAsync; + // + // btnCancel + // + btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + btnCancel.Appearance.Options.UseBackColor = true; + btnCancel.DialogResult = DialogResult.Cancel; + btnCancel.Location = new Point(430, 245); + btnCancel.Name = "btnCancel"; + btnCancel.Size = new Size(73, 22); + btnCancel.StyleController = layoutControl1; + btnCancel.TabIndex = 6; + btnCancel.Text = "鍙栨秷"; + // + // TagNameTextEdit + // + TagNameTextEdit.Location = new Point(55, 32); + TagNameTextEdit.Name = "TagNameTextEdit"; + TagNameTextEdit.Size = new Size(448, 20); + TagNameTextEdit.StyleController = layoutControl1; + TagNameTextEdit.TabIndex = 3; + // + // NameTextEdit + // + NameTextEdit.Location = new Point(55, 8); + NameTextEdit.Name = "NameTextEdit"; + NameTextEdit.Size = new Size(448, 20); + NameTextEdit.StyleController = layoutControl1; + NameTextEdit.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(55, 80); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(448, 161); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 4; + // + // 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[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(511, 275); + Root.TextVisible = false; + // + // layoutControlItem3 + // + layoutControlItem3.Control = TagNameTextEdit; + layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(499, 24); + layoutControlItem3.Text = "鏍囩:"; + layoutControlItem3.TextSize = new Size(35, 14); + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 72); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(499, 165); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextSize = new Size(35, 14); + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = NameTextEdit; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(499, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = btnCancel; + layoutControlItem6.Location = new Point(422, 237); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(77, 26); + layoutControlItem6.TextSize = new Size(0, 0); + layoutControlItem6.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 237); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(348, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(348, 237); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(74, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = textEditParentList; + layoutControlItem2.Location = new Point(0, 48); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(499, 24); + layoutControlItem2.Text = "鐖剁骇:"; + layoutControlItem2.TextSize = new Size(35, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // AddAssetsTankSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(511, 275); + Controls.Add(layoutControl1); + Name = "AddAssetsTankSeriesDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "娣诲姞绯诲垪"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList; + private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.cs new file mode 100644 index 0000000..ef43b54 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.cs @@ -0,0 +1,64 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + public partial class AddAssetsTankSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsTankSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.Load += AddAssetsTankSeriesDlg_Load; + } + + public event Func<Vmo.AssetsTankSeriesVmo, object, Task<bool>> ReloadDataEvent = null; + + private List<AssetsTankSeriesViewModel> _assetsTankSeriesViews; + + //鍒濆鍖� + private async void AddAssetsTankSeriesDlg_Load(object sender, EventArgs e) + { + _assetsTankSeriesViews = new List<AssetsTankSeriesViewModel>(); + var allList = await new BLL.AssetsTankSeries().GetAll(); + if (allList != null) + { + foreach (var item in allList) + { + _assetsTankSeriesViews.Add(new AssetsTankSeriesViewModel(item)); + } + } + treeListLookUpEdit1TreeList.DataSource = _assetsTankSeriesViews; + } + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + return false; + } + return true; + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!Valid()) + return; + var model = new Vmo.AssetsTankSeriesVmo(); + model.Name = NameTextEdit.Text; + model.TagName = TagNameTextEdit.Text; + model.Description = DescriptionTextEdit.Text; + if (await this.ReloadDataEvent.Invoke(model, this.textEditParentList.EditValue)) + { + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); + } + else + { + TipFormHelper.ShowError("娣诲姞澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.resx index 20033c4..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AddAssetsTankSeriesDlg.resx @@ -117,29 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="dxErrorProvider1.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AssetsTankSeriesViewModel.cs similarity index 82% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AssetsTankSeriesViewModel.cs index c9baa9c..4d44bb8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/AssetsTankSeriesViewModel.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/14-tank/01-series-bak/EditAssetsTankSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.Designer.cs new file mode 100644 index 0000000..8b3536c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.Designer.cs @@ -0,0 +1,291 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class EditAssetsTankSeriesDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit(); + treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + btnCancel = new DevExpress.XtraEditors.SimpleButton(); + TagNameTextEdit = new DevExpress.XtraEditors.TextEdit(); + NameTextEdit = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(textEditParentList); + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(btnCancel); + layoutControl1.Controls.Add(TagNameTextEdit); + layoutControl1.Controls.Add(NameTextEdit); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(511, 275); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // textEditParentList + // + textEditParentList.Location = new Point(55, 56); + textEditParentList.Name = "textEditParentList"; + textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + textEditParentList.Properties.DisplayMember = "Name"; + textEditParentList.Properties.NullText = ""; + textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList; + textEditParentList.Properties.ValueMember = "ID"; + textEditParentList.Size = new Size(448, 20); + textEditParentList.StyleController = layoutControl1; + textEditParentList.TabIndex = 11; + // + // treeListLookUpEdit1TreeList + // + treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); + treeListLookUpEdit1TreeList.Location = new Point(7, 37); + treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; + treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; + treeListLookUpEdit1TreeList.Size = new Size(400, 200); + treeListLookUpEdit1TreeList.TabIndex = 0; + treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; + // + // treeListColumn1 + // + treeListColumn1.Caption = "treeListColumn1"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(356, 245); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(70, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 5; + BtnOk.Text = "纭畾"; + BtnOk.Click += BtnOk_ClickAsync; + // + // btnCancel + // + btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + btnCancel.Appearance.Options.UseBackColor = true; + btnCancel.DialogResult = DialogResult.Cancel; + btnCancel.Location = new Point(430, 245); + btnCancel.Name = "btnCancel"; + btnCancel.Size = new Size(73, 22); + btnCancel.StyleController = layoutControl1; + btnCancel.TabIndex = 6; + btnCancel.Text = "鍙栨秷"; + // + // TagNameTextEdit + // + TagNameTextEdit.Location = new Point(55, 32); + TagNameTextEdit.Name = "TagNameTextEdit"; + TagNameTextEdit.Size = new Size(448, 20); + TagNameTextEdit.StyleController = layoutControl1; + TagNameTextEdit.TabIndex = 2; + // + // NameTextEdit + // + NameTextEdit.Location = new Point(55, 8); + NameTextEdit.Name = "NameTextEdit"; + NameTextEdit.Size = new Size(448, 20); + NameTextEdit.StyleController = layoutControl1; + NameTextEdit.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(55, 80); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(448, 161); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 4; + // + // 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[] { layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem3, layoutControlItem2 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(511, 275); + Root.TextVisible = false; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 72); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(499, 165); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextSize = new Size(35, 14); + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = NameTextEdit; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(499, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = btnCancel; + layoutControlItem6.Location = new Point(422, 237); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(77, 26); + layoutControlItem6.TextSize = new Size(0, 0); + layoutControlItem6.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 237); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(348, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(348, 237); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(74, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // layoutControlItem3 + // + layoutControlItem3.Control = TagNameTextEdit; + layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(499, 24); + layoutControlItem3.Text = "鏍囩:"; + layoutControlItem3.TextSize = new Size(35, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = textEditParentList; + layoutControlItem2.Location = new Point(0, 48); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(499, 24); + layoutControlItem2.Text = "鐖剁骇:"; + layoutControlItem2.TextSize = new Size(35, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // EditAssetsTankSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(511, 275); + Controls.Add(layoutControl1); + Name = "EditAssetsTankSeriesDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "缂栬緫绯诲垪"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); + ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList; + private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.cs new file mode 100644 index 0000000..f59ffdc --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.cs @@ -0,0 +1,64 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + public partial class EditAssetsTankSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsTankSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + public event Func<Vmo.AssetsTankSeriesVmo, object, Task<bool>> ReloadDataEvent = null; + + private Vmo.AssetsTankSeriesVmo _assetsTankSeries = null; + private List<AssetsTankSeriesViewModel> _assetsTankSeriesViews; + + public async void SetBindingData(Vmo.AssetsTankSeriesVmo seriesVmo) + { + _assetsTankSeriesViews = new List<AssetsTankSeriesViewModel>(); + _assetsTankSeries = seriesVmo; + this.NameTextEdit.Text = _assetsTankSeries.Name; + this.DescriptionTextEdit.Text = _assetsTankSeries.Description; + this.TagNameTextEdit.Text = _assetsTankSeries.TagName; + var allList = await new BLL.AssetsTankSeries().GetAll(); + foreach (var item in allList) + { + _assetsTankSeriesViews.Add(new AssetsTankSeriesViewModel(item)); + } + treeListLookUpEdit1TreeList.DataSource = _assetsTankSeriesViews; + this.textEditParentList.EditValue = _assetsTankSeries.ParentID; + } + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + return false; + } + return true; + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!Valid()) + return; + _assetsTankSeries.Name = NameTextEdit.Text; + _assetsTankSeries.TagName = TagNameTextEdit.Text; + _assetsTankSeries.Description = DescriptionTextEdit.Text; + if (await this.ReloadDataEvent.Invoke(_assetsTankSeries, this.textEditParentList.EditValue)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); + } + else + { + TipFormHelper.ShowError("淇敼澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.resx index 20033c4..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/EditAssetsTankSeriesDlg.resx @@ -117,29 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="dxErrorProvider1.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.cs similarity index 92% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.cs index 2a4717a..49e00e2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.cs @@ -55,8 +55,7 @@ { if (currentId != null) { - var select = await _bll.GetByID(Convert.ToInt64(currentId)); - rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + rhs.ParentID = Convert.ToInt32(currentId); } var bll = new BLL.AssetsTankSeries(); var id = await bll.Insert(rhs); @@ -102,8 +101,7 @@ { if (currentId != null) { - var select = await _bll.GetByID(Convert.ToInt64(currentId)); - rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + rhs.ParentID = Convert.ToInt32(currentId); } if (await BLLFactory<BLL.AssetsTankSeries>.Instance.Update(rhs)) { diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/TankTreeListCtrl.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series-bak/TankTreeListCtrl.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.Designer.cs index 2c03a77..0a7b6d6 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { partial class AddAssetsTankSeriesDlg { @@ -28,81 +28,34 @@ /// </summary> private void InitializeComponent() { - components = new System.ComponentModel.Container(); - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit(); - treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + components = new Container(); treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - BtnOk = new DevExpress.XtraEditors.SimpleButton(); - btnCancel = new DevExpress.XtraEditors.SimpleButton(); - TagNameTextEdit = new DevExpress.XtraEditors.TextEdit(); - NameTextEdit = new DevExpress.XtraEditors.TextEdit(); - DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); - Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + 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(); - ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((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(); - // - // layoutControl1 - // - layoutControl1.Controls.Add(textEditParentList); - layoutControl1.Controls.Add(BtnOk); - layoutControl1.Controls.Add(btnCancel); - layoutControl1.Controls.Add(TagNameTextEdit); - layoutControl1.Controls.Add(NameTextEdit); - layoutControl1.Controls.Add(DescriptionTextEdit); - layoutControl1.Dock = DockStyle.Fill; - layoutControl1.Location = new Point(0, 0); - layoutControl1.Name = "layoutControl1"; - layoutControl1.Root = Root; - layoutControl1.Size = new Size(511, 275); - layoutControl1.TabIndex = 0; - layoutControl1.Text = "layoutControl1"; - // - // textEditParentList - // - textEditParentList.Location = new Point(55, 56); - textEditParentList.Name = "textEditParentList"; - textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - textEditParentList.Properties.DisplayMember = "Name"; - textEditParentList.Properties.NullText = ""; - textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList; - textEditParentList.Properties.ValueMember = "ID"; - textEditParentList.Size = new Size(448, 20); - textEditParentList.StyleController = layoutControl1; - textEditParentList.TabIndex = 11; - // - // treeListLookUpEdit1TreeList - // - treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); - treeListLookUpEdit1TreeList.Location = new Point(7, 37); - treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; - treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; - treeListLookUpEdit1TreeList.Size = new Size(400, 200); - treeListLookUpEdit1TreeList.TabIndex = 0; - treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; // // treeListColumn1 // @@ -112,53 +65,66 @@ treeListColumn1.Visible = true; treeListColumn1.VisibleIndex = 0; // - // BtnOk + // dxErrorProvider1 // - BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(356, 245); - BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(70, 22); - BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 5; - BtnOk.Text = "纭畾"; - BtnOk.Click += BtnOk_ClickAsync; + dxErrorProvider1.ContainerControl = this; // - // btnCancel + // layoutControl1 // - btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - btnCancel.Appearance.Options.UseBackColor = true; - btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(430, 245); - btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(73, 22); - btnCancel.StyleController = layoutControl1; - btnCancel.TabIndex = 6; - btnCancel.Text = "鍙栨秷"; + 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"; // - // TagNameTextEdit + // generalOkAndCancelCtrl1 // - TagNameTextEdit.Location = new Point(55, 32); - TagNameTextEdit.Name = "TagNameTextEdit"; - TagNameTextEdit.Size = new Size(448, 20); - TagNameTextEdit.StyleController = layoutControl1; - TagNameTextEdit.TabIndex = 3; + 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; // - // NameTextEdit + // txtDescription // - NameTextEdit.Location = new Point(55, 8); - NameTextEdit.Name = "NameTextEdit"; - NameTextEdit.Size = new Size(448, 20); - NameTextEdit.StyleController = layoutControl1; - NameTextEdit.TabIndex = 0; + txtDescription.Location = new Point(59, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(349, 216); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 5; // - // DescriptionTextEdit + // txtTagName // - DescriptionTextEdit.Location = new Point(55, 80); - DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(448, 161); - DescriptionTextEdit.StyleController = layoutControl1; - DescriptionTextEdit.TabIndex = 4; + 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 // @@ -166,126 +132,95 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5 }); Root.Name = "Root"; - Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); - Root.Size = new Size(511, 275); + Root.Size = new Size(420, 342); Root.TextVisible = false; - // - // layoutControlItem3 - // - layoutControlItem3.Control = TagNameTextEdit; - layoutControlItem3.Location = new Point(0, 24); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "鏍囩:"; - layoutControlItem3.TextSize = new Size(35, 14); - // - // layoutControlItem5 - // - layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 72); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(499, 165); - layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(35, 14); // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = NameTextEdit; + layoutControlItem1.Control = txtName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(499, 24); + layoutControlItem1.Size = new Size(400, 24); layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; layoutControlItem1.TextSize = new Size(35, 14); // - // layoutControlItem6 + // layoutControlItem2 // - layoutControlItem6.Control = btnCancel; - layoutControlItem6.Location = new Point(422, 237); - layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(77, 26); - layoutControlItem6.TextSize = new Size(0, 0); - layoutControlItem6.TextVisible = false; + 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); // - // emptySpaceItem1 + // layoutControlItem3 // - emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 237); - emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(348, 26); - emptySpaceItem1.TextSize = new Size(0, 0); + 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 = BtnOk; - layoutControlItem4.Location = new Point(348, 237); + layoutControlItem4.Control = txtDescription; + layoutControlItem4.Location = new Point(0, 72); layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(74, 26); - layoutControlItem4.TextSize = new Size(0, 0); - layoutControlItem4.TextVisible = false; + layoutControlItem4.Size = new Size(400, 220); + layoutControlItem4.Text = "璇存槑:"; + layoutControlItem4.TextSize = new Size(35, 14); // - // layoutControlItem2 + // layoutControlItem5 // - layoutControlItem2.Control = textEditParentList; - layoutControlItem2.Location = new Point(0, 48); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(499, 24); - layoutControlItem2.Text = "鐖剁骇:"; - layoutControlItem2.TextSize = new Size(35, 14); + 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; // - // dxErrorProvider1 - // - dxErrorProvider1.ContainerControl = this; - // - // AddAssetsTankSeriesDlg + // AddAssetsCoolingSeriesDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(511, 275); + ClientSize = new Size(420, 342); Controls.Add(layoutControl1); - Name = "AddAssetsTankSeriesDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "娣诲姞绯诲垪"; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + Name = "AddAssetsCoolingSeriesDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); - ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((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.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraEditors.TextEdit NameTextEdit; - private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.TextEdit TagNameTextEdit; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.SimpleButton BtnOk; - private DevExpress.XtraEditors.SimpleButton btnCancel; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList; - private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; 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/14-tank/01-series/AddAssetsTankSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.cs index ef43b54..a77a4e9 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AddAssetsTankSeriesDlg.cs @@ -1,4 +1,7 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI { public partial class AddAssetsTankSeriesDlg : DevExpress.XtraEditors.XtraForm { @@ -6,57 +9,82 @@ { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - this.Load += AddAssetsTankSeriesDlg_Load; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } - public event Func<Vmo.AssetsTankSeriesVmo, object, Task<bool>> ReloadDataEvent = null; + private static AssetsTankSeriesVmo _last = null; - private List<AssetsTankSeriesViewModel> _assetsTankSeriesViews; + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<AssetsTankSeriesVmo> ReloadDataEvent; - //鍒濆鍖� - private async void AddAssetsTankSeriesDlg_Load(object sender, EventArgs e) + private AssetsTankSeriesVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(long parentId) { - _assetsTankSeriesViews = new List<AssetsTankSeriesViewModel>(); - var allList = await new BLL.AssetsTankSeries().GetAll(); - if (allList != null) + _vmo = new AssetsTankSeriesVmo(); + _vmo.ParentID = parentId; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.TankSeries); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null); + if (_last != null) { - foreach (var item in allList) - { - _assetsTankSeriesViews.Add(new AssetsTankSeriesViewModel(item)); - } + 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; } - treeListLookUpEdit1TreeList.DataSource = _assetsTankSeriesViews; } - //鏁版嵁楠岃瘉 - private bool Valid() + //楠岃瘉 + private async Task<bool> Valid() { this.dxErrorProvider1.ClearErrors(); - if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) { - this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.IsExistTagName(tagname)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } } return true; } - //瀹屾垚 - private async void BtnOk_ClickAsync(object sender, EventArgs e) + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() { - if (!Valid()) + if (_vmo == null) + { return; - var model = new Vmo.AssetsTankSeriesVmo(); - model.Name = NameTextEdit.Text; - model.TagName = TagNameTextEdit.Text; - model.Description = DescriptionTextEdit.Text; - if (await this.ReloadDataEvent.Invoke(model, this.textEditParentList.EditValue)) - { - TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); } - else + if (!await Valid()) { - TipFormHelper.ShowError("娣诲姞澶辫触!"); + 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.AssetsTankSeries>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankSeries>.Instance.GetByID(id); + _last = vmo; + this.ReloadDataEvent?.Invoke(vmo); this.DialogResult = DialogResult.OK; this.Close(); } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.Designer.cs new file mode 100644 index 0000000..4fb96a0 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.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 AssetsTankSeriesMgrTreeCtrl + { + /// <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(AssetsTankSeriesMgrTreeCtrl)); + 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; + // + // AssetsTankSeriesMgrTreeCtrl + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(layoutControl1); + Controls.Add(barDockControlLeft); + Controls.Add(barDockControlRight); + Controls.Add(barDockControlBottom); + Controls.Add(barDockControlTop); + Name = "AssetsTankSeriesMgrTreeCtrl"; + 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/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.cs new file mode 100644 index 0000000..4f79e19 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.cs @@ -0,0 +1,408 @@ +锘縰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 AssetsTankSeriesMgrTreeCtrl : DevExpress.XtraEditors.XtraUserControl + { + /// <summary> + /// + /// </summary> + public AssetsTankSeriesMgrTreeCtrl() + { + 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<AssetsTankSeriesVmo> FocusedChangedEvent; + + /// <summary> + /// 鎵�鏈夌粦瀹氬垪琛� + /// </summary> + private List<AssetsTankSeriesMgrViewModel> _allBindingList = null; + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public async void InitialData() + { + var overlay = this.ShowOverlay(); + var allList = await BLLFactory<HStation.BLL.AssetsTankSeries>.Instance.GetAll(); + _allBindingList = new List<AssetsTankSeriesMgrViewModel>(); + allList?.ForEach(x => + { + var vm = new AssetsTankSeriesMgrViewModel(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 AssetsTankSeriesMgrViewModel; + if (vm != null) + { + 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 AssetsTankSeriesMgrViewModel 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 AddAssetsTankSeriesDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsTankSeriesMgrViewModel(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 EditAssetsTankSeriesDlg(); + 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.AssetsTankSeries>.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 ViewAssetsTankSeriesDlg(); + 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 AssetsTankSeriesMgrViewModel; + 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 AssetsTankSeriesMgrViewModel; + 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.AssetsTankSeries>.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/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.resx new file mode 100644 index 0000000..08c7ee3 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrTreeCtrl.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/14-tank/01-series/AssetsTankSeriesMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrViewModel.cs new file mode 100644 index 0000000..ae42d91 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/AssetsTankSeriesMgrViewModel.cs @@ -0,0 +1,95 @@ +锘縰sing HStation.Service; + +namespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsTankSeriesMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsTankSeriesMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsTankSeriesMgrViewModel(HStation.Vmo.AssetsTankSeriesVmo 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.AssetsTankSeriesVmo 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.AssetsTankSeriesVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.Designer.cs index 8b3536c..7d4465e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { partial class EditAssetsTankSeriesDlg { @@ -28,81 +28,34 @@ /// </summary> private void InitializeComponent() { - components = new System.ComponentModel.Container(); - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - textEditParentList = new DevExpress.XtraEditors.TreeListLookUpEdit(); - treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + components = new Container(); treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - BtnOk = new DevExpress.XtraEditors.SimpleButton(); - btnCancel = new DevExpress.XtraEditors.SimpleButton(); - TagNameTextEdit = new DevExpress.XtraEditors.TextEdit(); - NameTextEdit = new DevExpress.XtraEditors.TextEdit(); - DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); - Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + 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(); - ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((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(); - // - // layoutControl1 - // - layoutControl1.Controls.Add(textEditParentList); - layoutControl1.Controls.Add(BtnOk); - layoutControl1.Controls.Add(btnCancel); - layoutControl1.Controls.Add(TagNameTextEdit); - layoutControl1.Controls.Add(NameTextEdit); - layoutControl1.Controls.Add(DescriptionTextEdit); - layoutControl1.Dock = DockStyle.Fill; - layoutControl1.Location = new Point(0, 0); - layoutControl1.Name = "layoutControl1"; - layoutControl1.Root = Root; - layoutControl1.Size = new Size(511, 275); - layoutControl1.TabIndex = 0; - layoutControl1.Text = "layoutControl1"; - // - // textEditParentList - // - textEditParentList.Location = new Point(55, 56); - textEditParentList.Name = "textEditParentList"; - textEditParentList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - textEditParentList.Properties.DisplayMember = "Name"; - textEditParentList.Properties.NullText = ""; - textEditParentList.Properties.TreeList = treeListLookUpEdit1TreeList; - textEditParentList.Properties.ValueMember = "ID"; - textEditParentList.Size = new Size(448, 20); - textEditParentList.StyleController = layoutControl1; - textEditParentList.TabIndex = 11; - // - // treeListLookUpEdit1TreeList - // - treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); - treeListLookUpEdit1TreeList.Location = new Point(7, 37); - treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; - treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; - treeListLookUpEdit1TreeList.Size = new Size(400, 200); - treeListLookUpEdit1TreeList.TabIndex = 0; - treeListLookUpEdit1TreeList.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; // // treeListColumn1 // @@ -112,53 +65,66 @@ treeListColumn1.Visible = true; treeListColumn1.VisibleIndex = 0; // - // BtnOk + // dxErrorProvider1 // - BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(356, 245); - BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(70, 22); - BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 5; - BtnOk.Text = "纭畾"; - BtnOk.Click += BtnOk_ClickAsync; + dxErrorProvider1.ContainerControl = this; // - // btnCancel + // layoutControl1 // - btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - btnCancel.Appearance.Options.UseBackColor = true; - btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(430, 245); - btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(73, 22); - btnCancel.StyleController = layoutControl1; - btnCancel.TabIndex = 6; - btnCancel.Text = "鍙栨秷"; + 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"; // - // TagNameTextEdit + // generalOkAndCancelCtrl1 // - TagNameTextEdit.Location = new Point(55, 32); - TagNameTextEdit.Name = "TagNameTextEdit"; - TagNameTextEdit.Size = new Size(448, 20); - TagNameTextEdit.StyleController = layoutControl1; - TagNameTextEdit.TabIndex = 2; + 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; // - // NameTextEdit + // txtDescription // - NameTextEdit.Location = new Point(55, 8); - NameTextEdit.Name = "NameTextEdit"; - NameTextEdit.Size = new Size(448, 20); - NameTextEdit.StyleController = layoutControl1; - NameTextEdit.TabIndex = 0; + txtDescription.Location = new Point(59, 84); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(349, 216); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 5; // - // DescriptionTextEdit + // txtTagName // - DescriptionTextEdit.Location = new Point(55, 80); - DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(448, 161); - DescriptionTextEdit.StyleController = layoutControl1; - DescriptionTextEdit.TabIndex = 4; + 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 // @@ -166,126 +132,95 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem3, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem5 }); Root.Name = "Root"; - Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); - Root.Size = new Size(511, 275); + Root.Size = new Size(420, 342); Root.TextVisible = false; - // - // layoutControlItem5 - // - layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 72); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(499, 165); - layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(35, 14); // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = NameTextEdit; + layoutControlItem1.Control = txtName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(499, 24); + layoutControlItem1.Size = new Size(400, 24); layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; layoutControlItem1.TextSize = new Size(35, 14); // - // layoutControlItem6 + // layoutControlItem2 // - layoutControlItem6.Control = btnCancel; - layoutControlItem6.Location = new Point(422, 237); - layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(77, 26); - layoutControlItem6.TextSize = new Size(0, 0); - layoutControlItem6.TextVisible = false; - // - // emptySpaceItem1 - // - emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 237); - emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(348, 26); - emptySpaceItem1.TextSize = new Size(0, 0); - // - // layoutControlItem4 - // - layoutControlItem4.Control = BtnOk; - layoutControlItem4.Location = new Point(348, 237); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(74, 26); - layoutControlItem4.TextSize = new Size(0, 0); - layoutControlItem4.TextVisible = false; + 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 = TagNameTextEdit; - layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Control = txtTagName; + layoutControlItem3.Location = new Point(0, 48); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "鏍囩:"; + layoutControlItem3.Size = new Size(400, 24); + layoutControlItem3.Text = "鏍囧織:"; layoutControlItem3.TextSize = new Size(35, 14); // - // layoutControlItem2 + // layoutControlItem4 // - layoutControlItem2.Control = textEditParentList; - layoutControlItem2.Location = new Point(0, 48); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(499, 24); - layoutControlItem2.Text = "鐖剁骇:"; - layoutControlItem2.TextSize = new Size(35, 14); + 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); // - // dxErrorProvider1 + // layoutControlItem5 // - dxErrorProvider1.ContainerControl = this; + 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; // - // EditAssetsTankSeriesDlg + // EditAssetsCoolingSeriesDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(511, 275); + ClientSize = new Size(420, 342); Controls.Add(layoutControl1); - Name = "EditAssetsTankSeriesDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "缂栬緫绯诲垪"; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + Name = "EditAssetsCoolingSeriesDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)textEditParentList.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); - ((System.ComponentModel.ISupportInitialize)TagNameTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)NameTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((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.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraEditors.TextEdit NameTextEdit; - private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.TextEdit TagNameTextEdit; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.SimpleButton BtnOk; - private DevExpress.XtraEditors.SimpleButton btnCancel; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraEditors.TreeListLookUpEdit textEditParentList; - private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; 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/14-tank/01-series/EditAssetsTankSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.cs index 520a5e0..404fcb2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/EditAssetsTankSeriesDlg.cs @@ -1,4 +1,7 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI { public partial class EditAssetsTankSeriesDlg : DevExpress.XtraEditors.XtraForm { @@ -6,60 +9,78 @@ { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } - public event Func<Vmo.AssetsTankSeriesVmo, object, Task<bool>> ReloadDataEvent = null; + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<AssetsTankSeriesVmo> ReloadDataEvent; - private Vmo.AssetsTankSeriesVmo _assetsTankSeries = null; - private List<AssetsTankSeriesViewModel> _assetsTankSeriesViews; + private AssetsTankSeriesVmo _vmo = null; - public async void SetBindingData(Vmo.AssetsTankSeriesVmo seriesVmo) + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(AssetsTankSeriesVmo vmo) { - _assetsTankSeriesViews = new List<AssetsTankSeriesViewModel>(); - _assetsTankSeries = seriesVmo; - this.NameTextEdit.Text = _assetsTankSeries.Name; - this.DescriptionTextEdit.Text = _assetsTankSeries.Description; - this.TagNameTextEdit.Text = _assetsTankSeries.TagName; - var allList = await new BLL.AssetsTankSeries().GetAll(); - foreach (var item in allList) + if (vmo == null) { - _assetsTankSeriesViews.Add(new AssetsTankSeriesViewModel(item)); + return; } - treeListLookUpEdit1TreeList.DataSource = _assetsTankSeriesViews; - if (_assetsTankSeries.ParentIds.Count > 0) - { - this.textEditParentList.EditValue = _assetsTankSeries.ParentIds.Last(); - } + _vmo = new AssetsTankSeriesVmo(vmo); + this.txtName.EditValue = vmo.Name; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.TankSeries); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; } - //鏁版嵁楠岃瘉 - private bool Valid() + //楠岃瘉 + private async Task<bool> Valid() { this.dxErrorProvider1.ClearErrors(); - if (string.IsNullOrEmpty(NameTextEdit.Text.Trim())) + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) { - this.dxErrorProvider1.SetError(this.NameTextEdit, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.IsExistTagNameExceptID(tagname, _vmo.ID)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } } return true; } - //瀹屾垚 - private async void BtnOk_ClickAsync(object sender, EventArgs e) + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() { - if (!Valid()) + if (_vmo == null) + { return; - _assetsTankSeries.Name = NameTextEdit.Text; - _assetsTankSeries.TagName = TagNameTextEdit.Text; - _assetsTankSeries.Description = DescriptionTextEdit.Text; - if (await this.ReloadDataEvent.Invoke(_assetsTankSeries, this.textEditParentList.EditValue)) - { - TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); } - else + if (!await Valid()) { - TipFormHelper.ShowError("淇敼澶辫触!"); + 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.AssetsTankSeries>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankSeries>.Instance.GetByID(_vmo.ID); + this.ReloadDataEvent?.Invoke(vmo); this.DialogResult = DialogResult.OK; this.Close(); } diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.Designer.cs new file mode 100644 index 0000000..ab27260 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.Designer.cs @@ -0,0 +1,200 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsTankSeriesDlg + { + /// <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); + // + // ViewAssetsTankSeriesDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(420, 342); + Controls.Add(layoutControl1); + Name = "ViewAssetsTankSeriesDlg"; + 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/14-tank/01-series/ViewAssetsTankSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.cs new file mode 100644 index 0000000..877bca0 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.cs @@ -0,0 +1,33 @@ +锘縰sing HStation.Vmo; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class ViewAssetsTankSeriesDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsTankSeriesDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private AssetsTankSeriesVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(AssetsTankSeriesVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new AssetsTankSeriesVmo(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/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.resx similarity index 72% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.resx index 20033c4..af32865 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/01-series/ViewAssetsTankSeriesDlg.resx @@ -117,29 +117,4 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.Designer.cs new file mode 100644 index 0000000..8c802e2 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.Designer.cs @@ -0,0 +1,583 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class AddAssetsTankMainDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + selectFlagsPopupCtrl1 = new SelectFlagsPopupCtrl(); + colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colCaliber = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colMaterial = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colFlowMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + TankCoefficientViewModelBindingSource = new BindingSource(components); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + TextEditName = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); + textEditDN = new DevExpress.XtraEditors.TextEdit(); + textEditMinLevel = new DevExpress.XtraEditors.TextEdit(); + textEditMinVol = new DevExpress.XtraEditors.TextEdit(); + textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); + textEditMaxLevel = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); + toolTipController1 = new DevExpress.Utils.ToolTipController(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(selectFlagsPopupCtrl1); + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(simpleButton1); + layoutControl1.Controls.Add(TextEditName); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Controls.Add(TextEditKeyWord); + layoutControl1.Controls.Add(textEditDN); + layoutControl1.Controls.Add(textEditMinLevel); + layoutControl1.Controls.Add(textEditMinVol); + layoutControl1.Controls.Add(textEditVoerFlow); + layoutControl1.Controls.Add(textEditMaxLevel); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(677, 488); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // selectFlagsPopupCtrl1 + // + selectFlagsPopupCtrl1.Location = new Point(72, 56); + selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; + selectFlagsPopupCtrl1.Size = new Size(264, 20); + selectFlagsPopupCtrl1.TabIndex = 5; + // + // colName + // + colName.Caption = "鍚嶇О"; + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + // + // colCaliber + // + colCaliber.Caption = "鍙e緞"; + colCaliber.FieldName = "Caliber"; + colCaliber.Name = "colCaliber"; + colCaliber.Visible = true; + colCaliber.VisibleIndex = 1; + // + // colMaterial + // + colMaterial.Caption = "鏉愭枡"; + colMaterial.FieldName = "Material"; + colMaterial.Name = "colMaterial"; + colMaterial.Visible = true; + colMaterial.VisibleIndex = 2; + // + // colMinorLoss + // + colMinorLoss.Caption = "鍠峰皠绯绘暟"; + colMinorLoss.FieldName = "MinorLoss"; + colMinorLoss.Name = "colMinorLoss"; + colMinorLoss.Visible = true; + colMinorLoss.VisibleIndex = 3; + // + // colFlowMinorLoss + // + colFlowMinorLoss.Caption = "娴侀噺绯绘暟"; + colFlowMinorLoss.FieldName = "FlowMinorLoss"; + colFlowMinorLoss.Name = "colFlowMinorLoss"; + colFlowMinorLoss.Visible = true; + colFlowMinorLoss.VisibleIndex = 4; + // + // TankCoefficientViewModelBindingSource + // + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(492, 458); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(88, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 10; + BtnOk.Text = "纭畾"; + BtnOk.Click += BtnOk_ClickAsync; + // + // simpleButton1 + // + simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + simpleButton1.Appearance.Options.UseBackColor = true; + simpleButton1.DialogResult = DialogResult.Cancel; + simpleButton1.Location = new Point(584, 458); + simpleButton1.Name = "simpleButton1"; + simpleButton1.Size = new Size(85, 22); + simpleButton1.StyleController = layoutControl1; + simpleButton1.TabIndex = 11; + simpleButton1.Text = "鍙栨秷"; + // + // TextEditName + // + TextEditName.Location = new Point(72, 8); + TextEditName.Name = "TextEditName"; + TextEditName.Size = new Size(264, 20); + TextEditName.StyleController = layoutControl1; + TextEditName.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(20, 137); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(637, 305); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 9; + // + // TextEditKeyWord + // + TextEditKeyWord.Location = new Point(404, 8); + TextEditKeyWord.Name = "TextEditKeyWord"; + TextEditKeyWord.Size = new Size(265, 20); + TextEditKeyWord.StyleController = layoutControl1; + TextEditKeyWord.TabIndex = 2; + // + // textEditDN + // + textEditDN.Location = new Point(72, 32); + textEditDN.Name = "textEditDN"; + textEditDN.Size = new Size(264, 20); + textEditDN.StyleController = layoutControl1; + textEditDN.TabIndex = 3; + // + // textEditMinLevel + // + textEditMinLevel.Location = new Point(404, 32); + textEditMinLevel.Name = "textEditMinLevel"; + textEditMinLevel.Size = new Size(265, 20); + textEditMinLevel.StyleController = layoutControl1; + textEditMinLevel.TabIndex = 4; + // + // textEditMinVol + // + textEditMinVol.Location = new Point(72, 80); + textEditMinVol.Name = "textEditMinVol"; + textEditMinVol.Size = new Size(264, 20); + textEditMinVol.StyleController = layoutControl1; + textEditMinVol.TabIndex = 7; + // + // textEditVoerFlow + // + textEditVoerFlow.EditValue = null; + textEditVoerFlow.Location = new Point(340, 80); + textEditVoerFlow.Name = "textEditVoerFlow"; + textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; + textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; + textEditVoerFlow.Size = new Size(329, 20); + textEditVoerFlow.StyleController = layoutControl1; + textEditVoerFlow.TabIndex = 8; + // + // textEditMaxLevel + // + textEditMaxLevel.Location = new Point(404, 56); + textEditMaxLevel.Name = "textEditMaxLevel"; + textEditMaxLevel.Size = new Size(265, 20); + textEditMaxLevel.StyleController = layoutControl1; + textEditMaxLevel.TabIndex = 6; + // + // 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[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem2, layoutControlItem3, layoutControlItem10, layoutControlItem14, layoutControlItem17, layoutControlItem11, layoutControlItem16 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(677, 488); + Root.TextVisible = false; + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(484, 450); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(92, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 450); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(484, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem8 + // + layoutControlItem8.Control = simpleButton1; + layoutControlItem8.Location = new Point(576, 450); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(89, 26); + layoutControlItem8.TextSize = new Size(0, 0); + layoutControlItem8.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = TextEditName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(332, 24); + layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlGroup5 + // + layoutControlGroup5.AppearanceGroup.FontSizeDelta = 1; + layoutControlGroup5.AppearanceGroup.Options.UseFont = true; + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); + layoutControlGroup5.Location = new Point(0, 96); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Size = new Size(665, 354); + layoutControlGroup5.Text = "璇存槑"; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(641, 309); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextToControlDistance = 0; + layoutControlItem5.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = TextEditKeyWord; + layoutControlItem2.Location = new Point(332, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(333, 24); + layoutControlItem2.Text = "鍏抽敭瀛�:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = selectFlagsPopupCtrl1; + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(332, 24); + layoutControlItem3.Text = "鏍囩鍒楄〃:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem10 + // + layoutControlItem10.Control = textEditDN; + layoutControlItem10.Location = new Point(0, 24); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(332, 24); + layoutControlItem10.Text = "鍏О鐩村緞:"; + layoutControlItem10.TextSize = new Size(52, 14); + // + // layoutControlItem11 + // + layoutControlItem11.Control = textEditMinLevel; + layoutControlItem11.Location = new Point(332, 24); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.Size = new Size(333, 24); + layoutControlItem11.Text = "鏈�浣庢按浣�:"; + layoutControlItem11.TextSize = new Size(52, 14); + // + // layoutControlItem14 + // + layoutControlItem14.Control = textEditMinVol; + layoutControlItem14.Location = new Point(0, 72); + layoutControlItem14.Name = "layoutControlItem14"; + layoutControlItem14.Size = new Size(332, 24); + layoutControlItem14.Text = "鏈�灏忓绉�:"; + layoutControlItem14.TextSize = new Size(52, 14); + // + // layoutControlItem17 + // + layoutControlItem17.Control = textEditMaxLevel; + layoutControlItem17.Location = new Point(332, 48); + layoutControlItem17.Name = "layoutControlItem17"; + layoutControlItem17.Size = new Size(333, 24); + layoutControlItem17.Text = "鏈�澶ф按浣�:"; + layoutControlItem17.TextSize = new Size(52, 14); + // + // layoutControlItem16 + // + layoutControlItem16.Control = textEditVoerFlow; + layoutControlItem16.Location = new Point(332, 72); + layoutControlItem16.Name = "layoutControlItem16"; + layoutControlItem16.Size = new Size(333, 24); + layoutControlItem16.Text = "鏄惁鍏佽婧㈡祦:"; + layoutControlItem16.TextSize = new Size(0, 0); + layoutControlItem16.TextVisible = false; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControlItem13 + // + layoutControlItem13.Control = imageComboBoxEdit1; + layoutControlItem13.Location = new Point(0, 72); + layoutControlItem13.Name = "layoutControlItem8"; + layoutControlItem13.Size = new Size(499, 24); + layoutControlItem13.Text = "閫夋嫨鍒嗙被"; + layoutControlItem13.TextSize = new Size(52, 14); + // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Size = new Size(100, 20); + imageComboBoxEdit1.TabIndex = 0; + // + // layoutControlItem15 + // + layoutControlItem15.Control = imageComboBoxEdit2; + layoutControlItem15.Location = new Point(0, 72); + layoutControlItem15.Name = "layoutControlItem8"; + layoutControlItem15.Size = new Size(499, 24); + layoutControlItem15.Text = "閫夋嫨鍒嗙被"; + layoutControlItem15.TextSize = new Size(52, 14); + // + // imageComboBoxEdit2 + // + imageComboBoxEdit2.Location = new Point(0, 0); + imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + imageComboBoxEdit2.Size = new Size(100, 20); + imageComboBoxEdit2.TabIndex = 0; + // + // tabbedControlGroup2 + // + tabbedControlGroup2.Location = new Point(0, 354); + tabbedControlGroup2.Name = "tabbedControlGroup1"; + tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; + tabbedControlGroup2.Size = new Size(669, 90); + tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); + tabbedControlGroup2.Text = "璇存槑"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup2"; + layoutControlGroup3.Size = new Size(645, 56); + layoutControlGroup3.Text = "灞炴��"; + layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + // + // layoutControlGroup4 + // + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); + layoutControlGroup4.Location = new Point(0, 0); + layoutControlGroup4.Name = "layoutControlGroup1"; + layoutControlGroup4.Size = new Size(645, 52); + layoutControlGroup4.Text = "璇存槑"; + // + // layoutControlItem27 + // + layoutControlItem27.Control = DescriptionTextEdit; + layoutControlItem27.Location = new Point(0, 0); + layoutControlItem27.Name = "layoutControlItem5"; + layoutControlItem27.Size = new Size(637, 26); + layoutControlItem27.Text = "璇存槑:"; + layoutControlItem27.TextSize = new Size(59, 14); + // + // AddAssetsTankMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(677, 488); + Controls.Add(layoutControl1); + Name = "AddAssetsTankMainDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "娣诲姞姘存睜"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit TextEditName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.Utils.ToolTipController toolTipController1; + private DevExpress.XtraEditors.TextEdit TextEditKeyWord; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit TextEditCoefficient; + private DevExpress.XtraEditors.TextEdit TextEditAngle; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraEditors.PopupContainerControl popupContainerControl1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraTreeList.Columns.TreeListColumn colCaliber; + private DevExpress.XtraTreeList.Columns.TreeListColumn colMaterial; + private DevExpress.XtraTreeList.Columns.TreeListColumn colMinorLoss; + private DevExpress.XtraTreeList.Columns.TreeListColumn colFlowMinorLoss; + private BindingSource TankCoefficientViewModelBindingSource; + private DevExpress.XtraEditors.PopupContainerEdit TextEditMinorLoss; + private SelectFlagsPopupCtrl selectFlagsPopupCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit textEditDN; + private DevExpress.XtraEditors.TextEdit textEditMinLevel; + private DevExpress.XtraEditors.TextEdit textEditMinVol; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraEditors.CheckEdit textEditVoerFlow; + private DevExpress.XtraEditors.TextEdit textEditMaxLevel; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.cs new file mode 100644 index 0000000..8c0197d --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.cs @@ -0,0 +1,154 @@ +锘縰sing DevExpress.XtraEditors.Controls; +using HStation.Vmo; + +namespace HStation.WinFrmUI.Assets +{ + public partial class AddAssetsTankMainDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsTankMainDlg() + { + InitializeComponent(); + this.treeList1.InitialMultiColSettings(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + private Vmo.AssetsTankMainVmo _TankVmo = null; + + private List<Vmo.AssetsTankFactorVmo> _AssetsTankCoefficient; + + public async void SetBindingData(long SeriesID) + { + var bll = new BLL.AssetsTankFactor(); + _AssetsTankCoefficient = await bll.GetAll(); + this.TankCoefficientViewModelBindingSource.DataSource = _AssetsTankCoefficient; + _TankVmo = new Vmo.AssetsTankMainVmo(); + _TankVmo.SeriesID = SeriesID; + this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(); + } + + public event Func<Vmo.AssetsTankMainVmo, Task<bool>> ReloadDataEvent = null; + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(TextEditMinorLoss.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditMinorLoss, "蹇呭~椤�"); + return false; + } + + return true; + } + + //鏉愭枡閫夋嫨鍙樺寲浜嬩欢 + private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) + { + if (_AssetsTankCoefficient == null) + return; + var select = GetCoefficientByMaterial(TextEditMaterial.Text); + if (select == null) + { + this.TextEditCoefficient.Text = string.Empty; + return; + } + this.TextEditCoefficient.Text = select.MinorLoss.ToString(); + } + + //鍙e緞閫夋嫨鍙樺寲浜嬩欢 + private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) + { + if (_AssetsTankCoefficient == null) + return; + if (double.TryParse(TextEditCaliber.Text, out double caliber)) + { + foreach (var item in _AssetsTankCoefficient) + { + if (item.Caliber.HasValue) + { + if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) + { + this.TextEditCoefficient.Text = item.MinorLoss.ToString(); + return; + } + } + } + } + } + + //鎵惧埌鏈�鐩歌繎鐨勬潗鏂� + private AssetsTankFactorVmo GetCoefficientByMaterial(string name) + { + AssetsTankFactorVmo select = null; + int maxMatchedChars = 0; + foreach (var item in _AssetsTankCoefficient) + { + int matchedChars = GetIntersect(item.Material, name); + if (matchedChars > maxMatchedChars) + { + maxMatchedChars = matchedChars; + select = item; + return select; + } + } + return select; + } + + private int GetIntersect(string str1, string str2) + { + if (str1 == null || str2 == null) return 0; + return string.Join("", str1.Intersect(str2)).Count(); + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!(Valid())) + return; + _TankVmo.Description = DescriptionTextEdit.Text.Trim(); + _TankVmo.Name = TextEditName.Text.Trim(); + _TankVmo.KeyWords = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; + if (double.TryParse(this.textEditDN.Text, out double DN)) + { + _TankVmo.DN = DN; + } + if (double.TryParse(this.textEditMinLevel.Text, out double MinLevel)) + { + _TankVmo.MinLevel = MinLevel; + } + if (double.TryParse(this.textEditMaxLevel.Text, out double MaxLevel)) + { + _TankVmo.MaxLevel = MaxLevel; + } + if (double.TryParse(this.textEditMinVol.Text, out double MinVol)) + { + _TankVmo.MinVol = MinVol; + } + _TankVmo.OverFlow = this.textEditVoerFlow.Checked; + if (await this.ReloadDataEvent.Invoke(_TankVmo)) + { + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); + } + else + { + TipFormHelper.ShowError("娣诲姞澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetCurrentViewModel(_AssetsTankCoefficient); + if (vm == null) + return; + this.TextEditCoefficient.Text = vm.MinorLoss.ToString(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.resx index 20033c4..d9a794f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/AddAssetsTankMainDlg.resx @@ -117,29 +117,13 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="TankCoefficientViewModelBindingSource.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="editorButtonImageOptions1.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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>310, 17</value> + </metadata> + <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>465, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.Designer.cs new file mode 100644 index 0000000..3f8184b --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.Designer.cs @@ -0,0 +1,597 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class EditAssetsTankMainDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + textEditMaxLevel = new DevExpress.XtraEditors.TextEdit(); + textEditDN = new DevExpress.XtraEditors.TextEdit(); + textEditMinLevel = new DevExpress.XtraEditors.TextEdit(); + textEditMinVol = new DevExpress.XtraEditors.TextEdit(); + textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); + selectFlagsPopupCtrl1 = new SelectFlagsPopupCtrl(); + colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colCaliber = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colMaterial = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colFlowMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + TankCoefficientViewModelBindingSource = new BindingSource(components); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + TextEditName = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); + toolTipController1 = new DevExpress.Utils.ToolTipController(components); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(textEditMaxLevel); + layoutControl1.Controls.Add(textEditDN); + layoutControl1.Controls.Add(textEditMinLevel); + layoutControl1.Controls.Add(textEditMinVol); + layoutControl1.Controls.Add(textEditVoerFlow); + layoutControl1.Controls.Add(selectFlagsPopupCtrl1); + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(simpleButton1); + layoutControl1.Controls.Add(TextEditName); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Controls.Add(TextEditKeyWord); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(681, 482); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // textEditMaxLevel + // + textEditMaxLevel.Location = new Point(406, 56); + textEditMaxLevel.Name = "textEditMaxLevel"; + textEditMaxLevel.Size = new Size(267, 20); + textEditMaxLevel.StyleController = layoutControl1; + textEditMaxLevel.TabIndex = 6; + // + // textEditDN + // + textEditDN.Location = new Point(72, 32); + textEditDN.Name = "textEditDN"; + textEditDN.Size = new Size(266, 20); + textEditDN.StyleController = layoutControl1; + textEditDN.TabIndex = 3; + // + // textEditMinLevel + // + textEditMinLevel.Location = new Point(406, 32); + textEditMinLevel.Name = "textEditMinLevel"; + textEditMinLevel.Size = new Size(267, 20); + textEditMinLevel.StyleController = layoutControl1; + textEditMinLevel.TabIndex = 4; + // + // textEditMinVol + // + textEditMinVol.Location = new Point(72, 80); + textEditMinVol.Name = "textEditMinVol"; + textEditMinVol.Size = new Size(266, 20); + textEditMinVol.StyleController = layoutControl1; + textEditMinVol.TabIndex = 7; + // + // textEditVoerFlow + // + textEditVoerFlow.EditValue = null; + textEditVoerFlow.Location = new Point(342, 80); + textEditVoerFlow.Name = "textEditVoerFlow"; + textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; + textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; + textEditVoerFlow.Size = new Size(331, 20); + textEditVoerFlow.StyleController = layoutControl1; + textEditVoerFlow.TabIndex = 8; + // + // selectFlagsPopupCtrl1 + // + selectFlagsPopupCtrl1.Location = new Point(72, 56); + selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; + selectFlagsPopupCtrl1.Size = new Size(266, 20); + selectFlagsPopupCtrl1.TabIndex = 5; + // + // colName + // + colName.Caption = "鍚嶇О"; + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 0; + // + // colCaliber + // + colCaliber.Caption = "鍙e緞"; + colCaliber.FieldName = "Caliber"; + colCaliber.Name = "colCaliber"; + colCaliber.Visible = true; + colCaliber.VisibleIndex = 1; + // + // colMaterial + // + colMaterial.Caption = "鏉愭枡"; + colMaterial.FieldName = "Material"; + colMaterial.Name = "colMaterial"; + colMaterial.Visible = true; + colMaterial.VisibleIndex = 2; + // + // colMinorLoss + // + colMinorLoss.Caption = "鍠峰皠绯绘暟"; + colMinorLoss.FieldName = "MinorLoss"; + colMinorLoss.Name = "colMinorLoss"; + colMinorLoss.Visible = true; + colMinorLoss.VisibleIndex = 3; + // + // colFlowMinorLoss + // + colFlowMinorLoss.Caption = "娴侀噺绯绘暟"; + colFlowMinorLoss.FieldName = "FlowMinorLoss"; + colFlowMinorLoss.Name = "colFlowMinorLoss"; + colFlowMinorLoss.Visible = true; + colFlowMinorLoss.VisibleIndex = 4; + // + // TankCoefficientViewModelBindingSource + // + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(531, 452); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(67, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 10; + BtnOk.Text = "纭畾"; + BtnOk.Click += BtnOk_ClickAsync; + // + // simpleButton1 + // + simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + simpleButton1.Appearance.Options.UseBackColor = true; + simpleButton1.DialogResult = DialogResult.Cancel; + simpleButton1.Location = new Point(602, 452); + simpleButton1.Name = "simpleButton1"; + simpleButton1.Size = new Size(71, 22); + simpleButton1.StyleController = layoutControl1; + simpleButton1.TabIndex = 11; + simpleButton1.Text = "鍙栨秷"; + // + // TextEditName + // + TextEditName.Location = new Point(72, 8); + TextEditName.Name = "TextEditName"; + TextEditName.Size = new Size(266, 20); + TextEditName.StyleController = layoutControl1; + TextEditName.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(20, 137); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(641, 299); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 9; + // + // TextEditKeyWord + // + TextEditKeyWord.Location = new Point(406, 8); + TextEditKeyWord.Name = "TextEditKeyWord"; + TextEditKeyWord.Size = new Size(267, 20); + TextEditKeyWord.StyleController = layoutControl1; + TextEditKeyWord.TabIndex = 2; + // + // 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[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem7, layoutControlItem6, layoutControlItem17, layoutControlItem18, layoutControlItem14, layoutControlItem16, layoutControlItem10 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(681, 482); + Root.TextVisible = false; + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(523, 444); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(71, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 444); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(523, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem8 + // + layoutControlItem8.Control = simpleButton1; + layoutControlItem8.Location = new Point(594, 444); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(75, 26); + layoutControlItem8.TextSize = new Size(0, 0); + layoutControlItem8.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = TextEditName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(334, 24); + layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlGroup5 + // + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); + layoutControlGroup5.Location = new Point(0, 96); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Size = new Size(669, 348); + layoutControlGroup5.Text = "璇存槑"; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(645, 303); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextToControlDistance = 0; + layoutControlItem5.TextVisible = false; + // + // layoutControlItem7 + // + layoutControlItem7.Control = TextEditKeyWord; + layoutControlItem7.Location = new Point(334, 0); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(335, 24); + layoutControlItem7.Text = "鍏抽敭瀛�:"; + layoutControlItem7.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = selectFlagsPopupCtrl1; + layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(334, 24); + layoutControlItem6.Text = "鏍囩鍒楄〃:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // layoutControlItem16 + // + layoutControlItem16.Control = textEditMinLevel; + layoutControlItem16.Location = new Point(334, 24); + layoutControlItem16.Name = "layoutControlItem16"; + layoutControlItem16.Size = new Size(335, 24); + layoutControlItem16.Text = "鏈�浣庢按浣�:"; + layoutControlItem16.TextSize = new Size(52, 14); + // + // layoutControlItem17 + // + layoutControlItem17.Control = textEditDN; + layoutControlItem17.Location = new Point(0, 24); + layoutControlItem17.Name = "layoutControlItem17"; + layoutControlItem17.Size = new Size(334, 24); + layoutControlItem17.Text = "鍏О鐩村緞:"; + layoutControlItem17.TextSize = new Size(52, 14); + // + // layoutControlItem18 + // + layoutControlItem18.Control = textEditMaxLevel; + layoutControlItem18.Location = new Point(334, 48); + layoutControlItem18.Name = "layoutControlItem18"; + layoutControlItem18.Size = new Size(335, 24); + layoutControlItem18.Text = "鏈�澶ф按浣�:"; + layoutControlItem18.TextSize = new Size(52, 14); + // + // layoutControlItem10 + // + layoutControlItem10.Control = textEditVoerFlow; + layoutControlItem10.Location = new Point(334, 72); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(335, 24); + layoutControlItem10.TextSize = new Size(0, 0); + layoutControlItem10.TextVisible = false; + // + // layoutControlItem14 + // + layoutControlItem14.Control = textEditMinVol; + layoutControlItem14.Location = new Point(0, 72); + layoutControlItem14.Name = "layoutControlItem14"; + layoutControlItem14.Size = new Size(334, 24); + layoutControlItem14.Text = "鏈�灏忓绉�:"; + layoutControlItem14.TextSize = new Size(52, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControlItem13 + // + layoutControlItem13.Control = imageComboBoxEdit1; + layoutControlItem13.Location = new Point(0, 72); + layoutControlItem13.Name = "layoutControlItem8"; + layoutControlItem13.Size = new Size(499, 24); + layoutControlItem13.Text = "閫夋嫨鍒嗙被"; + layoutControlItem13.TextSize = new Size(52, 14); + // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Size = new Size(100, 20); + imageComboBoxEdit1.TabIndex = 0; + // + // layoutControlItem15 + // + layoutControlItem15.Control = imageComboBoxEdit2; + layoutControlItem15.Location = new Point(0, 72); + layoutControlItem15.Name = "layoutControlItem8"; + layoutControlItem15.Size = new Size(499, 24); + layoutControlItem15.Text = "閫夋嫨鍒嗙被"; + layoutControlItem15.TextSize = new Size(52, 14); + // + // imageComboBoxEdit2 + // + imageComboBoxEdit2.Location = new Point(0, 0); + imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + imageComboBoxEdit2.Size = new Size(100, 20); + imageComboBoxEdit2.TabIndex = 0; + // + // tabbedControlGroup2 + // + tabbedControlGroup2.Location = new Point(0, 354); + tabbedControlGroup2.Name = "tabbedControlGroup1"; + tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; + tabbedControlGroup2.Size = new Size(669, 90); + tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); + tabbedControlGroup2.Text = "璇存槑"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup2"; + layoutControlGroup3.Size = new Size(645, 56); + layoutControlGroup3.Text = "灞炴��"; + layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + // + // layoutControlGroup4 + // + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); + layoutControlGroup4.Location = new Point(0, 0); + layoutControlGroup4.Name = "layoutControlGroup1"; + layoutControlGroup4.Size = new Size(645, 42); + layoutControlGroup4.Text = "璇存槑"; + // + // layoutControlItem27 + // + layoutControlItem27.Control = DescriptionTextEdit; + layoutControlItem27.Location = new Point(0, 0); + layoutControlItem27.Name = "layoutControlItem5"; + layoutControlItem27.Size = new Size(645, 42); + layoutControlItem27.Text = "璇存槑:"; + layoutControlItem27.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Location = new Point(334, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(335, 24); + layoutControlItem2.Text = "鍏抽敭瀛�:"; + layoutControlItem2.TextSize = new Size(49, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(669, 24); + layoutControlItem3.Text = "鎹熷け绯绘暟:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // EditAssetsTankMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(681, 482); + Controls.Add(layoutControl1); + Name = "EditAssetsTankMainDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "缂栬緫姘存睜"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit TextEditName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.Utils.ToolTipController toolTipController1; + private DevExpress.XtraEditors.TextEdit TextEditKeyWord; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraEditors.PopupContainerControl popupContainerControl1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraTreeList.Columns.TreeListColumn colCaliber; + private DevExpress.XtraTreeList.Columns.TreeListColumn colMaterial; + private DevExpress.XtraTreeList.Columns.TreeListColumn colMinorLoss; + private DevExpress.XtraTreeList.Columns.TreeListColumn colFlowMinorLoss; + private BindingSource TankCoefficientViewModelBindingSource; + private DevExpress.XtraEditors.PopupContainerEdit TextEditMinorLoss; + private SelectFlagsPopupCtrl selectFlagsPopupCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraEditors.TextEdit textEditDN; + private DevExpress.XtraEditors.TextEdit textEditMinLevel; + private DevExpress.XtraEditors.TextEdit textEditMinVol; + private DevExpress.XtraEditors.CheckEdit textEditVoerFlow; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private DevExpress.XtraEditors.TextEdit textEditMaxLevel; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.cs new file mode 100644 index 0000000..249d07e --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.cs @@ -0,0 +1,98 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraEditors.Controls; +using HStation.Vmo; + +namespace HStation.WinFrmUI.Assets +{ + public partial class EditAssetsTankMainDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsTankMainDlg() + { + InitializeComponent(); + // this.treeList1.InitialMultiColSettings(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + private Vmo.AssetsTankMainVmo _TankVmo = null; + + private List<Vmo.AssetsTankFactorVmo> _AssetsTankCoefficient; + + public async void SetBindingData(Vmo.AssetsTankMainVmo TankVmo) + { + var bll = new BLL.AssetsTankFactor(); + _AssetsTankCoefficient = await bll.GetAll(); + this.TankCoefficientViewModelBindingSource.DataSource = _AssetsTankCoefficient; + + _TankVmo = TankVmo; + this.TextEditName.Text = _TankVmo.Name; + this.DescriptionTextEdit.Text = _TankVmo.Description; + this.TextEditKeyWord.Text = string.Join(",", _TankVmo.KeyWords); + this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(_TankVmo.Flags); + this.textEditDN.Text = _TankVmo.DN.ToString(); + this.textEditMinLevel.Text = _TankVmo.MinLevel.ToString(); + this.textEditMaxLevel.Text = _TankVmo.MaxLevel.ToString(); + this.textEditMinVol.Text = _TankVmo.MinVol.ToString(); + this.textEditVoerFlow.Checked = _TankVmo.OverFlow; + } + + public event Func<Vmo.AssetsTankMainVmo, Task<bool>> ReloadDataEvent = null; + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + return false; + } + return true; + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!(Valid())) + return; + _TankVmo.Description = DescriptionTextEdit.Text.Trim(); + _TankVmo.Name = TextEditName.Text.Trim(); + _TankVmo.KeyWords = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; + if (double.TryParse(this.textEditDN.Text, out double DN)) + { + _TankVmo.DN = DN; + } + if (double.TryParse(this.textEditMinLevel.Text, out double MinLevel)) + { + _TankVmo.MinLevel = MinLevel; + } + if (double.TryParse(this.textEditMaxLevel.Text, out double MaxLevel)) + { + _TankVmo.MaxLevel = MaxLevel; + } + if (double.TryParse(this.textEditMinVol.Text, out double MinVol)) + { + _TankVmo.MinVol = MinVol; + } + _TankVmo.OverFlow = this.textEditVoerFlow.Checked; + if (await this.ReloadDataEvent.Invoke(_TankVmo)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); + } + else + { + TipFormHelper.ShowSucceed("淇敼澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetCurrentViewModel(_AssetsTankCoefficient); + if (vm == null) + return; + this.TextEditMinorLoss.Text = vm.MinorLoss.ToString(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.resx index 20033c4..d9a794f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main-bak/EditAssetsTankMainDlg.resx @@ -117,29 +117,13 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="TankCoefficientViewModelBindingSource.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="editorButtonImageOptions1.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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>310, 17</value> + </metadata> + <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>465, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.Designer.cs index d1c2980..25bf23a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.Designer.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { partial class AddAssetsTankMainDlg { @@ -28,248 +28,165 @@ /// </summary> private void InitializeComponent() { - components = new System.ComponentModel.Container(); + components = new Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - selectFlagsPopupCtrl1 = new SelectFlagsPopupCtrl(); - colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colCaliber = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colMaterial = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colFlowMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - TankCoefficientViewModelBindingSource = new BindingSource(components); - BtnOk = new DevExpress.XtraEditors.SimpleButton(); - simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); - TextEditName = new DevExpress.XtraEditors.TextEdit(); - DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); - TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); - textEditDN = new DevExpress.XtraEditors.TextEdit(); - textEditMinLevel = new DevExpress.XtraEditors.TextEdit(); - textEditMinVol = new DevExpress.XtraEditors.TextEdit(); - textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); - textEditMaxLevel = new DevExpress.XtraEditors.TextEdit(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtMinLevel = new DevExpress.XtraEditors.TextEdit(); + txtDN = new DevExpress.XtraEditors.TextEdit(); + txtMaxLevel = new DevExpress.XtraEditors.TextEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = 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(); layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); - imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); - layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); - imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); - tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); - layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); - toolTipController1 = new DevExpress.Utils.ToolTipController(components); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + txtMinVol = new DevExpress.XtraEditors.TextEdit(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtMinLevel.Properties).BeginInit(); + ((ISupportInitialize)txtDN.Properties).BeginInit(); + ((ISupportInitialize)txtMaxLevel.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)layoutControlItem10).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + ((ISupportInitialize)txtMinVol.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem5).BeginInit(); + ((ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem11).BeginInit(); SuspendLayout(); // // layoutControl1 // - layoutControl1.Controls.Add(selectFlagsPopupCtrl1); - layoutControl1.Controls.Add(BtnOk); - layoutControl1.Controls.Add(simpleButton1); - layoutControl1.Controls.Add(TextEditName); - layoutControl1.Controls.Add(DescriptionTextEdit); - layoutControl1.Controls.Add(TextEditKeyWord); - layoutControl1.Controls.Add(textEditDN); - layoutControl1.Controls.Add(textEditMinLevel); - layoutControl1.Controls.Add(textEditMinVol); layoutControl1.Controls.Add(textEditVoerFlow); - layoutControl1.Controls.Add(textEditMaxLevel); + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtMinLevel); + layoutControl1.Controls.Add(txtDN); + layoutControl1.Controls.Add(txtMaxLevel); + layoutControl1.Controls.Add(txtName); + layoutControl1.Controls.Add(txtMinVol); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; - layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(677, 488); - layoutControl1.TabIndex = 0; + layoutControl1.Size = new Size(665, 358); + layoutControl1.TabIndex = 1; layoutControl1.Text = "layoutControl1"; // - // selectFlagsPopupCtrl1 + // txtKeyWord // - selectFlagsPopupCtrl1.Location = new Point(72, 56); - selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; - selectFlagsPopupCtrl1.Size = new Size(264, 20); - selectFlagsPopupCtrl1.TabIndex = 5; + txtKeyWord.Location = new Point(398, 12); + txtKeyWord.Name = "txtKeyWord"; + txtKeyWord.Properties.NullValuePrompt = ",鍒嗛殧 渚嬪 A,B"; + txtKeyWord.Size = new Size(255, 20); + txtKeyWord.StyleController = layoutControl1; + txtKeyWord.TabIndex = 2; // - // colName + // txtTagName // - colName.Caption = "鍚嶇О"; - colName.FieldName = "Name"; - colName.Name = "colName"; - colName.Visible = true; - colName.VisibleIndex = 0; + txtTagName.Location = new Point(76, 84); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(254, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 7; // - // colCaliber + // setFlagsEditCtrl1 // - colCaliber.Caption = "鍙e緞"; - colCaliber.FieldName = "Caliber"; - colCaliber.Name = "colCaliber"; - colCaliber.Visible = true; - colCaliber.VisibleIndex = 1; + setFlagsEditCtrl1.Location = new Point(398, 36); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(255, 20); + setFlagsEditCtrl1.TabIndex = 4; // - // colMaterial + // generalOkAndCancelCtrl1 // - colMaterial.Caption = "鏉愭枡"; - colMaterial.FieldName = "Material"; - colMaterial.Name = "colMaterial"; - colMaterial.Visible = true; - colMaterial.VisibleIndex = 2; + 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, 296); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(641, 50); + generalOkAndCancelCtrl1.TabIndex = 10; // - // colMinorLoss + // txtDescription // - colMinorLoss.Caption = "鍠峰皠绯绘暟"; - colMinorLoss.FieldName = "MinorLoss"; - colMinorLoss.Name = "colMinorLoss"; - colMinorLoss.Visible = true; - colMinorLoss.VisibleIndex = 3; + txtDescription.Location = new Point(76, 132); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(577, 160); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 9; // - // colFlowMinorLoss + // txtMinLevel // - colFlowMinorLoss.Caption = "娴侀噺绯绘暟"; - colFlowMinorLoss.FieldName = "FlowMinorLoss"; - colFlowMinorLoss.Name = "colFlowMinorLoss"; - colFlowMinorLoss.Visible = true; - colFlowMinorLoss.VisibleIndex = 4; + txtMinLevel.Location = new Point(76, 60); + txtMinLevel.Name = "txtMinLevel"; + txtMinLevel.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMinLevel.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtMinLevel.Size = new Size(254, 20); + txtMinLevel.StyleController = layoutControl1; + txtMinLevel.TabIndex = 5; // - // TankCoefficientViewModelBindingSource + // txtDN // - TankCoefficientViewModelBindingSource.DataSource = typeof(TankCoefficientViewModel); + txtDN.Location = new Point(76, 36); + txtDN.Name = "txtDN"; + txtDN.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDN.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDN.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDN.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDN.Properties.NullValuePrompt = "mm"; + txtDN.Size = new Size(254, 20); + txtDN.StyleController = layoutControl1; + txtDN.TabIndex = 3; + txtDN.EditValueChanged += txtCaliber_EditValueChanged; // - // BtnOk + // txtMaxLevel // - BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(492, 458); - BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(88, 22); - BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 10; - BtnOk.Text = "纭畾"; - BtnOk.Click += BtnOk_ClickAsync; + txtMaxLevel.Location = new Point(398, 60); + txtMaxLevel.Name = "txtMaxLevel"; + txtMaxLevel.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaxLevel.Size = new Size(255, 20); + txtMaxLevel.StyleController = layoutControl1; + txtMaxLevel.TabIndex = 6; + txtMaxLevel.EditValueChanged += txtMaterial_EditValueChanged; // - // simpleButton1 + // txtName // - simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - simpleButton1.Appearance.Options.UseBackColor = true; - simpleButton1.DialogResult = DialogResult.Cancel; - simpleButton1.Location = new Point(584, 458); - simpleButton1.Name = "simpleButton1"; - simpleButton1.Size = new Size(85, 22); - simpleButton1.StyleController = layoutControl1; - simpleButton1.TabIndex = 11; - simpleButton1.Text = "鍙栨秷"; - // - // TextEditName - // - TextEditName.Location = new Point(72, 8); - TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(264, 20); - TextEditName.StyleController = layoutControl1; - TextEditName.TabIndex = 0; - // - // DescriptionTextEdit - // - DescriptionTextEdit.Location = new Point(20, 137); - DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(637, 305); - DescriptionTextEdit.StyleController = layoutControl1; - DescriptionTextEdit.TabIndex = 9; - // - // TextEditKeyWord - // - TextEditKeyWord.Location = new Point(404, 8); - TextEditKeyWord.Name = "TextEditKeyWord"; - TextEditKeyWord.Size = new Size(265, 20); - TextEditKeyWord.StyleController = layoutControl1; - TextEditKeyWord.TabIndex = 2; - // - // textEditDN - // - textEditDN.Location = new Point(72, 32); - textEditDN.Name = "textEditDN"; - textEditDN.Size = new Size(264, 20); - textEditDN.StyleController = layoutControl1; - textEditDN.TabIndex = 3; - // - // textEditMinLevel - // - textEditMinLevel.Location = new Point(404, 32); - textEditMinLevel.Name = "textEditMinLevel"; - textEditMinLevel.Size = new Size(265, 20); - textEditMinLevel.StyleController = layoutControl1; - textEditMinLevel.TabIndex = 4; - // - // textEditMinVol - // - textEditMinVol.Location = new Point(72, 80); - textEditMinVol.Name = "textEditMinVol"; - textEditMinVol.Size = new Size(264, 20); - textEditMinVol.StyleController = layoutControl1; - textEditMinVol.TabIndex = 7; - // - // textEditVoerFlow - // - textEditVoerFlow.EditValue = null; - textEditVoerFlow.Location = new Point(340, 80); - textEditVoerFlow.Name = "textEditVoerFlow"; - textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; - textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; - textEditVoerFlow.Size = new Size(329, 20); - textEditVoerFlow.StyleController = layoutControl1; - textEditVoerFlow.TabIndex = 8; - // - // textEditMaxLevel - // - textEditMaxLevel.Location = new Point(404, 56); - textEditMaxLevel.Name = "textEditMaxLevel"; - textEditMaxLevel.Size = new Size(265, 20); - textEditMaxLevel.StyleController = layoutControl1; - textEditMaxLevel.TabIndex = 6; + txtName.Location = new Point(76, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(254, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; // // Root // @@ -277,308 +194,199 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem2, layoutControlItem3, layoutControlItem10, layoutControlItem14, layoutControlItem17, layoutControlItem11, layoutControlItem16 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem3, layoutControlItem6, layoutControlItem7, layoutControlItem10, layoutControlItem9, layoutControlItem5, layoutControlItem2, layoutControlItem8, layoutControlItem4, layoutControlItem11 }); Root.Name = "Root"; - Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); - Root.Size = new Size(677, 488); + Root.Size = new Size(665, 358); Root.TextVisible = false; - // - // layoutControlItem4 - // - layoutControlItem4.Control = BtnOk; - layoutControlItem4.Location = new Point(484, 450); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(92, 26); - layoutControlItem4.TextSize = new Size(0, 0); - layoutControlItem4.TextVisible = false; - // - // emptySpaceItem1 - // - emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 450); - emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(484, 26); - emptySpaceItem1.TextSize = new Size(0, 0); - // - // layoutControlItem8 - // - layoutControlItem8.Control = simpleButton1; - layoutControlItem8.Location = new Point(576, 450); - layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(89, 26); - layoutControlItem8.TextSize = new Size(0, 0); - layoutControlItem8.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = TextEditName; + layoutControlItem1.Control = txtName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(332, 24); - layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.Size = new Size(322, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; layoutControlItem1.TextSize = new Size(52, 14); - // - // layoutControlGroup5 - // - layoutControlGroup5.AppearanceGroup.FontSizeDelta = 1; - layoutControlGroup5.AppearanceGroup.Options.UseFont = true; - layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); - layoutControlGroup5.Location = new Point(0, 96); - layoutControlGroup5.Name = "layoutControlGroup5"; - layoutControlGroup5.Size = new Size(665, 354); - layoutControlGroup5.Text = "璇存槑"; - // - // layoutControlItem5 - // - layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 0); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(641, 309); - layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; - layoutControlItem5.TextSize = new Size(0, 0); - layoutControlItem5.TextToControlDistance = 0; - layoutControlItem5.TextVisible = false; - // - // layoutControlItem2 - // - layoutControlItem2.Control = TextEditKeyWord; - layoutControlItem2.Location = new Point(332, 0); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(333, 24); - layoutControlItem2.Text = "鍏抽敭瀛�:"; - layoutControlItem2.TextSize = new Size(52, 14); // // layoutControlItem3 // - layoutControlItem3.Control = selectFlagsPopupCtrl1; - layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Control = txtDN; + layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(332, 24); - layoutControlItem3.Text = "鏍囩鍒楄〃:"; + layoutControlItem3.Size = new Size(322, 24); + layoutControlItem3.Text = "鍏О鐩村緞:"; layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtMinLevel; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(322, 24); + layoutControlItem4.Text = "鏈�浣庢按浣�:"; + layoutControlItem4.TextSize = new Size(52, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaxLevel; + layoutControlItem2.Location = new Point(322, 48); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(323, 24); + layoutControlItem2.Text = "鏈�楂樻按浣�:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 120); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(645, 164); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 284); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(645, 54); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; // // layoutControlItem10 // - layoutControlItem10.Control = textEditDN; - layoutControlItem10.Location = new Point(0, 24); + layoutControlItem10.Control = txtKeyWord; + layoutControlItem10.Location = new Point(322, 0); layoutControlItem10.Name = "layoutControlItem10"; - layoutControlItem10.Size = new Size(332, 24); - layoutControlItem10.Text = "鍏О鐩村緞:"; + layoutControlItem10.Size = new Size(323, 24); + layoutControlItem10.Text = "鍏抽敭瀛�:"; layoutControlItem10.TextSize = new Size(52, 14); // - // layoutControlItem11 + // layoutControlItem8 // - layoutControlItem11.Control = textEditMinLevel; - layoutControlItem11.Location = new Point(332, 24); - layoutControlItem11.Name = "layoutControlItem11"; - layoutControlItem11.Size = new Size(333, 24); - layoutControlItem11.Text = "鏈�浣庢按浣�:"; - layoutControlItem11.TextSize = new Size(52, 14); + layoutControlItem8.Control = setFlagsEditCtrl1; + layoutControlItem8.Location = new Point(322, 24); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(323, 24); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(52, 14); // - // layoutControlItem14 + // layoutControlItem9 // - layoutControlItem14.Control = textEditMinVol; - layoutControlItem14.Location = new Point(0, 72); - layoutControlItem14.Name = "layoutControlItem14"; - layoutControlItem14.Size = new Size(332, 24); - layoutControlItem14.Text = "鏈�灏忓绉�:"; - layoutControlItem14.TextSize = new Size(52, 14); - // - // layoutControlItem17 - // - layoutControlItem17.Control = textEditMaxLevel; - layoutControlItem17.Location = new Point(332, 48); - layoutControlItem17.Name = "layoutControlItem17"; - layoutControlItem17.Size = new Size(333, 24); - layoutControlItem17.Text = "鏈�澶ф按浣�:"; - layoutControlItem17.TextSize = new Size(52, 14); - // - // layoutControlItem16 - // - layoutControlItem16.Control = textEditVoerFlow; - layoutControlItem16.Location = new Point(332, 72); - layoutControlItem16.Name = "layoutControlItem16"; - layoutControlItem16.Size = new Size(333, 24); - layoutControlItem16.Text = "鏄惁鍏佽婧㈡祦:"; - layoutControlItem16.TextSize = new Size(0, 0); - layoutControlItem16.TextVisible = false; + layoutControlItem9.Control = txtTagName; + layoutControlItem9.Location = new Point(0, 72); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(322, 24); + layoutControlItem9.Text = "鏍囧織:"; + layoutControlItem9.TextSize = new Size(52, 14); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // - // layoutControlItem13 + // txtMinVol // - layoutControlItem13.Control = imageComboBoxEdit1; - layoutControlItem13.Location = new Point(0, 72); - layoutControlItem13.Name = "layoutControlItem8"; - layoutControlItem13.Size = new Size(499, 24); - layoutControlItem13.Text = "閫夋嫨鍒嗙被"; - layoutControlItem13.TextSize = new Size(52, 14); + txtMinVol.Location = new Point(398, 84); + txtMinVol.Name = "txtMinVol"; + txtMinVol.Size = new Size(255, 20); + txtMinVol.StyleController = layoutControl1; + txtMinVol.TabIndex = 8; // - // imageComboBoxEdit1 + // layoutControlItem5 // - imageComboBoxEdit1.Location = new Point(0, 0); - imageComboBoxEdit1.Name = "imageComboBoxEdit1"; - imageComboBoxEdit1.Size = new Size(100, 20); - imageComboBoxEdit1.TabIndex = 0; + layoutControlItem5.Control = txtMinVol; + layoutControlItem5.Location = new Point(322, 72); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(323, 24); + layoutControlItem5.Text = "鏈�灏忓绉�:"; + layoutControlItem5.TextSize = new Size(52, 14); // - // layoutControlItem15 + // textEditVoerFlow // - layoutControlItem15.Control = imageComboBoxEdit2; - layoutControlItem15.Location = new Point(0, 72); - layoutControlItem15.Name = "layoutControlItem8"; - layoutControlItem15.Size = new Size(499, 24); - layoutControlItem15.Text = "閫夋嫨鍒嗙被"; - layoutControlItem15.TextSize = new Size(52, 14); + textEditVoerFlow.EditValue = null; + textEditVoerFlow.Location = new Point(12, 108); + textEditVoerFlow.Name = "textEditVoerFlow"; + textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; + textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; + textEditVoerFlow.Size = new Size(641, 20); + textEditVoerFlow.StyleController = layoutControl1; + textEditVoerFlow.TabIndex = 9; // - // imageComboBoxEdit2 + // layoutControlItem11 // - imageComboBoxEdit2.Location = new Point(0, 0); - imageComboBoxEdit2.Name = "imageComboBoxEdit2"; - imageComboBoxEdit2.Size = new Size(100, 20); - imageComboBoxEdit2.TabIndex = 0; - // - // tabbedControlGroup2 - // - tabbedControlGroup2.Location = new Point(0, 354); - tabbedControlGroup2.Name = "tabbedControlGroup1"; - tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; - tabbedControlGroup2.Size = new Size(669, 90); - tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); - tabbedControlGroup2.Text = "璇存槑"; - // - // layoutControlGroup3 - // - layoutControlGroup3.Location = new Point(0, 0); - layoutControlGroup3.Name = "layoutControlGroup2"; - layoutControlGroup3.Size = new Size(645, 56); - layoutControlGroup3.Text = "灞炴��"; - layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - // - // layoutControlGroup4 - // - layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); - layoutControlGroup4.Location = new Point(0, 0); - layoutControlGroup4.Name = "layoutControlGroup1"; - layoutControlGroup4.Size = new Size(645, 52); - layoutControlGroup4.Text = "璇存槑"; - // - // layoutControlItem27 - // - layoutControlItem27.Control = DescriptionTextEdit; - layoutControlItem27.Location = new Point(0, 0); - layoutControlItem27.Name = "layoutControlItem5"; - layoutControlItem27.Size = new Size(637, 26); - layoutControlItem27.Text = "璇存槑:"; - layoutControlItem27.TextSize = new Size(59, 14); + layoutControlItem11.Control = textEditVoerFlow; + layoutControlItem11.Location = new Point(0, 96); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.Size = new Size(645, 24); + layoutControlItem11.TextSize = new Size(0, 0); + layoutControlItem11.TextVisible = false; // // AddAssetsTankMainDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(677, 488); + ClientSize = new Size(665, 358); Controls.Add(layoutControl1); Name = "AddAssetsTankMainDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "娣诲姞姘存睜"; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtMinLevel.Properties).EndInit(); + ((ISupportInitialize)txtDN.Properties).EndInit(); + ((ISupportInitialize)txtMaxLevel.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)layoutControlItem10).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)txtMinVol.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem5).EndInit(); + ((ISupportInitialize)textEditVoerFlow.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem11).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraEditors.TextEdit TextEditName; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraEditors.TextEdit txtMinLevel; + private DevExpress.XtraEditors.TextEdit txtDN; + private DevExpress.XtraEditors.TextEdit txtMaxLevel; + private DevExpress.XtraEditors.TextEdit txtName; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; - private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.SimpleButton BtnOk; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraEditors.SimpleButton simpleButton1; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraEditors.SimpleButton btnCancel; - private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; - private DevExpress.XtraEditors.TextEdit TagNameTextEdit; - private DevExpress.XtraEditors.TextEdit NameTextEdit; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; - private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; - private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; - private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; - private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; - private DevExpress.Utils.ToolTipController toolTipController1; - private DevExpress.XtraEditors.TextEdit TextEditKeyWord; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private DevExpress.XtraEditors.TextEdit TextEditCoefficient; - private DevExpress.XtraEditors.TextEdit TextEditAngle; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; - private DevExpress.XtraEditors.PopupContainerControl popupContainerControl1; - private DevExpress.XtraTreeList.TreeList treeList1; - private DevExpress.XtraTreeList.Columns.TreeListColumn colName; - private DevExpress.XtraTreeList.Columns.TreeListColumn colCaliber; - private DevExpress.XtraTreeList.Columns.TreeListColumn colMaterial; - private DevExpress.XtraTreeList.Columns.TreeListColumn colMinorLoss; - private DevExpress.XtraTreeList.Columns.TreeListColumn colFlowMinorLoss; - private BindingSource TankCoefficientViewModelBindingSource; - private DevExpress.XtraEditors.PopupContainerEdit TextEditMinorLoss; - private SelectFlagsPopupCtrl selectFlagsPopupCtrl1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraEditors.TextEdit textEditDN; - private DevExpress.XtraEditors.TextEdit textEditMinLevel; - private DevExpress.XtraEditors.TextEdit textEditMinVol; + 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; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraEditors.TextEdit txtMinVol; private DevExpress.XtraEditors.CheckEdit textEditVoerFlow; - private DevExpress.XtraEditors.TextEdit textEditMaxLevel; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.cs index c9cea6f..fa07307 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.cs @@ -1,154 +1,198 @@ -锘縰sing DevExpress.XtraEditors.Controls; +锘縰sing DevExpress.XtraEditors; +using DevExpress.XtraScheduler.Outlook.Interop; +using HStation.Service.Assets; 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.Assets +namespace HStation.WinFrmUI { public partial class AddAssetsTankMainDlg : DevExpress.XtraEditors.XtraForm { public AddAssetsTankMainDlg() { InitializeComponent(); - this.treeList1.InitialMultiColSettings(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } - private Vmo.AssetsTankMainVmo _TankVmo = null; + private static AssetsTankMainVmo _last = null; - private List<Vmo.AssetsTankCoefficientVmo> _AssetsTankCoefficient; + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsTankMainVmo> ReloadDataEvent; - public async void SetBindingData(long SeriesID) + private HStation.Vmo.AssetsTankSeriesVmo _series = null; + private HStation.Vmo.AssetsTankMainVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(HStation.Vmo.AssetsTankSeriesVmo series) { - var bll = new BLL.AssetsTankCoefficient(); - _AssetsTankCoefficient = await bll.GetAll(); - this.TankCoefficientViewModelBindingSource.DataSource = _AssetsTankCoefficient; - _TankVmo = new Vmo.AssetsTankMainVmo(); - _TankVmo.SeriesID = SeriesID; - this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(); + if (series == null) + { + return; + } + _series = series; + _vmo = new Vmo.AssetsTankMainVmo(); + _vmo.SeriesID = series.ID; + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.TankMain); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null); + if (_last != null) + { + this.txtName.EditValue = _last.Name; + this.txtKeyWord.EditValue = KeyWordHelper.ToString(_last.KeyWords); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), _last.Flags); + this.txtTagName.EditValue = _last.TagName; + this.txtDescription.EditValue = _last.Description; + } } - public event Func<Vmo.AssetsTankMainVmo, Task<bool>> ReloadDataEvent = null; - - //鏁版嵁楠岃瘉 - private bool Valid() + //楠岃瘉 + private async Task<bool> Valid() { this.dxErrorProvider1.ClearErrors(); - if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) { - this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); return false; } - if (string.IsNullOrEmpty(TextEditMinorLoss.Text.Trim())) + if (string.IsNullOrEmpty(this.txtMaxLevel.Text.Trim())) { - this.dxErrorProvider1.SetError(this.TextEditMinorLoss, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.txtMaxLevel, "蹇呭~椤�"); return false; } - + if (string.IsNullOrEmpty(this.txtMinLevel.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMinLevel, "蹇呭~椤�"); + return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.IsExistTagName(tagname)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } + } return true; } - //鏉愭枡閫夋嫨鍙樺寲浜嬩欢 - private void TextEditMaterial_SelectedIndexChanged(object sender, EventArgs e) + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() { - if (_AssetsTankCoefficient == null) - return; - var select = GetCoefficientByMaterial(TextEditMaterial.Text); - if (select == null) + if (_series == null) { - this.TextEditCoefficient.Text = string.Empty; return; } - this.TextEditCoefficient.Text = select.MinorLoss.ToString(); + if (_vmo == null) + { + return; + } + if (!await Valid()) + { + return; + } + _vmo.Name = this.txtName.Text.Trim(); + // _vmo.MinorLoss = double.Parse(this.txtMinorLoss.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(); + if (double.TryParse(this.txtDN.EditValue.ToString(), out double DN)) + { + _vmo.DN = DN; + } + if (double.TryParse(this.txtMinLevel.Text, out double MinLevel)) + { + _vmo.MinLevel = MinLevel; + } + if (double.TryParse(this.txtMaxLevel.Text, out double MaxLevel)) + { + _vmo.MaxLevel = MaxLevel; + } + if (double.TryParse(this.txtMinVol.Text, out double MinVol)) + { + _vmo.MinVol = MinVol; + } + _vmo.OverFlow = this.textEditVoerFlow.Checked; + var id = await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.GetByID(id); + _last = vmo; + this.ReloadDataEvent?.Invoke(vmo); + this.DialogResult = DialogResult.OK; + this.Close(); } - //鍙e緞閫夋嫨鍙樺寲浜嬩欢 - private void TextEditCaliber_SelectedIndexChanged(object sender, EventArgs e) + //鑾峰彇鎵�鏈夌郴鏁板垪琛� + private async Task<List<AssetsTankFactorVmo>> GetAllFactorList() { - if (_AssetsTankCoefficient == null) - return; - if (double.TryParse(TextEditCaliber.Text, out double caliber)) + if (_allFactorList == null) { - foreach (var item in _AssetsTankCoefficient) + _allFactorList = await BLLFactory<HStation.BLL.AssetsTankFactor>.Instance.GetAll(); + if (_allFactorList == null) { - if (item.Caliber.HasValue) + _allFactorList = new List<AssetsTankFactorVmo>(); + } + } + return _allFactorList; + } + + private List<AssetsTankFactorVmo> _allFactorList = null; + + //鍖归厤绯绘暟 + private async void MatchingFactor() + { + if (this.txtMinLevel.EditValue == null) + { + var allFactorList = await GetAllFactorList(); + if (allFactorList != null && allFactorList.Count > 0) + { + var material = this.txtMaxLevel.Text.Trim(); + double? diameter = this.txtDN.EditValue == null ? null : double.Parse(this.txtDN.EditValue.ToString()); + var factorList = allFactorList.ToList(); + if (!string.IsNullOrEmpty(material)) { - if (Math.Abs(Convert.ToDouble(item.Caliber) - caliber) < 10) - { - this.TextEditCoefficient.Text = item.MinorLoss.ToString(); - return; - } + factorList = factorList.Where(x => !string.IsNullOrEmpty(x.Material) && x.Material.Contains(material)).ToList(); + } + if (diameter.HasValue) + { + factorList = factorList.Where(x => x.Caliber.HasValue && x.Caliber.Value == diameter.Value).ToList(); + } + var factor = factorList.FirstOrDefault(); + if (factor != null) + { + this.txtMinLevel.EditValue = factor.MinorLoss; } } } } - //鎵惧埌鏈�鐩歌繎鐨勬潗鏂� - private AssetsTankCoefficientVmo GetCoefficientByMaterial(string name) + private void txtMaterial_EditValueChanged(object sender, EventArgs e) { - AssetsTankCoefficientVmo select = null; - int maxMatchedChars = 0; - foreach (var item in _AssetsTankCoefficient) - { - int matchedChars = GetIntersect(item.Material, name); - if (matchedChars > maxMatchedChars) - { - maxMatchedChars = matchedChars; - select = item; - return select; - } - } - return select; + MatchingFactor(); } - private int GetIntersect(string str1, string str2) + private void txtCaliber_EditValueChanged(object sender, EventArgs e) { - if (str1 == null || str2 == null) return 0; - return string.Join("", str1.Intersect(str2)).Count(); - } - - //瀹屾垚 - private async void BtnOk_ClickAsync(object sender, EventArgs e) - { - if (!(Valid())) - return; - _TankVmo.Description = DescriptionTextEdit.Text.Trim(); - _TankVmo.Name = TextEditName.Text.Trim(); - _TankVmo.KeyWord = this.TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); - _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; - if (double.TryParse(this.textEditDN.Text, out double DN)) - { - _TankVmo.DN = DN; - } - if (double.TryParse(this.textEditMinLevel.Text, out double MinLevel)) - { - _TankVmo.MinLevel = MinLevel; - } - if (double.TryParse(this.textEditMaxLevel.Text, out double MaxLevel)) - { - _TankVmo.MaxLevel = MaxLevel; - } - if (double.TryParse(this.textEditMinVol.Text, out double MinVol)) - { - _TankVmo.MinVol = MinVol; - } - _TankVmo.OverFlow = this.textEditVoerFlow.Checked; - if (await this.ReloadDataEvent.Invoke(_TankVmo)) - { - TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); - } - else - { - TipFormHelper.ShowError("娣诲姞澶辫触!"); - } - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) - { - var vm = this.treeList1.GetCurrentViewModel(_AssetsTankCoefficient); - if (vm == null) - return; - this.TextEditCoefficient.Text = vm.MinorLoss.ToString(); + MatchingFactor(); } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.resx index d9a794f..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AddAssetsTankMainDlg.resx @@ -117,13 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="TankCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>310, 17</value> - </metadata> - <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>465, 17</value> + <value>17, 17</value> </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.Designer.cs new file mode 100644 index 0000000..4042383 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.Designer.cs @@ -0,0 +1,441 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsTankMainMgrPage + { + /// <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(AssetsTankMainMgrPage)); + 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(); + barBtnCurve = 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(); + assetsTankMainMgrViewModelBindingSource = new BindingSource(components); + gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colID = new DevExpress.XtraGrid.Columns.GridColumn(); + colName = 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(); + behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); + dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); + colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn(); + colMinLevel = new DevExpress.XtraGrid.Columns.GridColumn(); + colMinVol = new DevExpress.XtraGrid.Columns.GridColumn(); + colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn(); + colDN = new DevExpress.XtraGrid.Columns.GridColumn(); + ((ISupportInitialize)ribbonControl1).BeginInit(); + ((ISupportInitialize)panelControl1).BeginInit(); + panelControl1.SuspendLayout(); + ((ISupportInitialize)gridControl1).BeginInit(); + ((ISupportInitialize)assetsTankMainMgrViewModelBindingSource).BeginInit(); + ((ISupportInitialize)gridView1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).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, barBtnCurve }); + ribbonControl1.Location = new Point(1, 1); + ribbonControl1.MaxItemId = 20; + 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, 101); + 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; + // + // barBtnCurve + // + barBtnCurve.Caption = "瀹圭Н鏇茬嚎"; + barBtnCurve.Id = 19; + barBtnCurve.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnCurve.ImageOptions.SvgImage"); + barBtnCurve.Name = "barBtnCurve"; + barBtnCurve.ItemClick += barBtnCurve_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(barBtnCurve); + 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, 102); + panelControl1.Name = "panelControl1"; + panelControl1.Padding = new Padding(0, 1, 0, 0); + panelControl1.Size = new Size(1107, 567); + panelControl1.TabIndex = 3; + // + // gridControl1 + // + gridControl1.DataSource = assetsTankMainMgrViewModelBindingSource; + 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, 566); + gridControl1.TabIndex = 0; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // assetsTankMainMgrViewModelBindingSource + // + assetsTankMainMgrViewModelBindingSource.DataSource = typeof(AssetsTankMainMgrViewModel); + // + // 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, colKeyWords, colFlags, colTagName, colSortCode, colDescription, colDetail, colMaxLevel, colMinLevel, colMinVol, colOverFlow, colDN }); + 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; + // + // colKeyWords + // + colKeyWords.FieldName = "KeyWords"; + colKeyWords.MinWidth = 100; + colKeyWords.Name = "colKeyWords"; + colKeyWords.Visible = true; + colKeyWords.VisibleIndex = 6; + colKeyWords.Width = 100; + // + // colFlags + // + colFlags.FieldName = "Flags"; + colFlags.MinWidth = 100; + colFlags.Name = "colFlags"; + colFlags.Visible = true; + colFlags.VisibleIndex = 7; + colFlags.Width = 100; + // + // colTagName + // + colTagName.FieldName = "TagName"; + colTagName.MinWidth = 100; + colTagName.Name = "colTagName"; + colTagName.Visible = true; + colTagName.VisibleIndex = 8; + 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 = 9; + colDescription.Width = 100; + // + // colDetail + // + colDetail.Caption = "璇︾粏淇℃伅"; + colDetail.ColumnEdit = repositoryItemButtonEdit1; + colDetail.MaxWidth = 60; + colDetail.MinWidth = 60; + colDetail.Name = "colDetail"; + colDetail.Visible = true; + colDetail.VisibleIndex = 10; + 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; + // + // dragDropEvents1 + // + dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; + // + // colMaxLevel + // + colMaxLevel.FieldName = "MaxLevel"; + colMaxLevel.Name = "colMaxLevel"; + colMaxLevel.Visible = true; + colMaxLevel.VisibleIndex = 3; + // + // colMinLevel + // + colMinLevel.FieldName = "MinLevel"; + colMinLevel.Name = "colMinLevel"; + colMinLevel.Visible = true; + colMinLevel.VisibleIndex = 2; + // + // colMinVol + // + colMinVol.FieldName = "MinVol"; + colMinVol.Name = "colMinVol"; + colMinVol.Visible = true; + colMinVol.VisibleIndex = 4; + // + // colOverFlow + // + colOverFlow.FieldName = "OverFlow"; + colOverFlow.Name = "colOverFlow"; + colOverFlow.Visible = true; + colOverFlow.VisibleIndex = 5; + // + // colDN + // + colDN.FieldName = "DN"; + colDN.Name = "colDN"; + colDN.Visible = true; + colDN.VisibleIndex = 1; + // + // AssetsTankMainMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(panelControl1); + Controls.Add(ribbonControl1); + Name = "AssetsTankMainMgrPage"; + Padding = new Padding(1); + Size = new Size(1109, 670); + ((ISupportInitialize)ribbonControl1).EndInit(); + ((ISupportInitialize)panelControl1).EndInit(); + panelControl1.ResumeLayout(false); + ((ISupportInitialize)gridControl1).EndInit(); + ((ISupportInitialize)assetsTankMainMgrViewModelBindingSource).EndInit(); + ((ISupportInitialize)gridView1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).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.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 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 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; + private BindingSource assetsTankMainMgrViewModelBindingSource; + private DevExpress.XtraBars.BarButtonItem barBtnCurve; + private DevExpress.XtraGrid.Columns.GridColumn colMaxLevel; + private DevExpress.XtraGrid.Columns.GridColumn colMinLevel; + private DevExpress.XtraGrid.Columns.GridColumn colMinVol; + private DevExpress.XtraGrid.Columns.GridColumn colOverFlow; + private DevExpress.XtraGrid.Columns.GridColumn colDN; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.cs new file mode 100644 index 0000000..7d3956a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.cs @@ -0,0 +1,474 @@ +锘縰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 AssetsTankMainMgrPage : DocumentPage + { + public AssetsTankMainMgrPage() + { + InitializeComponent(); + this.gridView1.SetNormalView(30); + this.PageTitle.Caption = "鎹㈢儹鍣ㄥ瀷鍙�"; + this.PageTitle.HeaderSvgImage = AssetsMainSvgImageHelper.Tank; + this.PageTitle.SvgImageSize = new Size(24, 24); + } + + private AssetsTankSeriesVmo _series = null;//绯诲垪 + private List<AssetsTankMainMgrViewModel> _allBindingList = null;//鏁版嵁缁戝畾鍒楄〃 + private readonly object _locker = new();//閿佸畾瀵硅薄 + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(AssetsTankSeriesVmo 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.AssetsTankMain>.Instance.GetBySeriesID(_series.ID); + _allBindingList = new List<AssetsTankMainMgrViewModel>(); + if (allBindingList != null && allBindingList.Count > 0) + { + foreach (var item in allBindingList) + { + var vm = new AssetsTankMainMgrViewModel(item); + _allBindingList.Add(vm); + } + } + this.assetsTankMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankMainMgrViewModelBindingSource.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 AddAssetsTankMainDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsTankMainMgrViewModel(rhs); + _allBindingList.Add(vm); + this.assetsTankMainMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛锛�"); + }; + dlg.SetBindingData(_series); + dlg.ShowDialog(); + } + + //缂栬緫 + private void Edit() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new EditAssetsTankMainDlg(); + 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.AssetsTankMain>.Instance.DeleteByID(vm.ID); + if (!bol) + { + TipFormHelper.ShowError("鍒犻櫎澶辫触锛�"); + return; + } + _allBindingList.Remove(vm); + this.assetsTankMainMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); + } + + //鏌ョ湅 + private void View() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new ViewAssetsTankMainDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ShowDialog(); + } + + //鏇茬嚎 + private void Curve() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + lock (_locker) + { + var guid = new PageGuid() + { + Modular = AssetsFunctionHelper.Modular, + MoudingType = eMoudingType.Tab, + Function = AssetsFunctionHelper.CurveMgr, + TagName = $"{HStation.Assets.DataType.TankMain}-{vm.ID}-curveql" + }; + if (!IsExistPage(guid, true)) + { + var page = new AssetsTankCurveVOLMgrPage(); + page.SetBindingData(vm.Vmo); + CreatePage(page, guid); + } + } + } + + //涓婄Щ + 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 AssetsTankMainMgrViewModel; + if (current == null) + { + return; + } + var prevHandle = rowHandle - 1; + var prev = this.gridView1.GetRow(prevHandle) as AssetsTankMainMgrViewModel; + 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.AssetsTankMain>.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.assetsTankMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankMainMgrViewModelBindingSource.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 AssetsTankMainMgrViewModel; + if (current == null) + { + return; + } + var nextHandle = rowHandle + 1; + var next = this.gridView1.GetRow(nextHandle) as AssetsTankMainMgrViewModel; + 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.AssetsTankMain>.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.assetsTankMainMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankMainMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = nextHandle; + } + + #region 褰撳墠 + + //鑾峰彇褰撳墠 + private AssetsTankMainMgrViewModel 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 barBtnCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + Curve(); + } + + //绯绘暟 + private void barBtnFactor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + lock (_locker) + { + var guid = new PageGuid() + { + Modular = AssetsFunctionHelper.Modular, + MoudingType = eMoudingType.Tab, + Function = AssetsFunctionHelper.TankFactorMgr, + TagName = string.Empty + }; + if (!IsExistPage(guid, true)) + { + var page = new AssetsTankFactorMgrPage(); + 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 AssetsTankMainMgrViewModel; + 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 AssetsTankMainMgrViewModel; + 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.AssetsTankMain>.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/14-tank/02-main/AssetsTankMainMgrPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.resx new file mode 100644 index 0000000..f47a53c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrPage.resx @@ -0,0 +1,384 @@ +锘�<?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> + <data name="barBtnCurve.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMAEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLlll + bGxvd3tmaWxsOiNGRkIxMTU7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMzU7fQoJLnN0M3tv + cGFjaXR5OjAuNjU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iU3BsaW5lIj4NCiAgICA8cGF0aCBkPSJNMjks + MTZjLTEuNywwLTMsMS4zLTMsM2MwLDAuNywwLjMsMS40LDAuNywxLjljLTEuMiwzLjItMyw1LjEtNC43 + LDUuMWMtMi41LDAtNS4yLTQuMS01LjgtMTAuMiAgIGMxLjEtMC41LDEuOC0xLjUsMS44LTIuOGMwLTEu + NC0xLTIuNy0yLjQtMi45QzE0LjcsNi41LDEyLjEsNCw5LDRzLTUuNywyLjUtNi42LDYuMUMxLDEwLjMs + MCwxMS42LDAsMTNjMCwxLjcsMS4zLDMsMywzczMtMS4zLDMtMyAgIGMwLTEuMi0wLjctMi4xLTEuNi0y + LjZDNS4yLDcuOCw3LDYsOSw2czMuOCwxLjgsNC42LDQuNGMtMSwwLjUtMS42LDEuNS0xLjYsMi42YzAs + MS40LDAuOSwyLjUsMi4yLDIuOUMxNC45LDIyLjgsMTguMSwyOCwyMiwyOCAgIGMyLjYsMCw1LTIuNCw2 + LjQtNi4xYzAuMiwwLDAuNCwwLjEsMC42LDAuMWMxLjcsMCwzLTEuMywzLTNTMzAuNywxNiwyOSwxNnog + TTMsMTRjLTAuNiwwLTEtMC40LTEtMWMwLTAuNiwwLjQtMSwxLTFzMSwwLjQsMSwxICAgQzQsMTMuNiwz + LjYsMTQsMywxNHogTTE1LDEyYzAuNiwwLDEsMC40LDEsMWMwLDAuNi0wLjQsMS0xLDFzLTEtMC40LTEt + MUMxNCwxMi40LDE0LjQsMTIsMTUsMTJ6IE0yOSwyMGMtMC42LDAtMS0wLjQtMS0xICAgYzAtMC42LDAu + NC0xLDEtMXMxLDAuNCwxLDFDMzAsMTkuNiwyOS42LDIwLDI5LDIweiIgY2xhc3M9IkJsdWUiIC8+DQog + IDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <metadata name="assetsTankMainMgrViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>339, 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> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrViewModel.cs new file mode 100644 index 0000000..96744a7 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/AssetsTankMainMgrViewModel.cs @@ -0,0 +1,143 @@ +锘縰sing HStation.Service.Assets; + +namespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsTankMainMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsTankMainMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsTankMainMgrViewModel(HStation.Vmo.AssetsTankMainVmo rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.DN = rhs.DN; + this.MinLevel = rhs.MinLevel; + this.MaxLevel = rhs.MaxLevel; + this.OverFlow = rhs.OverFlow; + this.MinVol = rhs.MinVol; + 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.AssetsTankMainVmo rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.DN = rhs.DN; + this.MinLevel = rhs.MinLevel; + this.MaxLevel = rhs.MaxLevel; + this.OverFlow = rhs.OverFlow; + this.MinVol = rhs.MinVol; + 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> + [DisplayName("鏈�浣庢按浣�")] + public double MinLevel { get; set; } + + /// <summary> + /// 鏈�楂樻按浣� + /// </summary> + [DisplayName("鏈�楂樻按浣�")] + public double MaxLevel { get; set; } + + /// <summary> + /// 鍏О鐩村緞 + /// </summary> + [DisplayName("鍏О鐩村緞")] + public double DN { get; set; } + + /// <summary> + /// 鏈�灏忓绉� + /// </summary> + [DisplayName("鏈�灏忓绉�")] + public double MinVol { get; set; } + + /// <summary> + /// 鏄惁婧㈡祦 + /// </summary> + [DisplayName("鏄惁婧㈡祦")] + public bool OverFlow { 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.AssetsTankMainVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.Designer.cs index f58f14f..8226085 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.Designer.cs @@ -1,6 +1,6 @@ -锘縩amespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI { - partial class EditAssetsTankMainDlg + partial class EditAssetsTankMainDlg { /// <summary> /// Required designer variable. @@ -28,252 +28,131 @@ /// </summary> private void InitializeComponent() { - components = new System.ComponentModel.Container(); + components = new Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - textEditMaxLevel = new DevExpress.XtraEditors.TextEdit(); - textEditDN = new DevExpress.XtraEditors.TextEdit(); - textEditMinLevel = new DevExpress.XtraEditors.TextEdit(); - textEditMinVol = new DevExpress.XtraEditors.TextEdit(); - textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); - selectFlagsPopupCtrl1 = new SelectFlagsPopupCtrl(); - colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colCaliber = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colMaterial = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - colFlowMinorLoss = new DevExpress.XtraTreeList.Columns.TreeListColumn(); - TankCoefficientViewModelBindingSource = new BindingSource(components); - BtnOk = new DevExpress.XtraEditors.SimpleButton(); - simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); - TextEditName = new DevExpress.XtraEditors.TextEdit(); - DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); - TextEditKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + setFlagsEditCtrl1 = new SetFlagsEditCtrl(); + generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + txtName = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + textEditVoerFlow = new DevExpress.XtraEditors.CheckEdit(); + txtMinLevel = new DevExpress.XtraEditors.TextEdit(); + txtDN = new DevExpress.XtraEditors.TextEdit(); + txtMaxLevel = new DevExpress.XtraEditors.TextEdit(); + txtMinVol = new DevExpress.XtraEditors.TextEdit(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); - imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); - imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); - tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); - layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); - toolTipController1 = new DevExpress.Utils.ToolTipController(components); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtName.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem6).BeginInit(); + ((ISupportInitialize)layoutControlItem7).BeginInit(); + ((ISupportInitialize)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + ((ISupportInitialize)layoutControlItem10).BeginInit(); + ((ISupportInitialize)dxErrorProvider1).BeginInit(); + ((ISupportInitialize)textEditVoerFlow.Properties).BeginInit(); + ((ISupportInitialize)txtMinLevel.Properties).BeginInit(); + ((ISupportInitialize)txtDN.Properties).BeginInit(); + ((ISupportInitialize)txtMaxLevel.Properties).BeginInit(); + ((ISupportInitialize)txtMinVol.Properties).BeginInit(); + ((ISupportInitialize)layoutControlItem11).BeginInit(); + ((ISupportInitialize)layoutControlItem12).BeginInit(); + ((ISupportInitialize)layoutControlItem13).BeginInit(); + ((ISupportInitialize)layoutControlItem14).BeginInit(); + ((ISupportInitialize)layoutControlItem15).BeginInit(); SuspendLayout(); // // layoutControl1 // - layoutControl1.Controls.Add(textEditMaxLevel); - layoutControl1.Controls.Add(textEditDN); - layoutControl1.Controls.Add(textEditMinLevel); - layoutControl1.Controls.Add(textEditMinVol); layoutControl1.Controls.Add(textEditVoerFlow); - layoutControl1.Controls.Add(selectFlagsPopupCtrl1); - layoutControl1.Controls.Add(BtnOk); - layoutControl1.Controls.Add(simpleButton1); - layoutControl1.Controls.Add(TextEditName); - layoutControl1.Controls.Add(DescriptionTextEdit); - layoutControl1.Controls.Add(TextEditKeyWord); + layoutControl1.Controls.Add(txtMinLevel); + layoutControl1.Controls.Add(txtDN); + layoutControl1.Controls.Add(txtMaxLevel); + layoutControl1.Controls.Add(txtMinVol); + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(setFlagsEditCtrl1); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtName); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; - layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(681, 482); - layoutControl1.TabIndex = 0; + layoutControl1.Size = new Size(665, 381); + layoutControl1.TabIndex = 1; layoutControl1.Text = "layoutControl1"; // - // textEditMaxLevel + // txtKeyWord // - textEditMaxLevel.Location = new Point(406, 56); - textEditMaxLevel.Name = "textEditMaxLevel"; - textEditMaxLevel.Size = new Size(267, 20); - textEditMaxLevel.StyleController = layoutControl1; - textEditMaxLevel.TabIndex = 6; + txtKeyWord.Location = new Point(398, 12); + txtKeyWord.Name = "txtKeyWord"; + txtKeyWord.Properties.NullValuePrompt = ",鍒嗛殧锛屼緥濡� A,B"; + txtKeyWord.Size = new Size(255, 20); + txtKeyWord.StyleController = layoutControl1; + txtKeyWord.TabIndex = 2; // - // textEditDN + // txtTagName // - textEditDN.Location = new Point(72, 32); - textEditDN.Name = "textEditDN"; - textEditDN.Size = new Size(266, 20); - textEditDN.StyleController = layoutControl1; - textEditDN.TabIndex = 3; + txtTagName.Location = new Point(76, 84); + txtTagName.Name = "txtTagName"; + txtTagName.Size = new Size(254, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 7; // - // textEditMinLevel + // setFlagsEditCtrl1 // - textEditMinLevel.Location = new Point(406, 32); - textEditMinLevel.Name = "textEditMinLevel"; - textEditMinLevel.Size = new Size(267, 20); - textEditMinLevel.StyleController = layoutControl1; - textEditMinLevel.TabIndex = 4; + setFlagsEditCtrl1.Location = new Point(398, 36); + setFlagsEditCtrl1.Name = "setFlagsEditCtrl1"; + setFlagsEditCtrl1.Size = new Size(255, 20); + setFlagsEditCtrl1.TabIndex = 4; // - // textEditMinVol + // generalOkAndCancelCtrl1 // - textEditMinVol.Location = new Point(72, 80); - textEditMinVol.Name = "textEditMinVol"; - textEditMinVol.Size = new Size(266, 20); - textEditMinVol.StyleController = layoutControl1; - textEditMinVol.TabIndex = 7; + 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 = 11; // - // textEditVoerFlow + // txtDescription // - textEditVoerFlow.EditValue = null; - textEditVoerFlow.Location = new Point(342, 80); - textEditVoerFlow.Name = "textEditVoerFlow"; - textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; - textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; - textEditVoerFlow.Size = new Size(331, 20); - textEditVoerFlow.StyleController = layoutControl1; - textEditVoerFlow.TabIndex = 8; + txtDescription.Location = new Point(76, 132); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(577, 207); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 10; // - // selectFlagsPopupCtrl1 + // txtName // - selectFlagsPopupCtrl1.Location = new Point(72, 56); - selectFlagsPopupCtrl1.Name = "selectFlagsPopupCtrl1"; - selectFlagsPopupCtrl1.Size = new Size(266, 20); - selectFlagsPopupCtrl1.TabIndex = 5; - // - // colName - // - colName.Caption = "鍚嶇О"; - colName.FieldName = "Name"; - colName.Name = "colName"; - colName.Visible = true; - colName.VisibleIndex = 0; - // - // colCaliber - // - colCaliber.Caption = "鍙e緞"; - colCaliber.FieldName = "Caliber"; - colCaliber.Name = "colCaliber"; - colCaliber.Visible = true; - colCaliber.VisibleIndex = 1; - // - // colMaterial - // - colMaterial.Caption = "鏉愭枡"; - colMaterial.FieldName = "Material"; - colMaterial.Name = "colMaterial"; - colMaterial.Visible = true; - colMaterial.VisibleIndex = 2; - // - // colMinorLoss - // - colMinorLoss.Caption = "鍠峰皠绯绘暟"; - colMinorLoss.FieldName = "MinorLoss"; - colMinorLoss.Name = "colMinorLoss"; - colMinorLoss.Visible = true; - colMinorLoss.VisibleIndex = 3; - // - // colFlowMinorLoss - // - colFlowMinorLoss.Caption = "娴侀噺绯绘暟"; - colFlowMinorLoss.FieldName = "FlowMinorLoss"; - colFlowMinorLoss.Name = "colFlowMinorLoss"; - colFlowMinorLoss.Visible = true; - colFlowMinorLoss.VisibleIndex = 4; - // - // TankCoefficientViewModelBindingSource - // - TankCoefficientViewModelBindingSource.DataSource = typeof(TankCoefficientViewModel); - // - // BtnOk - // - BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(531, 452); - BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(67, 22); - BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 10; - BtnOk.Text = "纭畾"; - BtnOk.Click += BtnOk_ClickAsync; - // - // simpleButton1 - // - simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - simpleButton1.Appearance.Options.UseBackColor = true; - simpleButton1.DialogResult = DialogResult.Cancel; - simpleButton1.Location = new Point(602, 452); - simpleButton1.Name = "simpleButton1"; - simpleButton1.Size = new Size(71, 22); - simpleButton1.StyleController = layoutControl1; - simpleButton1.TabIndex = 11; - simpleButton1.Text = "鍙栨秷"; - // - // TextEditName - // - TextEditName.Location = new Point(72, 8); - TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(266, 20); - TextEditName.StyleController = layoutControl1; - TextEditName.TabIndex = 0; - // - // DescriptionTextEdit - // - DescriptionTextEdit.Location = new Point(20, 137); - DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(641, 299); - DescriptionTextEdit.StyleController = layoutControl1; - DescriptionTextEdit.TabIndex = 9; - // - // TextEditKeyWord - // - TextEditKeyWord.Location = new Point(406, 8); - TextEditKeyWord.Name = "TextEditKeyWord"; - TextEditKeyWord.Size = new Size(267, 20); - TextEditKeyWord.StyleController = layoutControl1; - TextEditKeyWord.TabIndex = 2; + txtName.Location = new Point(76, 12); + txtName.Name = "txtName"; + txtName.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtName.Size = new Size(254, 20); + txtName.StyleController = layoutControl1; + txtName.TabIndex = 0; // // Root // @@ -281,318 +160,230 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlGroup5, layoutControlItem7, layoutControlItem6, layoutControlItem17, layoutControlItem18, layoutControlItem14, layoutControlItem16, layoutControlItem10 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem6, layoutControlItem7, layoutControlItem10, layoutControlItem15, layoutControlItem13, layoutControlItem11, layoutControlItem12, layoutControlItem9, layoutControlItem8, layoutControlItem14 }); Root.Name = "Root"; - Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); - Root.Size = new Size(681, 482); + Root.Size = new Size(665, 381); Root.TextVisible = false; - // - // layoutControlItem4 - // - layoutControlItem4.Control = BtnOk; - layoutControlItem4.Location = new Point(523, 444); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(71, 26); - layoutControlItem4.TextSize = new Size(0, 0); - layoutControlItem4.TextVisible = false; - // - // emptySpaceItem1 - // - emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 444); - emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(523, 26); - emptySpaceItem1.TextSize = new Size(0, 0); - // - // layoutControlItem8 - // - layoutControlItem8.Control = simpleButton1; - layoutControlItem8.Location = new Point(594, 444); - layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(75, 26); - layoutControlItem8.TextSize = new Size(0, 0); - layoutControlItem8.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = TextEditName; + layoutControlItem1.Control = txtName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(334, 24); - layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.Size = new Size(322, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; layoutControlItem1.TextSize = new Size(52, 14); - // - // layoutControlGroup5 - // - layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); - layoutControlGroup5.Location = new Point(0, 96); - layoutControlGroup5.Name = "layoutControlGroup5"; - layoutControlGroup5.Size = new Size(669, 348); - layoutControlGroup5.Text = "璇存槑"; - // - // layoutControlItem5 - // - layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 0); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(645, 303); - layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; - layoutControlItem5.TextSize = new Size(0, 0); - layoutControlItem5.TextToControlDistance = 0; - layoutControlItem5.TextVisible = false; - // - // layoutControlItem7 - // - layoutControlItem7.Control = TextEditKeyWord; - layoutControlItem7.Location = new Point(334, 0); - layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(335, 24); - layoutControlItem7.Text = "鍏抽敭瀛�:"; - layoutControlItem7.TextSize = new Size(52, 14); // // layoutControlItem6 // - layoutControlItem6.Control = selectFlagsPopupCtrl1; - layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 120); layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(334, 24); - layoutControlItem6.Text = "鏍囩鍒楄〃:"; + layoutControlItem6.Size = new Size(645, 211); + layoutControlItem6.Text = "璇存槑:"; layoutControlItem6.TextSize = new Size(52, 14); // - // layoutControlItem16 + // layoutControlItem7 // - layoutControlItem16.Control = textEditMinLevel; - layoutControlItem16.Location = new Point(334, 24); - layoutControlItem16.Name = "layoutControlItem16"; - layoutControlItem16.Size = new Size(335, 24); - layoutControlItem16.Text = "鏈�浣庢按浣�:"; - layoutControlItem16.TextSize = new Size(52, 14); + 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; // - // layoutControlItem17 + // layoutControlItem8 // - layoutControlItem17.Control = textEditDN; - layoutControlItem17.Location = new Point(0, 24); - layoutControlItem17.Name = "layoutControlItem17"; - layoutControlItem17.Size = new Size(334, 24); - layoutControlItem17.Text = "鍏О鐩村緞:"; - layoutControlItem17.TextSize = new Size(52, 14); + layoutControlItem8.Control = setFlagsEditCtrl1; + layoutControlItem8.Location = new Point(322, 24); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(323, 24); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(52, 14); // - // layoutControlItem18 + // layoutControlItem9 // - layoutControlItem18.Control = textEditMaxLevel; - layoutControlItem18.Location = new Point(334, 48); - layoutControlItem18.Name = "layoutControlItem18"; - layoutControlItem18.Size = new Size(335, 24); - layoutControlItem18.Text = "鏈�澶ф按浣�:"; - layoutControlItem18.TextSize = new Size(52, 14); + layoutControlItem9.Control = txtTagName; + layoutControlItem9.Location = new Point(0, 72); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(322, 24); + layoutControlItem9.Text = "鏍囧織:"; + layoutControlItem9.TextSize = new Size(52, 14); // // layoutControlItem10 // - layoutControlItem10.Control = textEditVoerFlow; - layoutControlItem10.Location = new Point(334, 72); + layoutControlItem10.Control = txtKeyWord; + layoutControlItem10.Location = new Point(322, 0); layoutControlItem10.Name = "layoutControlItem10"; - layoutControlItem10.Size = new Size(335, 24); - layoutControlItem10.TextSize = new Size(0, 0); - layoutControlItem10.TextVisible = false; - // - // layoutControlItem14 - // - layoutControlItem14.Control = textEditMinVol; - layoutControlItem14.Location = new Point(0, 72); - layoutControlItem14.Name = "layoutControlItem14"; - layoutControlItem14.Size = new Size(334, 24); - layoutControlItem14.Text = "鏈�灏忓绉�:"; - layoutControlItem14.TextSize = new Size(52, 14); + layoutControlItem10.Size = new Size(323, 24); + layoutControlItem10.Text = "鍏抽敭瀛�:"; + layoutControlItem10.TextSize = new Size(52, 14); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // + // textEditVoerFlow + // + textEditVoerFlow.EditValue = null; + textEditVoerFlow.Location = new Point(12, 108); + textEditVoerFlow.Name = "textEditVoerFlow"; + textEditVoerFlow.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default; + textEditVoerFlow.Properties.Caption = "鏄惁鍏佽婧㈡祦"; + textEditVoerFlow.Size = new Size(641, 20); + textEditVoerFlow.StyleController = layoutControl1; + textEditVoerFlow.TabIndex = 9; + // + // txtMinLevel + // + txtMinLevel.Location = new Point(76, 60); + txtMinLevel.Name = "txtMinLevel"; + txtMinLevel.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMinLevel.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtMinLevel.Size = new Size(254, 20); + txtMinLevel.StyleController = layoutControl1; + txtMinLevel.TabIndex = 5; + // + // txtDN + // + txtDN.Location = new Point(76, 36); + txtDN.Name = "txtDN"; + txtDN.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDN.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDN.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDN.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDN.Properties.NullValuePrompt = "mm"; + txtDN.Size = new Size(254, 20); + txtDN.StyleController = layoutControl1; + txtDN.TabIndex = 3; + // + // txtMaxLevel + // + txtMaxLevel.Location = new Point(398, 60); + txtMaxLevel.Name = "txtMaxLevel"; + txtMaxLevel.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaxLevel.Size = new Size(255, 20); + txtMaxLevel.StyleController = layoutControl1; + txtMaxLevel.TabIndex = 6; + // + // txtMinVol + // + txtMinVol.Location = new Point(398, 84); + txtMinVol.Name = "txtMinVol"; + txtMinVol.Size = new Size(255, 20); + txtMinVol.StyleController = layoutControl1; + txtMinVol.TabIndex = 8; + // + // layoutControlItem11 + // + layoutControlItem11.Control = txtDN; + layoutControlItem11.Location = new Point(0, 24); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.Size = new Size(322, 24); + layoutControlItem11.Text = "鍏О鐩村緞:"; + layoutControlItem11.TextSize = new Size(52, 14); + // + // layoutControlItem12 + // + layoutControlItem12.Control = txtMinVol; + layoutControlItem12.Location = new Point(322, 72); + layoutControlItem12.Name = "layoutControlItem12"; + layoutControlItem12.Size = new Size(323, 24); + layoutControlItem12.Text = "鏈�浣庡绉�:"; + layoutControlItem12.TextSize = new Size(52, 14); + // // layoutControlItem13 // - layoutControlItem13.Control = imageComboBoxEdit1; - layoutControlItem13.Location = new Point(0, 72); - layoutControlItem13.Name = "layoutControlItem8"; - layoutControlItem13.Size = new Size(499, 24); - layoutControlItem13.Text = "閫夋嫨鍒嗙被"; + layoutControlItem13.Control = txtMaxLevel; + layoutControlItem13.Location = new Point(322, 48); + layoutControlItem13.Name = "layoutControlItem13"; + layoutControlItem13.Size = new Size(323, 24); + layoutControlItem13.Text = "鏈�楂樻按浣�:"; layoutControlItem13.TextSize = new Size(52, 14); // - // imageComboBoxEdit1 + // layoutControlItem14 // - imageComboBoxEdit1.Location = new Point(0, 0); - imageComboBoxEdit1.Name = "imageComboBoxEdit1"; - imageComboBoxEdit1.Size = new Size(100, 20); - imageComboBoxEdit1.TabIndex = 0; + layoutControlItem14.Control = txtMinLevel; + layoutControlItem14.Location = new Point(0, 48); + layoutControlItem14.Name = "layoutControlItem14"; + layoutControlItem14.Size = new Size(322, 24); + layoutControlItem14.Text = "鏈�浣庢按浣�:"; + layoutControlItem14.TextSize = new Size(52, 14); // // layoutControlItem15 // - layoutControlItem15.Control = imageComboBoxEdit2; - layoutControlItem15.Location = new Point(0, 72); - layoutControlItem15.Name = "layoutControlItem8"; - layoutControlItem15.Size = new Size(499, 24); - layoutControlItem15.Text = "閫夋嫨鍒嗙被"; - layoutControlItem15.TextSize = new Size(52, 14); - // - // imageComboBoxEdit2 - // - imageComboBoxEdit2.Location = new Point(0, 0); - imageComboBoxEdit2.Name = "imageComboBoxEdit2"; - imageComboBoxEdit2.Size = new Size(100, 20); - imageComboBoxEdit2.TabIndex = 0; - // - // tabbedControlGroup2 - // - tabbedControlGroup2.Location = new Point(0, 354); - tabbedControlGroup2.Name = "tabbedControlGroup1"; - tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; - tabbedControlGroup2.Size = new Size(669, 90); - tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); - tabbedControlGroup2.Text = "璇存槑"; - // - // layoutControlGroup3 - // - layoutControlGroup3.Location = new Point(0, 0); - layoutControlGroup3.Name = "layoutControlGroup2"; - layoutControlGroup3.Size = new Size(645, 56); - layoutControlGroup3.Text = "灞炴��"; - layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - // - // layoutControlGroup4 - // - layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); - layoutControlGroup4.Location = new Point(0, 0); - layoutControlGroup4.Name = "layoutControlGroup1"; - layoutControlGroup4.Size = new Size(645, 42); - layoutControlGroup4.Text = "璇存槑"; - // - // layoutControlItem27 - // - layoutControlItem27.Control = DescriptionTextEdit; - layoutControlItem27.Location = new Point(0, 0); - layoutControlItem27.Name = "layoutControlItem5"; - layoutControlItem27.Size = new Size(645, 42); - layoutControlItem27.Text = "璇存槑:"; - layoutControlItem27.TextSize = new Size(59, 14); - // - // layoutControlItem2 - // - layoutControlItem2.Location = new Point(334, 0); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(335, 24); - layoutControlItem2.Text = "鍏抽敭瀛�:"; - layoutControlItem2.TextSize = new Size(49, 14); - // - // layoutControlItem3 - // - layoutControlItem3.Location = new Point(0, 48); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(669, 24); - layoutControlItem3.Text = "鎹熷け绯绘暟:"; - layoutControlItem3.TextSize = new Size(52, 14); + layoutControlItem15.Control = textEditVoerFlow; + layoutControlItem15.Location = new Point(0, 96); + layoutControlItem15.Name = "layoutControlItem15"; + layoutControlItem15.Size = new Size(645, 24); + layoutControlItem15.TextSize = new Size(0, 0); + layoutControlItem15.TextVisible = false; // // EditAssetsTankMainDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(681, 482); + ClientSize = new Size(665, 381); Controls.Add(layoutControl1); Name = "EditAssetsTankMainDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "缂栬緫姘存睜"; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)textEditMaxLevel.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditDN.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinLevel.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditMinVol.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditVoerFlow.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)TextEditKeyWord.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); - ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtName.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)layoutControlItem6).EndInit(); + ((ISupportInitialize)layoutControlItem7).EndInit(); + ((ISupportInitialize)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ((ISupportInitialize)layoutControlItem10).EndInit(); + ((ISupportInitialize)dxErrorProvider1).EndInit(); + ((ISupportInitialize)textEditVoerFlow.Properties).EndInit(); + ((ISupportInitialize)txtMinLevel.Properties).EndInit(); + ((ISupportInitialize)txtDN.Properties).EndInit(); + ((ISupportInitialize)txtMaxLevel.Properties).EndInit(); + ((ISupportInitialize)txtMinVol.Properties).EndInit(); + ((ISupportInitialize)layoutControlItem11).EndInit(); + ((ISupportInitialize)layoutControlItem12).EndInit(); + ((ISupportInitialize)layoutControlItem13).EndInit(); + ((ISupportInitialize)layoutControlItem14).EndInit(); + ((ISupportInitialize)layoutControlItem15).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraEditors.TextEdit TextEditName; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtLowerLimit; + private DevExpress.XtraEditors.TextEdit txtName; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; - private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.SimpleButton BtnOk; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraEditors.SimpleButton simpleButton1; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraEditors.SimpleButton btnCancel; - private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; - private DevExpress.XtraEditors.TextEdit TagNameTextEdit; - private DevExpress.XtraEditors.TextEdit NameTextEdit; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; - private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; - private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; - private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; - private DevExpress.Utils.ToolTipController toolTipController1; - private DevExpress.XtraEditors.TextEdit TextEditKeyWord; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; - private DevExpress.XtraEditors.PopupContainerControl popupContainerControl1; - private DevExpress.XtraTreeList.TreeList treeList1; - private DevExpress.XtraTreeList.Columns.TreeListColumn colName; - private DevExpress.XtraTreeList.Columns.TreeListColumn colCaliber; - private DevExpress.XtraTreeList.Columns.TreeListColumn colMaterial; - private DevExpress.XtraTreeList.Columns.TreeListColumn colMinorLoss; - private DevExpress.XtraTreeList.Columns.TreeListColumn colFlowMinorLoss; - private BindingSource TankCoefficientViewModelBindingSource; - private DevExpress.XtraEditors.PopupContainerEdit TextEditMinorLoss; - private SelectFlagsPopupCtrl selectFlagsPopupCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; - private DevExpress.XtraEditors.TextEdit textEditDN; - private DevExpress.XtraEditors.TextEdit textEditMinLevel; - private DevExpress.XtraEditors.TextEdit textEditMinVol; - private DevExpress.XtraEditors.CheckEdit textEditVoerFlow; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + 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; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; - private DevExpress.XtraEditors.TextEdit textEditMaxLevel; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + private DevExpress.XtraEditors.CheckEdit textEditVoerFlow; + private DevExpress.XtraEditors.TextEdit txtMinLevel; + private DevExpress.XtraEditors.TextEdit txtDN; + private DevExpress.XtraEditors.TextEdit txtMaxLevel; + private DevExpress.XtraEditors.TextEdit txtMinVol; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.cs index b3b12f8..365dbf8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.cs @@ -1,98 +1,123 @@ -锘縰sing DevExpress.Utils; -using DevExpress.XtraEditors.Controls; +锘縰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.Assets +namespace HStation.WinFrmUI { public partial class EditAssetsTankMainDlg : DevExpress.XtraEditors.XtraForm { public EditAssetsTankMainDlg() { InitializeComponent(); - // this.treeList1.InitialMultiColSettings(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; } - private Vmo.AssetsTankMainVmo _TankVmo = null; + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsTankMainVmo> ReloadDataEvent; - private List<Vmo.AssetsTankCoefficientVmo> _AssetsTankCoefficient; + private HStation.Vmo.AssetsTankMainVmo _vmo = null; - public async void SetBindingData(Vmo.AssetsTankMainVmo TankVmo) + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public async void SetBindingData(HStation.Vmo.AssetsTankMainVmo vmo) { - var bll = new BLL.AssetsTankCoefficient(); - _AssetsTankCoefficient = await bll.GetAll(); - this.TankCoefficientViewModelBindingSource.DataSource = _AssetsTankCoefficient; - - _TankVmo = TankVmo; - this.TextEditName.Text = _TankVmo.Name; - this.DescriptionTextEdit.Text = _TankVmo.Description; - this.TextEditKeyWord.Text = string.Join(",", _TankVmo.KeyWord); - this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(_TankVmo.Flags); - this.textEditDN.Text = _TankVmo.DN.ToString(); - this.textEditMinLevel.Text = _TankVmo.MinLevel.ToString(); - this.textEditMaxLevel.Text = _TankVmo.MaxLevel.ToString(); - this.textEditMinVol.Text = _TankVmo.MinVol.ToString(); - this.textEditVoerFlow.Checked = _TankVmo.OverFlow; + if (vmo == null) + { + return; + } + _vmo = new Vmo.AssetsTankMainVmo(vmo); + this.txtName.EditValue = vmo.Name; + this.txtKeyWord.EditValue = HStation.Service.Assets.KeyWordHelper.ToString(vmo.KeyWords); + var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.TankMain); + this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), vmo.Flags); + this.txtTagName.EditValue = vmo.TagName; + this.txtDescription.EditValue = vmo.Description; + this.txtDN.Text = vmo.DN.ToString(); + this.txtMinLevel.Text = vmo.MinLevel.ToString(); + this.txtMaxLevel.Text = vmo.MaxLevel.ToString(); + this.txtMinVol.Text = vmo.MinVol.ToString(); + this.textEditVoerFlow.Checked = vmo.OverFlow; } - public event Func<Vmo.AssetsTankMainVmo, Task<bool>> ReloadDataEvent = null; - - //鏁版嵁楠岃瘉 - private bool Valid() + //楠岃瘉 + private async Task<bool> Valid() { this.dxErrorProvider1.ClearErrors(); - if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) { - this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); return false; + } + var tagname = this.txtTagName.Text.Trim(); + if (!string.IsNullOrEmpty(tagname)) + { + if (await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.IsExistTagNameExceptID(tagname, _vmo.ID)) + { + this.dxErrorProvider1.SetError(this.txtTagName, "閲嶅"); + return false; + } } return true; } - //瀹屾垚 - private async void BtnOk_ClickAsync(object sender, EventArgs e) + //纭畾 + private async void GeneralOkAndCancelCtrl1_OkEvent() { - if (!(Valid())) + if (_vmo == null) + { return; - _TankVmo.Description = DescriptionTextEdit.Text.Trim(); - _TankVmo.Name = TextEditName.Text.Trim(); - _TankVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); - _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; - if (double.TryParse(this.textEditDN.Text, out double DN)) - { - _TankVmo.DN = DN; } - if (double.TryParse(this.textEditMinLevel.Text, out double MinLevel)) + if (!await Valid()) { - _TankVmo.MinLevel = MinLevel; + return; } - if (double.TryParse(this.textEditMaxLevel.Text, out double MaxLevel)) + _vmo.Name = this.txtName.Text.Trim(); + _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(); + if (double.TryParse(this.txtDN.Text, out double DN)) { - _TankVmo.MaxLevel = MaxLevel; + _vmo.DN = DN; } - if (double.TryParse(this.textEditMinVol.Text, out double MinVol)) + if (double.TryParse(this.txtMinLevel.Text, out double MinLevel)) { - _TankVmo.MinVol = MinVol; + _vmo.MinLevel = MinLevel; } - _TankVmo.OverFlow = this.textEditVoerFlow.Checked; - if (await this.ReloadDataEvent.Invoke(_TankVmo)) + if (double.TryParse(this.txtMaxLevel.Text, out double MaxLevel)) { - TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); + _vmo.MaxLevel = MaxLevel; } - else + if (double.TryParse(this.txtMinVol.Text, out double MinVol)) { - TipFormHelper.ShowSucceed("淇敼澶辫触!"); + _vmo.MinVol = MinVol; } + _vmo.OverFlow = this.textEditVoerFlow.Checked; + + var bol = await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.GetByID(_vmo.ID); + this.ReloadDataEvent?.Invoke(vmo); this.DialogResult = DialogResult.OK; this.Close(); - } - - private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) - { - var vm = this.treeList1.GetCurrentViewModel(_AssetsTankCoefficient); - if (vm == null) - return; - this.TextEditMinorLoss.Text = vm.MinorLoss.ToString(); } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.resx index d9a794f..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/EditAssetsTankMainDlg.resx @@ -117,13 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="TankCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>310, 17</value> - </metadata> - <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>465, 17</value> + <value>17, 17</value> </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.Designer.cs new file mode 100644 index 0000000..fc16636 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.Designer.cs @@ -0,0 +1,313 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsTankMainDlg + { + /// <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(); + txtTagName = new DevExpress.XtraEditors.TextEdit(); + txtFlags = new DevExpress.XtraEditors.TextEdit(); + txtKeyWord = new DevExpress.XtraEditors.TextEdit(); + txtDescription = new DevExpress.XtraEditors.MemoEdit(); + this.txtMinorLoss = new DevExpress.XtraEditors.TextEdit(); + txtDiameter = 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(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtTagName.Properties).BeginInit(); + ((ISupportInitialize)txtFlags.Properties).BeginInit(); + ((ISupportInitialize)txtKeyWord.Properties).BeginInit(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)this.txtMinorLoss.Properties).BeginInit(); + ((ISupportInitialize)txtDiameter.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)layoutControlItem8).BeginInit(); + ((ISupportInitialize)layoutControlItem9).BeginInit(); + ((ISupportInitialize)layoutControlItem10).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtTagName); + layoutControl1.Controls.Add(txtFlags); + layoutControl1.Controls.Add(txtKeyWord); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(this.txtMinorLoss); + layoutControl1.Controls.Add(txtDiameter); + 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"; + // + // txtTagName + // + txtTagName.Location = new Point(398, 60); + txtTagName.Name = "txtTagName"; + txtTagName.Properties.ReadOnly = true; + txtTagName.Properties.UseReadOnlyAppearance = false; + txtTagName.Size = new Size(255, 20); + txtTagName.StyleController = layoutControl1; + txtTagName.TabIndex = 8; + // + // txtFlags + // + txtFlags.Location = new Point(76, 84); + txtFlags.Name = "txtFlags"; + txtFlags.Properties.ReadOnly = true; + txtFlags.Properties.UseReadOnlyAppearance = false; + txtFlags.Size = new Size(577, 20); + txtFlags.StyleController = layoutControl1; + txtFlags.TabIndex = 7; + // + // 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; + // + // txtMinorLoss + // + this.txtMinorLoss.Location = new Point(76, 60); + this.txtMinorLoss.Name = "txtMinorLoss"; + this.txtMinorLoss.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + this.txtMinorLoss.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + this.txtMinorLoss.Properties.ReadOnly = true; + this.txtMinorLoss.Properties.UseReadOnlyAppearance = false; + this.txtMinorLoss.Size = new Size(254, 20); + this.txtMinorLoss.StyleController = layoutControl1; + this.txtMinorLoss.TabIndex = 5; + // + // txtDiameter + // + txtDiameter.Location = new Point(398, 36); + txtDiameter.Name = "txtDiameter"; + txtDiameter.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDiameter.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDiameter.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDiameter.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDiameter.Properties.NullValuePrompt = "mm"; + txtDiameter.Properties.ReadOnly = true; + txtDiameter.Properties.UseReadOnlyAppearance = false; + txtDiameter.Size = new Size(255, 20); + txtDiameter.StyleController = layoutControl1; + txtDiameter.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, 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 = txtDiameter; + layoutControlItem3.Location = new Point(322, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(323, 24); + layoutControlItem3.Text = "鐩村緞:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = this.txtMinorLoss; + layoutControlItem4.Location = new Point(0, 48); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(322, 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(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); + // + // layoutControlItem8 + // + layoutControlItem8.Control = txtFlags; + layoutControlItem8.Location = new Point(0, 72); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(645, 24); + layoutControlItem8.Text = "鏍囩:"; + layoutControlItem8.TextSize = new Size(52, 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(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); + // + // ViewAssetsTankMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(665, 381); + Controls.Add(layoutControl1); + Name = "ViewAssetsTankMainDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "璇︾粏淇℃伅"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtTagName.Properties).EndInit(); + ((ISupportInitialize)txtFlags.Properties).EndInit(); + ((ISupportInitialize)txtKeyWord.Properties).EndInit(); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)this.txtMinorLoss.Properties).EndInit(); + ((ISupportInitialize)txtDiameter.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)layoutControlItem8).EndInit(); + ((ISupportInitialize)layoutControlItem9).EndInit(); + ((ISupportInitialize)layoutControlItem10).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraEditors.TextEdit txtMinorLoss; + private DevExpress.XtraEditors.TextEdit txtCoefficient; + private DevExpress.XtraEditors.TextEdit txtDiameter; + 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/14-tank/02-main/ViewAssetsTankMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.cs new file mode 100644 index 0000000..9b23b6a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.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; + +namespace HStation.WinFrmUI +{ + public partial class ViewAssetsTankMainDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsTankMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private HStation.Vmo.AssetsTankMainVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsTankMainVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = vmo; + this.txtName.EditValue = vmo.Name; + 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/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.resx similarity index 72% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.resx index 20033c4..af32865 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/02-main/ViewAssetsTankMainDlg.resx @@ -117,29 +117,4 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.Designer.cs deleted file mode 100644 index 7049559..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.Designer.cs +++ /dev/null @@ -1,314 +0,0 @@ -锘縩amespace HStation.WinFrmUI -{ - partial class SetTankCoefficientDlg - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode(); - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetTankCoefficientDlg)); - 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(); - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - BtnOk = new DevExpress.XtraEditors.SimpleButton(); - btnCancel = new DevExpress.XtraEditors.SimpleButton(); - gridControl1 = new DevExpress.XtraGrid.GridControl(); - TankCoefficientViewModelBindingSource = new BindingSource(components); - gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); - ColDelete = new DevExpress.XtraGrid.Columns.GridColumn(); - repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); - gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); - colFlowMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); - gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); - gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); - gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); - Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); - ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); - layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit(); - SuspendLayout(); - // - // layoutControl1 - // - layoutControl1.Controls.Add(BtnOk); - layoutControl1.Controls.Add(btnCancel); - layoutControl1.Controls.Add(gridControl1); - layoutControl1.Dock = DockStyle.Fill; - layoutControl1.Location = new Point(0, 0); - layoutControl1.Name = "layoutControl1"; - layoutControl1.Root = Root; - layoutControl1.Size = new Size(662, 410); - layoutControl1.TabIndex = 0; - layoutControl1.Text = "layoutControl1"; - // - // BtnOk - // - BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - BtnOk.Appearance.Options.UseBackColor = true; - BtnOk.Location = new Point(472, 386); - BtnOk.Name = "BtnOk"; - BtnOk.Size = new Size(89, 22); - BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 2; - BtnOk.Text = "纭畾"; - BtnOk.Click += BtnOk_Click; - // - // btnCancel - // - btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - btnCancel.Appearance.Options.UseBackColor = true; - btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(565, 386); - btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(95, 22); - btnCancel.StyleController = layoutControl1; - btnCancel.TabIndex = 3; - btnCancel.Text = "鍙栨秷"; - // - // gridControl1 - // - gridControl1.DataSource = TankCoefficientViewModelBindingSource; - gridLevelNode1.RelationName = "Level1"; - gridControl1.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] { gridLevelNode1 }); - gridControl1.Location = new Point(2, 2); - gridControl1.MainView = gridView1; - gridControl1.Name = "gridControl1"; - gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1 }); - gridControl1.Size = new Size(658, 380); - gridControl1.TabIndex = 0; - gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); - // - // TankCoefficientViewModelBindingSource - // - TankCoefficientViewModelBindingSource.DataSource = typeof(TankCoefficientViewModel); - // - // gridView1 - // - gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; - gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { ColDelete, gridColumn1, colFlowMinorLoss, gridColumn2, gridColumn3, gridColumn4 }); - gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; - gridView1.GridControl = gridControl1; - gridView1.Name = "gridView1"; - gridView1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True; - gridView1.OptionsCustomization.AllowFilter = false; - gridView1.OptionsCustomization.AllowQuickHideColumns = false; - gridView1.OptionsCustomization.AllowSort = false; - gridView1.OptionsMenu.EnableColumnMenu = false; - gridView1.OptionsMenu.EnableFooterMenu = false; - gridView1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom; - gridView1.OptionsView.ShowGroupPanel = false; - gridView1.RowCellClick += gridView1_RowCellClick; - // - // ColDelete - // - ColDelete.AppearanceCell.Options.UseTextOptions = true; - ColDelete.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - ColDelete.Caption = "鍒犻櫎"; - ColDelete.ColumnEdit = repositoryItemButtonEdit1; - ColDelete.Name = "ColDelete"; - ColDelete.OptionsColumn.AllowEdit = false; - ColDelete.Visible = true; - ColDelete.VisibleIndex = 5; - ColDelete.Width = 47; - // - // repositoryItemButtonEdit1 - // - repositoryItemButtonEdit1.AutoHeight = false; - editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); - 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; - // - // gridColumn1 - // - gridColumn1.AppearanceCell.Options.UseTextOptions = true; - gridColumn1.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridColumn1.FieldName = "Caliber"; - gridColumn1.Name = "gridColumn1"; - gridColumn1.Visible = true; - gridColumn1.VisibleIndex = 1; - // - // colFlowMinorLoss - // - colFlowMinorLoss.AppearanceCell.Options.UseTextOptions = true; - colFlowMinorLoss.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - colFlowMinorLoss.FieldName = "FlowMinorLoss"; - colFlowMinorLoss.Name = "colFlowMinorLoss"; - colFlowMinorLoss.Visible = true; - colFlowMinorLoss.VisibleIndex = 3; - // - // gridColumn2 - // - gridColumn2.AppearanceCell.Options.UseTextOptions = true; - gridColumn2.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridColumn2.FieldName = "Material"; - gridColumn2.Name = "gridColumn2"; - gridColumn2.Visible = true; - gridColumn2.VisibleIndex = 2; - // - // gridColumn3 - // - gridColumn3.AppearanceCell.Options.UseTextOptions = true; - gridColumn3.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridColumn3.FieldName = "MinorLoss"; - gridColumn3.Name = "gridColumn3"; - gridColumn3.Visible = true; - gridColumn3.VisibleIndex = 4; - // - // gridColumn4 - // - gridColumn4.AppearanceCell.Options.UseTextOptions = true; - gridColumn4.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridColumn4.FieldName = "Name"; - gridColumn4.Name = "gridColumn4"; - gridColumn4.Visible = true; - gridColumn4.VisibleIndex = 0; - // - // Root - // - Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, emptySpaceItem1, layoutControlItem3, layoutControlItem2 }); - Root.Name = "Root"; - Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - Root.Size = new Size(662, 410); - Root.TextVisible = false; - // - // layoutControlItem1 - // - layoutControlItem1.Control = gridControl1; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(662, 384); - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; - // - // emptySpaceItem1 - // - emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 384); - emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(470, 26); - emptySpaceItem1.TextSize = new Size(0, 0); - // - // layoutControlItem3 - // - layoutControlItem3.Control = btnCancel; - layoutControlItem3.Location = new Point(563, 384); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(99, 26); - layoutControlItem3.TextSize = new Size(0, 0); - layoutControlItem3.TextVisible = false; - // - // layoutControlItem2 - // - layoutControlItem2.Control = BtnOk; - layoutControlItem2.Location = new Point(470, 384); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(93, 26); - layoutControlItem2.TextSize = new Size(0, 0); - layoutControlItem2.TextVisible = false; - // - // emptySpaceItem2 - // - emptySpaceItem2.AllowHotTrack = false; - emptySpaceItem2.Location = new Point(0, 237); - emptySpaceItem2.Name = "emptySpaceItem2"; - emptySpaceItem2.Size = new Size(352, 26); - emptySpaceItem2.TextSize = new Size(0, 0); - // - // SetTankCoefficientDlg - // - AutoScaleDimensions = new SizeF(7F, 14F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(662, 410); - Controls.Add(layoutControl1); - Name = "SetTankCoefficientDlg"; - StartPosition = FormStartPosition.CenterScreen; - Text = "璁剧疆灞�闃荤郴鏁�"; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); - layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); - ((System.ComponentModel.ISupportInitialize)TankCoefficientViewModelBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); - ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).EndInit(); - ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit(); - ResumeLayout(false); - } - - #endregion - - private DevExpress.XtraLayout.LayoutControl layoutControl1; - private DevExpress.XtraGrid.GridControl gridControl1; - private DevExpress.XtraGrid.Views.Grid.GridView gridView1; - private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.SimpleButton BtnOk; - private DevExpress.XtraEditors.SimpleButton btnCancel; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; - private DevExpress.XtraGrid.Columns.GridColumn colChoice; - private DevExpress.XtraGrid.Columns.GridColumn colDescription; - private DevExpress.XtraGrid.Columns.GridColumn colName; - private DevExpress.XtraGrid.Columns.GridColumn ColDelete; - private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; - private DevExpress.XtraGrid.Columns.GridColumn colCaliber; - private DevExpress.XtraGrid.Columns.GridColumn colMaterial; - private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; - private BindingSource TankCoefficientViewModelBindingSource; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; - private DevExpress.XtraGrid.Columns.GridColumn colFlowMinorLoss; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.cs deleted file mode 100644 index 1e9717e..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.cs +++ /dev/null @@ -1,79 +0,0 @@ -锘縩amespace HStation.WinFrmUI -{ - public partial class SetTankCoefficientDlg : DevExpress.XtraEditors.XtraForm - { - public SetTankCoefficientDlg() - { - InitializeComponent(); - this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - } - - private BLL.AssetsTankCoefficient _bll = null; - - private List<TankCoefficientViewModel> _allBindingList = null; - - public async void SetBindingData() - { - _bll = new BLL.AssetsTankCoefficient(); - var alllist = await _bll.GetAll(); - _allBindingList = new List<TankCoefficientViewModel>(); - if (alllist != null) - { - foreach (var item in alllist) - { - _allBindingList.Add(new TankCoefficientViewModel(item)); - } - } - this.TankCoefficientViewModelBindingSource.DataSource = _allBindingList; - this.TankCoefficientViewModelBindingSource.ResetBindings(false); - } - - //瀹屾垚 - private async void BtnOk_Click(object sender, EventArgs e) - { - var allList = new List<Vmo.AssetsTankCoefficientVmo>(); - foreach (var item in _allBindingList) - { - allList.Add(new Vmo.AssetsTankCoefficientVmo { ID = item.ID, Name = item.Name, MinorLoss = item.MinorLoss }); - } - if (await _bll.DeleteAll()) - { - if (allList.Count > 0) - { - if (await _bll.Inserts(allList)) - { - MessageBoxHelper.ShowSuccess("璁剧疆鎴愬姛!"); - } - else - { - MessageBoxHelper.ShowError("璁剧疆澶辫触!"); - } - } - else - { - MessageBoxHelper.ShowSuccess("璁剧疆鎴愬姛!"); - } - } - else - { - MessageBoxHelper.ShowError("璁剧疆澶辫触!"); - }; - this.DialogResult = DialogResult.OK; - this.Close(); - } - - //鍒犻櫎 - private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) - { - if (_allBindingList == null || _allBindingList.Count < 1) - return; - var row = this.gridView1.GetCurrentViewModel(_allBindingList); - if (row == null) - return; - if (e.Column == this.ColDelete) - _allBindingList.Remove(row); - this.TankCoefficientViewModelBindingSource.DataSource = _allBindingList; - this.TankCoefficientViewModelBindingSource.ResetBindings(false); - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/TankCoefficientViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/TankCoefficientViewModel.cs deleted file mode 100644 index d347ac6..0000000 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/TankCoefficientViewModel.cs +++ /dev/null @@ -1,78 +0,0 @@ -锘縰sing System.ComponentModel; - -namespace HStation.WinFrmUI -{ - public class TankCoefficientViewModel - { - public TankCoefficientViewModel() - { } - - public TankCoefficientViewModel(Vmo.AssetsTankCoefficientVmo rhs) - { - this.ID = rhs.ID; - this.Name = rhs.Name; - this.MinorLoss = rhs.MinorLoss; - } - - /// <summary> - /// id - /// </summary> - public long ID { get; set; } - - /// <summary> - /// 鍚嶇О - /// </summary> - [DisplayName("鍚嶇О")] - [Browsable(true)] - public string Name { get; set; } - - /// <summary> - /// 鏈�浣庢按浣� - /// </summary> - [DisplayName("鏈�浣庢按浣�")] - [Browsable(true)] - public double MinLevel { get; set; } - - /// <summary> - /// 鏈�楂樻按浣� - /// </summary> - [DisplayName("鏈�楂樻按浣�")] - [Browsable(true)] - public double MaxLevel { get; set; } - - /// <summary> - /// 鍏О鐩村緞 - /// </summary> - [DisplayName("鍏О鐩村緞")] - [Browsable(true)] - public double DN { get; set; } - - /// <summary> - /// 鏈�灏忓绉� - /// </summary> - [DisplayName("鏈�灏忓绉�")] - [Browsable(true)] - public double MinVol { get; set; } - - /// <summary> - /// 鏄惁鍏佽婧㈡祦 - /// </summary> - [DisplayName("鏄惁鍏佽婧㈡祦")] - [Browsable(true)] - public bool OverFlow { get; set; } - - /// <summary> - /// 鍠峰皠绯绘暟 - /// </summary> - [DisplayName("鍠峰皠绯绘暟")] - [Browsable(true)] - public double MinorLoss { get; set; } - - /// <summary> - /// 娴侀噺绯绘暟 - /// </summary> - [DisplayName("娴侀噺绯绘暟")] - [Browsable(true)] - public double? FlowMinorLoss { get; set; } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.Designer.cs new file mode 100644 index 0000000..d86f681 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.Designer.cs @@ -0,0 +1,258 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AddAssetsTankFactorDlg + { + /// <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(); + txtMinorLoss = new DevExpress.XtraEditors.TextEdit(); + txtDiameter = 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(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtMinorLoss.Properties).BeginInit(); + ((ISupportInitialize)txtDiameter.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)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtMinorLoss); + layoutControl1.Controls.Add(txtDiameter); + 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, 60); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(430, 214); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtMinorLoss + // + txtMinorLoss.Location = new Point(335, 36); + txtMinorLoss.Name = "txtMinorLoss"; + txtMinorLoss.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMinorLoss.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtMinorLoss.Size = new Size(178, 20); + txtMinorLoss.StyleController = layoutControl1; + txtMinorLoss.TabIndex = 5; + // + // txtDiameter + // + txtDiameter.Location = new Point(83, 36); + txtDiameter.Name = "txtDiameter"; + txtDiameter.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDiameter.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDiameter.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDiameter.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDiameter.Properties.NullValuePrompt = "mm"; + txtDiameter.Size = new Size(177, 20); + txtDiameter.StyleController = layoutControl1; + txtDiameter.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(335, 12); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(178, 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, layoutControlItem6, layoutControlItem7, layoutControlItem2, layoutControlItem4 }); + 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 = txtDiameter; + layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(252, 24); + layoutControlItem3.Text = "鐩村緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtMinorLoss; + layoutControlItem4.Location = new Point(252, 24); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(253, 24); + layoutControlItem4.Text = "<color=red>*</color>灞�闃荤郴鏁�:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(252, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(253, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 218); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // 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; + // + // AddAssetsTankFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "AddAssetsTankFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "娣诲姞"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtMinorLoss.Properties).EndInit(); + ((ISupportInitialize)txtDiameter.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)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 txtDiameter; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtMinorLoss; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + 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/14-tank/03-factor/AddAssetsTankFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.cs new file mode 100644 index 0000000..5ed50c7 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.cs @@ -0,0 +1,102 @@ +锘縰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 AddAssetsTankFactorDlg : DevExpress.XtraEditors.XtraForm + { + public AddAssetsTankFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + private static AssetsTankFactorVmo _last = null; + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsTankFactorVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsTankFactorVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData() + { + _vmo = new Vmo.AssetsTankFactorVmo(); + if (_last != null) + { + this.txtName.EditValue = _last.Name; + this.txtMaterial.EditValue = _last.Material; + this.txtDiameter.EditValue = _last.Caliber; + this.txtMinorLoss.EditValue = _last.MinorLoss; + this.txtDescription.EditValue = _last.Description; + } + } + + //楠岃瘉 + 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.txtMinorLoss.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMinorLoss, "蹇呭~椤�"); + 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.txtDiameter.EditValue == null ? null : double.Parse(this.txtDiameter.EditValue?.ToString()); + _vmo.MinorLoss = double.Parse(this.txtMinorLoss.EditValue?.ToString()); + _vmo.Description = this.txtDescription.Text.Trim(); + var id = await BLLFactory<HStation.BLL.AssetsTankFactor>.Instance.Insert(_vmo); + if (id < 1) + { + TipFormHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankFactor>.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/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.resx index 20033c4..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AddAssetsTankFactorDlg.resx @@ -117,29 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="dxErrorProvider1.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.Designer.cs new file mode 100644 index 0000000..96f195d --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.Designer.cs @@ -0,0 +1,378 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsTankFactorMgrPage + { + /// <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(AssetsTankFactorMgrPage)); + 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(); + assetsTankFactorMgrViewModelBindingSource = 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(); + colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); + colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); + colDetail = new DevExpress.XtraGrid.Columns.GridColumn(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); + dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); + colDiameter = new DevExpress.XtraGrid.Columns.GridColumn(); + colMinorLoss = new DevExpress.XtraGrid.Columns.GridColumn(); + ((ISupportInitialize)ribbonControl1).BeginInit(); + ((ISupportInitialize)panelControl1).BeginInit(); + panelControl1.SuspendLayout(); + ((ISupportInitialize)gridControl1).BeginInit(); + ((ISupportInitialize)assetsTankFactorMgrViewModelBindingSource).BeginInit(); + ((ISupportInitialize)gridView1).BeginInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).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 = assetsTankFactorMgrViewModelBindingSource; + 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 }); + // + // assetsTankFactorMgrViewModelBindingSource + // + assetsTankFactorMgrViewModelBindingSource.DataSource = typeof(AssetsTankFactorMgrViewModel); + // + // 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, colDiameter, colMinorLoss, 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 = 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; + // + // 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 = 4; + colDescription.Width = 100; + // + // colDetail + // + colDetail.Caption = "璇︾粏淇℃伅"; + colDetail.ColumnEdit = repositoryItemButtonEdit1; + colDetail.MaxWidth = 60; + colDetail.MinWidth = 60; + colDetail.Name = "colDetail"; + colDetail.Visible = true; + colDetail.VisibleIndex = 5; + 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; + // + // dragDropEvents1 + // + dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; + // + // colDiameter + // + colDiameter.FieldName = "Diameter"; + colDiameter.MaxWidth = 100; + colDiameter.MinWidth = 100; + colDiameter.Name = "colDiameter"; + colDiameter.Visible = true; + colDiameter.VisibleIndex = 2; + colDiameter.Width = 100; + // + // colMinorLoss + // + colMinorLoss.FieldName = "MinorLoss"; + colMinorLoss.MaxWidth = 100; + colMinorLoss.MinWidth = 100; + colMinorLoss.Name = "colMinorLoss"; + colMinorLoss.Visible = true; + colMinorLoss.VisibleIndex = 3; + colMinorLoss.Width = 100; + // + // AssetsTankFactorMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(panelControl1); + Controls.Add(ribbonControl1); + Name = "AssetsTankFactorMgrPage"; + Padding = new Padding(1); + Size = new Size(998, 670); + ((ISupportInitialize)ribbonControl1).EndInit(); + ((ISupportInitialize)panelControl1).EndInit(); + panelControl1.ResumeLayout(false); + ((ISupportInitialize)gridControl1).EndInit(); + ((ISupportInitialize)assetsTankFactorMgrViewModelBindingSource).EndInit(); + ((ISupportInitialize)gridView1).EndInit(); + ((ISupportInitialize)repositoryItemButtonEdit1).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.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 assetsTankFactorMgrViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colMaterial; + 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; + private DevExpress.XtraGrid.Columns.GridColumn colDiameter; + private DevExpress.XtraGrid.Columns.GridColumn colMinorLoss; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.cs new file mode 100644 index 0000000..a0b524c --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.cs @@ -0,0 +1,407 @@ +锘縰sing DevExpress.Utils.DragDrop; +using DevExpress.XtraEditors; +using Yw; + +namespace HStation.WinFrmUI +{ + public partial class AssetsTankFactorMgrPage : DocumentPage + { + public AssetsTankFactorMgrPage() + { + InitializeComponent(); + this.gridView1.SetLimitView(30); + this.PageTitle.Caption = "鎹㈢儹鍣ㄧ郴鏁�"; + this.PageTitle.HeaderSvgImage = AssetsMainSvgImageHelper.Factor; + this.PageTitle.SvgImageSize = new Size(24, 24); + } + + //鏁版嵁缁戝畾鍒楄〃 + private List<AssetsTankFactorMgrViewModel> _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.AssetsTankFactor>.Instance.GetAll(); + _allBindingList = new List<AssetsTankFactorMgrViewModel>(); + if (allBindingList != null && allBindingList.Count > 0) + { + foreach (var item in allBindingList) + { + var vm = new AssetsTankFactorMgrViewModel(item); + _allBindingList.Add(vm); + } + } + this.assetsTankFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankFactorMgrViewModelBindingSource.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 AddAssetsTankFactorDlg(); + dlg.ReloadDataEvent += (rhs) => + { + var vm = new AssetsTankFactorMgrViewModel(rhs); + _allBindingList.Add(vm); + this.assetsTankFactorMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛锛�"); + }; + dlg.SetBindingData(); + dlg.ShowDialog(); + } + + //缂栬緫 + private void Edit() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new EditAssetsTankFactorDlg(); + 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.AssetsTankFactor>.Instance.DeleteByID(vm.ID); + if (!bol) + { + TipFormHelper.ShowError("鍒犻櫎澶辫触锛�"); + return; + } + _allBindingList.Remove(vm); + this.assetsTankFactorMgrViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); + } + + //鏌ョ湅 + private void View() + { + var vm = GetCurrentViewModel(); + if (vm == null) + { + return; + } + var dlg = new ViewAssetsTankFactorDlg(); + 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 AssetsTankFactorMgrViewModel; + if (current == null) + { + return; + } + var prevHandle = rowHandle - 1; + var prev = this.gridView1.GetRow(prevHandle) as AssetsTankFactorMgrViewModel; + 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.AssetsTankFactor>.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.assetsTankFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankFactorMgrViewModelBindingSource.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 AssetsTankFactorMgrViewModel; + if (current == null) + { + return; + } + var nextHandle = rowHandle + 1; + var next = this.gridView1.GetRow(nextHandle) as AssetsTankFactorMgrViewModel; + 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.AssetsTankFactor>.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.assetsTankFactorMgrViewModelBindingSource.DataSource = _allBindingList; + this.assetsTankFactorMgrViewModelBindingSource.ResetBindings(false); + this.gridView1.FocusedRowHandle = nextHandle; + } + + #region 褰撳墠 + + //鑾峰彇褰撳墠 + private AssetsTankFactorMgrViewModel 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 AssetsTankFactorMgrViewModel; + 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 AssetsTankFactorMgrViewModel; + 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.AssetsTankFactor>.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/14-tank/03-factor/AssetsTankFactorMgrPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.resx new file mode 100644 index 0000000..a936b46 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrPage.resx @@ -0,0 +1,329 @@ +锘�<?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="assetsExchangerFactorMgrViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>378, 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> +</root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrViewModel.cs new file mode 100644 index 0000000..bfd93ec --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/AssetsTankFactorMgrViewModel.cs @@ -0,0 +1,93 @@ +锘縩amespace HStation.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class AssetsTankFactorMgrViewModel + { + /// <summary> + /// + /// </summary> + public AssetsTankFactorMgrViewModel() + { } + + /// <summary> + /// + /// </summary> + public AssetsTankFactorMgrViewModel(HStation.Vmo.AssetsTankFactorVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Diameter = rhs.Caliber; + this.MinorLoss = rhs.MinorLoss; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// + /// </summary> + public void Reset(HStation.Vmo.AssetsTankFactorVmo rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Diameter = rhs.Caliber; + this.MinorLoss = rhs.MinorLoss; + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// id + /// </summary> + [Display(Name = "ID")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [Display(Name = "鏉愭枡")] + public string Material { get; set; } + + /// <summary> + /// 鐩村緞 + /// </summary> + [Display(Name = "鐩村緞(mm)")] + public double? Diameter { get; set; } + + /// <summary> + /// 灞�闃荤郴鏁� + /// </summary> + [Display(Name = "灞�闃荤郴鏁�")] + public double MinorLoss { 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.AssetsTankFactorVmo Vmo { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.Designer.cs new file mode 100644 index 0000000..29b0ccc --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.Designer.cs @@ -0,0 +1,258 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class EditAssetsTankFactorDlg + { + /// <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(); + txtMinorLoss = new DevExpress.XtraEditors.TextEdit(); + txtDiameter = 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(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtMinorLoss.Properties).BeginInit(); + ((ISupportInitialize)txtDiameter.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)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtMinorLoss); + layoutControl1.Controls.Add(txtDiameter); + 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, 60); + txtDescription.Name = "txtDescription"; + txtDescription.Size = new Size(430, 214); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtMinorLoss + // + txtMinorLoss.Location = new Point(335, 36); + txtMinorLoss.Name = "txtMinorLoss"; + txtMinorLoss.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMinorLoss.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtMinorLoss.Size = new Size(178, 20); + txtMinorLoss.StyleController = layoutControl1; + txtMinorLoss.TabIndex = 5; + // + // txtDiameter + // + txtDiameter.Location = new Point(83, 36); + txtDiameter.Name = "txtDiameter"; + txtDiameter.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDiameter.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDiameter.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDiameter.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDiameter.Properties.NullValuePrompt = "mm"; + txtDiameter.Size = new Size(177, 20); + txtDiameter.StyleController = layoutControl1; + txtDiameter.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(335, 12); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Size = new Size(178, 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, layoutControlItem4, layoutControlItem6, layoutControlItem7, layoutControlItem2, layoutControlItem3 }); + 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 = txtDiameter; + layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(252, 24); + layoutControlItem3.Text = "鍙e緞:"; + layoutControlItem3.TextSize = new Size(59, 14); + // + // layoutControlItem4 + // + layoutControlItem4.AllowHtmlStringInCaption = true; + layoutControlItem4.Control = txtMinorLoss; + layoutControlItem4.Location = new Point(252, 24); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(253, 24); + layoutControlItem4.Text = "<color=red>*</color>灞�闃荤郴鏁�:"; + layoutControlItem4.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.AllowHtmlStringInCaption = true; + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(252, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(253, 24); + layoutControlItem2.Text = "<color=red>*</color>鏉愯川:"; + layoutControlItem2.TextSize = new Size(59, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 218); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(59, 14); + // + // 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; + // + // EditAssetsTankFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "EditAssetsTankFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "缂栬緫"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtMinorLoss.Properties).EndInit(); + ((ISupportInitialize)txtDiameter.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)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 txtDiameter; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtMinorLoss; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + 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/14-tank/03-factor/EditAssetsTankFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.cs new file mode 100644 index 0000000..ee3d072 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.cs @@ -0,0 +1,100 @@ +锘縰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 EditAssetsTankFactorDlg : DevExpress.XtraEditors.XtraForm + { + public EditAssetsTankFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + /// <summary> + /// 杩斿洖鏁版嵁浜嬩欢 + /// </summary> + public event Action<HStation.Vmo.AssetsTankFactorVmo> ReloadDataEvent; + + private HStation.Vmo.AssetsTankFactorVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsTankFactorVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = new Vmo.AssetsTankFactorVmo(vmo); + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtDiameter.EditValue = vmo.Caliber; + this.txtMinorLoss.EditValue = vmo.MinorLoss; + this.txtDescription.EditValue = vmo.Description; + } + + //楠岃瘉 + 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.txtMinorLoss.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMinorLoss, "蹇呭~椤�"); + 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.txtDiameter.EditValue == null ? null : double.Parse(this.txtDiameter.EditValue?.ToString()); + _vmo.MinorLoss = double.Parse(this.txtMinorLoss.EditValue?.ToString()); + _vmo.Description = this.txtDescription.Text.Trim(); + var bol = await BLLFactory<HStation.BLL.AssetsTankFactor>.Instance.Update(_vmo); + if (!bol) + { + TipFormHelper.ShowError("鏇存柊澶辫触锛�"); + return; + } + var vmo = await BLLFactory<HStation.BLL.AssetsTankFactor>.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/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.resx similarity index 73% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.resx index 20033c4..d438392 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/EditAssetsTankFactorDlg.resx @@ -117,29 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="dxErrorProvider1.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.Designer.cs new file mode 100644 index 0000000..d935b94 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.Designer.cs @@ -0,0 +1,229 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class ViewAssetsTankFactorDlg + { + /// <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(); + txtMinorLoss = new DevExpress.XtraEditors.TextEdit(); + txtDiameter = 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(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)txtDescription.Properties).BeginInit(); + ((ISupportInitialize)txtMinorLoss.Properties).BeginInit(); + ((ISupportInitialize)txtDiameter.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(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(txtDescription); + layoutControl1.Controls.Add(txtMinorLoss); + layoutControl1.Controls.Add(txtDiameter); + 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, 60); + txtDescription.Name = "txtDescription"; + txtDescription.Properties.ReadOnly = true; + txtDescription.Properties.UseReadOnlyAppearance = false; + txtDescription.Size = new Size(437, 244); + txtDescription.StyleController = layoutControl1; + txtDescription.TabIndex = 7; + // + // txtMinorLoss + // + txtMinorLoss.Location = new Point(328, 36); + txtMinorLoss.Name = "txtMinorLoss"; + txtMinorLoss.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMinorLoss.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtMinorLoss.Properties.ReadOnly = true; + txtMinorLoss.Properties.UseReadOnlyAppearance = false; + txtMinorLoss.Size = new Size(185, 20); + txtMinorLoss.StyleController = layoutControl1; + txtMinorLoss.TabIndex = 5; + // + // txtDiameter + // + txtDiameter.Location = new Point(76, 36); + txtDiameter.Name = "txtDiameter"; + txtDiameter.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txtDiameter.Properties.DisplayFormat.FormatString = "{0}mm"; + txtDiameter.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom; + txtDiameter.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + txtDiameter.Properties.NullValuePrompt = "mm"; + txtDiameter.Properties.ReadOnly = true; + txtDiameter.Properties.UseReadOnlyAppearance = false; + txtDiameter.Size = new Size(184, 20); + txtDiameter.StyleController = layoutControl1; + txtDiameter.TabIndex = 4; + // + // txtMaterial + // + txtMaterial.Location = new Point(328, 12); + txtMaterial.Name = "txtMaterial"; + txtMaterial.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; + txtMaterial.Properties.ReadOnly = true; + txtMaterial.Properties.UseReadOnlyAppearance = false; + txtMaterial.Size = new Size(185, 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, layoutControlItem6, layoutControlItem2, layoutControlItem4 }); + 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 = txtDiameter; + layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(252, 24); + layoutControlItem3.Text = "鐩村緞:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtMinorLoss; + layoutControlItem4.Location = new Point(252, 24); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(253, 24); + layoutControlItem4.Text = "灞�闃荤郴鏁�:"; + layoutControlItem4.TextSize = new Size(52, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = txtMaterial; + layoutControlItem2.Location = new Point(252, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(253, 24); + layoutControlItem2.Text = "鏉愯川:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtDescription; + layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(505, 248); + layoutControlItem6.Text = "璇存槑:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // ViewAssetsTankFactorDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(525, 316); + Controls.Add(layoutControl1); + Name = "ViewAssetsTankFactorDlg"; + StartPosition = FormStartPosition.CenterParent; + Text = "璇︾粏淇℃伅"; + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)txtDescription.Properties).EndInit(); + ((ISupportInitialize)txtMinorLoss.Properties).EndInit(); + ((ISupportInitialize)txtDiameter.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(); + 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 txtDiameter; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtMinorLoss; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.MemoEdit txtDescription; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.cs new file mode 100644 index 0000000..09cc33b --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.cs @@ -0,0 +1,44 @@ +锘縰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 ViewAssetsTankFactorDlg : DevExpress.XtraEditors.XtraForm + { + public ViewAssetsTankFactorDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.layoutControl1.SetupLayoutControl(); + } + + private HStation.Vmo.AssetsTankFactorVmo _vmo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(HStation.Vmo.AssetsTankFactorVmo vmo) + { + if (vmo == null) + { + return; + } + _vmo = vmo; + this.txtName.EditValue = vmo.Name; + this.txtMaterial.EditValue = vmo.Material; + this.txtDiameter.EditValue = vmo.Caliber; + this.txtMinorLoss.EditValue = vmo.MinorLoss; + this.txtDescription.EditValue = vmo.Description; + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.resx similarity index 72% copy from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.resx index 20033c4..af32865 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-factor/ViewAssetsTankFactorDlg.resx @@ -117,29 +117,4 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.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="editorButtonImageOptions1.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> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.Designer.cs new file mode 100644 index 0000000..2c6a538 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.Designer.cs @@ -0,0 +1,120 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class AssetsTankMgrPage + { + /// <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(AssetsTankMgrPage)); + dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); + dockPnlLeft = new DevExpress.XtraBars.Docking.DockPanel(); + dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); + assetsTankSeriesMgrTreeCtrl1 = new AssetsTankSeriesMgrTreeCtrl(); + assetsTankMainMgrPage1 = new AssetsTankMainMgrPage(); + ((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(assetsTankSeriesMgrTreeCtrl1); + dockPanel1_Container.Location = new Point(3, 26); + dockPanel1_Container.Name = "dockPanel1_Container"; + dockPanel1_Container.Size = new Size(193, 563); + dockPanel1_Container.TabIndex = 0; + // + // assetsTankSeriesMgrTreeCtrl1 + // + assetsTankSeriesMgrTreeCtrl1.Dock = DockStyle.Fill; + assetsTankSeriesMgrTreeCtrl1.Location = new Point(0, 0); + assetsTankSeriesMgrTreeCtrl1.Name = "assetsTankSeriesMgrTreeCtrl1"; + assetsTankSeriesMgrTreeCtrl1.Size = new Size(193, 563); + assetsTankSeriesMgrTreeCtrl1.TabIndex = 0; + // + // assetsTankMainMgrPage1 + // + assetsTankMainMgrPage1.Appearance.BackColor = SystemColors.Control; + assetsTankMainMgrPage1.Appearance.Options.UseBackColor = true; + assetsTankMainMgrPage1.Dock = DockStyle.Fill; + assetsTankMainMgrPage1.Location = new Point(200, 0); + assetsTankMainMgrPage1.Name = "assetsTankMainMgrPage1"; + assetsTankMainMgrPage1.Padding = new Padding(1); + assetsTankMainMgrPage1.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); + assetsTankMainMgrPage1.PageTitle = pageTitle1; + assetsTankMainMgrPage1.Size = new Size(825, 592); + assetsTankMainMgrPage1.TabIndex = 1; + // + // AssetsTankMgrPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(assetsTankMainMgrPage1); + Controls.Add(dockPnlLeft); + Name = "AssetsTankMgrPage"; + 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 AssetsTankSeriesMgrTreeCtrl assetsTankSeriesMgrTreeCtrl1; + private AssetsTankMainMgrPage assetsTankMainMgrPage1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.cs new file mode 100644 index 0000000..44dff25 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.cs @@ -0,0 +1,58 @@ +锘縰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 AssetsTankMgrPage : DocumentPage + { + public AssetsTankMgrPage() + { + InitializeComponent(); + this.PageTitle.Caption = "鎹㈢儹鍣ㄥ瀷鍙�"; + this.PageTitle.HeaderSvgImage = AssetsMainSvgImageHelper.Tank; + this.PageTitle.SvgImageSize = new Size(24, 24); + this.assetsTankSeriesMgrTreeCtrl1.FocusedChangedEvent += assetsTankSeriesMgrTreeCtrl1_FocusedChangedEvent; + } + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + InitialMainPage(); + this.assetsTankSeriesMgrTreeCtrl1.InitialData(); + } + + //鍒濆鍖栧瀷鍙烽〉闈� + private void InitialMainPage() + { + this.assetsTankMainMgrPage1.PageGuid = new PageGuid() + { + Modular = AssetsFunctionHelper.Modular, + MoudingType = eMoudingType.Tab, + Function = AssetsFunctionHelper.TankFactorMgr, + TagName = string.Empty + }; + this.assetsTankMainMgrPage1.IsExistPageEvent += this.IsExistPage; + this.assetsTankMainMgrPage1.CreatePageEvent += this.CreatePage; + this.assetsTankMainMgrPage1.FindPageEvent += this.FindPage; + } + + //鑱氱劍鏀瑰彉 + private void assetsTankSeriesMgrTreeCtrl1_FocusedChangedEvent(AssetsTankSeriesVmo series) + { + this.assetsTankMainMgrPage1.SetBindingData(series); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.resx similarity index 77% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.resx index 20033c4..6331e59 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/03-coefficient/SetTankCoefficientDlg.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/AssetsTankMgrPage.resx @@ -117,29 +117,35 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="sprinklerCoefficientViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <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="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <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 - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJgEAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs - YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy - Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh - Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N - CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu - NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w - LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt - MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks - Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 - LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= + 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/14-tank/TankManageMainPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankManageMainPage.cs index bf9a272..60fd674 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankManageMainPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankManageMainPage.cs @@ -123,9 +123,6 @@ private void barBtnSetCoefficient_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var dlg = new SetTankCoefficientDlg(); - dlg.SetBindingData(); - dlg.ShowDialog(); } //鏇茬嚎 diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankViewModel.cs index 6efc7a1..f0bacff 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/14-tank/TankViewModel.cs @@ -18,7 +18,7 @@ this.DN = rhs.DN; this.MinVol = rhs.MinVol; this.OverFlow = rhs.OverFlow; - this.KeyWord = string.Join(",", rhs.KeyWord); + this.KeyWord = string.Join(",", rhs.KeyWords); this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; @@ -33,7 +33,7 @@ this.DN = rhs.DN; this.MinVol = rhs.MinVol; this.OverFlow = rhs.OverFlow; - this.KeyWord = string.Join(",", rhs.KeyWord); + this.KeyWord = string.Join(",", rhs.KeyWords); this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Vmo = rhs; 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 20f4812..991779a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj @@ -186,6 +186,42 @@ <Compile Update="11-compressor\06-prop\ExchangerProductListBox.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="14-tank\01-series\AddAssetsTankSeriesDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\01-series\AssetsTankSeriesMgrTreeCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="14-tank\01-series\EditAssetsTankSeriesDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\01-series\ViewAssetsTankSeriesDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\02-main\AddAssetsTankMainDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\02-main\AssetsTankMainMgrPage.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="14-tank\02-main\EditAssetsTankMainDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\02-main\ViewAssetsTankMainDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\03-factor\AddAssetsTankFactorDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\03-factor\AssetsTankFactorMgrPage.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="14-tank\03-factor\EditAssetsTankFactorDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\03-factor\ViewAssetsTankFactorDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="14-tank\04-curveVol\AssetsTankCurveVOLMgrPage.cs"> <SubType>UserControl</SubType> </Compile> @@ -200,6 +236,9 @@ </Compile> <Compile Update="14-tank\04-curveVol\ImportAssetsTankCurveVOLByPictureDlg.cs"> <SubType>Form</SubType> + </Compile> + <Compile Update="14-tank\AssetsTankMgrPage.cs"> + <SubType>UserControl</SubType> </Compile> <Compile Update="15-meter\01-series\AddAssetsMeterSeriesDlg.cs"> <SubType>Form</SubType> @@ -332,12 +371,11 @@ <Compile Update="17-hydrant\02-main\EditAssetsHydrantMainDlg.cs" /> <Compile Update="17-hydrant\03-coefficient\SetHydrantCoefficientDlg.cs" /> <Compile Update="17-hydrant\HydrantManageMainPage.cs" /> - <Compile Update="14-tank\01-series\AddAssetsTankSeriesDlg.cs" /> - <Compile Update="14-tank\01-series\TankTreeListCtrl.cs" /> - <Compile Update="14-tank\01-series\EditAssetsTankSeriesDlg.cs" /> - <Compile Update="14-tank\02-main\AddAssetsTankMainDlg.cs" /> - <Compile Update="14-tank\02-main\EditAssetsTankMainDlg.cs" /> - <Compile Update="14-tank\03-coefficient\SetTankCoefficientDlg.cs" /> + <Compile Update="14-tank\01-series-bak\AddAssetsTankSeriesDlg.cs" /> + <Compile Update="14-tank\01-series-bak\TankTreeListCtrl.cs" /> + <Compile Update="14-tank\01-series-bak\EditAssetsTankSeriesDlg.cs" /> + <Compile Update="14-tank\02-main-bak\AddAssetsTankMainDlg.cs" /> + <Compile Update="14-tank\02-main-bak\EditAssetsTankMainDlg.cs" /> <Compile Update="14-tank\TankManageMainPage.cs" /> <Compile Update="13-blunthead\01-series\AddAssetsBluntheadSeriesDlg.cs" /> <Compile Update="13-blunthead\01-series\EditAssetsBluntheadSeriesDlg.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 0dedabd..6e54fb7 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 @@ -308,22 +308,19 @@ <Compile Update="13-blunthead\BluntheadManageMainPage.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="14-tank\01-series\AddAssetsTankSeriesDlg.cs"> + <Compile Update="14-tank\01-series-bak\AddAssetsTankSeriesDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="14-tank\01-series\EditAssetsTankSeriesDlg.cs"> + <Compile Update="14-tank\01-series-bak\EditAssetsTankSeriesDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="14-tank\01-series\TankTreeListCtrl.cs"> + <Compile Update="14-tank\01-series-bak\TankTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="14-tank\02-main\AddAssetsTankMainDlg.cs"> + <Compile Update="14-tank\02-main-bak\AddAssetsTankMainDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="14-tank\02-main\EditAssetsTankMainDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="14-tank\03-coefficient\SetTankCoefficientDlg.cs"> + <Compile Update="14-tank\02-main-bak\EditAssetsTankMainDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="14-tank\04-chart-edit\TankMainPhartMinorLossPanel.cs"> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs index 68d401d..a780abc 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs @@ -1424,12 +1424,12 @@ } Vmo.AssetsTankMainVmo vmo = null; var nameMatching = tankVmos.Where(x => - (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || - (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 + (x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1 ) //鍏堣繘琛岀瓫閫�,鍚庤繘琛屼粠澶у埌灏忔帓搴� .OrderByDescending(x => - (x.KeyWord != null && x.KeyWord.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || - (x.KeyWord == null || !x.KeyWord.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); + (x.KeyWords != null && x.KeyWords.Any(keyword => GetIntersect(keyword, input.ModelType) >= 1)) || + (x.KeyWords == null || !x.KeyWords.Any()) && GetIntersect(x.Name, input.ModelType) >= 1).ToList(); if (nameMatching.Count > 1) { diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingViewModel.cs index 4ce12ae..0e2f71f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingViewModel.cs @@ -18,7 +18,7 @@ { this.ID = rhs.ID; this.Name = rhs.Name; - this.KeyWords = HStation.Service.Assets.KeyWordHelper.ToString(rhs.KeyWord); + this.KeyWords = HStation.Service.Assets.KeyWordHelper.ToString(rhs.KeyWords); this.Flags = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; -- Gitblit v1.9.3