From 8a169e59577fd2cf19ce4ec6cb88e47d0ff79d63 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 20 二月 2025 18:25:59 +0800 Subject: [PATCH] 解决存储修改bug,没有完全解决 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.Designer.cs | 70 +- BLL/HStation.BLL.Core/HStation.BLL.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.Designer.cs | 78 ++++ WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/08-checked/HydroWorkingCheckedListHorizCtrl.Designer.cs | 2 WinFrmUI/HStation.WinFrmUI.Common.Core/HStation.WinFrmUI.Common.Core.csproj.user | 8 WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.resx | 123 ++++++ Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj | 2 WinFrmUI/HStation.WinFrmUI.Auth.Core/HStation.WinFrmUI.Auth.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListItemViewModel.cs | 78 ++++ WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.resx | 123 ++++++ WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListItemViewModel.cs | 94 ++++ Entry/HStation.Entry.Xhs.Core/HStation.Entry.Xhs.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.cs | 90 ++++ WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.cs | 113 +++++ Desktop/HStation.Desktop.Xhs.Core/Login/LoginFrm.cs | 18 Entry/HStation.Entry.Xhs.Core/Properties/PublishProfiles/FolderProfile.pubxml.user | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 12 WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj | 8 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.cs | 4 WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingCheckedListItemViewModel.datasource | 10 Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.cs | 6 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.Designer.cs | 56 +- WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingPumpListItemViewModel.datasource | 10 BLL/Yw.BLL.Division.Core/Yw.BLL.Division.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.Designer.cs | 188 +++++++++ 27 files changed, 1,022 insertions(+), 85 deletions(-) diff --git a/BLL/HStation.BLL.Core/HStation.BLL.Core.csproj b/BLL/HStation.BLL.Core/HStation.BLL.Core.csproj index 4511760..6de1642 100644 --- a/BLL/HStation.BLL.Core/HStation.BLL.Core.csproj +++ b/BLL/HStation.BLL.Core/HStation.BLL.Core.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Yw.BLL.Core" Version="3.1.9" /> + <PackageReference Include="Yw.BLL.Core" Version="3.2.1" /> </ItemGroup> <ItemGroup> diff --git a/BLL/Yw.BLL.Division.Core/Yw.BLL.Division.Core.csproj b/BLL/Yw.BLL.Division.Core/Yw.BLL.Division.Core.csproj index fa6d8a9..c544b30 100644 --- a/BLL/Yw.BLL.Division.Core/Yw.BLL.Division.Core.csproj +++ b/BLL/Yw.BLL.Division.Core/Yw.BLL.Division.Core.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Yw.BLL.Core" Version="3.1.9" /> + <PackageReference Include="Yw.BLL.Core" Version="3.2.1" /> </ItemGroup> <ItemGroup> diff --git a/Desktop/HStation.Desktop.Xhs.Core/Login/LoginFrm.cs b/Desktop/HStation.Desktop.Xhs.Core/Login/LoginFrm.cs index 649cc0d..f13a9dd 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/Login/LoginFrm.cs +++ b/Desktop/HStation.Desktop.Xhs.Core/Login/LoginFrm.cs @@ -71,6 +71,24 @@ return; } + this.Invoke(() => + { + var threadId = Thread.CurrentThread.ManagedThreadId; + Yw.Untity.UserRegister.Regist + ( + result.User.Corpration.ID, + result.User.ID, + (int)result.User.AdminType, + result.User.Name, + result.User.Tag, + result.User.LoginAccount.ID, + result.User.LoginAccount.LoginType.ID, + result.Software.Project.ID, + result.Software.ID + ); + }); + + Yw.JwtToken2Helper.Set(result.AccessToken, result.RefreshToken); var login = new GlobalParas(result); var authTreelist = await BLLFactory<Yw.BLL.MenuAuthority>.Instance.GetHaveMenuTreeList(GlobalParas._GlobalParas.SoftwareID, GlobalParas._GlobalParas.UserID); diff --git a/Entry/HStation.Entry.Xhs.Core/HStation.Entry.Xhs.Core.csproj b/Entry/HStation.Entry.Xhs.Core/HStation.Entry.Xhs.Core.csproj index 629a084..85b430a 100644 --- a/Entry/HStation.Entry.Xhs.Core/HStation.Entry.Xhs.Core.csproj +++ b/Entry/HStation.Entry.Xhs.Core/HStation.Entry.Xhs.Core.csproj @@ -20,7 +20,7 @@ <PackageReference Include="Yw.Application.Basic.Core" Version="3.3.3" /> <PackageReference Include="Yw.Application.Bimface.Core" Version="3.2.0" /> <PackageReference Include="Yw.Application.Dict.Core" Version="3.1.3" /> - <PackageReference Include="Yw.Application.Hydro.Core" Version="3.8.6" /> + <PackageReference Include="Yw.Application.Hydro.Core" Version="3.8.9" /> <PackageReference Include="Yw.Application.Map.Core" Version="3.2.2" /> <PackageReference Include="Yw.Application.Phart.Core" Version="3.3.1" /> <PackageReference Include="Yw.Application.Unit.Core" Version="3.1.8" /> diff --git a/Entry/HStation.Entry.Xhs.Core/Properties/PublishProfiles/FolderProfile.pubxml.user b/Entry/HStation.Entry.Xhs.Core/Properties/PublishProfiles/FolderProfile.pubxml.user index 85d1b6f..e0cb814 100644 --- a/Entry/HStation.Entry.Xhs.Core/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Entry/HStation.Entry.Xhs.Core/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>D:\WorkData\git\HStation\XHS\Entry\HStation.Entry.Xhs.Core\bin\Release\net6.0\publish\</_PublishTargetUrl> - <History>True|2025-02-13T03:00:50.4202223Z;True|2025-02-08T17:31:17.3841999+08:00;True|2025-02-08T17:27:02.1630402+08:00;True|2025-01-25T12:24:10.7702918+08:00;True|2025-01-24T09:10:22.0248945+08:00;True|2025-01-23T10:54:42.2796686+08:00;True|2025-01-22T07:53:29.9931150+08:00;True|2025-01-21T11:37:36.9296374+08:00;True|2025-01-20T10:42:21.8992153+08:00;True|2025-01-20T10:41:30.8562468+08:00;True|2025-01-20T10:36:54.9849821+08:00;True|2025-01-20T10:31:16.0442319+08:00;True|2025-01-13T15:07:40.9182715+08:00;True|2025-01-13T12:08:58.0115763+08:00;True|2025-01-13T12:08:44.3187386+08:00;True|2025-01-13T12:07:41.4659157+08:00;True|2025-01-13T11:53:47.1828627+08:00;True|2025-01-13T11:38:53.6150404+08:00;True|2025-01-13T11:37:14.9075336+08:00;True|2025-01-13T11:35:23.3939940+08:00;True|2025-01-13T11:33:41.6199459+08:00;True|2025-01-13T11:32:15.2734783+08:00;True|2025-01-13T11:30:39.9296756+08:00;True|2025-01-13T11:25:02.3605923+08:00;True|2025-01-13T11:21:03.0110309+08:00;True|2025-01-13T11:17:46.3662069+08:00;True|2025-01-08T09:44:09.5132234+08:00;True|2024-09-03T11:22:43.3813050+08:00;True|2024-09-03T11:06:18.0799295+08:00;True|2024-09-03T10:52:25.3198740+08:00;True|2024-09-02T09:16:17.5197059+08:00;False|2024-09-02T09:08:02.4504522+08:00;True|2024-06-20T12:16:07.3854116+08:00;True|2024-06-18T09:13:21.8960491+08:00;True|2024-06-12T18:55:43.2697624+08:00;True|2024-06-12T18:54:42.2191664+08:00;True|2024-06-12T18:37:39.2735086+08:00;True|2024-06-12T18:32:59.2340941+08:00;True|2024-06-12T18:18:57.9018714+08:00;True|2024-06-12T18:13:13.4471521+08:00;True|2024-06-12T18:11:38.4803257+08:00;True|2024-06-12T18:10:00.3753638+08:00;True|2024-06-12T18:03:08.9521607+08:00;True|2024-06-12T17:59:46.2755740+08:00;True|2024-06-12T17:58:01.8017051+08:00;True|2024-06-12T17:56:20.6946001+08:00;True|2024-06-12T17:32:53.8291604+08:00;True|2024-06-12T17:32:38.6492118+08:00;False|2024-06-12T17:32:17.0260105+08:00;True|2024-06-12T17:08:59.9367775+08:00;True|2024-06-12T16:32:42.3320305+08:00;True|2024-06-07T13:34:17.3014803+08:00;True|2024-06-07T13:20:33.5124438+08:00;True|2024-06-07T10:24:47.0351087+08:00;True|2024-06-05T17:04:55.4017239+08:00;True|2024-06-05T16:05:35.1432805+08:00;True|2024-06-05T15:18:06.1797165+08:00;True|2024-06-05T13:53:59.9366676+08:00;True|2024-06-05T13:43:45.7009774+08:00;True|2024-06-05T13:38:18.1415782+08:00;True|2024-06-05T12:14:05.4745826+08:00;True|2024-06-05T12:10:02.8443283+08:00;True|2024-06-02T18:41:28.5233205+08:00;True|2024-06-02T18:21:27.5679625+08:00;True|2024-06-02T17:34:02.6234679+08:00;True|2024-06-02T16:58:23.9422671+08:00;True|2024-06-02T16:16:43.6949096+08:00;True|2024-06-02T14:44:06.8963915+08:00;True|2024-06-02T11:10:51.5587482+08:00;True|2024-06-01T11:30:39.5033584+08:00;True|2024-05-30T16:29:38.0730664+08:00;True|2024-05-30T15:16:14.5429969+08:00;True|2024-05-29T17:31:27.5349115+08:00;True|2024-05-29T16:49:44.3085849+08:00;True|2024-05-29T10:46:15.3071701+08:00;True|2024-05-28T16:21:22.2987178+08:00;True|2024-05-28T11:55:02.0680294+08:00;True|2024-05-24T09:27:50.0479340+08:00;True|2024-05-23T14:16:32.3824342+08:00;True|2024-05-23T10:51:43.4383910+08:00;True|2024-05-22T11:19:10.1709647+08:00;True|2024-05-22T11:12:47.8835237+08:00;True|2024-05-22T10:43:34.7720709+08:00;True|2024-05-21T17:25:46.9831973+08:00;True|2024-05-21T12:11:55.2774332+08:00;True|2024-05-13T10:32:18.9951394+08:00;True|2024-05-09T09:53:09.1673089+08:00;True|2024-05-08T17:18:58.3017566+08:00;True|2024-05-08T11:15:08.3734126+08:00;True|2024-05-07T10:59:04.2016283+08:00;True|2024-05-07T10:58:56.6254107+08:00;True|2024-05-07T10:56:03.7274034+08:00;True|2024-05-07T10:55:53.5496684+08:00;True|2024-05-07T10:55:41.1246352+08:00;True|2024-05-07T09:57:18.3908307+08:00;True|2024-05-06T18:17:15.0427456+08:00;True|2024-05-06T17:38:00.0855585+08:00;True|2024-05-06T14:04:15.4665470+08:00;True|2024-05-06T09:38:06.9447096+08:00;False|2024-05-06T09:37:21.4257032+08:00;</History> + <History>True|2025-02-20T10:12:03.4625245Z;True|2025-02-20T15:24:26.6198459+08:00;True|2025-02-20T15:20:15.0132977+08:00;True|2025-02-13T11:00:50.4202223+08:00;True|2025-02-08T17:31:17.3841999+08:00;True|2025-02-08T17:27:02.1630402+08:00;True|2025-01-25T12:24:10.7702918+08:00;True|2025-01-24T09:10:22.0248945+08:00;True|2025-01-23T10:54:42.2796686+08:00;True|2025-01-22T07:53:29.9931150+08:00;True|2025-01-21T11:37:36.9296374+08:00;True|2025-01-20T10:42:21.8992153+08:00;True|2025-01-20T10:41:30.8562468+08:00;True|2025-01-20T10:36:54.9849821+08:00;True|2025-01-20T10:31:16.0442319+08:00;True|2025-01-13T15:07:40.9182715+08:00;True|2025-01-13T12:08:58.0115763+08:00;True|2025-01-13T12:08:44.3187386+08:00;True|2025-01-13T12:07:41.4659157+08:00;True|2025-01-13T11:53:47.1828627+08:00;True|2025-01-13T11:38:53.6150404+08:00;True|2025-01-13T11:37:14.9075336+08:00;True|2025-01-13T11:35:23.3939940+08:00;True|2025-01-13T11:33:41.6199459+08:00;True|2025-01-13T11:32:15.2734783+08:00;True|2025-01-13T11:30:39.9296756+08:00;True|2025-01-13T11:25:02.3605923+08:00;True|2025-01-13T11:21:03.0110309+08:00;True|2025-01-13T11:17:46.3662069+08:00;True|2025-01-08T09:44:09.5132234+08:00;True|2024-09-03T11:22:43.3813050+08:00;True|2024-09-03T11:06:18.0799295+08:00;True|2024-09-03T10:52:25.3198740+08:00;True|2024-09-02T09:16:17.5197059+08:00;False|2024-09-02T09:08:02.4504522+08:00;True|2024-06-20T12:16:07.3854116+08:00;True|2024-06-18T09:13:21.8960491+08:00;True|2024-06-12T18:55:43.2697624+08:00;True|2024-06-12T18:54:42.2191664+08:00;True|2024-06-12T18:37:39.2735086+08:00;True|2024-06-12T18:32:59.2340941+08:00;True|2024-06-12T18:18:57.9018714+08:00;True|2024-06-12T18:13:13.4471521+08:00;True|2024-06-12T18:11:38.4803257+08:00;True|2024-06-12T18:10:00.3753638+08:00;True|2024-06-12T18:03:08.9521607+08:00;True|2024-06-12T17:59:46.2755740+08:00;True|2024-06-12T17:58:01.8017051+08:00;True|2024-06-12T17:56:20.6946001+08:00;True|2024-06-12T17:32:53.8291604+08:00;True|2024-06-12T17:32:38.6492118+08:00;False|2024-06-12T17:32:17.0260105+08:00;True|2024-06-12T17:08:59.9367775+08:00;True|2024-06-12T16:32:42.3320305+08:00;True|2024-06-07T13:34:17.3014803+08:00;True|2024-06-07T13:20:33.5124438+08:00;True|2024-06-07T10:24:47.0351087+08:00;True|2024-06-05T17:04:55.4017239+08:00;True|2024-06-05T16:05:35.1432805+08:00;True|2024-06-05T15:18:06.1797165+08:00;True|2024-06-05T13:53:59.9366676+08:00;True|2024-06-05T13:43:45.7009774+08:00;True|2024-06-05T13:38:18.1415782+08:00;True|2024-06-05T12:14:05.4745826+08:00;True|2024-06-05T12:10:02.8443283+08:00;True|2024-06-02T18:41:28.5233205+08:00;True|2024-06-02T18:21:27.5679625+08:00;True|2024-06-02T17:34:02.6234679+08:00;True|2024-06-02T16:58:23.9422671+08:00;True|2024-06-02T16:16:43.6949096+08:00;True|2024-06-02T14:44:06.8963915+08:00;True|2024-06-02T11:10:51.5587482+08:00;True|2024-06-01T11:30:39.5033584+08:00;True|2024-05-30T16:29:38.0730664+08:00;True|2024-05-30T15:16:14.5429969+08:00;True|2024-05-29T17:31:27.5349115+08:00;True|2024-05-29T16:49:44.3085849+08:00;True|2024-05-29T10:46:15.3071701+08:00;True|2024-05-28T16:21:22.2987178+08:00;True|2024-05-28T11:55:02.0680294+08:00;True|2024-05-24T09:27:50.0479340+08:00;True|2024-05-23T14:16:32.3824342+08:00;True|2024-05-23T10:51:43.4383910+08:00;True|2024-05-22T11:19:10.1709647+08:00;True|2024-05-22T11:12:47.8835237+08:00;True|2024-05-22T10:43:34.7720709+08:00;True|2024-05-21T17:25:46.9831973+08:00;True|2024-05-21T12:11:55.2774332+08:00;True|2024-05-13T10:32:18.9951394+08:00;True|2024-05-09T09:53:09.1673089+08:00;True|2024-05-08T17:18:58.3017566+08:00;True|2024-05-08T11:15:08.3734126+08:00;True|2024-05-07T10:59:04.2016283+08:00;True|2024-05-07T10:58:56.6254107+08:00;True|2024-05-07T10:56:03.7274034+08:00;True|2024-05-07T10:55:53.5496684+08:00;True|2024-05-07T10:55:41.1246352+08:00;True|2024-05-07T09:57:18.3908307+08:00;True|2024-05-06T18:17:15.0427456+08:00;True|2024-05-06T17:38:00.0855585+08:00;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj b/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj index f7d1c9a..1af1148 100644 --- a/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj +++ b/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Yw.Service.Hydro.Core" Version="5.1.2" /> + <PackageReference Include="Yw.Service.Hydro.Core" Version="5.1.5" /> </ItemGroup> <ItemGroup> diff --git a/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj b/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj index 4bf9f9d..b4b30e7 100644 --- a/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj +++ b/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj @@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="Yw.Geometry.Core" Version="3.3.2" /> - <PackageReference Include="Yw.Service.Hydro.Core" Version="5.1.2" /> + <PackageReference Include="Yw.Service.Hydro.Core" Version="5.1.5" /> </ItemGroup> <ItemGroup> diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/HStation.WinFrmUI.Auth.Core.csproj b/WinFrmUI/HStation.WinFrmUI.Auth.Core/HStation.WinFrmUI.Auth.Core.csproj index 4d4284b..6c4c148 100644 --- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/HStation.WinFrmUI.Auth.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/HStation.WinFrmUI.Auth.Core.csproj @@ -37,7 +37,7 @@ <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="Microsoft.QualityTools.Testing.Fakes" Version="17.5.0-beta.23060.1" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2535.41" /> - <PackageReference Include="Yw.BLL.Auth.Core" Version="3.7.2" /> + <PackageReference Include="Yw.BLL.Auth.Core" Version="3.7.5" /> </ItemGroup> <ItemGroup> diff --git a/WinFrmUI/HStation.WinFrmUI.Common.Core/HStation.WinFrmUI.Common.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Common.Core/HStation.WinFrmUI.Common.Core.csproj.user index 81dca9d..317a8c7 100644 --- a/WinFrmUI/HStation.WinFrmUI.Common.Core/HStation.WinFrmUI.Common.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Common.Core/HStation.WinFrmUI.Common.Core.csproj.user @@ -1,8 +1,2 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Compile Update="UserControl1.cs"> - <SubType>UserControl</SubType> - </Compile> - </ItemGroup> -</Project> \ No newline at end of file +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs index 414812c..20e0f57 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -990,8 +990,18 @@ WaitFormHelper.ShowWaitForm("姝e湪淇濆瓨锛岃绋嶅悗..."); - var bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance + bool bol = false; + + try + { + bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance .Update(_hydroInfo, addParterList, updateParterList, removeParters); + } + catch (Exception ex) + { + XtraMessageBox.Show(ex.Message); + _isSaving = false; + } if (!bol) { diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.Designer.cs index 99e273d..ac9473d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.Designer.cs @@ -31,25 +31,25 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); panelControl1 = new PanelControl(); simulationPumpAnalyChartCtrl1 = new SimulationPumpAnalyChartCtrl(); - hydroWorkingCheckedListHorizCtrl1 = new HydroWorkingCheckedListHorizCtrl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + hydroPumpAnalyWorkingCheckedListCtrl1 = new HydroPumpAnalyWorkingCheckedListCtrl(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)panelControl1).BeginInit(); panelControl1.SuspendLayout(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); - ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); + ((ISupportInitialize)layoutControlItem3).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(hydroPumpAnalyWorkingCheckedListCtrl1); layoutControl1.Controls.Add(panelControl1); - layoutControl1.Controls.Add(hydroWorkingCheckedListHorizCtrl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; @@ -77,13 +77,6 @@ simulationPumpAnalyChartCtrl1.Size = new Size(916, 543); simulationPumpAnalyChartCtrl1.TabIndex = 0; // - // hydroWorkingCheckedListHorizCtrl1 - // - hydroWorkingCheckedListHorizCtrl1.Location = new Point(2, 24); - hydroWorkingCheckedListHorizCtrl1.Name = "hydroWorkingCheckedListHorizCtrl1"; - hydroWorkingCheckedListHorizCtrl1.Size = new Size(922, 35); - hydroWorkingCheckedListHorizCtrl1.TabIndex = 4; - // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; @@ -97,26 +90,13 @@ // layoutControlGroup1 // layoutControlGroup1.GroupStyle = DevExpress.Utils.GroupStyle.Title; - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup1.Size = new Size(926, 60); layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 1); layoutControlGroup1.Text = "宸ュ喌鍒楄〃"; - // - // layoutControlItem1 - // - layoutControlItem1.Control = hydroWorkingCheckedListHorizCtrl1; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.MaxSize = new Size(0, 35); - layoutControlItem1.MinSize = new Size(50, 35); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - layoutControlItem1.Size = new Size(922, 35); - layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; // // layoutControlItem2 // @@ -128,6 +108,26 @@ layoutControlItem2.Spacing = new DevExpress.XtraLayout.Utils.Padding(2, 2, 1, 2); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; + // + // hydroPumpAnalyWorkingCheckedListCtrl1 + // + hydroPumpAnalyWorkingCheckedListCtrl1.Location = new Point(2, 24); + hydroPumpAnalyWorkingCheckedListCtrl1.Name = "hydroPumpAnalyWorkingCheckedListCtrl1"; + hydroPumpAnalyWorkingCheckedListCtrl1.Size = new Size(922, 35); + hydroPumpAnalyWorkingCheckedListCtrl1.TabIndex = 6; + // + // layoutControlItem3 + // + layoutControlItem3.Control = hydroPumpAnalyWorkingCheckedListCtrl1; + layoutControlItem3.Location = new Point(0, 0); + layoutControlItem3.MaxSize = new Size(0, 35); + layoutControlItem3.MinSize = new Size(50, 35); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem3.Size = new Size(922, 35); + layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; // // SimulationPumpAnalyWorkingChartCtrl // @@ -142,20 +142,20 @@ panelControl1.ResumeLayout(false); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); - ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); + ((ISupportInitialize)layoutControlItem3).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; - private HydroWorkingCheckedListHorizCtrl hydroWorkingCheckedListHorizCtrl1; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private PanelControl panelControl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private SimulationPumpAnalyChartCtrl simulationPumpAnalyChartCtrl1; + private HydroPumpAnalyWorkingCheckedListCtrl hydroPumpAnalyWorkingCheckedListCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.cs index 75a8b23..895dcb5 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingChartCtrl.cs @@ -8,7 +8,7 @@ { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); - this.hydroWorkingCheckedListHorizCtrl1.CheckedChangedEvent += HydroWorkingCheckedListHorizCtrl1_CheckedChangedEvent; + this.hydroPumpAnalyWorkingCheckedListCtrl1.CheckedChangedEvent += HydroWorkingCheckedListHorizCtrl1_CheckedChangedEvent; } private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅 @@ -48,7 +48,7 @@ _pumpInfo = pumpInfo; _allWorkingList = allWorkingList; _allCalcuResultDict = allCalcuResultDict; - this.hydroWorkingCheckedListHorizCtrl1.SetBindingData(allWorkingList); + this.hydroPumpAnalyWorkingCheckedListCtrl1.SetBindingData(_pumpInfo, _allCalcuResultDict); this.simulationPumpAnalyChartCtrl1.SetBindingData(hydroInfo, pumpInfo, allCalcuResultDict); } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.Designer.cs index 372ddf9..e0d4919 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.Designer.cs @@ -30,25 +30,25 @@ { layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); simulationPumpAnalyWorkingChartCtrl1 = new SimulationPumpAnalyWorkingChartCtrl(); - hydroPumpListViewCtrl1 = new HydroPumpListViewInWorkingsCtrl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - splitterItem1 = new DevExpress.XtraLayout.SplitterItem(); itemForPumpAnaly = new DevExpress.XtraLayout.LayoutControlItem(); + splitterItem1 = new DevExpress.XtraLayout.SplitterItem(); + hydroPumpAnalyWorkingPumpListCtrl1 = new HydroPumpAnalyWorkingPumpListCtrl(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlGroup1).BeginInit(); - ((ISupportInitialize)layoutControlItem1).BeginInit(); - ((ISupportInitialize)splitterItem1).BeginInit(); ((ISupportInitialize)itemForPumpAnaly).BeginInit(); + ((ISupportInitialize)splitterItem1).BeginInit(); + ((ISupportInitialize)layoutControlItem2).BeginInit(); SuspendLayout(); // // layoutControl1 // + layoutControl1.Controls.Add(hydroPumpAnalyWorkingPumpListCtrl1); layoutControl1.Controls.Add(simulationPumpAnalyWorkingChartCtrl1); - layoutControl1.Controls.Add(hydroPumpListViewCtrl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; @@ -65,13 +65,6 @@ simulationPumpAnalyWorkingChartCtrl1.Size = new Size(815, 557); simulationPumpAnalyWorkingChartCtrl1.TabIndex = 10; // - // hydroPumpListViewCtrl1 - // - hydroPumpListViewCtrl1.Location = new Point(2, 24); - hydroPumpListViewCtrl1.Name = "hydroPumpListViewCtrl1"; - hydroPumpListViewCtrl1.Size = new Size(192, 531); - hydroPumpListViewCtrl1.TabIndex = 9; - // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; @@ -85,29 +78,12 @@ // layoutControlGroup1 // layoutControlGroup1.GroupStyle = DevExpress.Utils.GroupStyle.Title; - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "layoutControlGroup1"; layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); layoutControlGroup1.Size = new Size(196, 557); layoutControlGroup1.Text = "姘存车鍒楄〃"; - // - // layoutControlItem1 - // - layoutControlItem1.Control = hydroPumpListViewCtrl1; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - layoutControlItem1.Size = new Size(192, 531); - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; - // - // splitterItem1 - // - splitterItem1.AllowHotTrack = true; - splitterItem1.Location = new Point(196, 0); - splitterItem1.Name = "splitterItem1"; - splitterItem1.Size = new Size(10, 557); // // itemForPumpAnaly // @@ -118,6 +94,30 @@ itemForPumpAnaly.Size = new Size(815, 557); itemForPumpAnaly.TextSize = new Size(0, 0); itemForPumpAnaly.TextVisible = false; + // + // splitterItem1 + // + splitterItem1.AllowHotTrack = true; + splitterItem1.Location = new Point(196, 0); + splitterItem1.Name = "splitterItem1"; + splitterItem1.Size = new Size(10, 557); + // + // hydroPumpAnalyWorkingPumpListCtrl1 + // + hydroPumpAnalyWorkingPumpListCtrl1.Location = new Point(2, 24); + hydroPumpAnalyWorkingPumpListCtrl1.Name = "hydroPumpAnalyWorkingPumpListCtrl1"; + hydroPumpAnalyWorkingPumpListCtrl1.Size = new Size(192, 531); + hydroPumpAnalyWorkingPumpListCtrl1.TabIndex = 11; + // + // layoutControlItem2 + // + layoutControlItem2.Control = hydroPumpAnalyWorkingPumpListCtrl1; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem2.Size = new Size(192, 531); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; // // SimulationPumpAnalyWorkingCtrl // @@ -130,22 +130,22 @@ layoutControl1.ResumeLayout(false); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlGroup1).EndInit(); - ((ISupportInitialize)layoutControlItem1).EndInit(); - ((ISupportInitialize)splitterItem1).EndInit(); ((ISupportInitialize)itemForPumpAnaly).EndInit(); + ((ISupportInitialize)splitterItem1).EndInit(); + ((ISupportInitialize)layoutControlItem2).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; - private HydroPumpListViewInWorkingsCtrl hydroPumpListViewCtrl1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.SplitterItem splitterItem1; private SimulationPumpAnalyChartCtrl simulationPumpAnalyChartCtrl1; private SimulationPumpAnalyWorkingChartCtrl simulationPumpAnalyWorkingChartCtrl1; private DevExpress.XtraLayout.LayoutControlItem itemForPumpAnaly; + private HydroPumpAnalyWorkingPumpListCtrl hydroPumpAnalyWorkingPumpListCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.cs index ec2ab4e..8dbaf2d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/10-pump-analy/SimulationPumpAnalyWorkingCtrl.cs @@ -9,11 +9,11 @@ { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); - this.hydroPumpListViewCtrl1.SelectedChangedEvent += HydroPumpListViewCtrl1_SelectedChangedEvent; + this.hydroPumpAnalyWorkingPumpListCtrl1.SelectedChangedEvent += HydroPumpListViewCtrl1_SelectedChangedEvent; } private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅 - private Yw.Model.HydroPumpInfo _pumpInfo = null;//姘存车淇″績 + private Yw.Model.HydroPumpInfo _pumpInfo = null;//姘存车淇℃伅 private List<HydroWorkingVmo> _allWorkingList = null;//鎵�鏈夊伐鍐靛垪琛� private Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> _allCalcuResultDict = null;//璁$畻缁撴灉瀛楀吀 @@ -49,7 +49,7 @@ _allCalcuResultDict.Add(working, vm); } } - this.hydroPumpListViewCtrl1.SetBindingData(_hydroInfo, allWorkingList); + this.hydroPumpAnalyWorkingPumpListCtrl1.SetBindingData(_hydroInfo, _allCalcuResultDict); } //姘存车閫夋嫨鏀瑰彉 diff --git a/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj b/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj index 9e81d31..86f40ad 100644 --- a/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj +++ b/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj @@ -23,7 +23,7 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> - <PackageReference Include="Yw.BLL.Auth.Core" Version="3.7.2" /> + <PackageReference Include="Yw.BLL.Auth.Core" Version="3.7.5" /> </ItemGroup> <ItemGroup> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/08-checked/HydroWorkingCheckedListHorizCtrl.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/08-checked/HydroWorkingCheckedListHorizCtrl.Designer.cs index aa004d0..b834302 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/08-checked/HydroWorkingCheckedListHorizCtrl.Designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/08-checked/HydroWorkingCheckedListHorizCtrl.Designer.cs @@ -38,6 +38,7 @@ // checkedListBoxControl1 // checkedListBoxControl1.CheckMember = "Checked"; + checkedListBoxControl1.CheckOnClick = true; checkedListBoxControl1.DataSource = hydroWorkingCheckedListItemViewModelBindingSource; checkedListBoxControl1.DisplayMember = "Name"; checkedListBoxControl1.Dock = DockStyle.Fill; @@ -45,6 +46,7 @@ checkedListBoxControl1.Location = new Point(0, 0); checkedListBoxControl1.MultiColumn = true; checkedListBoxControl1.Name = "checkedListBoxControl1"; + checkedListBoxControl1.SelectionMode = SelectionMode.None; checkedListBoxControl1.ShowFocusRect = false; checkedListBoxControl1.Size = new Size(573, 123); checkedListBoxControl1.TabIndex = 0; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingCheckedListItemViewModel.datasource b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingCheckedListItemViewModel.datasource new file mode 100644 index 0000000..e2e8404 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingCheckedListItemViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="HydroPumpAnalyWorkingCheckedListItemViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>Yw.WinFrmUI.HydroPumpAnalyWorkingCheckedListItemViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingPumpListItemViewModel.datasource b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingPumpListItemViewModel.datasource new file mode 100644 index 0000000..51defff --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroPumpAnalyWorkingPumpListItemViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="HydroPumpAnalyWorkingPumpListItemViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>Yw.WinFrmUI.HydroPumpAnalyWorkingPumpListItemViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj index c59c531..be0ce2a 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj @@ -57,7 +57,7 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="Yw.BLL.Basic.Core" Version="3.3.7" /> - <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.9.6" /> + <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.9.9" /> <PackageReference Include="Yw.Pump.Core" Version="3.2.4" /> </ItemGroup> @@ -451,6 +451,12 @@ <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> + <Compile Update="pump-analy\02-working\HydroPumpAnalyWorkingCheckedListCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="pump-analy\02-working\HydroPumpAnalyWorkingPumpListCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> </ItemGroup> <ItemGroup> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.Designer.cs new file mode 100644 index 0000000..3e2a2e0 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.Designer.cs @@ -0,0 +1,78 @@ +锘縩amespace Yw.WinFrmUI +{ + partial class HydroPumpAnalyWorkingCheckedListCtrl + { + /// <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(); + checkedListBoxControl1 = new DevExpress.XtraEditors.CheckedListBoxControl(); + hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource = new BindingSource(components); + ((ISupportInitialize)checkedListBoxControl1).BeginInit(); + ((ISupportInitialize)hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource).BeginInit(); + SuspendLayout(); + // + // checkedListBoxControl1 + // + checkedListBoxControl1.CheckMember = "Checked"; + checkedListBoxControl1.CheckOnClick = true; + checkedListBoxControl1.DataSource = hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource; + checkedListBoxControl1.DisplayMember = "Name"; + checkedListBoxControl1.Dock = DockStyle.Fill; + checkedListBoxControl1.ItemHeight = 25; + checkedListBoxControl1.Location = new Point(0, 0); + checkedListBoxControl1.MultiColumn = true; + checkedListBoxControl1.Name = "checkedListBoxControl1"; + checkedListBoxControl1.SelectionMode = SelectionMode.None; + checkedListBoxControl1.ShowFocusRect = false; + checkedListBoxControl1.Size = new Size(573, 123); + checkedListBoxControl1.TabIndex = 0; + checkedListBoxControl1.ValueMember = "Id"; + checkedListBoxControl1.ItemCheck += checkedListBoxControl1_ItemCheck; + checkedListBoxControl1.GetItemEnabled += checkedListBoxControl1_GetItemEnabled; + // + // hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource + // + hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource.DataSource = typeof(HydroPumpAnalyWorkingCheckedListItemViewModel); + // + // HydroPumpAnalyWorkingCheckedListCtrl + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(checkedListBoxControl1); + Name = "HydroPumpAnalyWorkingCheckedListCtrl"; + Size = new Size(573, 123); + ((ISupportInitialize)checkedListBoxControl1).EndInit(); + ((ISupportInitialize)hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraEditors.CheckedListBoxControl checkedListBoxControl1; + private BindingSource hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource; + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.cs new file mode 100644 index 0000000..4299bc6 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.cs @@ -0,0 +1,90 @@ +锘縰sing DevExpress.XtraEditors.Controls; +using System.Data; +using Yw.Geometry; + +namespace Yw.WinFrmUI +{ + public partial class HydroPumpAnalyWorkingCheckedListCtrl : DevExpress.XtraEditors.XtraUserControl + { + public HydroPumpAnalyWorkingCheckedListCtrl() + { + InitializeComponent(); + } + + /// <summary> + /// 閫夋嫨鏀瑰彉浜嬩欢 + /// </summary> + public event Action<List<HydroWorkingVmo>> CheckedChangedEvent; + + private Yw.Model.HydroPumpInfo _pump = null;//姘存车淇℃伅 + private Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> _allCalcuResultDict = null;//璁$畻缁撴灉瀛楀吀 + private BindingList<HydroPumpAnalyWorkingCheckedListItemViewModel> _allBindingList = null;//鎵�鏈夌粦瀹氬垪琛� + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData + ( + Yw.Model.HydroPumpInfo pump, + Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> allCalcuResultDict + ) + { + if (pump == null) + { + return; + } + if (allCalcuResultDict == null || allCalcuResultDict.Count < 1) + { + return; + } + + _pump = pump; + _allCalcuResultDict = allCalcuResultDict; + + _allBindingList = new BindingList<HydroPumpAnalyWorkingCheckedListItemViewModel>(); + foreach (var kpv in allCalcuResultDict) + { + var item = new HydroPumpAnalyWorkingCheckedListItemViewModel(kpv.Key, pump, kpv.Value); + _allBindingList.Add(item); + } + this.hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource.DataSource = _allBindingList; + this.hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource.ResetBindings(false); + } + + /// <summary> + /// 鑾峰彇閫夋嫨宸ュ喌鍒楄〃 + /// </summary> + public List<HydroWorkingVmo> GetWorkingCheckedList() + { + return _allBindingList?.Where(x => x.Checked).Select(x => x.Vmo).ToList(); + } + + //閫夋嫨鏀瑰彉 + private void checkedListBoxControl1_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e) + { + var list = GetWorkingCheckedList(); + this.CheckedChangedEvent?.Invoke(list); + } + + //鑾峰彇椤瑰彲鐢ㄦ�� + private void checkedListBoxControl1_GetItemEnabled(object sender, GetItemEnabledEventArgs e) + { + if (_allBindingList == null || _allBindingList.Count < 1) + { + return; + } + if (e.Index < 0) + { + return; + } + if (e.Index > _allBindingList.Count - 1) + { + return; + } + var item = _allBindingList[e.Index]; + e.Enabled = item.Enabled; + } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.resx b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.resx new file mode 100644 index 0000000..6771dc2 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListCtrl.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="hydroPumpAnalyWorkingCheckedListItemViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListItemViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListItemViewModel.cs new file mode 100644 index 0000000..0599709 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingCheckedListItemViewModel.cs @@ -0,0 +1,78 @@ +锘縩amespace Yw.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class HydroPumpAnalyWorkingCheckedListItemViewModel + { + /// <summary> + /// + /// </summary> + public HydroPumpAnalyWorkingCheckedListItemViewModel() { } + + /// <summary> + /// + /// </summary> + public HydroPumpAnalyWorkingCheckedListItemViewModel + ( + Yw.Vmo.HydroWorkingVmo rhs, + Yw.Model.HydroPumpInfo pump, + HydroPumpAnalyViewModel vm + ) + { + this.Id = rhs.ID.ToString(); + this.Name = rhs.Name; + this.Checked = true; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.Vmo = rhs; + var pumpInfo = vm.Items.Find(x => x.Code == pump.Code); + if (pumpInfo.LinkStatus == Yw.Hydro.LinkStatus.Open) + { + this.Enabled = true; + } + else + { + this.Enabled = false; + this.Checked = false; + } + } + + /// <summary> + /// Id + /// </summary> + public string Id { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 閫夋嫨 + /// </summary> + public bool Checked { get; set; } + + /// <summary> + /// 鍚敤 + /// </summary> + public bool Enabled { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// + /// </summary> + public Yw.Vmo.HydroWorkingVmo Vmo { get; set; } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.Designer.cs new file mode 100644 index 0000000..5d5b6b6 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.Designer.cs @@ -0,0 +1,188 @@ +锘縩amespace Yw.WinFrmUI +{ + partial class HydroPumpAnalyWorkingPumpListCtrl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new Container(); + DevExpress.XtraEditors.TableLayout.ItemTemplateBase itemTemplateBase1 = new DevExpress.XtraEditors.TableLayout.ItemTemplateBase(); + DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition1 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); + DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition2 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); + DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition3 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); + DevExpress.XtraEditors.TableLayout.TemplatedItemElement templatedItemElement1 = new DevExpress.XtraEditors.TableLayout.TemplatedItemElement(); + DevExpress.XtraEditors.TableLayout.TemplatedItemElement templatedItemElement2 = new DevExpress.XtraEditors.TableLayout.TemplatedItemElement(); + DevExpress.XtraEditors.TableLayout.TemplatedItemElement templatedItemElement3 = new DevExpress.XtraEditors.TableLayout.TemplatedItemElement(); + DevExpress.XtraEditors.TableLayout.TableRowDefinition tableRowDefinition1 = new DevExpress.XtraEditors.TableLayout.TableRowDefinition(); + imageListBoxControl1 = new DevExpress.XtraEditors.ImageListBoxControl(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + itemForGroup = new DevExpress.XtraLayout.LayoutControlItem(); + hydroPumpAnalyWorkingPumpListItemViewModelBindingSource = new BindingSource(components); + ((ISupportInitialize)imageListBoxControl1).BeginInit(); + ((ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); + ((ISupportInitialize)Root).BeginInit(); + ((ISupportInitialize)layoutControlItem1).BeginInit(); + ((ISupportInitialize)itemForGroup).BeginInit(); + ((ISupportInitialize)hydroPumpAnalyWorkingPumpListItemViewModelBindingSource).BeginInit(); + SuspendLayout(); + // + // imageListBoxControl1 + // + imageListBoxControl1.DataSource = hydroPumpAnalyWorkingPumpListItemViewModelBindingSource; + imageListBoxControl1.ItemHeight = 34; + imageListBoxControl1.Location = new Point(0, 21); + imageListBoxControl1.Name = "imageListBoxControl1"; + imageListBoxControl1.Size = new Size(218, 520); + imageListBoxControl1.StyleController = layoutControl1; + imageListBoxControl1.TabIndex = 0; + tableColumnDefinition1.Length.Type = DevExpress.XtraEditors.TableLayout.TableDefinitionLengthType.Pixel; + tableColumnDefinition1.Length.Value = 32D; + tableColumnDefinition2.Length.Type = DevExpress.XtraEditors.TableLayout.TableDefinitionLengthType.Pixel; + tableColumnDefinition2.Length.Value = 116D; + tableColumnDefinition3.Length.Type = DevExpress.XtraEditors.TableLayout.TableDefinitionLengthType.Pixel; + tableColumnDefinition3.Length.Value = 107D; + itemTemplateBase1.Columns.Add(tableColumnDefinition1); + itemTemplateBase1.Columns.Add(tableColumnDefinition2); + itemTemplateBase1.Columns.Add(tableColumnDefinition3); + templatedItemElement1.ColumnIndex = 1; + templatedItemElement1.FieldName = "Name"; + templatedItemElement1.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter; + templatedItemElement1.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside; + templatedItemElement1.Text = "Name"; + templatedItemElement1.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft; + templatedItemElement1.TextLocation = new Point(10, 0); + templatedItemElement2.Appearance.Normal.ForeColor = Color.Silver; + templatedItemElement2.Appearance.Normal.Options.UseForeColor = true; + templatedItemElement2.ColumnIndex = 2; + templatedItemElement2.FieldName = "RatedHz"; + templatedItemElement2.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter; + templatedItemElement2.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside; + templatedItemElement2.Text = "RatedHz"; + templatedItemElement2.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft; + templatedItemElement3.FieldName = "Image"; + templatedItemElement3.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter; + templatedItemElement3.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside; + templatedItemElement3.Text = "Image"; + templatedItemElement3.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter; + itemTemplateBase1.Elements.Add(templatedItemElement1); + itemTemplateBase1.Elements.Add(templatedItemElement2); + itemTemplateBase1.Elements.Add(templatedItemElement3); + itemTemplateBase1.Name = "template1"; + itemTemplateBase1.Rows.Add(tableRowDefinition1); + imageListBoxControl1.Templates.Add(itemTemplateBase1); + imageListBoxControl1.SelectedValueChanged += imageListBoxControl1_SelectedValueChanged; + // + // layoutControl1 + // + layoutControl1.Controls.Add(imageComboBoxEdit1); + layoutControl1.Controls.Add(imageListBoxControl1); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(218, 541); + layoutControl1.TabIndex = 1; + layoutControl1.Text = "layoutControl1"; + // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + imageComboBoxEdit1.Size = new Size(218, 20); + imageComboBoxEdit1.StyleController = layoutControl1; + imageComboBoxEdit1.TabIndex = 4; + imageComboBoxEdit1.SelectedValueChanged += imageComboBoxEdit1_SelectedValueChanged; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, itemForGroup }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(218, 541); + Root.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.Control = imageListBoxControl1; + layoutControlItem1.Location = new Point(0, 21); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem1.Size = new Size(218, 520); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // itemForGroup + // + itemForGroup.Control = imageComboBoxEdit1; + itemForGroup.Location = new Point(0, 0); + itemForGroup.Name = "itemForGroup"; + itemForGroup.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 1); + itemForGroup.Size = new Size(218, 21); + itemForGroup.Text = "鍒嗙粍:"; + itemForGroup.TextSize = new Size(0, 0); + itemForGroup.TextVisible = false; + // + // hydroPumpAnalyWorkingPumpListItemViewModelBindingSource + // + hydroPumpAnalyWorkingPumpListItemViewModelBindingSource.DataSource = typeof(HydroPumpAnalyWorkingPumpListItemViewModel); + // + // HydroPumpAnalyWorkingPumpListCtrl + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(layoutControl1); + Name = "HydroPumpAnalyWorkingPumpListCtrl"; + Size = new Size(218, 541); + ((ISupportInitialize)imageListBoxControl1).EndInit(); + ((ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); + ((ISupportInitialize)Root).EndInit(); + ((ISupportInitialize)layoutControlItem1).EndInit(); + ((ISupportInitialize)itemForGroup).EndInit(); + ((ISupportInitialize)hydroPumpAnalyWorkingPumpListItemViewModelBindingSource).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraEditors.ImageListBoxControl imageListBoxControl1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem itemForGroup; + private BindingSource hydroPumpAnalyWorkingPumpListItemViewModelBindingSource; + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.cs new file mode 100644 index 0000000..3770355 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.cs @@ -0,0 +1,113 @@ +锘縰sing DevExpress.Pdf.Native; +using DevExpress.Xpo.Helpers; +using DevExpress.XtraEditors.Controls; +using System.Data; + +namespace Yw.WinFrmUI +{ + public partial class HydroPumpAnalyWorkingPumpListCtrl : DevExpress.XtraEditors.XtraUserControl + { + public HydroPumpAnalyWorkingPumpListCtrl() + { + InitializeComponent(); + this.layoutControl1.SetupLayoutControl(); + } + + /// <summary> + /// 閫夋嫨鏀瑰彉浜嬩欢 + /// </summary> + public event Action<Yw.Model.HydroPumpInfo> SelectedChangedEvent; + + private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅 + Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> _allCalcuResultDict = null;//璁$畻缁撴灉瀛楀吀 + private List<HydroPumpAnalyWorkingPumpListItemViewModel> _allList = null;//鎵�鏈夊垪琛� + private List<HydroPumpAnalyWorkingPumpListItemViewModel> _allBindingList = null;//鎵�鏈夌粦瀹氬垪琛� + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData + ( + Yw.Model.HydroModelInfo hydroInfo, + Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> allCalcuResultDict + ) + { + if (hydroInfo == null) + { + return; + } + if (allCalcuResultDict == null || allCalcuResultDict.Count < 1) + { + return; + } + _hydroInfo = hydroInfo; + _allCalcuResultDict = allCalcuResultDict; + var allList = hydroInfo.Pumps?.Select(x => new HydroPumpAnalyWorkingPumpListItemViewModel(x, allCalcuResultDict)).ToList(); + SetBindingData(allList); + } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(List<HydroPumpAnalyWorkingPumpListItemViewModel> allList) + { + if (allList == null || allList.Count < 1) + { + return; + } + InitialGroups(allList); + } + + //鍒濆鍖栨墍鏈夊垎缁� + private void InitialGroups(List<HydroPumpAnalyWorkingPumpListItemViewModel> allList) + { + _allList = allList?.ToList(); + var groups = _allList?.Select(x => x.BeginGroup).Distinct().ToList(); + this.itemForGroup.Visibility = groups != null && groups.Count > 1 ? DevExpress.XtraLayout.Utils.LayoutVisibility.Always + : DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + this.imageComboBoxEdit1.Properties.BeginUpdate(); + this.imageComboBoxEdit1.Properties.Items.Clear(); + groups?.ForEach(x => + { + this.imageComboBoxEdit1.Properties.Items.Add(x, x, -1); + }); + this.imageComboBoxEdit1.SelectedIndex = groups != null && groups.Count > 0 ? 0 : -1; + this.imageComboBoxEdit1.Properties.EndUpdate(); + } + + //鍒嗙粍閫夋嫨鏀瑰彉 + private void imageComboBoxEdit1_SelectedValueChanged(object sender, EventArgs e) + { + var item = this.imageComboBoxEdit1.SelectedItem as ImageComboBoxItem; + if (item == null) + { + return; + } + _allBindingList = _allList?.Where(x => x.BeginGroup == item.Value?.ToString()).ToList(); + if (_allBindingList == null) + { + _allBindingList = new List<HydroPumpAnalyWorkingPumpListItemViewModel>(); + } + this.hydroPumpAnalyWorkingPumpListItemViewModelBindingSource.DataSource = _allBindingList; + this.hydroPumpAnalyWorkingPumpListItemViewModelBindingSource.ResetBindings(false); + } + + //閫夋嫨鏀瑰彉 + private void imageListBoxControl1_SelectedValueChanged(object sender, EventArgs e) + { + if (_allBindingList == null || _allBindingList.Count < 1) + { + return; + } + var item = this.imageListBoxControl1.SelectedItem; + var pump = item as HydroPumpAnalyWorkingPumpListItemViewModel; + if (pump == null) + { + return; + } + this.SelectedChangedEvent?.Invoke(pump.Vmo); + } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.resx b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.resx new file mode 100644 index 0000000..a9bbd99 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListCtrl.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="hydroPumpAnalyWorkingPumpListItemViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>43, 32</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListItemViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListItemViewModel.cs new file mode 100644 index 0000000..8408879 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/pump-analy/02-working/HydroPumpAnalyWorkingPumpListItemViewModel.cs @@ -0,0 +1,94 @@ +锘縰sing DevExpress.XtraSpreadsheet.Export; + +namespace Yw.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public class HydroPumpAnalyWorkingPumpListItemViewModel + { + /// <summary> + /// + /// </summary> + public HydroPumpAnalyWorkingPumpListItemViewModel() { } + + /// <summary> + /// + /// </summary> + public HydroPumpAnalyWorkingPumpListItemViewModel + ( + Yw.Model.HydroPumpInfo rhs, + Dictionary<HydroWorkingVmo, HydroPumpAnalyViewModel> allCalcuResultDict + ) + { + this.BeginGroup = string.IsNullOrEmpty(rhs.BeginGroup) ? string.Empty : rhs.BeginGroup; + this.Name = rhs.Name; + this.Code = rhs.Code; + this.RatedHz = $"{rhs.RatedHz}hz"; + this.LinkStatus = Yw.Hydro.PumpStatus.Closed; + if (allCalcuResultDict != null && allCalcuResultDict.Count > 0) + { + var list = allCalcuResultDict.Values.ToList(); + if (list.Exists(x => x.Items != null && x.Items.Exists(t => t.Code == rhs.Code && t.LinkStatus == Yw.Hydro.PumpStatus.Open))) + { + this.LinkStatus = Yw.Hydro.PumpStatus.Open; + } + } + this.Description = rhs.Description; + this.Vmo = rhs; + } + + /// <summary> + /// 鍒嗙粍 + /// </summary> + public string BeginGroup { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 缂栫爜 + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 棰濆畾棰戠巼 + /// </summary> + public string RatedHz { get; set; } + + /// <summary> + /// 杩愯鐘舵�� + /// </summary> + public string LinkStatus { get; set; } + + /// <summary> + /// 鍥剧墖 + /// </summary> + public Image Image + { + get + { + if (this.LinkStatus == Yw.Hydro.PumpStatus.Open) + { + return Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_run_32; + } + return Yw.WinFrmUI.Hydro.Core.Properties.Resources.pump_shut_32; + } + } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + /// <summary> + /// vmo + /// </summary> + public Yw.Model.HydroPumpInfo Vmo { get; set; } + + + + } +} -- Gitblit v1.9.3