From 554694000f4d7ffc231a23e7ff429595c254ceaa Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 07 八月 2024 17:41:14 +0800 Subject: [PATCH] 辅助功能添加 --- IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs | 19 Test/IStation.Win.View/Core/Extend/TileControlExtensions.cs | 58 Test/IStation.Win.View/Core/Extend/ListBoxControlExtend.cs | 13 Temp.txt | 1 Test/IStation.Win.View/Core/Extend/DateEditExtend.cs | 81 Test/IStation.Win.View/Core/Extend/LayoutControlExtensions.cs | 21 Test/IStation.Win.View/IStation.Win.View.csproj | 31 Test/IStation.Win.View/Core/Extend/GridViewExtend.cs | 590 ++++++ Test/IStation.Win.View/Core/Wait/WaitFormStyle2.cs | 53 Test/IStation.Win.View/Core/Extend/ControlExtend.cs | 29 Test/IStation.Win.View/Core/Extend/TextEditExtend.cs | 21 Test/IStation.Win.View/Core/Extend/XtraChartHelper.cs | 96 + Test/IStation.Win.View/Core/Wait/WaitFormStyle2.resx | 120 + IStation.Service/IStation.Service.csproj | 2 IStation.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user | 2 Test/IStation.Win.View/Core/Extend/ControlNavigatorExtend.cs | 37 Test/IStation.Win.View/Core/Extend/XtraFormExtend.cs | 13 Test/IStation.Win.View/Core/Extend/RibbonControlExtend.cs | 24 Test/IStation.Win.View/Core/Extend/BandGridViewExtend.cs | 23 Test/IStation.Win.View/Core/Extend/MessageBoxShow.cs | 49 Test/IStation.Win.View/Core/Wait/WaitFrmHelper.cs | 147 + Test/IStation.Win.View/View/RealTimeZyScadaView.Designer.cs | 1361 ++++++++++++++ IStation.Service/07-global/GlobalHelper.cs | 38 Test/IStation.Win.View/viweMian.resx | 120 + IStation.Schedule.sln | 13 Test/IStation.Win.View/ViewModel/RealTimeZyScadaViewModel - 复制.cs | 260 ++ Test/IStation.Win.View/Core/Extend/ButtonEditExtend.cs | 64 Test/IStation.Win.View/viweMian.Designer.cs | 132 + Test/IStation.Win.View/Core/Wait/WaitFormStyle1.Designer.cs | 120 + Test/IStation.Win.View/Core/Extend/TokenEditExtend.cs | 28 Test/IStation.Win.View/Core/Wait/WaitFormStyle2.designer.cs | 129 + Test/IStation.Win.View/View/RealTimeZyScadaView.cs | 439 ++++ Test/IStation.Win.View/App.config | 48 Test/IStation.Win.View/IStation.Win.View.csproj.user | 12 Test/IStation.Win.View/Core/Extend/LookUpEditExtend.cs | 27 Test/IStation.Win.View/Core/Extend/FormExtend.cs | 46 Test/IStation.Win.View/Core/Extend/DevHelper.cs | 18 Test/IStation.Win.View/ViewModel/RealTimePumpScheduleViewModel.cs | 62 Test/IStation.Win.View/Core/Extend/ExtensionsDev.cs | 249 ++ Test/IStation.Win.View/ViewModel/RealTimePumpScadaViewModel.cs | 48 Test/IStation.Win.View/Core/Wait/OverlayHelper.cs | 25 Test/IStation.Win.View/viweMian.cs | 23 Test/IStation.Win.View/Core/Extend/TreeListExtend.cs | 287 +++ Test/IStation.Win.View/Core/Wait/eSplashScreenCommand.cs | 8 Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScheduleViewModel.datasource | 10 Test/IStation.Win.View/View/RealTimeZyScadaView.resx | 132 + Test/IStation.Win.View/Core/Extend/SearchLookUpEditExtend.cs | 28 Test/IStation.Win.View/Core/Extend/ClassUpdateVailDataHelper.cs | 100 + Test/IStation.Win.View/Core/Extend/GridContorlExtend.cs | 55 /dev/null | 68 Test/IStation.Win.View/Core/Wait/WaitFormStyle1.resx | 120 + Test/IStation.Win.View/Core/Extend/ImageExtend.cs | 35 Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScadaViewModel.datasource | 10 Test/IStation.Win.View/Core/Wait/WaitFormStyle1.cs | 55 Test/IStation.Win.View/Program.cs | 66 55 files changed, 5,586 insertions(+), 80 deletions(-) diff --git a/IStation.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user b/IStation.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user index 6e85d81..aabe630 100644 --- a/IStation.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/IStation.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ <Project> <PropertyGroup> <_PublishTargetUrl>D:\WorkCode\IStation\Service.Ch.V1.1\IStation.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl> - <History>True|2024-08-05T02:03:03.1020499Z||;True|2024-08-05T10:00:42.1282571+08:00||;True|2024-08-01T17:23:11.3983389+08:00||;True|2024-08-01T17:22:31.0342192+08:00||;True|2024-08-01T17:20:38.4331763+08:00||;True|2024-07-25T13:35:25.1478492+08:00||;True|2024-07-16T17:39:33.3835168+08:00||;True|2024-07-16T17:14:00.9398568+08:00||;False|2024-07-16T17:13:27.9996953+08:00||;True|2024-07-16T13:09:16.9500768+08:00||;True|2024-07-15T12:48:47.2966278+08:00||;False|2024-07-15T12:48:32.1828646+08:00||;True|2024-07-12T16:40:50.3694799+08:00||;True|2024-07-12T10:40:34.0007726+08:00||;True|2024-07-12T10:36:32.4601011+08:00||;True|2024-07-12T10:33:14.3243625+08:00||;True|2024-07-11T14:10:11.4665289+08:00||;True|2024-07-11T14:08:13.0064903+08:00||;True|2024-07-11T14:06:32.4662645+08:00||;True|2024-07-09T09:51:25.7986637+08:00||;False|2024-07-09T09:50:56.5778877+08:00||;False|2024-07-09T09:50:23.0123211+08:00||;True|2024-06-26T16:20:21.3981649+08:00||;False|2024-06-26T16:19:59.2162840+08:00||;True|2024-06-26T15:20:17.9242271+08:00||;True|2024-06-19T15:01:43.3271769+08:00||;True|2024-06-18T09:51:50.4178295+08:00||;True|2024-06-18T09:41:19.5989782+08:00||;True|2024-06-18T09:41:10.7867036+08:00||;True|2024-06-18T09:38:57.0128861+08:00||;True|2024-06-17T15:22:17.6153518+08:00||;False|2024-06-17T15:22:01.3404718+08:00||;True|2024-06-13T11:15:55.4873247+08:00||;True|2024-06-13T11:14:52.9075916+08:00||;True|2024-06-13T10:09:13.5966875+08:00||;True|2024-06-13T09:58:26.1880685+08:00||;True|2024-06-13T09:49:29.6928004+08:00||;True|2024-06-13T09:46:16.2707476+08:00||;True|2024-05-30T14:57:39.3412922+08:00||;True|2024-05-30T11:59:44.7664433+08:00||;True|2024-05-30T11:53:59.9799057+08:00||;True|2024-05-30T11:21:35.4761141+08:00||;True|2024-05-30T11:16:55.6157765+08:00||;True|2024-05-30T11:07:45.8336241+08:00||;True|2024-05-30T10:59:58.8877118+08:00||;True|2024-05-30T10:36:09.0290592+08:00||;True|2024-05-30T10:35:17.5448779+08:00||;True|2024-05-27T17:06:29.6833574+08:00||;False|2024-05-27T17:06:07.6398727+08:00||;False|2024-05-27T17:05:20.1523960+08:00||;False|2024-05-27T17:05:04.1140399+08:00||;False|2024-05-27T17:04:44.5872009+08:00||;True|2024-05-11T15:21:00.4779174+08:00||;True|2024-04-23T10:14:25.7074885+08:00||;True|2024-04-22T16:37:12.5852855+08:00||;True|2024-04-22T16:34:52.0894541+08:00||;True|2024-04-19T10:53:01.1630050+08:00||;True|2024-04-19T10:52:02.7021209+08:00||;True|2024-03-30T11:56:28.7775554+08:00||;True|2024-03-13T14:48:09.8998210+08:00||;True|2024-03-13T14:47:27.2433264+08:00||;True|2023-12-25T14:14:16.4083227+08:00||;True|2023-11-16T13:48:01.0622937+08:00||;True|2023-10-18T11:32:08.8356991+08:00||;False|2023-10-18T11:29:58.5783437+08:00||;True|2023-10-16T10:41:58.8456599+08:00||;False|2023-10-16T10:30:14.3272745+08:00||;True|2023-09-11T14:56:16.8635396+08:00||;True|2023-08-31T14:48:56.6882268+08:00||;True|2023-08-31T14:42:46.1818009+08:00||;True|2023-08-31T14:35:48.5604752+08:00||;True|2023-08-08T11:38:41.3309044+08:00||;True|2023-07-28T11:00:59.6697086+08:00||;True|2023-07-18T14:39:48.3496234+08:00||;True|2023-07-17T17:38:55.8911210+08:00||;True|2023-07-17T11:57:31.1164907+08:00||;True|2023-07-17T10:00:17.1961455+08:00||;True|2023-07-13T16:04:03.6854523+08:00||;True|2023-07-11T09:58:12.2295644+08:00||;True|2023-06-26T11:38:29.6648988+08:00||;True|2023-06-21T16:17:40.6226554+08:00||;True|2023-06-21T13:30:18.8163322+08:00||;True|2023-06-21T13:19:43.9290154+08:00||;True|2023-06-21T11:35:28.3376504+08:00||;</History> + <History>True|2024-08-07T02:34:56.6363692Z||;True|2024-08-07T10:23:23.5959249+08:00||;True|2024-08-07T10:18:55.3553323+08:00||;True|2024-08-05T10:03:03.1020499+08:00||;True|2024-08-05T10:00:42.1282571+08:00||;True|2024-08-01T17:23:11.3983389+08:00||;True|2024-08-01T17:22:31.0342192+08:00||;True|2024-08-01T17:20:38.4331763+08:00||;True|2024-07-25T13:35:25.1478492+08:00||;True|2024-07-16T17:39:33.3835168+08:00||;True|2024-07-16T17:14:00.9398568+08:00||;False|2024-07-16T17:13:27.9996953+08:00||;True|2024-07-16T13:09:16.9500768+08:00||;True|2024-07-15T12:48:47.2966278+08:00||;False|2024-07-15T12:48:32.1828646+08:00||;True|2024-07-12T16:40:50.3694799+08:00||;True|2024-07-12T10:40:34.0007726+08:00||;True|2024-07-12T10:36:32.4601011+08:00||;True|2024-07-12T10:33:14.3243625+08:00||;True|2024-07-11T14:10:11.4665289+08:00||;True|2024-07-11T14:08:13.0064903+08:00||;True|2024-07-11T14:06:32.4662645+08:00||;True|2024-07-09T09:51:25.7986637+08:00||;False|2024-07-09T09:50:56.5778877+08:00||;False|2024-07-09T09:50:23.0123211+08:00||;True|2024-06-26T16:20:21.3981649+08:00||;False|2024-06-26T16:19:59.2162840+08:00||;True|2024-06-26T15:20:17.9242271+08:00||;True|2024-06-19T15:01:43.3271769+08:00||;True|2024-06-18T09:51:50.4178295+08:00||;True|2024-06-18T09:41:19.5989782+08:00||;True|2024-06-18T09:41:10.7867036+08:00||;True|2024-06-18T09:38:57.0128861+08:00||;True|2024-06-17T15:22:17.6153518+08:00||;False|2024-06-17T15:22:01.3404718+08:00||;True|2024-06-13T11:15:55.4873247+08:00||;True|2024-06-13T11:14:52.9075916+08:00||;True|2024-06-13T10:09:13.5966875+08:00||;True|2024-06-13T09:58:26.1880685+08:00||;True|2024-06-13T09:49:29.6928004+08:00||;True|2024-06-13T09:46:16.2707476+08:00||;True|2024-05-30T14:57:39.3412922+08:00||;True|2024-05-30T11:59:44.7664433+08:00||;True|2024-05-30T11:53:59.9799057+08:00||;True|2024-05-30T11:21:35.4761141+08:00||;True|2024-05-30T11:16:55.6157765+08:00||;True|2024-05-30T11:07:45.8336241+08:00||;True|2024-05-30T10:59:58.8877118+08:00||;True|2024-05-30T10:36:09.0290592+08:00||;True|2024-05-30T10:35:17.5448779+08:00||;True|2024-05-27T17:06:29.6833574+08:00||;False|2024-05-27T17:06:07.6398727+08:00||;False|2024-05-27T17:05:20.1523960+08:00||;False|2024-05-27T17:05:04.1140399+08:00||;False|2024-05-27T17:04:44.5872009+08:00||;True|2024-05-11T15:21:00.4779174+08:00||;True|2024-04-23T10:14:25.7074885+08:00||;True|2024-04-22T16:37:12.5852855+08:00||;True|2024-04-22T16:34:52.0894541+08:00||;True|2024-04-19T10:53:01.1630050+08:00||;True|2024-04-19T10:52:02.7021209+08:00||;True|2024-03-30T11:56:28.7775554+08:00||;True|2024-03-13T14:48:09.8998210+08:00||;True|2024-03-13T14:47:27.2433264+08:00||;True|2023-12-25T14:14:16.4083227+08:00||;True|2023-11-16T13:48:01.0622937+08:00||;True|2023-10-18T11:32:08.8356991+08:00||;False|2023-10-18T11:29:58.5783437+08:00||;True|2023-10-16T10:41:58.8456599+08:00||;False|2023-10-16T10:30:14.3272745+08:00||;True|2023-09-11T14:56:16.8635396+08:00||;True|2023-08-31T14:48:56.6882268+08:00||;True|2023-08-31T14:42:46.1818009+08:00||;True|2023-08-31T14:35:48.5604752+08:00||;True|2023-08-08T11:38:41.3309044+08:00||;True|2023-07-28T11:00:59.6697086+08:00||;True|2023-07-18T14:39:48.3496234+08:00||;True|2023-07-17T17:38:55.8911210+08:00||;True|2023-07-17T11:57:31.1164907+08:00||;True|2023-07-17T10:00:17.1961455+08:00||;True|2023-07-13T16:04:03.6854523+08:00||;True|2023-07-11T09:58:12.2295644+08:00||;True|2023-06-26T11:38:29.6648988+08:00||;True|2023-06-21T16:17:40.6226554+08:00||;True|2023-06-21T13:30:18.8163322+08:00||;True|2023-06-21T13:19:43.9290154+08:00||;True|2023-06-21T11:35:28.3376504+08:00||;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git a/IStation.Schedule.sln b/IStation.Schedule.sln index c29c500..b5dbd71 100644 --- a/IStation.Schedule.sln +++ b/IStation.Schedule.sln @@ -25,7 +25,9 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.Test.One", "IStation.Test.One\IStation.Test.One.csproj", "{9D3A6032-C476-470B-954D-B300546984A4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IStation.Test.Init", "Test\IStation.Test.Init\IStation.Test.Init.csproj", "{21641F48-1098-4332-B826-1755F49B99C4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.Test.Init", "Test\IStation.Test.Init\IStation.Test.Init.csproj", "{21641F48-1098-4332-B826-1755F49B99C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IStation.Win.View", "Test\IStation.Win.View\IStation.Win.View.csproj", "{58DC6B34-8DF9-441E-BA52-E9CC13FD5707}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -123,6 +125,14 @@ {21641F48-1098-4332-B826-1755F49B99C4}.Release|Any CPU.Build.0 = Release|Any CPU {21641F48-1098-4332-B826-1755F49B99C4}.Release|x86.ActiveCfg = Release|Any CPU {21641F48-1098-4332-B826-1755F49B99C4}.Release|x86.Build.0 = Release|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Debug|x86.ActiveCfg = Debug|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Debug|x86.Build.0 = Debug|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Release|Any CPU.Build.0 = Release|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Release|x86.ActiveCfg = Release|Any CPU + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -131,6 +141,7 @@ {35E6A93C-A115-43E7-AE6B-67CEE31C3B7C} = {C5DDDBED-5401-4F86-B4B6-97082CDEFC61} {9D3A6032-C476-470B-954D-B300546984A4} = {C5DDDBED-5401-4F86-B4B6-97082CDEFC61} {21641F48-1098-4332-B826-1755F49B99C4} = {C5DDDBED-5401-4F86-B4B6-97082CDEFC61} + {58DC6B34-8DF9-441E-BA52-E9CC13FD5707} = {C5DDDBED-5401-4F86-B4B6-97082CDEFC61} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E02989A8-9B6F-43E5-AACA-790328215089} diff --git a/IStation.Service/07-global/01-helper/ScadaHistoryDataHelper.cs b/IStation.Service/07-global/01-helper/ScadaHistoryDataHelper.cs deleted file mode 100644 index 51a2ece..0000000 --- a/IStation.Service/07-global/01-helper/ScadaHistoryDataHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -锘縩amespace IStation.Docking -{ - /// <summary> - /// Scada 鍘嗗彶鏁版嵁杈呭姪绫� - /// </summary> - public class ScadaHistoryDataHelper - { - - } - -} - - - - - diff --git a/IStation.Service/07-global/01-helper/ScadaRealTimeDataHelper.cs b/IStation.Service/07-global/01-helper/ScadaRealTimeDataHelper.cs deleted file mode 100644 index 6536615..0000000 --- a/IStation.Service/07-global/01-helper/ScadaRealTimeDataHelper.cs +++ /dev/null @@ -1,68 +0,0 @@ -锘縩amespace IStation.Docking -{ - /// <summary> - /// Scada 瀹炴椂鏁版嵁杈呭姪绫� - /// </summary> - public class ScadaRealTimeDataHelper - { - /// <summary> - /// - /// </summary> - public static string Get(out List<Model.ZyScada> zy_scada_list) - { - zy_scada_list = new List<Model.ZyScada>(); - if (!Settings.ParasHelper.ZyDocking.Enable) - { - return "ZyDocking 鏈惎鐢�"; - } - - var url = Settings.ParasHelper.ZyDocking.ScadaHttpUrl; - if (string.IsNullOrEmpty(url)) - { - return "ScadaHttpUrl 涓虹┖"; - } - - try - { - var response_text = Yw.Untity.HttpRequestHelper.Get(url); - var dto = JsonHelper.Json2Object<ZyRealTimeDataDto>(response_text); - var data = dto?.data; - if (dto.data == null || !dto.data.Any()) - { - return "response_text 瑙f瀽澶辫触锛�"; - } - foreach (var item in data) - { - - var zy_scada = new Model.ZyScada(); - zy_scada.Code = item.Key; - zy_scada.Tag = item.Value["key"]; - - if (DateTime.TryParse(item.Value["time"], out DateTime t)) - zy_scada.Time = t; - if (double.TryParse(item.Value["vals"], out double v)) - zy_scada.Value = v; - - zy_scada_list.Add(zy_scada); - } - } - catch (System.Exception ex) - { - return ex.Message; - } - if (!zy_scada_list.Any()) - { - return "zy_scada_list 鏃犳暟鎹�"; - } - - return string.Empty; - } - - } - -} - - - - - diff --git a/IStation.Service/07-global/01-helper/GlobalHelper.cs b/IStation.Service/07-global/GlobalHelper.cs similarity index 97% rename from IStation.Service/07-global/01-helper/GlobalHelper.cs rename to IStation.Service/07-global/GlobalHelper.cs index c8ac408..5906e38 100644 --- a/IStation.Service/07-global/01-helper/GlobalHelper.cs +++ b/IStation.Service/07-global/GlobalHelper.cs @@ -56,6 +56,44 @@ return true; } + /// <summary> + /// 鏄惁鏄�1杈撴按 + /// </summary> + /// <param name="flags"></param> + /// <returns></returns> + public static bool IsStation1(IEnumerable<int> flags) + { + if (flags == null || !flags.Any()) + { + return false; + } + var flag = flags.FirstOrDefault(); + if (!Station1FlagList.Contains(flag)) + { + return false; + } + return true; + } + + /// <summary> + /// 鏄惁鏄�2杈撴按 + /// </summary> + /// <param name="flags"></param> + /// <returns></returns> + public static bool IsStation2(IEnumerable<int> flags) + { + if (flags==null|| !flags.Any()) + { + return false; + } + var flag = flags.FirstOrDefault(); + if (!Station2FlagList.Contains(flag)) + { + return false; + } + return true; + } + #endregion #region 浼楁瘏Scada瀵规帴鏍囩 diff --git a/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs b/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs index 64f249a..42fa4b4 100644 --- a/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs +++ b/IStation.Service/08-algorithm/02-schedule/ScheduleHelper.cs @@ -20,6 +20,8 @@ #endregion + #region Private Variable + private readonly decimal _frequency_min = 28; private readonly decimal _frequency_max = 50; private readonly decimal _frequency_space = 1;//棰戠巼闂撮殧 @@ -45,7 +47,9 @@ private List<List<int>> _same_section_flag_combine_list = null; // 鍚屾娉电粍鍚� private List<Model.WaterSupplyLimit> _water_supply_limit_list = null; //渚涙按闄愬埗鍒楄〃 private List<Model.FrequencyLimit> _frequency_limit_list = null; // 棰戠巼闄愬埗鍒楄〃 - private Dictionary<int,double> _flag_cumulative_runtime_dict = null; // 娉电疮璁¤繍琛屾椂闀垮瓧鍏� + private Dictionary<int, double> _flag_cumulative_runtime_dict = null; // 娉电疮璁¤繍琛屾椂闀垮瓧鍏� + + #endregion /// <summary> /// 鍒濆鍖� @@ -216,8 +220,6 @@ { //渚涙按闄愬埗 var exist_limit = false; -//#if DEBUG -//#else if (exist_water_supply_limit_list) { var limit = water_supply_limit_list.Find(x => x.PumpCount == current_open_flag_list.Count); @@ -228,8 +230,7 @@ exist_limit = true; } } - } -//#endif + } if (!exist_limit) { var opt_ana_combine = GetOptAnaCombine @@ -851,7 +852,6 @@ return lstResult; } - /// <summary> /// 鑾峰彇鎺掑垪缁勫悎 @@ -881,6 +881,10 @@ var analysis_deviation = _service_analysis_deviation.GetByFlowAndRunFlags(flow, flags); if (analysis_deviation == null) { + if (GlobalHelper.IsStation2(flags)) + { + Yw.LogHelper.Error($"[{Yw.Untity.IntListHelper.ToString(flags)}]缁勫悎涓嶅瓨鍦ㄥ亸宸郴鏁�!"); + } return deviation_factor_dict; } @@ -914,8 +918,7 @@ #endregion - - + #region Expand /// <summary> diff --git a/IStation.Service/IStation.Service.csproj b/IStation.Service/IStation.Service.csproj index 4de65cb..12c2854 100644 --- a/IStation.Service/IStation.Service.csproj +++ b/IStation.Service/IStation.Service.csproj @@ -30,8 +30,6 @@ <Compile Remove="02-model\00-basic\01-scada\Scada.cs" /> <Compile Remove="05-service\00-basic\HydraulicModelValidationConfig.cs" /> <Compile Remove="05-service\00-basic\Scada.cs" /> - <Compile Remove="07-global\01-helper\ScadaHistoryDataHelper.cs" /> - <Compile Remove="07-global\01-helper\ScadaRealTimeDataHelper.cs" /> <Compile Remove="08-algorithm\02-schedule\ScheduleConfigHelper.cs" /> <Compile Remove="08-algorithm\02-schedule\ScheduleHelper - 澶嶅埗 %282%29.cs" /> <Compile Remove="08-algorithm\02-schedule\ScheduleHelper - 澶嶅埗.cs" /> diff --git a/Temp.txt b/Temp.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/Temp.txt @@ -0,0 +1 @@ +锘� \ No newline at end of file diff --git a/Test/IStation.Win.View/App.config b/Test/IStation.Win.View/App.config new file mode 100644 index 0000000..f505b77 --- /dev/null +++ b/Test/IStation.Win.View/App.config @@ -0,0 +1,48 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System"> + <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </sectionGroup> + </configSections> + <applicationSettings> + <DevExpress.LookAndFeel.Design.AppSettings> + <setting name="DefaultAppSkin" serializeAs="String"> + <value>CompactSkin/WXI</value> + </setting> + <setting name="DefaultPalette" serializeAs="String"> + <value></value> + </setting> + <setting name="TouchUI" serializeAs="String"> + <value></value> + </setting> + <setting name="CompactUI" serializeAs="String"> + <value></value> + </setting> + <setting name="TouchScaleFactor" serializeAs="String"> + <value></value> + </setting> + <setting name="DirectX" serializeAs="String"> + <value>True</value> + </setting> + <setting name="RegisterUserSkins" serializeAs="String"> + <value></value> + </setting> + <setting name="RegisterBonusSkins" serializeAs="String"> + <value></value> + </setting> + <setting name="FontBehavior" serializeAs="String"> + <value></value> + </setting> + <setting name="DefaultAppFont" serializeAs="String"> + <value>Tahoma;10.5</value> + </setting> + <setting name="DPIAwarenessMode" serializeAs="String"> + <value>PerMonitorV2</value> + </setting> + <setting name="CustomPaletteCollection" serializeAs="Xml"> + <value /> + </setting> + </DevExpress.LookAndFeel.Design.AppSettings> + </applicationSettings> +</configuration> \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Extend/BandGridViewExtend.cs b/Test/IStation.Win.View/Core/Extend/BandGridViewExtend.cs new file mode 100644 index 0000000..923e1d7 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/BandGridViewExtend.cs @@ -0,0 +1,23 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraGrid.Views.BandedGrid; + +namespace IStation.Win +{ + /// <summary> + /// BandedGridView鎷撳睍绫� + /// </summary> + public static class BandGridViewExtend + { + /// <summary> + /// 璁剧疆bandView + /// </summary> + /// <param name="band"></param> + public static void SetBandView(this BandedGridView band, int height = 28) + { + band.SetNormalView(height); + band.BandPanelRowHeight = height; + band.Appearance.BandPanel.TextOptions.HAlignment = HorzAlignment.Center; + } + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ButtonEditExtend.cs b/Test/IStation.Win.View/Core/Extend/ButtonEditExtend.cs new file mode 100644 index 0000000..34d4de7 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ButtonEditExtend.cs @@ -0,0 +1,64 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class ButtonEditExtend + { + + /// <summary> + /// 璁剧疆鏌ヨ + /// </summary> + /// <param name="btn"></param> + /// <param name="SearchData"></param> + /// <param name="RecoverData"></param> + public static void SetSearchSettings(this ButtonEdit btn, EventHandler SearchData, EventHandler RecoverData) + { + btn.Properties.Buttons.Clear(); + btn.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Clear), + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Search)}); + btn.Properties.Buttons[0].Visible = false; + btn.EditValueChanged += delegate + { + if (btn.EditValue == null || string.IsNullOrEmpty(btn.EditValue.ToString())) + { + btn.Properties.Buttons[0].Visible = false; + if (RecoverData != null) + RecoverData(null, null); + } + else + btn.Properties.Buttons[0].Visible = true; + + }; + btn.ButtonClick += (sender, e) => + { + if (e.Button == btn.Properties.Buttons[0]) + { + btn.EditValue = null; + if (RecoverData != null) + RecoverData(sender, e); + } + else if (SearchData != null) + { + if (RecoverData != null) + RecoverData(sender, e); + SearchData(sender, e); + } + }; + btn.KeyPress += (sender, e) => + { + if (e.KeyChar == 13) + { + if (RecoverData != null) + RecoverData(sender, e); + if (SearchData != null) + SearchData(sender, e); + } + }; + + + } + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ClassUpdateVailDataHelper.cs b/Test/IStation.Win.View/Core/Extend/ClassUpdateVailDataHelper.cs new file mode 100644 index 0000000..b4ece1c --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ClassUpdateVailDataHelper.cs @@ -0,0 +1,100 @@ +锘縩amespace IStation.Win +{ + public static class ClassUpdateVailDataHelper + { + /// <summary> + /// 鍙嶅皠瀵规瘮瀹炰綋灞炴�у彉鏇� + /// </summary> + /// <typeparam name="T"></typeparam> + public static class CompareEntry<T> + { + /// <summary> + /// 缂栬緫涔嬪墠鐨勫璞″拰缂栬緫鍚庣殑瀵硅薄杩涜瀵规瘮 + /// </summary> + /// <returns></returns> + public static bool CompareDTO(T BeforeDTO, T AfterDTO) + { + bool IsEqual = true; + + if (BeforeDTO == null || AfterDTO == null) + { + IsEqual = false; + } + else if (BeforeDTO.Equals(DBNull.Value) || AfterDTO.Equals(DBNull.Value)) + { + IsEqual = false; + } + else if (BeforeDTO.GetType() != AfterDTO.GetType()) + { + IsEqual = false; + return IsEqual; + } + else if (BeforeDTO is int || BeforeDTO is short || BeforeDTO is long || BeforeDTO is float || BeforeDTO is double || BeforeDTO is decimal) + { + //int 01涓�1 + if (BeforeDTO is int) + { + if (Convert.ToInt32(BeforeDTO) != Convert.ToInt32(AfterDTO)) + { + IsEqual = false; + } + } + else if (BeforeDTO is short) + { + if (Convert.ToInt16(BeforeDTO) != Convert.ToInt16(AfterDTO)) + { + IsEqual = false; + } + } + else if (BeforeDTO is long) + { + if (Convert.ToInt64(BeforeDTO) != Convert.ToInt64(AfterDTO)) + { + IsEqual = false; + } + } + else if (BeforeDTO is float) + { + if (Convert.ToSingle(BeforeDTO) != Convert.ToSingle(AfterDTO)) + { + IsEqual = false; + } + } + else if (BeforeDTO is double) + { + if (Convert.ToDouble(BeforeDTO) != Convert.ToDouble(AfterDTO)) + { + IsEqual = false; + } + } + else if (BeforeDTO is decimal) + { + if (Convert.ToDecimal(BeforeDTO) == Convert.ToDecimal(AfterDTO)) + { + IsEqual = false; + } + } + } + else + { + var beforeMembers = BeforeDTO.GetType().GetProperties(); + var afterMembers = AfterDTO.GetType().GetProperties(); + for (int i = 0; i < beforeMembers.Length; i++) + { + var beforeVal = beforeMembers[i].GetValue(BeforeDTO, null); + var afterVal = afterMembers[i].GetValue(AfterDTO, null); + var beforeValue = beforeVal == null ? null : beforeVal.ToString(); + var afterValue = afterVal == null ? null : afterVal.ToString(); + if (beforeValue != afterValue) + { + IsEqual = false; + break; + } + } + } + + return IsEqual; + } + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ControlExtend.cs b/Test/IStation.Win.View/Core/Extend/ControlExtend.cs new file mode 100644 index 0000000..a86469c --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ControlExtend.cs @@ -0,0 +1,29 @@ +锘縩amespace IStation.Win +{ + /// <summary> + /// 鎺т欢鎷撳睍绫� + /// </summary> + public static class ControlExtend + { + /// <summary> + /// 缁樺埗鎺т欢杈规 + /// </summary> + /// <param name="ctrl">鎺т欢</param> + /// <param name="e">PaintEventArgs</param> + /// <param name="borderColor">Color</param> + /// <param name="borderWidth">榛樿涓�1</param> + public static void DrawBorder(this Control ctrl, PaintEventArgs e, Color borderColor, int borderWidth = 1) + { + ControlPaint.DrawBorder(e.Graphics, + ctrl.ClientRectangle, + borderColor, borderWidth, ButtonBorderStyle.Solid, + borderColor, borderWidth, ButtonBorderStyle.Solid, + borderColor, borderWidth, ButtonBorderStyle.Solid, + borderColor, borderWidth, ButtonBorderStyle.Solid); + } + + + + } + +} diff --git a/Test/IStation.Win.View/Core/Extend/ControlNavigatorExtend.cs b/Test/IStation.Win.View/Core/Extend/ControlNavigatorExtend.cs new file mode 100644 index 0000000..19e303a --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ControlNavigatorExtend.cs @@ -0,0 +1,37 @@ +锘縰sing DevExpress.XtraEditors; +using DevExpress.XtraGrid; + +namespace IStation.Win +{ + /// <summary> + /// ControlNavigator鎷撳睍绫� + /// </summary> + public static class ControlNavigatorExtend + { + + /// <summary> + /// 琛ㄦ牸瀵艰埅鏉¤缃� + /// </summary> + /// <param name="controlNavigator1"></param> + /// <param name="gridControl1"></param> + public static void SetControlNavigator(this ControlNavigator controlNavigator1, GridControl gridControl1) + { + controlNavigator1.Buttons.Append.Visible = false; + controlNavigator1.Buttons.CancelEdit.Visible = false; + controlNavigator1.Buttons.Edit.Visible = false; + controlNavigator1.Buttons.EndEdit.Visible = false; + controlNavigator1.Buttons.Remove.Visible = false; + controlNavigator1.Dock = DockStyle.Right; + controlNavigator1.LookAndFeel.SkinName = "Money Twins"; + controlNavigator1.Name = "controlNavigator1"; + controlNavigator1.NavigatableControl = gridControl1; + controlNavigator1.Size = new Size(299, 24); + controlNavigator1.TabIndex = 1; + controlNavigator1.Text = "controlNavigator1"; + controlNavigator1.TextLocation = NavigatorButtonsTextLocation.Center; + controlNavigator1.TextStringFormat = "绗瑊0}椤� - 鍏眥1}椤�"; + + } + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/DateEditExtend.cs b/Test/IStation.Win.View/Core/Extend/DateEditExtend.cs new file mode 100644 index 0000000..3598f6e --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/DateEditExtend.cs @@ -0,0 +1,81 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class DateEditExtend + { + // //鏄剧ず骞� + // dateEdit1.Properties.ShowToday = false; + //dateEdit1.Properties.ShowMonthHeaders = false; + //dateEdit1.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.Vista; + //dateEdit1.Properties.VistaCalendarInitialViewStyle = DevExpress.XtraEditors.VistaCalendarInitialViewStyle.YearsGroupView; + //dateEdit1.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.YearsGroupView; + //dateEdit1.Properties.Mask.EditMask = "yyyy"; + //dateEdit1.Properties.Mask.UseMaskAsDisplayFormat = true; + + ////鏄剧ず鏈� + //dateEdit2.Properties.ShowToday = false; + //dateEdit2.Properties.ShowMonthHeaders = true; + //dateEdit2.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.Vista; + //dateEdit2.Properties.VistaCalendarInitialViewStyle = DevExpress.XtraEditors.VistaCalendarInitialViewStyle.YearView; + //dateEdit2.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.YearView; + //dateEdit2.Properties.Mask.EditMask = "yyyy-MM"; + //dateEdit2.Properties.Mask.UseMaskAsDisplayFormat = true; + + ////瀛e害 + //dateEdit3.Properties.ShowToday = false; + //dateEdit3.Properties.ShowMonthHeaders = false; + //dateEdit3.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.Vista; + //dateEdit3.Properties.VistaCalendarInitialViewStyle = DevExpress.XtraEditors.VistaCalendarInitialViewStyle.QuarterView; + //dateEdit3.Properties.VistaCalendarViewStyle = DevExpress.XtraEditors.VistaCalendarViewStyle.QuarterView; + //dateEdit3.Properties.Mask.EditMask = "yyyy-MM"; + //dateEdit3.Properties.Mask.UseMaskAsDisplayFormat = true; + + /// <summary> + /// 璁剧疆鍙樉绀哄勾鏈� + /// </summary> + public static void SetOnlyShowYearMonth(this DateEdit dt) + { + dt.Properties.ShowToday = false; + dt.Properties.ShowMonthHeaders = true; + dt.Properties.CalendarView = DevExpress.XtraEditors.Repository.CalendarView.Vista; + dt.Properties.VistaCalendarInitialViewStyle = VistaCalendarInitialViewStyle.YearView; + dt.Properties.VistaCalendarViewStyle = VistaCalendarViewStyle.YearView; + dt.Properties.Mask.EditMask = "yyyy-MM"; + dt.Properties.Mask.UseMaskAsDisplayFormat = true; + } + + /// <summary> + /// 璁剧疆鍙樉绀烘棩鏈� + /// </summary> + /// <param name="dt"></param> + public static void SetOnlyShowDate(this DateEdit dt) + { + dt.Properties.DisplayFormat.FormatString = "yyyy-MM-dd"; + dt.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.EditFormat.FormatString = "yyyy-MM-dd"; + dt.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.Mask.EditMask = "yyyy-MM-dd"; + } + + /// <summary> + /// 璁剧疆鏄剧ず鏃堕挓 + /// </summary> + /// <param name="dt"></param> + public static void SetShowClock(this DateEdit dt) + { + dt.Properties.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm"; + dt.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm"; + dt.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.Mask.EditMask = "yyyy-MM-dd HH:mm"; + dt.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True; + dt.Properties.VistaEditTime = DevExpress.Utils.DefaultBoolean.True; + dt.Properties.VistaTimeProperties.DisplayFormat.FormatString = "HH:mm"; + dt.Properties.VistaTimeProperties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.VistaTimeProperties.EditFormat.FormatString = "HH:mm"; + dt.Properties.VistaTimeProperties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + dt.Properties.VistaTimeProperties.Mask.EditMask = "HH:mm"; + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/DevHelper.cs b/Test/IStation.Win.View/Core/Extend/DevHelper.cs new file mode 100644 index 0000000..626c5a5 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/DevHelper.cs @@ -0,0 +1,18 @@ +锘縰sing DevExpress.Utils; + +namespace IStation.Win +{ + public class DevHelper + { + /// <summary> + /// 杈撳叆 <see cref="DefaultBoolean"/> + /// </summary> + public static bool Tran(DefaultBoolean bol) + { + if (bol == DefaultBoolean.True) + return true; + else + return false; + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ExtensionsDev.cs b/Test/IStation.Win.View/Core/Extend/ExtensionsDev.cs new file mode 100644 index 0000000..17aa641 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ExtensionsDev.cs @@ -0,0 +1,249 @@ +锘縩amespace IStation.Win +{ + //鎷撳睍XtraEditors + static public class ExtendSpinEdit + { + public static double GetValue(this DevExpress.XtraEditors.SpinEdit editCtrl) + { + return Convert.ToDouble(editCtrl.Value); + } + + public static void SetValue(this DevExpress.XtraEditors.SpinEdit editCtrl, double v) + { + editCtrl.Value = Convert.ToDecimal(v); + } + + } + + static public class ExtendCalcEdit + { + public static double GetValue(this DevExpress.XtraEditors.CalcEdit editCtrl) + { + return Convert.ToDouble(editCtrl.Value); + } + + public static void SetValue(this DevExpress.XtraEditors.CalcEdit editCtrl, double v) + { + editCtrl.Value = Convert.ToDecimal(v); + } + } + + public static class Extensions + { + + + /// <summary> + /// 杞寲涓鸿嚜瀹氫箟瀛楃涓叉牸寮� + /// </summary> + public static string ToCustomString(this DateTime dateTime) + { + return dateTime.ToString("yyyy-MM-dd HH:mm:ss"); + } + + + + /// <summary> + /// 璁剧疆褰揥indowsUIButtonPanel浣嶄簬鐣岄潰搴曢儴鏃剁殑澶栬 + /// </summary> + /// <param name="panel"></param> + public static void SetAppearanceAtBottom(this DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel panel) + { + panel.UseButtonBackgroundImages = false; + //panel.BackColor = Color.FromArgb(63, 63, 63); + //panel.AppearanceButton.Hovered.ForeColor = Color.FromArgb(130, 130, 130); + //panel.AppearanceButton.Normal.ForeColor = Color.White; + //panel.AppearanceButton.Pressed.ForeColor = Color.FromArgb(159, 159, 159); + panel.ButtonInterval = 20; + panel.BackColor = Color.Transparent; + panel.AppearanceButton.Hovered.ForeColor = Color.FromArgb(0, 122, 204); + panel.AppearanceButton.Normal.ForeColor = Color.Black; + panel.AppearanceButton.Pressed.ForeColor = Color.Red; + + } + + /// <summary> + /// 閲戦杞崲鎴愪腑鏂囧ぇ鍐欓噾棰� + /// </summary> + /// <param name="LowerMoney">eg:10.74</param> + /// <returns></returns> + public static string MoneyToUpper(string LowerMoney) + { + string functionReturnValue = null; + bool IsNegative = false; // 鏄惁鏄礋鏁� + if (LowerMoney.Trim().Substring(0, 1) == "-") + { + // 鏄礋鏁板垯鍏堣浆涓烘鏁� + LowerMoney = LowerMoney.Trim().Remove(0, 1); + IsNegative = true; + } + string strLower = null; + string strUpart = null; + string strUpper = null; + int iTemp = 0; + // 淇濈暀涓や綅灏忔暟 123.489鈫�123.49銆�銆�123.4鈫�123.4 + LowerMoney = Math.Round(double.Parse(LowerMoney), 2).ToString(); + if (LowerMoney.IndexOf(".") > 0) + { + if (LowerMoney.IndexOf(".") == LowerMoney.Length - 2) + { + LowerMoney = LowerMoney + "0"; + } + } + else + { + LowerMoney = LowerMoney + ".00"; + } + strLower = LowerMoney; + iTemp = 1; + strUpper = ""; + while (iTemp <= strLower.Length) + { + switch (strLower.Substring(strLower.Length - iTemp, 1)) + { + case ".": + strUpart = "鍦�"; + break; + case "0": + strUpart = "闆�"; + break; + case "1": + strUpart = "澹�"; + break; + case "2": + strUpart = "璐�"; + break; + case "3": + strUpart = "鍙�"; + break; + case "4": + strUpart = "鑲�"; + break; + case "5": + strUpart = "浼�"; + break; + case "6": + strUpart = "闄�"; + break; + case "7": + strUpart = "鏌�"; + break; + case "8": + strUpart = "鎹�"; + break; + case "9": + strUpart = "鐜�"; + break; + } + + switch (iTemp) + { + case 1: + strUpart = strUpart + "鍒�"; + break; + case 2: + strUpart = strUpart + "瑙�"; + break; + case 3: + strUpart = strUpart + ""; + break; + case 4: + strUpart = strUpart + ""; + break; + case 5: + strUpart = strUpart + "鎷�"; + break; + case 6: + strUpart = strUpart + "浣�"; + break; + case 7: + strUpart = strUpart + "浠�"; + break; + case 8: + strUpart = strUpart + "涓�"; + break; + case 9: + strUpart = strUpart + "鎷�"; + break; + case 10: + strUpart = strUpart + "浣�"; + break; + case 11: + strUpart = strUpart + "浠�"; + break; + case 12: + strUpart = strUpart + "浜�"; + break; + case 13: + strUpart = strUpart + "鎷�"; + break; + case 14: + strUpart = strUpart + "浣�"; + break; + case 15: + strUpart = strUpart + "浠�"; + break; + case 16: + strUpart = strUpart + "涓�"; + break; + default: + strUpart = strUpart + ""; + break; + } + + strUpper = strUpart + strUpper; + iTemp = iTemp + 1; + } + + strUpper = strUpper.Replace("闆舵嬀", "闆�"); + strUpper = strUpper.Replace("闆朵桨", "闆�"); + strUpper = strUpper.Replace("闆朵粺", "闆�"); + strUpper = strUpper.Replace("闆堕浂闆�", "闆�"); + strUpper = strUpper.Replace("闆堕浂", "闆�"); + strUpper = strUpper.Replace("闆惰闆跺垎", "鏁�"); + strUpper = strUpper.Replace("闆跺垎", "鏁�"); + strUpper = strUpper.Replace("闆惰", "闆�"); + strUpper = strUpper.Replace("闆朵嚎闆朵竾闆跺渾", "浜垮渾"); + strUpper = strUpper.Replace("浜块浂涓囬浂鍦�", "浜垮渾"); + strUpper = strUpper.Replace("闆朵嚎闆朵竾", "浜�"); + strUpper = strUpper.Replace("闆朵竾闆跺渾", "涓囧渾"); + strUpper = strUpper.Replace("闆朵嚎", "浜�"); + strUpper = strUpper.Replace("闆朵竾", "涓�"); + strUpper = strUpper.Replace("闆跺渾", "鍦�"); + strUpper = strUpper.Replace("闆堕浂", "闆�"); + + // 瀵瑰9鍦嗕互涓嬬殑閲戦鐨勫鐞� + if (strUpper.Substring(0, 1) == "鍦�") + { + strUpper = strUpper.Substring(1, strUpper.Length - 1); + } + if (strUpper.Substring(0, 1) == "闆�") + { + strUpper = strUpper.Substring(1, strUpper.Length - 1); + } + if (strUpper.Substring(0, 1) == "瑙�") + { + strUpper = strUpper.Substring(1, strUpper.Length - 1); + } + if (strUpper.Substring(0, 1) == "鍒�") + { + strUpper = strUpper.Substring(1, strUpper.Length - 1); + } + if (strUpper.Substring(0, 1) == "鏁�") + { + strUpper = "闆跺渾鏁�"; + } + functionReturnValue = strUpper; + + if (IsNegative == true) + { + return "璐�" + functionReturnValue; + } + else + { + return functionReturnValue; + } + } + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/FormExtend.cs b/Test/IStation.Win.View/Core/Extend/FormExtend.cs new file mode 100644 index 0000000..2abb493 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/FormExtend.cs @@ -0,0 +1,46 @@ +锘縰sing System.Runtime.InteropServices; + +namespace IStation.Win +{ + /// <summary> + /// FORM绐椾綋鎷撳睍绫� + /// </summary> + public static class FormExtensions + { + /// <summary> + /// + /// </summary> + /// <returns></returns> + [DllImport("user32.dll")] + public static extern bool ReleaseCapture(); + + /// <summary> + /// + /// </summary> + /// <param name="hwnd"></param> + /// <param name="wMsg"></param> + /// <param name="wParam"></param> + /// <param name="lParam"></param> + /// <returns></returns> + [DllImport("user32.dll")] + public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + + private const int VM_NCLBUTTONDOWN = 0X00A1;//瀹氫箟榧犳爣宸﹂敭鎸変笅 + private const int HTCAPTION = 2; + + /// <summary> + /// 鎷栧姩绉诲姩 + /// </summary> + /// <param name="frm"></param> + public static void DragMove(this Form frm) + { + //涓哄綋鍓嶅簲鐢ㄧ▼搴忛噴鏀鹃紶鏍囨崟鑾� + ReleaseCapture(); + //鍙戦�佹秷鎭� 璁╃郴缁熻浠ヤ负鍦ㄦ爣棰樻爮涓婃寜涓嬮紶鏍� + SendMessage(frm.Handle, VM_NCLBUTTONDOWN, HTCAPTION, 0); + } + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/GridContorlExtend.cs b/Test/IStation.Win.View/Core/Extend/GridContorlExtend.cs new file mode 100644 index 0000000..28332fb --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/GridContorlExtend.cs @@ -0,0 +1,55 @@ +锘縰sing DevExpress.XtraGrid; +using DevExpress.XtraGrid.Views.Grid; + +namespace IStation.Win +{ + /// <summary> + /// GridView鐨勬嫇灞曠被 + /// </summary> + public static class GridContorlExtend + { + #region 榛樿 + /// <summary> + /// 鏅�氳鍥捐缃� + /// </summary> + /// <param name="grid"></param> + public static void ContextMenuStrip(this GridControl grid) + { + if (grid.Views.Count < 1) + return; + var view = grid.Views[0] as GridView; + + + var contextMenuStrip = new ContextMenuStrip(); + var copyItem = new ToolStripMenuItem(); + copyItem.Text = "澶嶅埗鍗曞厓鏍�"; + copyItem.Click += new EventHandler((sender, e) => + { + var text = view.GetFocusedDisplayText(); + Clipboard.SetData(DataFormats.Text, text); + }); + contextMenuStrip.Items.Add(copyItem); + + var exportExcelItem = new ToolStripMenuItem(); + exportExcelItem.Text = "瀵煎嚭Excel"; + exportExcelItem.Click += new EventHandler((sender, e) => + { + var dlg = new SaveFileDialog(); + dlg.Filter = "excel|.xlsx"; + if (dlg.ShowDialog() != DialogResult.OK) + return; + var options = new DevExpress.XtraPrinting.XlsxExportOptionsEx(); + options.ExportType = DevExpress.Export.ExportType.DataAware;//鎵�瑙佸嵆鎵�寰� + options.TextExportMode = DevExpress.XtraPrinting.TextExportMode.Text; + view.ExportToXlsx(dlg.FileName, options); + }); + contextMenuStrip.Items.Add(exportExcelItem); + + grid.ContextMenuStrip = contextMenuStrip; + } + + + #endregion + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/GridViewExtend.cs b/Test/IStation.Win.View/Core/Extend/GridViewExtend.cs new file mode 100644 index 0000000..4795c35 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/GridViewExtend.cs @@ -0,0 +1,590 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraGrid.Columns; +using DevExpress.XtraGrid.Views.Grid; +using DevExpress.XtraGrid.Views.Grid.ViewInfo; +using System.ComponentModel; + +namespace IStation.Win +{ + /// <summary> + /// GridView鐨勬嫇灞曠被 + /// </summary> + public static class GridViewExtend + { + #region 榛樿 + + /// <summary> + /// 鏅�氳鍥捐缃� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetNormalView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = true; + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = false; + grid.OptionsCustomization.AllowSort = true; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.ShowIndicator = false; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsView.ShowDetailButtons = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = false; + grid.OptionsBehavior.ReadOnly = true; + + + //grid.OptionsView.EnableAppearanceOddRow = true; // 浣胯兘 // 鍜屽拰涓婇潰缁戝畾 鍚屾椂浣跨敤鏈夋晥 + //grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251); // 璁剧疆鍋舵暟琛岄鑹� + //grid.OptionsView.EnableAppearanceEvenRow = true; + //grid.Appearance.OddRow.BackColor = Color.White; // 璁剧疆鍋舵暟琛岄鑹� + + grid.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + grid.OptionsFind.ShowCloseButton = false; + + grid.RowHeight = height; + grid.BestFitColumns(); + + } + + /// <summary> + /// 闄愬埗鍔熻兘鐨勮鍥� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetLimitView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = false; + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = false; + grid.OptionsCustomization.AllowSort = false; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = false; + grid.OptionsBehavior.ReadOnly = true; + + grid.OptionsView.EnableAppearanceOddRow = true; // 浣胯兘 // 鍜屽拰涓婇潰缁戝畾 鍚屾椂浣跨敤鏈夋晥 + grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251); // 璁剧疆鍋舵暟琛岄鑹� + grid.OptionsView.EnableAppearanceEvenRow = true; + grid.Appearance.OddRow.BackColor = Color.White; // 璁剧疆鍋舵暟琛岄鑹� + + + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + } + + /// <summary> + /// 鏅�氱紪杈戣鍥捐缃� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetNormalEditView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = true; + + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = true; + grid.OptionsCustomization.AllowSort = true; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = true; + grid.OptionsBehavior.ReadOnly = false; + + /*grid.OptionsView.EnableAppearanceOddRow = true; + grid.OptionsView.EnableAppearanceEvenRow = true; + grid.Appearance.OddRow.BackColor = Color.White; + grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);*/ + + + grid.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + + grid.OptionsFilter.AllowFilterEditor = false; + grid.OptionsFind.ShowCloseButton = false; + grid.OptionsCustomization.AllowSort = false; + grid.OptionsCustomization.AllowFilter = false; + + } + + /// <summary> + /// 闄愬埗鍔熻兘鐨勭紪杈戣鍥� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetLimitEditView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = false; + + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = false; + grid.OptionsCustomization.AllowSort = false; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = true; + grid.OptionsBehavior.ReadOnly = false; + + grid.OptionsView.EnableAppearanceOddRow = true; // 浣胯兘 // 鍜屽拰涓婇潰缁戝畾 鍚屾椂浣跨敤鏈夋晥 + grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251); // 璁剧疆鍋舵暟琛岄鑹� + grid.OptionsView.EnableAppearanceEvenRow = true; + grid.Appearance.OddRow.BackColor = Color.White; // 璁剧疆鍋舵暟琛岄鑹� + + + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + } + + /// <summary> + /// 缁戝畾鏅�氱紪杈戣鍥捐缃� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetBindingNormalEditView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = true; + + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = true; + grid.OptionsCustomization.AllowSort = true; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = true; + grid.OptionsBehavior.ReadOnly = false; + + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + } + + /// <summary> + /// 缁戝畾闄愬埗缂栬緫瑙嗗浘璁剧疆 + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetBindingLimitEditView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = false; + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = false; + grid.OptionsCustomization.AllowSort = false; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = true; + grid.OptionsBehavior.ReadOnly = false; + + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + + + } + + /// <summary> + /// 鏄剧ずViewCaption + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void ShowViewCaption(this GridView grid, int height = 35) + { + grid.OptionsView.ShowViewCaption = true; + grid.ViewCaptionHeight = height; + grid.Appearance.ViewCaption.TextOptions.HAlignment = HorzAlignment.Near; + } + + + /// <summary> + /// GridView娉ㄥ唽鏄剧ず琛屾爣 + /// </summary> + /// <param name="grid"></param> + public static void RegistCustomDrawRowIndicator(this GridView grid, int IndicatorWidth = 35) + { + grid.OptionsView.ShowIndicator = true; + grid.IndicatorWidth = IndicatorWidth; + grid.CustomDrawRowIndicator += (sender, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + { + e.Info.DisplayText = (e.RowHandle + 1).ToString().Trim(); + e.Appearance.TextOptions.HAlignment = HorzAlignment.Far; + } + }; + } + + /// <summary> + /// 娉ㄥ唽鑷畾涔夌粍鍚� + /// </summary> + /// <param name="grid"></param> + /// <param name="col"></param> + /// <param name="func"></param> + public static void RegistCustomGroupRow(this GridView grid, GridColumn col, Func<object, string> func) + { + grid.CustomDrawGroupRow += (sender, e) => + { + var gridGroupRowInfo = e.Info as GridGroupRowInfo; + if (gridGroupRowInfo.Column == col) + { + var index = grid.GetDataRowHandleByGroupRowHandle(e.RowHandle); + var row = grid.GetRow(index); + if (row == null) + return; + gridGroupRowInfo.GroupText = func(row); + } + }; + } + + /// <summary> + /// 鑷畾涔夊崟鍏冩牸鏍峰紡 + /// </summary> + /// <param name="grid"></param> + /// <param name="bgColor"></param> + /// <param name="foreColor"></param> + public static void RegistCustomDrawCell(this GridView grid, Color? bgColor = null, Color? foreColor = null) + { + if (bgColor == null) + bgColor = Color.FromArgb(0, 122, 204); + if (foreColor == null) + foreColor = Color.White; + grid.CustomDrawCell += (sender, e) => + { + if (e.RowHandle == (sender as GridView).FocusedRowHandle) + { + var cell = e.Cell as GridCellInfo; + if (!cell.IsMerged) + { + e.Appearance.BackColor = bgColor.Value; + e.Appearance.ForeColor = foreColor.Value; + } + } + }; + } + + /// <summary> + /// 鑾峰彇褰撳墠鏁版嵁琛� + /// </summary> + public static T GetCurrentViewModel<T>(this GridView grid, List<T> source) where T : class + { + if (source == null) + return default; + if (source.Count < 1) + { + return default; + } + var row = grid.GetFocusedRow() as T; + if (row == null) + { + return null; + } + return row; + } + + /// <summary> + /// 鑾峰彇褰撳墠鏁版嵁琛� + /// </summary> + public static T GetCurrentViewModel<T>(this GridView grid, BindingList<T> source) where T : class + { + if (source == null) + return default; + if (source.Count < 1) + { + return default; + } + var row = grid.GetFocusedRow() as T; + if (row == null) + { + return null; + } + return row; + } + + #endregion + + /// <summary> + /// 缁戝畾鎸夊垪鍒嗙粍瑙嗗浘璁剧疆 Nsx_20210729 + /// </summary> + /// <param name="grid"></param> + /// <param name="col"></param> + /// <param name="height"></param> + public static void SetGroupView(this GridView grid, GridColumn col, int height = 35) + { + grid.GroupCount = 1; + grid.RowHeight = height; + grid.GroupRowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.OptionsBehavior.ReadOnly = true; + grid.OptionsBehavior.Editable = false; + grid.OptionsView.ShowDetailButtons = false; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.OptionsBehavior.AllowFixedGroups = DefaultBoolean.True; + grid.OptionsBehavior.AllowPixelScrolling = DefaultBoolean.True; + grid.OptionsClipboard.ClipboardMode = DevExpress.Export.ClipboardMode.Formatted; + grid.OptionsBehavior.AutoExpandAllGroups = true; + grid.OptionsFind.AlwaysVisible = false; + grid.OptionsPrint.PrintHorzLines = false; + grid.OptionsPrint.PrintPreview = true; + grid.OptionsPrint.PrintVertLines = false; + grid.OptionsView.GroupDrawMode = GroupDrawMode.Office; + grid.OptionsView.ShowGroupedColumns = true; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsView.ShowIndicator = false; + grid.OptionsView.ShowVerticalLines = DefaultBoolean.False; + grid.PreviewFieldName = "PlainText"; + grid.SortInfo.AddRange(new GridColumnSortInfo[] { + new GridColumnSortInfo(col, DevExpress.Data.ColumnSortOrder.None)}); + grid.BestFitColumns(); + } + + + ///// <summary> + ///// 瀵煎嚭Excel + ///// </summary> + //public static void ExportExcel(this GridView grid) + //{ + // var path = ExcelSaveFilePathHelper.SaveFilePathName(); + // if (string.IsNullOrEmpty(path)) return; + // grid.OptionsPrint.PrintDetails = true;//瀵煎嚭鏄庣粏 + // grid.OptionsPrint.ExpandAllDetails = true;//瀵煎嚭鎵�鏈夋槑缁嗭紝false鐨勮瘽锛屽彧浼氬鍑哄睍寮�鐨勬槑缁� + // grid.ExportToXlsx(path, new DevExpress.XtraPrinting.XlsxExportOptionsEx() { ExportType = DevExpress.Export.ExportType.WYSIWYG, TextExportMode = DevExpress.XtraPrinting.TextExportMode.Text }); + // DialogResult dr = XtraMessageBox.Show("瀵煎嚭鎴愬姛锛佹槸鍚︽墦寮�鍒氬垰淇濆瓨鐨凟xcel鏂囦欢锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + // if (dr != DialogResult.OK) + // return; + // System.Diagnostics.Process.Start(path); + //} + /* + /// <summary> + /// 瀵煎嚭Excel + /// </summary> + public static void ExportExcel(this GridView grid, DocumentPage page, string pageOperateInfo) + { + page.ShowCmdOperateInfo("瀵煎嚭鍒楄〃淇℃伅鍒癊xcel"); + var path = ExcelSaveFilePathHelper.SaveFilePathName(); + page.ShowCmdOperateInfo(pageOperateInfo); + if (string.IsNullOrEmpty(path)) return; + grid.OptionsPrint.PrintDetails = true;//瀵煎嚭鏄庣粏 + grid.OptionsPrint.ExpandAllDetails = true;//瀵煎嚭鎵�鏈夋槑缁嗭紝false鐨勮瘽锛屽彧浼氬鍑哄睍寮�鐨勬槑缁� + grid.ExportToXlsx(path, new DevExpress.XtraPrinting.XlsxExportOptionsEx() { ExportType = DevExpress.Export.ExportType.WYSIWYG, TextExportMode = DevExpress.XtraPrinting.TextExportMode.Text }); + DialogResult dr = XtraMessageBox.Show("瀵煎嚭鎴愬姛锛佹槸鍚︽墦寮�鍒氬垰淇濆瓨鐨凟xcel鏂囦欢锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (dr != DialogResult.OK) + return; + System.Diagnostics.Process.Start(path); + }*/ + + + /// <summary> + /// 涓昏〃瑙嗗浘棰滆壊鏍峰紡璁剧疆 + /// </summary> + /// <param name="grid"></param> + public static void SetGridMianViewColor(this GridView grid) + { + var focusRowColor = Color.LightBlue;// Color.FromName(Skin.FocusRowColor); + //鑱氱劍 + grid.Appearance.FocusedRow.Options.UseBackColor = true; + grid.Appearance.FocusedRow.BackColor = focusRowColor; + grid.Appearance.FocusedCell.Options.UseBackColor = true; + grid.Appearance.FocusedCell.BackColor = focusRowColor; + + + //濂囧伓琛岄鑹� + grid.OptionsView.EnableAppearanceOddRow = true; + grid.Appearance.OddRow.Options.UseBackColor = true; + grid.Appearance.OddRow.BackColor = Color.FromName(Skin.OddRowColor); // 璁剧疆濂囨暟琛岄鑹� + + + grid.OptionsView.EnableAppearanceEvenRow = true; + grid.Appearance.EvenRow.Options.UseBackColor = true; + grid.Appearance.EvenRow.BackColor = Color.FromName(Skin.EvenRowColor); // 璁剧疆鍋舵暟琛岄鑹� + } + + /// <summary> + /// 浠庤〃瑙嗗浘棰滆壊鏍峰紡璁剧疆 + /// </summary> + /// <param name="grid"></param> + public static void SetGridSubViewColor(this GridView grid) + { + //鑱氱劍 + grid.Appearance.FocusedRow.Options.UseBackColor = true; + grid.Appearance.FocusedRow.BackColor = Color.FromName(Skin.FocusRowColor); + grid.Appearance.FocusedCell.Options.UseBackColor = true; + grid.Appearance.FocusedCell.BackColor = Color.FromName(Skin.FocusRowColor); + } + + + /// <summary> + /// 鏅�氱紪杈戣鍥捐缃� + /// </summary> + /// <param name="grid"></param> + /// <param name="height"></param> + public static void SetDefaultEditView(this GridView grid, int height = 35) + { + grid.OptionsFind.FindNullPrompt = "妫�绱�"; + grid.OptionsSelection.MultiSelect = false; + grid.OptionsMenu.EnableColumnMenu = true; + + grid.OptionsSelection.EnableAppearanceFocusedCell = false; + grid.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; + grid.Appearance.Row.TextOptions.HAlignment = HorzAlignment.Center; + grid.FocusRectStyle = DrawFocusRectStyle.RowFullFocus; + grid.OptionsCustomization.AllowFilter = true; + grid.OptionsCustomization.AllowSort = true; + grid.OptionsCustomization.AllowQuickHideColumns = false; + grid.OptionsView.ShowAutoFilterRow = false; + grid.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; + grid.OptionsView.NewItemRowPosition = NewItemRowPosition.None; + grid.OptionsView.ShowGroupPanel = false; + grid.OptionsClipboard.AllowCopy = DefaultBoolean.True; + grid.OptionsBehavior.Editable = true; + grid.OptionsBehavior.ReadOnly = false; + + grid.OptionsView.EnableAppearanceOddRow = true; + grid.OptionsView.EnableAppearanceEvenRow = true; + grid.Appearance.OddRow.BackColor = Color.White; + grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251); + + + grid.RowHeight = height; + grid.ColumnPanelRowHeight = height; + grid.GroupRowHeight = height; + grid.BestFitColumns(); + } + + public class Skin + { + public static string ThemeStyle { get; set; } = "The Bezier"; + + public static string Style { get; set; } = "Office Colorful"; + + public string MainFromColor { get; set; } = "#0070C0"; + + public string ConfirmButtonColor { get; set; } = "#2960A4"; + + public string CancelButtonColor { get; set; } = "#F07409"; + + public string StartButtonColor { get; set; } = "#8DB3E2"; + + public static string FocusRowColor { get; set; } = "#7292CD"; + + public static string OddRowColor { get; set; } = "#D8D8D8"; + + public static string EvenRowColor { get; set; } = "#FFFFFF"; + } + + + /// <summary> + /// 璁剧疆鎷栨嫿鐘舵�佷笅鐨勬櫘閫氳鍥� + /// </summary> + public static void SetDragNormalView<t>(this GridView rhs, int height = 35) where t : class + { + rhs.SetNormalView(height); + + GridHitInfo downHitInfo = null; + rhs.MouseDown += (sender, e) => + { + var view = sender as GridView; + downHitInfo = null; + if (view != null) + { + GridHitInfo hitInfo = view.CalcHitInfo(new Point(e.X, e.Y)); + if (e.Button == MouseButtons.Left && hitInfo.InRow && hitInfo.HitTest != GridHitTest.RowIndicator) + { + downHitInfo = hitInfo; + } + } + }; + + + rhs.MouseMove += (sender, e) => + { + var view = sender as GridView; + if (e.Button == MouseButtons.Left && downHitInfo != null) + { + Size dragSize = SystemInformation.DragSize; + Rectangle dragRect = new Rectangle(new Point(downHitInfo.HitPoint.X - dragSize.Width / 2, downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize); + + if (!dragRect.Contains(new Point(e.X, e.Y))) + { + if (view != null) + { + var dragVm = view.GetSelectedRows().Select(rownum => view.GetRow(rownum) as t).FirstOrDefault(); + if (dragVm != null) + { + view.GridControl.DoDragDrop(dragVm, DragDropEffects.Move); + } + } + downHitInfo = null; + DXMouseEventArgs.GetMouseArgs(e).Handled = true; + } + } + }; + } + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ImageExtend.cs b/Test/IStation.Win.View/Core/Extend/ImageExtend.cs new file mode 100644 index 0000000..2ab760f --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ImageExtend.cs @@ -0,0 +1,35 @@ +锘縩amespace IStation.Win +{ + public static class ImageExtend + { + /// <summary> + /// 灏嗘寚瀹氬浘鐗囪浆鍖栦负鎸囧畾灏哄,Image瀵硅薄鑷甫鑾峰彇缂╃暐鍥剧殑鏂规硶GetThumbnailImage + /// </summary> + /// <param name="img"></param> + /// <param name="width"></param> + /// <param name="height"></param> + /// <returns></returns> + public static Image GetCustomizedImage(this Image img, int width, int height) + { + var bp = new Bitmap(width, height); + //绋嬪簭浣跨敤璁惧鐨凞PI鍒涘缓鍥剧墖锛屾墍浠ヤ唬鐮佹敞閲� + //using (Graphics g = Graphics.FromHwnd(IntPtr.Zero)) + //{ + // float dpiX = g.DpiX; + // float dpiY = g.DpiY; + // bp.SetResolution((int)dpiX, (int)dpiY); + //} + using (Graphics g = Graphics.FromImage(bp)) + { + Rectangle resultRectangle = new Rectangle(0, 0, width, height); + Rectangle sourceRectangle = new Rectangle(0, 0, img.Width, img.Height); + g.DrawImage(img, resultRectangle, sourceRectangle, GraphicsUnit.Pixel); + } + return bp; + } + + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/LayoutControlExtensions.cs b/Test/IStation.Win.View/Core/Extend/LayoutControlExtensions.cs new file mode 100644 index 0000000..6f0d580 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/LayoutControlExtensions.cs @@ -0,0 +1,21 @@ +锘縰sing DevExpress.XtraLayout; + +namespace IStation.Win +{ + /// <summary> + /// layoutControl鎷撳睍绫� + /// </summary> + public static class LayoutControlExtensions + { + /// <summary> + /// 璁剧疆 + /// </summary> + /// <param name="layout"></param> + public static void SetupLayoutControl(this LayoutControl layout) + { + layout.AllowCustomization = false; + layout.OptionsView.UseParentAutoScaleFactor = true; + } + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/ListBoxControlExtend.cs b/Test/IStation.Win.View/Core/Extend/ListBoxControlExtend.cs new file mode 100644 index 0000000..353337a --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/ListBoxControlExtend.cs @@ -0,0 +1,13 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class ListBoxControlExtend + { + public static void InitialDefaultSettings(this ListBoxControl listBox, int ItemHeight = 25) + { + listBox.ShowFocusRect = false; + listBox.ItemHeight = ItemHeight; + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/LookUpEditExtend.cs b/Test/IStation.Win.View/Core/Extend/LookUpEditExtend.cs new file mode 100644 index 0000000..00d7022 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/LookUpEditExtend.cs @@ -0,0 +1,27 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + /// <summary> + /// LookUpEdit鎷撳睍绫� + /// </summary> + public static class LookUpEditExtend + { + /// <summary> + /// 璁剧疆鎴怌ombo鐨勬樉绀烘晥鏋� + /// </summary> + /// <param name="lookUp"></param> + public static void SetAsCombo(this LookUpEdit lookUp) + { + lookUp.Properties.AllowFocused = false; + lookUp.Properties.NullText = string.Empty; + lookUp.Properties.ShowFooter = false; + lookUp.Properties.ShowHeader = false; + lookUp.Properties.ShowLines = false; + } + + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/MessageBoxShow.cs b/Test/IStation.Win.View/Core/Extend/MessageBoxShow.cs new file mode 100644 index 0000000..9dbc8b9 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/MessageBoxShow.cs @@ -0,0 +1,49 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class MyMessageBox + { + public static void InfomationShow(string str) + { + if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN")) + { + XtraMessageBox.Show(str, "鎻愮ず淇℃伅", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + XtraMessageBox.Show(str, "Notice", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + public static DialogResult WarningShow(string str) + { + if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN")) + { + return XtraMessageBox.Show(str, "璀﹀憡", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + } + else + { + return XtraMessageBox.Show(str, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + } + } + + public static DialogResult StopShow(string str) + { + if (System.Globalization.CultureInfo.CurrentCulture.Name.Equals("zh-CN")) + { + return XtraMessageBox.Show(str, "閿欒", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + else + { + return XtraMessageBox.Show(str, "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + } + + + + + } + + +} diff --git a/Test/IStation.Win.View/Core/Extend/RibbonControlExtend.cs b/Test/IStation.Win.View/Core/Extend/RibbonControlExtend.cs new file mode 100644 index 0000000..25f83ee --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/RibbonControlExtend.cs @@ -0,0 +1,24 @@ +锘縰sing DevExpress.XtraBars.Ribbon; + +namespace IStation.Win +{ + public static class RibbonControlExtend + { + /// <summary> + /// 璁剧疆甯歌瑙嗗浘 + /// </summary> + public static void SetNormalView(this RibbonControl rc) + { + rc.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.True; + rc.ItemPanelStyle = RibbonItemPanelStyle.Classic; + //rc.OptionsMenuMinWidth = 300; + rc.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + rc.ShowPageHeadersMode = ShowPageHeadersMode.Hide; + rc.ToolbarLocation = RibbonQuickAccessToolbarLocation.Hidden; + rc.RibbonStyle = RibbonControlStyle.MacOffice; + } + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/SearchLookUpEditExtend.cs b/Test/IStation.Win.View/Core/Extend/SearchLookUpEditExtend.cs new file mode 100644 index 0000000..d27a07e --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/SearchLookUpEditExtend.cs @@ -0,0 +1,28 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraEditors; + +namespace IStation.Win +{ + /// <summary> + /// SearchLookUpEdit + /// </summary> + public static class SearchLookUpEditExtend + { + /// <summary> + /// 璁剧疆榛樿 + /// </summary> + public static void SetDefaultView(this SearchLookUpEdit rhs, int height = 250) + { + rhs.Properties.AllowFocused = false; + rhs.Properties.NullText = ""; + rhs.Properties.ShowClearButton = false; + var width = rhs.Size.Width - 105; + rhs.Properties.PopupFormSize = new Size(width, height); + rhs.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center; + } + + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/TextEditExtend.cs b/Test/IStation.Win.View/Core/Extend/TextEditExtend.cs new file mode 100644 index 0000000..91d5379 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/TextEditExtend.cs @@ -0,0 +1,21 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class TextEditExtend + { + /// <summary> + /// 鍙兘杈撳叆鏁板瓧 + /// </summary> + public static void SetNumeric(this TextEdit txt) + { + txt.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric; + // txt.Properties.Mask.UseMaskAsDisplayFormat = true; + txt.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; + txt.Text = string.Empty; + } + + + + } +} diff --git a/Test/IStation.Win.View/Core/Extend/TileControlExtensions.cs b/Test/IStation.Win.View/Core/Extend/TileControlExtensions.cs new file mode 100644 index 0000000..725667e --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/TileControlExtensions.cs @@ -0,0 +1,58 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class TileControlExtensions + { + /// <summary> + /// Peek寮瑰嚭璁剧疆 + /// </summary> + /// <param name="tc"></param> + public static void SetForPeek(this TileControl tc) + { + tc.AllowItemHover = true; + tc.AllowGlyphSkinning = true; + tc.AllowDrag = false; + tc.LayoutMode = TileControlLayoutMode.Adaptive; + tc.Orientation = Orientation.Vertical; + tc.ItemBorderVisibility = TileItemBorderVisibility.Never; + tc.OptionsAdaptiveLayout.ItemMinSize = new Size(200, 50); + tc.Padding = new Padding(0); + tc.ItemPadding = new Padding(15); + tc.IndentBetweenItems = 0; + tc.AppearanceItem.Normal.BackColor = Color.White; + tc.AppearanceItem.Normal.ForeColor = Color.FromArgb(63, 63, 63); + tc.AppearanceItem.Hovered.BackColor = Color.FromArgb(0, 122, 204); + tc.AppearanceItem.Hovered.ForeColor = Color.White; + } + + /// <summary> + /// Peek寮瑰嚭璁剧疆 + /// </summary> + /// <param name="tc"></param> + public static void SetForPeek2(this TileControl tc) + { + tc.AllowItemHover = true; + tc.AllowGlyphSkinning = true; + tc.AllowDrag = false; + tc.LayoutMode = TileControlLayoutMode.Adaptive; + tc.Orientation = Orientation.Vertical; + tc.ItemBorderVisibility = TileItemBorderVisibility.Never; + tc.OptionsAdaptiveLayout.ItemMinSize = new Size(180, 50); + tc.Padding = new Padding(0); + tc.ItemPadding = new Padding(5); + tc.IndentBetweenItems = 0; + + tc.AppearanceItem.Normal.BackColor = Color.White; + tc.AppearanceItem.Normal.ForeColor = Color.FromArgb(63, 63, 63); + tc.AppearanceItem.Hovered.BackColor = Color.FromArgb(0, 122, 204); + tc.AppearanceItem.Hovered.ForeColor = Color.White; + + /*tc.AppearanceItem.Normal.BackColor = Color.FromArgb(63, 63, 63); + tc.AppearanceItem.Normal.ForeColor = Color.White; + + tc.AppearanceItem.Hovered.BackColor = Color.White; + tc.AppearanceItem.Hovered.ForeColor = Color.FromArgb(0, 122, 204); */ + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/TokenEditExtend.cs b/Test/IStation.Win.View/Core/Extend/TokenEditExtend.cs new file mode 100644 index 0000000..0f7b3eb --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/TokenEditExtend.cs @@ -0,0 +1,28 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class TokenEditExtend + { + /// <summary> + /// 鍒濆鍖栭粯璁よ缃� + /// </summary> + /// <param name="rhs"></param> + /// <param name="SeparatorChar"></param> + public static void InitDefaultSettings(this TokenEdit rhs, char SeparatorChar = ',') + { + rhs.Properties.ShowDropDown = true; + rhs.Properties.DropDownRowCount = 5; + rhs.Properties.CheckMode = TokenEditCheckMode.Default; + rhs.Properties.MaxExpandLines = 5; + rhs.Properties.PopupPanelOptions.ShowPopupPanel = true; + rhs.Properties.PopupPanelOptions.Location = TokenEditPopupPanelLocation.BelowToken; + rhs.Properties.ShowRemoveTokenButtons = false; + rhs.Properties.PopupSizeable = false; + rhs.Properties.TokenGlyphLocation = TokenEditGlyphLocation.Left; + rhs.Properties.EditValueSeparatorChar = SeparatorChar; + rhs.Properties.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand; + rhs.ShowPopup(); + } + } +} diff --git a/Test/IStation.Win.View/Core/Extend/TreeListExtend.cs b/Test/IStation.Win.View/Core/Extend/TreeListExtend.cs new file mode 100644 index 0000000..c96a878 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/TreeListExtend.cs @@ -0,0 +1,287 @@ +锘縰sing DevExpress.XtraTreeList; +using DevExpress.XtraTreeList.Columns; +using DevExpress.XtraTreeList.Nodes; +using System.Collections; + +namespace IStation.Win +{ + public static class TreeListExtend + { + /// <summary> + /// 鏍规嵁clinet point 鑾峰彇鑺傜偣 + /// </summary> + /// <param name="rhs"></param> + /// <param name="cp"></param> + /// <returns></returns> + public static TreeListNode GetNodeByCP(this TreeList rhs, Point cp) + { + Point pt = rhs.PointToClient(cp); + TreeListHitInfo ht = rhs.CalcHitInfo(pt); + TreeListNode node = ht.Node; + if (node is TreeListAutoFilterNode) + return null; + return node; + } + + /// <summary> + /// 鍒濆鍖栭粯璁よ缃� + /// </summary> + /// <param name="rhs"></param> + /// <param name="height"></param> + public static void InitialDefaultSettings(this TreeList rhs, int height = 30) + { + rhs.OptionsBehavior.Editable = false; + rhs.OptionsBehavior.ReadOnly = true; + rhs.OptionsSelection.EnableAppearanceFocusedCell = false; + rhs.OptionsMenu.EnableNodeMenu = false; + rhs.OptionsView.FocusRectStyle = DrawFocusRectStyle.None; + rhs.OptionsSelection.SelectNodesOnRightClick = true; + rhs.ViewStyle = TreeListViewStyle.TreeView; + rhs.RowHeight = height; + + rhs.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + rhs.OptionsFind.ShowCloseButton = false; + } + + /// <summary> + /// 鍒濆鍖栧閫夋璁剧疆 + /// </summary> + /// <param name="rhs"></param> + /// <param name="checkBoxFieldName"></param> + /// <param name="height"></param> + public static void InitialDefaultMultiSelectSettings(this TreeList rhs, string checkBoxFieldName = "Checked", int height = 30) + { + rhs.InitialDefaultSettings(height); + rhs.CheckBoxFieldName = checkBoxFieldName;//澶氶�夋缁戝畾鍒楀悕 + rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//鑾峰彇鎴栬缃埗鑺傜偣鏃舵槸鍚﹁嚜鍔ㄦ鏌�/鍙栨秷妫�鏌ュ瓙鑺傜偣 + rhs.OptionsView.CheckBoxStyle = DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle.Check;//璁剧疆鍕鹃�夋鏍峰紡 + } + + /// <summary> + /// 鍒濆鍖栧彲缂栬緫瑙嗗浘 + /// </summary> + public static void InitialBindingNormalEditView(this TreeList rhs, int height = 30) + { + rhs.OptionsSelection.EnableAppearanceFocusedCell = false; + rhs.OptionsMenu.EnableNodeMenu = false; + rhs.OptionsView.FocusRectStyle = DrawFocusRectStyle.None; + rhs.OptionsSelection.SelectNodesOnRightClick = true; + rhs.OptionsMenu.EnableColumnMenu = false; + rhs.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + rhs.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near; + rhs.RowHeight = height; + } + + /// <summary> + /// 澶氬垪鏄剧ず璁剧疆 + /// </summary> + /// <param name="rhs"></param> + /// <param name="height"></param> + public static void InitialMultiColSettings(this TreeList rhs, int height = 30) + { + rhs.OptionsBehavior.Editable = false; + rhs.OptionsBehavior.ReadOnly = true; + rhs.OptionsSelection.EnableAppearanceFocusedCell = false; + rhs.OptionsMenu.EnableNodeMenu = false; + rhs.OptionsView.FocusRectStyle = DrawFocusRectStyle.None; + rhs.OptionsSelection.SelectNodesOnRightClick = true; + rhs.OptionsMenu.EnableColumnMenu = false; + rhs.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + rhs.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + rhs.RowHeight = height; + + rhs.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + rhs.OptionsFind.ShowCloseButton = false; + } + + /// <summary> + /// 鍒濆鍖栧閫夋璁剧疆 + /// </summary> + /// <param name="rhs"></param> + /// <param name="checkBoxFieldName"></param> + /// <param name="height"></param> + public static void InitialMultiColMultiSelectSettings(this TreeList rhs, string checkBoxFieldName = "Checked", int height = 30) + { + rhs.InitialMultiColSettings(height); + rhs.CheckBoxFieldName = checkBoxFieldName;//澶氶�夋缁戝畾鍒楀悕 + rhs.OptionsBehavior.AllowRecursiveNodeChecking = true;//鑾峰彇鎴栬缃埗鑺傜偣鏃舵槸鍚﹁嚜鍔ㄦ鏌�/鍙栨秷妫�鏌ュ瓙鑺傜偣 + rhs.OptionsView.CheckBoxStyle = DefaultNodeCheckBoxStyle.Check;//璁剧疆鍕鹃�夋鏍峰紡 + } + + + //娓愬彉鑹� + public static void RegistCustomDrawNodeCell(this TreeList rhs, Color? bgColor = null, Color? foreColor = null) + { + if (bgColor == null) + bgColor = Color.FromArgb(0, 122, 204); + if (foreColor == null) + foreColor = Color.White; + rhs.CustomDrawNodeCell += (sender, e) => + { + if (e.Node == (sender as TreeList).FocusedNode) + { + e.Appearance.BackColor = bgColor.Value; + e.Appearance.ForeColor = foreColor.Value; + } + }; + } + + /// <summary> + /// 鑾峰彇褰撳墠鏁版嵁琛� + /// </summary> + public static T GetCurrentViewModel<T>(this TreeList tree, IEnumerable<T> source) where T : class + { + if (source == null) + return default; + if (source.Count() < 1) + { + return default; + } + var row = tree.GetFocusedRow() as T; + if (row == null) + { + return null; + } + return row; + } + + + /*/// <summary> + /// 瀵煎嚭Excel + /// </summary> + public static void ExportExcel(this TreeList tree, DocumentPage page, string pageOperateInfo) + { + page.ShowCmdOperateInfo("瀵煎嚭鍒楄〃淇℃伅鍒癊xcel"); + var path = ExcelSaveFilePathHelper.SaveFilePathName(); + page.ShowCmdOperateInfo(pageOperateInfo); + if (string.IsNullOrEmpty(path)) return; + tree.OptionsPrint.PrintAllNodes = true;//瀵煎嚭鏄庣粏 + tree.OptionsPrint.PrintTree = true;//瀵煎嚭鎵�鏈夋槑缁嗭紝false鐨勮瘽锛屽彧浼氬鍑哄睍寮�鐨勬槑缁� + tree.ExportToXlsx(path, new DevExpress.XtraPrinting.XlsxExportOptionsEx() { ExportType = DevExpress.Export.ExportType.WYSIWYG, TextExportMode = DevExpress.XtraPrinting.TextExportMode.Text }); + DialogResult dr = XtraMessageBox.Show("瀵煎嚭鎴愬姛锛佹槸鍚︽墦寮�鍒氬垰淇濆瓨鐨凟xcel鏂囦欢锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (dr != DialogResult.OK) + return; + System.Diagnostics.Process.Start(path); + }*/ + + /// <summary> + /// 璁剧疆鎷栨嫿鐘舵�佷笅鐨勬櫘閫氳鍥� + /// </summary> + public static void SetDragViewModels<t>(this TreeList rhs) where t : class + { + rhs.DragDrop += (sender, e) => + { + TreeListNode node = (TreeListNode)e.Data.GetData(typeof(TreeListNode)); + if (node == null) return; + TreeList list = (TreeList)sender; + if (list == node.TreeList) return; + TreeListHitInfo info = list.CalcHitInfo(list.PointToClient(new Point(e.X, e.Y))); + InsertBrush(list, node, info.Node == null ? -1 : info.Node.Id); + }; + } + + private static void InsertBrush(TreeList list, TreeListNode node, int parent) + { + ArrayList data = new ArrayList(); + foreach (TreeListColumn column in node.TreeList.Columns) + { + data.Add(node[column]); + } + parent = list.AppendNode(data.ToArray(), parent).Id; + + if (node.HasChildren) + foreach (TreeListNode n in node.Nodes) + InsertBrush(list, n, parent); + } + + + + #region 鍒锋柊閫変腑鑺傜偣 + private static List<TreeListNode> _haveChildNodes = null; + public static void RefreshCheckeState(this TreeList rhs) + { + if (rhs.OptionsView.CheckBoxStyle != DefaultNodeCheckBoxStyle.Check) + return; + _haveChildNodes = new List<TreeListNode>(); + foreach (TreeListNode node in rhs.Nodes) + { + GetHaveChildNode(node); + } + if (_haveChildNodes != null && _haveChildNodes.Count > 0) + { + _haveChildNodes.Reverse(); + foreach (var node in _haveChildNodes) + { + if (node.Nodes != null && node.Nodes.Any()) + { + foreach (var childNode in node.Nodes) + { + + } + var checkCount = node.Nodes.Where(x => x.Checked).Count(); + if (checkCount == 0) + { + node.CheckState = CheckState.Unchecked; + } + else if (checkCount == node.Nodes.Count) + { + node.CheckState = CheckState.Checked; + } + else + { + node.CheckState = CheckState.Indeterminate; + } + } + } + } + _haveChildNodes = null; + } + + private static void GetHaveChildNode(TreeListNode node) + { + if (node.Nodes.Count > 0) + { + _haveChildNodes.Add(node); + + foreach (TreeListNode childNode in node.Nodes) + { + GetHaveChildNode(childNode); + } + } + } + #endregion + + } +} + + + +/*/// <summary> +/// 璁剧疆鎷栨嫿鐘舵�佷笅鐨勬櫘閫氳鍥� +/// </summary> +public static void SetDragViewModels<t>(this TreeList rhs) where t : class +{ + rhs.DragDrop += (sender, e) => + { + TreeListNode node = (TreeListNode)e.Data.GetData(typeof(TreeListNode)); + if (node == null) return; + TreeList list = (TreeList)sender; + if (list == node.TreeList) return; + TreeListHitInfo info = list.CalcHitInfo(list.PointToClient(new Point(e.X, e.Y))); + InsertBrush(list, node, info.Node == null ? -1 : info.Node.Id); + }; +} + +private static void InsertBrush(TreeList list, TreeListNode node, int parent) +{ + ArrayList data = new ArrayList(); + foreach (TreeListColumn column in node.TreeList.Columns) + { + data.Add(node[column]); + } + parent = list.AppendNode(data.ToArray(), parent).Id; + + if (node.HasChildren) + foreach (TreeListNode n in node.Nodes) + InsertBrush(list, n, parent); +}*/ \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Extend/XtraChartHelper.cs b/Test/IStation.Win.View/Core/Extend/XtraChartHelper.cs new file mode 100644 index 0000000..df2c880 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/XtraChartHelper.cs @@ -0,0 +1,96 @@ +锘�//using System.Data.SqlClient; +using DevExpress.XtraCharts; + +namespace IStation.Win +{ + //鎷撳睍XtraChart + public class XtraChartHelper + { + #region SetAxisRange + public static void SetAxisRange(AxisX axis, double minValue, double maxValue) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.SetMinMaxValues(minValue, maxValue); + axis.VisualRange.SetMinMaxValues(minValue, maxValue); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + + public static void SetAxisRange(SecondaryAxisX axis, double minValue, double maxValue) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.SetMinMaxValues(minValue, maxValue); + axis.VisualRange.SetMinMaxValues(minValue, maxValue); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + + public static void SetAxisRange(AxisY axis, double minValue, double maxValue) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.AutoSideMargins = false; + axis.VisualRange.AutoSideMargins = false; + axis.WholeRange.SetMinMaxValues(minValue, maxValue); + axis.VisualRange.SetMinMaxValues(minValue, maxValue); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + public static void SetAxisRange(SecondaryAxisY axis, double minValue, double maxValue) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.AutoSideMargins = false; + axis.VisualRange.AutoSideMargins = false; + axis.WholeRange.SetMinMaxValues(minValue, maxValue); + axis.VisualRange.SetMinMaxValues(minValue, maxValue); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + public static void SetAxisRange(AxisY axis, double minValueWhole, double maxValueWhole, + double minValueVisual, double maxValueVisual) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.SetMinMaxValues(minValueWhole, maxValueWhole); + axis.VisualRange.SetMinMaxValues(minValueVisual, maxValueVisual); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + public static void SetAxisRange(SecondaryAxisY axis, double minValueWhole, double maxValueWhole, + double minValueVisual, double maxValueVisual) + { + axis.NumericScaleOptions.AutoGrid = false; + + axis.VisualRange.Auto = false; + axis.WholeRange.Auto = false; + axis.WholeRange.SideMarginsValue = 0; + axis.VisualRange.SideMarginsValue = 0; + axis.WholeRange.SetMinMaxValues(minValueWhole, maxValueWhole); + axis.VisualRange.SetMinMaxValues(minValueVisual, maxValueVisual); + axis.WholeRange.AlwaysShowZeroLevel = false; + } + #endregion + + + + } + +} diff --git a/Test/IStation.Win.View/Core/Extend/XtraFormExtend.cs b/Test/IStation.Win.View/Core/Extend/XtraFormExtend.cs new file mode 100644 index 0000000..17f2e58 --- /dev/null +++ b/Test/IStation.Win.View/Core/Extend/XtraFormExtend.cs @@ -0,0 +1,13 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win +{ + public static class XtraFormExtend + { + public static void SetGlowEffect(this XtraForm form) + { + form.ActiveGlowColor = Color.FromArgb(0, 122, 204); + form.FormBorderEffect = FormBorderEffect.Glow; + } + } +} diff --git a/Test/IStation.Win.View/Core/Wait/OverlayHelper.cs b/Test/IStation.Win.View/Core/Wait/OverlayHelper.cs new file mode 100644 index 0000000..96bca37 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/OverlayHelper.cs @@ -0,0 +1,25 @@ +锘縰sing DevExpress.XtraSplashScreen; + +namespace IStation.Win +{ + public static class OverlayHelper + { + private static OverlayWindowOptions _options = new OverlayWindowOptions(opacity: 100d / 255); + + public static IOverlaySplashScreenHandle ShowOverlay(this Control owner) + { + return DevExpress.XtraSplashScreen.SplashScreenManager.ShowOverlayForm(owner, _options); + } + + public static IOverlaySplashScreenHandle ShowOverlay(Control owner, OverlayWindowOptions options) + { + return DevExpress.XtraSplashScreen.SplashScreenManager.ShowOverlayForm(owner, options); + } + + public static IOverlaySplashScreenHandle ShowOverlay(Control owner, bool? fadeIn = null, bool? fadeOut = null, Color? backColor = null, Color? foreColor = null, int? opacity = null, Image image = null, IOverlayWindowPainter customPainter = null, string skinName = null, ImageRotationParams? rotationParameters = null, int? startupDelay = null) + { + return DevExpress.XtraSplashScreen.SplashScreenManager.ShowOverlayForm(owner, fadeIn, fadeOut, backColor, foreColor, opacity, image, customPainter, skinName, rotationParameters, startupDelay); + } + + } +} diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.Designer.cs b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.Designer.cs new file mode 100644 index 0000000..8c05116 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.Designer.cs @@ -0,0 +1,120 @@ +锘縩amespace IStation.Win +{ + partial class WaitFormStyle1 + { + /// <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() + { + this.progressPanel1 = new DevExpress.XtraWaitForm.ProgressPanel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.marqueeProgressBarControl1 = new DevExpress.XtraEditors.MarqueeProgressBarControl(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).BeginInit(); + this.SuspendLayout(); + // + // progressPanel1 + // + this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent; + this.progressPanel1.Appearance.Options.UseBackColor = true; + this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.progressPanel1.AppearanceCaption.ForeColor = System.Drawing.Color.Navy; + this.progressPanel1.AppearanceCaption.Options.UseFont = true; + this.progressPanel1.AppearanceCaption.Options.UseForeColor = true; + this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.progressPanel1.AppearanceDescription.Options.UseFont = true; + this.progressPanel1.Caption = "璇风◢鍊欙紝姝e湪鍔犺浇涓�傘�傘��"; + this.progressPanel1.Description = ""; + this.progressPanel1.ImageHorzOffset = 20; + this.progressPanel1.Location = new System.Drawing.Point(-10, 22); + this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.progressPanel1.Name = "progressPanel1"; + this.progressPanel1.Size = new System.Drawing.Size(345, 36); + this.progressPanel1.TabIndex = 0; + this.progressPanel1.Text = "progressPanel1"; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 13, 0, 13); + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(0, 26); + this.tableLayoutPanel1.TabIndex = 1; + // + // pictureBox2 + // + this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.Location = new System.Drawing.Point(275, 2); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(239, 74); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox2.TabIndex = 11; + this.pictureBox2.TabStop = false; + // + // marqueeProgressBarControl1 + // + this.marqueeProgressBarControl1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.marqueeProgressBarControl1.EditValue = 0; + this.marqueeProgressBarControl1.Location = new System.Drawing.Point(0, 85); + this.marqueeProgressBarControl1.Name = "marqueeProgressBarControl1"; + this.marqueeProgressBarControl1.Size = new System.Drawing.Size(515, 26); + this.marqueeProgressBarControl1.TabIndex = 9; + // + // WaitFormStyle1 + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.ClientSize = new System.Drawing.Size(515, 111); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.marqueeProgressBarControl1); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.progressPanel1); + this.DoubleBuffered = true; + this.Name = "WaitFormStyle1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Form1"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private DevExpress.XtraWaitForm.ProgressPanel progressPanel1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.PictureBox pictureBox2; + private DevExpress.XtraEditors.MarqueeProgressBarControl marqueeProgressBarControl1; + } +} diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.cs b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.cs new file mode 100644 index 0000000..150bc8b --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.cs @@ -0,0 +1,55 @@ +锘縩amespace IStation.Win +{ + public partial class WaitFormStyle1 : DevExpress.XtraWaitForm.WaitForm + { + public WaitFormStyle1() + { + InitializeComponent(); + this.progressPanel1.AutoHeight = true; + + + //if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.ru) + //{ + // progressPanel1.Caption = "锌芯写芯卸写懈...聽"; + //} + //else if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.enUS) + //{ + // progressPanel1.Caption = "please waiting......"; + //} + + + //this.pictureBox2.Image = IStation.Win.CorpSettingHelper.GetWaitingFormImage(); + //this.progressPanel1.AppearanceCaption.ForeColor = IStation.Win.CorpSkinStyleHelper.SkinMainColor; + //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(this, typeof(WaitForm), true, true, true); + //IStation.Win.WaitFrmHelper.HideWaitForm(); + //DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("姝e湪鍒涘缓閿�鍞」鐩�"); + //DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("璇风◢绛夊緟"); + } + + + + #region Overrides + + public override void SetCaption(string caption) + { + base.SetCaption(caption); + this.progressPanel1.Caption = caption; + } + public override void SetDescription(string description) + { + base.SetDescription(description); + this.progressPanel1.Description = description; + } + public override void ProcessCommand(Enum cmd, object arg) + { + + if (arg != null) + SetCaption(arg.ToString()); + + base.ProcessCommand(cmd, arg); + } + + #endregion + + } +} \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.resx b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle1.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.cs b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.cs new file mode 100644 index 0000000..94ed4fd --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.cs @@ -0,0 +1,53 @@ +锘縩amespace IStation.Win +{ + public partial class WaitFormStyle2 : DevExpress.XtraWaitForm.WaitForm + { + public WaitFormStyle2() + { + InitializeComponent(); + + //if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.ru) + //{ + // progressPanel1.Caption = "锌芯写芯卸写懈...聽"; + //} + //else if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.enUS) + //{ + // progressPanel1.Caption = "please waiting......"; + //} + //else if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.es) + //{ + // progressPanel1.Caption = "Por favor espere......."; + //} + //else if (IStation.Win.Localization.Current == Eventech.Model.eLocalizationType.ko) + //{ + // progressPanel1.Caption = "鞛犾嫓毵� 旮半嫟毽劯鞖� 搿滊摐 欷�..."; + //} + + //this.labelControlCorpName.Text = IStation.GlobeParas.GetCorpFullName(IStation.Win.Localization.Current); + + //this.labelControlVersion.ForeColor = this.labelControlCorpName.ForeColor = + //this.progressPanel1.AppearanceCaption.ForeColor = IStation.Win.CorpSkinStyleHelper.SkinMainColor; + //this.pictureBox2.Image = IStation.Win.CorpSettingHelper.GetWaitingFormImage(); + } + + + + public override void SetCaption(string caption) + { + base.SetCaption(caption); + this.progressPanel1.Caption = caption; + } + public override void SetDescription(string description) + { + base.SetDescription(description); + this.progressPanel1.Description = description; + } + public override void ProcessCommand(Enum cmd, object arg) + { + if (arg != null) + SetCaption(arg.ToString()); + + base.ProcessCommand(cmd, arg); + } + } +} \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.designer.cs b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.designer.cs new file mode 100644 index 0000000..4a20c56 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.designer.cs @@ -0,0 +1,129 @@ +锘縩amespace IStation.Win +{ + partial class WaitFormStyle2 + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param nameLogin="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() + { + this.marqueeProgressBarControl1 = new DevExpress.XtraEditors.MarqueeProgressBarControl(); + this.labelControlVersion = new DevExpress.XtraEditors.LabelControl(); + this.labelControlCorpName = new DevExpress.XtraEditors.LabelControl(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.progressPanel1 = new DevExpress.XtraWaitForm.ProgressPanel(); + ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + this.SuspendLayout(); + // + // marqueeProgressBarControl1 + // + this.marqueeProgressBarControl1.EditValue = 0; + this.marqueeProgressBarControl1.Location = new System.Drawing.Point(12, 38); + this.marqueeProgressBarControl1.Name = "marqueeProgressBarControl1"; + this.marqueeProgressBarControl1.Size = new System.Drawing.Size(528, 23); + this.marqueeProgressBarControl1.TabIndex = 5; + // + // labelControlVersion + // + this.labelControlVersion.Appearance.Font = new System.Drawing.Font("Times New Roman", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelControlVersion.Appearance.Options.UseFont = true; + this.labelControlVersion.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + this.labelControlVersion.Location = new System.Drawing.Point(430, 110); + this.labelControlVersion.Name = "labelControlVersion"; + this.labelControlVersion.Size = new System.Drawing.Size(98, 12); + this.labelControlVersion.TabIndex = 6; + this.labelControlVersion.Text = "Copyright 漏 2019-2025"; + // + // labelControlCorpName + // + this.labelControlCorpName.Appearance.Font = new System.Drawing.Font("Times New Roman", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelControlCorpName.Appearance.Options.UseFont = true; + this.labelControlCorpName.Appearance.Options.UseTextOptions = true; + this.labelControlCorpName.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.labelControlCorpName.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; + this.labelControlCorpName.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + this.labelControlCorpName.Location = new System.Drawing.Point(407, 128); + this.labelControlCorpName.Name = "labelControlCorpName"; + this.labelControlCorpName.Size = new System.Drawing.Size(133, 12); + this.labelControlCorpName.TabIndex = 6; + this.labelControlCorpName.Text = "涓婃捣涔夌淮娴佷綋绉戞妧鏈夐檺鍏徃"; + // + // pictureBox2 + // + this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.Location = new System.Drawing.Point(12, 67); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(290, 73); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox2.TabIndex = 8; + this.pictureBox2.TabStop = false; + // + // progressPanel1 + // + this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent; + this.progressPanel1.Appearance.Options.UseBackColor = true; + this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.progressPanel1.AppearanceCaption.Options.UseFont = true; + this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.progressPanel1.AppearanceDescription.Options.UseFont = true; + this.progressPanel1.Caption = "璇风◢鍊欙紝姝e湪鍔犺浇涓�傘�傘��"; + this.progressPanel1.Description = ""; + this.progressPanel1.ImageHorzOffset = 20; + this.progressPanel1.Location = new System.Drawing.Point(-6, 2); + this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.progressPanel1.Name = "progressPanel1"; + this.progressPanel1.Size = new System.Drawing.Size(345, 36); + this.progressPanel1.TabIndex = 9; + this.progressPanel1.Text = "progressPanel1"; + // + // WaitFormStyle2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(552, 152); + this.Controls.Add(this.labelControlCorpName); + this.Controls.Add(this.progressPanel1); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.labelControlVersion); + this.Controls.Add(this.marqueeProgressBarControl1); + this.Font = new System.Drawing.Font("妤蜂綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "WaitFormStyle2"; + this.Text = "Form1"; + ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private DevExpress.XtraEditors.MarqueeProgressBarControl marqueeProgressBarControl1; + private DevExpress.XtraEditors.LabelControl labelControlVersion; + private DevExpress.XtraEditors.LabelControl labelControlCorpName; + private System.Windows.Forms.PictureBox pictureBox2; + private DevExpress.XtraWaitForm.ProgressPanel progressPanel1; + } +} diff --git a/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.resx b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFormStyle2.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/Test/IStation.Win.View/Core/Wait/WaitFrmHelper.cs b/Test/IStation.Win.View/Core/Wait/WaitFrmHelper.cs new file mode 100644 index 0000000..ac34fc3 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/WaitFrmHelper.cs @@ -0,0 +1,147 @@ +锘縰sing DevExpress.XtraSplashScreen; + +namespace IStation.Win +{ + public static class WaitHelper + { + private const string _caption = "鍔姏鍔犺浇涓�..."; + + /// <summary> + ///鏄剧ず绛夊緟绐椾綋 + /// </summary> + public static void ShowWaitForm() + { + HideWaitForm(); + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(null, typeof(WaitFormStyle1), true, true, false); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(_caption); + } + + + /// <summary> + /// 鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="form">鐖剁獥浣�</param> + public static void ShowWaitForm(Form form, bool isLocked = false) + { + HideWaitForm(); + if (isLocked) + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(form, typeof(WaitFormStyle1), true, true, false, ParentFormState.Locked); + else + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(form, typeof(WaitFormStyle1), true, true, false, ParentFormState.Unlocked); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(_caption); + } + + + /// <summary> + /// 鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="caption">鎻愮ず淇℃伅</param> + public static void ShowWaitForm(string caption) + { + HideWaitForm(); + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(null, typeof(WaitFormStyle1), true, true, false); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(caption); + } + + /// <summary> + /// 鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="form">鐖剁獥浣�</param> + /// <param name="caption">鎻愮ず淇℃伅</param> + public static void ShowWaitForm(Form form, string caption) + { + HideWaitForm(); + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(form, typeof(WaitFormStyle1), true, true, false); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(caption); + } + + /// <summary> + /// 鐢ㄦ埛鎺т欢璋冪敤鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="userCtrl"></param> + /// <param name="isLocked">鏄惁閿佸畾</param> + public static void ShowWaitForm(UserControl userCtrl, bool isLocked = false) + { + HideWaitForm(); + if (isLocked) + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true, ParentFormState.Locked); + else + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(_caption); + } + + /// <summary> + ///鐢ㄦ埛鎺т欢璋冪敤鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="userCtrl">鐢ㄦ埛鎺т欢</param> + /// <param name="caption">鎻愮ず淇℃伅</param> + /// <param name="isLocked">鏄惁閿佸畾</param> + public static void ShowWaitForm(UserControl userCtrl, string caption, bool isLocked = false) + { + HideWaitForm(); + if (isLocked) + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true, ParentFormState.Locked); + else + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true); + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(caption); + } + + /// <summary> + /// 鐢ㄦ埛鎺т欢璋冪敤鏄剧ず绛夊緟绐椾綋 + /// </summary> + /// <param name="userCtrl">鐢ㄦ埛鎺т欢</param> + /// <param name="pt">鏄剧ず浣嶇疆</param> + /// <param name="isLocked">鏄惁閿佸畾</param> + /// <param name="caption">鎻愮ず淇℃伅</param> + public static void ShowWaitForm(UserControl userCtrl, Point pt, bool isLocked = false, string caption = null) + { + HideWaitForm(); + if (isLocked) + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true, SplashFormStartPosition.Manual, pt, ParentFormState.Locked); + else + DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(userCtrl, typeof(WaitFormStyle1), true, true, SplashFormStartPosition.Manual, pt, ParentFormState.Unlocked); + if (caption == null) + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(_caption); + else + DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption(caption); + } + + /// <summary> + /// 璁剧疆绛夊緟鎻愮ず + /// </summary> + /// <param name="Caption"></param> + public static void SetWaitCaption(string Caption) + { + var form = DevExpress.XtraSplashScreen.SplashScreenManager.Default; + if (form == null) + return; + form.SetWaitFormCaption(Caption); + } + + + /// <summary> + /// 鍏抽棴绛夊緟绐椾綋 + /// </summary> + public static void HideWaitForm() + { + DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm(false); + } + + /// <summary> + /// 閿佸畾鎺т欢鐨勫墠鎻愪笅蹇呴』璋冪敤姝ゆ柟娉� + /// </summary> + /// <param name="ctrl"></param> + public static void HideWaitForm(Control ctrl) + { + ctrl.Invoke(new MethodInvoker(() => + { + DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm(false); + })); + } + + + + + } + +} diff --git a/Test/IStation.Win.View/Core/Wait/eSplashScreenCommand.cs b/Test/IStation.Win.View/Core/Wait/eSplashScreenCommand.cs new file mode 100644 index 0000000..965e2a3 --- /dev/null +++ b/Test/IStation.Win.View/Core/Wait/eSplashScreenCommand.cs @@ -0,0 +1,8 @@ +锘縩amespace IStation.Win +{ + public enum eSplashScreenCommand + { + Caption, + Description + } +} diff --git a/Test/IStation.Win.View/IStation.Win.View.csproj b/Test/IStation.Win.View/IStation.Win.View.csproj new file mode 100644 index 0000000..c336c34 --- /dev/null +++ b/Test/IStation.Win.View/IStation.Win.View.csproj @@ -0,0 +1,31 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>WinExe</OutputType> + <TargetFramework>net6.0-windows</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>disable</Nullable> + </PropertyGroup> + + <ItemGroup> + <Compile Remove="ViewModel\RealTimeZyScadaViewModel - 澶嶅埗.cs" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\IStation.Test.Init\IStation.Test.Init.csproj" /> + </ItemGroup> + + <ItemGroup> + <Compile Update="Core\Wait\WaitFormStyle1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="Core\Wait\WaitFormStyle2.cs"> + <SubType>Form</SubType> + </Compile> + </ItemGroup> + +</Project> diff --git a/Test/IStation.Win.View/IStation.Win.View.csproj.user b/Test/IStation.Win.View/IStation.Win.View.csproj.user new file mode 100644 index 0000000..96ab523 --- /dev/null +++ b/Test/IStation.Win.View/IStation.Win.View.csproj.user @@ -0,0 +1,12 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> + <ItemGroup> + <Compile Update="View\RealTimeZyScadaView.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="viweMian.cs"> + <SubType>Form</SubType> + </Compile> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/Test/IStation.Win.View/Program.cs b/Test/IStation.Win.View/Program.cs new file mode 100644 index 0000000..d585b44 --- /dev/null +++ b/Test/IStation.Win.View/Program.cs @@ -0,0 +1,66 @@ +锘縰sing DevExpress.XtraEditors; + +namespace IStation.Win.View +{ + internal class Program + { + static void Main(string[] args) + { + using (var mutex = new System.Threading.Mutex(true, Application.ProductName, out bool createNew)) + { + if (!createNew) + { + MessageBox.Show("绋嬪簭姝e湪杩愯涓�..."); + Application.Exit(); + return; + } + } + + + //澶勭悊鏈崟鑾风殑寮傚父 + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); + + //澶勭悊UI绾跨▼寮傚父 + Application.ThreadException += (sender, e) => + { + var ex = e.Exception; + XtraMessageBox.Show($"绯荤粺鍑虹幇鏈煡寮傚父锛岃閲嶅惎绯荤粺锛乗r\n{ex.Message}"); + }; + + //澶勭悊闈濽I绾跨▼寮傚父 + AppDomain.CurrentDomain.UnhandledException += (sender, e) => + { + if (e.ExceptionObject is Exception ex) + { + XtraMessageBox.Show($"绯荤粺鍑虹幇鏈煡寮傚父锛岃閲嶅惎绯荤粺锛乗r\n{ex.Message}"); + } + }; + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + + System.Windows.Forms.Application.EnableVisualStyles(); + System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); + + //瀛椾綋 + //var font = new System.Drawing.Font("寰蒋闆呴粦", 10); + //DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont = font; + //DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont = font; + //DevExpress.Utils.AppearanceObject.DefaultFont = font; + + + //zh-Hans鐣岄潰缈昏瘧 + System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-Hans"); + System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-Hans"); + + //鐨偆 + DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(DevExpress.LookAndFeel.SkinStyle.WXICompact); + + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new viweMian()); + } + } +} diff --git a/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScadaViewModel.datasource b/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScadaViewModel.datasource new file mode 100644 index 0000000..38728df --- /dev/null +++ b/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScadaViewModel.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="RealTimePumpScadaViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>IStation.Win.View.ViewModel.RealTimePumpScadaViewModel, IStation.Win.View, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScheduleViewModel.datasource b/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScheduleViewModel.datasource new file mode 100644 index 0000000..185cdf1 --- /dev/null +++ b/Test/IStation.Win.View/Properties/DataSources/IStation.Win.View.ViewModel.RealTimePumpScheduleViewModel.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="RealTimePumpScheduleViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>IStation.Win.View.ViewModel.RealTimePumpScheduleViewModel, IStation.Win.View, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/Test/IStation.Win.View/View/RealTimeZyScadaView.Designer.cs b/Test/IStation.Win.View/View/RealTimeZyScadaView.Designer.cs new file mode 100644 index 0000000..ad0e0d7 --- /dev/null +++ b/Test/IStation.Win.View/View/RealTimeZyScadaView.Designer.cs @@ -0,0 +1,1361 @@ +锘縩amespace IStation.Win.View +{ + partial class RealTimeZyScadaView + { + /// <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 System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + btnGetScada = new DevExpress.XtraEditors.SimpleButton(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + gridControlStation2 = new DevExpress.XtraGrid.GridControl(); + realTimePumpScadaViewModelBindingSource1 = new BindingSource(components); + gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colFlag1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRunStatus1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colInletWaterLevel1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colOutletPressure1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colInstantaneousFlow1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePower1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeed1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colMaintenanceState1 = new DevExpress.XtraGrid.Columns.GridColumn(); + gridControlStation1 = new DevExpress.XtraGrid.GridControl(); + realTimePumpScadaViewModelBindingSource = new BindingSource(components); + gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colFlag = new DevExpress.XtraGrid.Columns.GridColumn(); + colRunStatus = new DevExpress.XtraGrid.Columns.GridColumn(); + colInletWaterLevel = new DevExpress.XtraGrid.Columns.GridColumn(); + colOutletPressure = new DevExpress.XtraGrid.Columns.GridColumn(); + colInstantaneousFlow = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePower = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeed = new DevExpress.XtraGrid.Columns.GridColumn(); + colMaintenanceState = new DevExpress.XtraGrid.Columns.GridColumn(); + sidePanel1 = new DevExpress.XtraEditors.SidePanel(); + layoutControl2 = new DevExpress.XtraLayout.LayoutControl(); + gridControl1 = new DevExpress.XtraGrid.GridControl(); + realTimePumpScheduleViewModelBindingSource = new BindingSource(components); + gridView3 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colFlag2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRunStatus2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colOutletPressure2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colInstantaneousFlow2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePower2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeed2 = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePowerDiff = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeedDiif = new DevExpress.XtraGrid.Columns.GridColumn(); + txtJD1Flow = new DevExpress.XtraEditors.TextEdit(); + txtJD2Pressure = new DevExpress.XtraEditors.TextEdit(); + txtJD2Flow = new DevExpress.XtraEditors.TextEdit(); + txtJD1Pressure = new DevExpress.XtraEditors.TextEdit(); + txtJD3Flow = new DevExpress.XtraEditors.TextEdit(); + txtJD3Pressure = new DevExpress.XtraEditors.TextEdit(); + txtTargetFlow1 = new DevExpress.XtraEditors.TextEdit(); + txtTargetPressure1 = new DevExpress.XtraEditors.TextEdit(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup12 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup8 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup14 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + sidePanel2 = new DevExpress.XtraEditors.SidePanel(); + layoutControl3 = new DevExpress.XtraLayout.LayoutControl(); + gridControl2 = new DevExpress.XtraGrid.GridControl(); + realTimePumpScheduleViewModelBindingSource1 = new BindingSource(components); + gridView4 = new DevExpress.XtraGrid.Views.Grid.GridView(); + colFlag3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRunStatus3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colOutletPressure3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colInstantaneousFlow3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePower3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeed3 = new DevExpress.XtraGrid.Columns.GridColumn(); + colActivePowerDiff1 = new DevExpress.XtraGrid.Columns.GridColumn(); + colRotateSpeedDiif1 = new DevExpress.XtraGrid.Columns.GridColumn(); + txtDN2400Flow = new DevExpress.XtraEditors.TextEdit(); + txtDN2700Flow = new DevExpress.XtraEditors.TextEdit(); + txtDN2400Pressure = new DevExpress.XtraEditors.TextEdit(); + txtDN2700Pressure = new DevExpress.XtraEditors.TextEdit(); + txtTargetFlow2 = new DevExpress.XtraEditors.TextEdit(); + txtTargetPressure2 = new DevExpress.XtraEditors.TextEdit(); + layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup7 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup10 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlGroup11 = new DevExpress.XtraLayout.LayoutControlGroup(); + emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup13 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup9 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup15 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); + sidePanel3 = new DevExpress.XtraEditors.SidePanel(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridControlStation2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScadaViewModelBindingSource1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridView2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridControlStation1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScadaViewModelBindingSource).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit(); + sidePanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)layoutControl2).BeginInit(); + layoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScheduleViewModelBindingSource).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridView3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD1Flow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD2Pressure.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD2Flow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD1Pressure.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD3Flow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtJD3Pressure.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetFlow1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetPressure1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup12).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); + sidePanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)layoutControl3).BeginInit(); + layoutControl3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)gridControl2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScheduleViewModelBindingSource1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)gridView4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2400Flow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2700Flow.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2400Pressure.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2700Pressure.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetFlow2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetPressure2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup10).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup11).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup9).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem19).BeginInit(); + sidePanel3.SuspendLayout(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(btnGetScada); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Margin = new Padding(4, 3, 4, 3); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(851, 564, 975, 600); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(1426, 78); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // btnGetScada + // + btnGetScada.Location = new Point(6, 39); + btnGetScada.Margin = new Padding(2, 3, 2, 3); + btnGetScada.Name = "btnGetScada"; + btnGetScada.Size = new Size(1414, 33); + btnGetScada.StyleController = layoutControl1; + btnGetScada.TabIndex = 4; + btnGetScada.Text = "鑾峰彇"; + btnGetScada.Click += btnGetScada_Click; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup3 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(1426, 78); + Root.TextVisible = false; + // + // layoutControlGroup3 + // + layoutControlGroup3.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3 }); + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup3"; + layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(4, 4, 4, 4); + layoutControlGroup3.Size = new Size(1426, 78); + layoutControlGroup3.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup3.Text = "鎿嶄綔"; + // + // layoutControlItem3 + // + layoutControlItem3.Control = btnGetScada; + layoutControlItem3.Location = new Point(0, 0); + layoutControlItem3.MinSize = new Size(123, 32); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(1418, 37); + layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; + // + // gridControlStation2 + // + gridControlStation2.DataSource = realTimePumpScadaViewModelBindingSource1; + gridControlStation2.EmbeddedNavigator.Margin = new Padding(2, 3, 2, 3); + gridControlStation2.Location = new Point(1, 210); + gridControlStation2.MainView = gridView2; + gridControlStation2.Name = "gridControlStation2"; + gridControlStation2.Size = new Size(846, 321); + gridControlStation2.TabIndex = 5; + gridControlStation2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView2 }); + // + // realTimePumpScadaViewModelBindingSource1 + // + realTimePumpScadaViewModelBindingSource1.DataSource = typeof(ViewModel.RealTimePumpScadaViewModel); + // + // gridView2 + // + gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colFlag1, colRunStatus1, colInletWaterLevel1, colOutletPressure1, colInstantaneousFlow1, colActivePower1, colRotateSpeed1, colMaintenanceState1 }); + gridView2.DetailHeight = 349; + gridView2.GridControl = gridControlStation2; + gridView2.Name = "gridView2"; + // + // colFlag1 + // + colFlag1.FieldName = "Flag"; + colFlag1.MinWidth = 30; + colFlag1.Name = "colFlag1"; + colFlag1.Visible = true; + colFlag1.VisibleIndex = 0; + colFlag1.Width = 62; + // + // colRunStatus1 + // + colRunStatus1.FieldName = "RunStatus"; + colRunStatus1.MinWidth = 30; + colRunStatus1.Name = "colRunStatus1"; + colRunStatus1.Visible = true; + colRunStatus1.VisibleIndex = 1; + colRunStatus1.Width = 62; + // + // colInletWaterLevel1 + // + colInletWaterLevel1.FieldName = "InletWaterLevel"; + colInletWaterLevel1.MinWidth = 30; + colInletWaterLevel1.Name = "colInletWaterLevel1"; + colInletWaterLevel1.Visible = true; + colInletWaterLevel1.VisibleIndex = 2; + colInletWaterLevel1.Width = 62; + // + // colOutletPressure1 + // + colOutletPressure1.FieldName = "OutletPressure"; + colOutletPressure1.MinWidth = 30; + colOutletPressure1.Name = "colOutletPressure1"; + colOutletPressure1.Visible = true; + colOutletPressure1.VisibleIndex = 3; + colOutletPressure1.Width = 62; + // + // colInstantaneousFlow1 + // + colInstantaneousFlow1.FieldName = "InstantaneousFlow"; + colInstantaneousFlow1.MinWidth = 30; + colInstantaneousFlow1.Name = "colInstantaneousFlow1"; + colInstantaneousFlow1.Visible = true; + colInstantaneousFlow1.VisibleIndex = 4; + colInstantaneousFlow1.Width = 62; + // + // colActivePower1 + // + colActivePower1.FieldName = "ActivePower"; + colActivePower1.MinWidth = 30; + colActivePower1.Name = "colActivePower1"; + colActivePower1.Visible = true; + colActivePower1.VisibleIndex = 5; + colActivePower1.Width = 62; + // + // colRotateSpeed1 + // + colRotateSpeed1.FieldName = "RotateSpeed"; + colRotateSpeed1.MinWidth = 30; + colRotateSpeed1.Name = "colRotateSpeed1"; + colRotateSpeed1.Visible = true; + colRotateSpeed1.VisibleIndex = 6; + colRotateSpeed1.Width = 62; + // + // colMaintenanceState1 + // + colMaintenanceState1.FieldName = "MaintenanceState"; + colMaintenanceState1.MinWidth = 30; + colMaintenanceState1.Name = "colMaintenanceState1"; + colMaintenanceState1.Visible = true; + colMaintenanceState1.VisibleIndex = 7; + colMaintenanceState1.Width = 62; + // + // gridControlStation1 + // + gridControlStation1.DataSource = realTimePumpScadaViewModelBindingSource; + gridControlStation1.EmbeddedNavigator.Margin = new Padding(2, 3, 2, 3); + gridControlStation1.Location = new Point(1, 205); + gridControlStation1.MainView = gridView1; + gridControlStation1.Name = "gridControlStation1"; + gridControlStation1.Size = new Size(575, 326); + gridControlStation1.TabIndex = 7; + gridControlStation1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); + // + // realTimePumpScadaViewModelBindingSource + // + realTimePumpScadaViewModelBindingSource.DataSource = typeof(ViewModel.RealTimePumpScadaViewModel); + // + // gridView1 + // + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colFlag, colRunStatus, colInletWaterLevel, colOutletPressure, colInstantaneousFlow, colActivePower, colRotateSpeed, colMaintenanceState }); + gridView1.DetailHeight = 349; + gridView1.GridControl = gridControlStation1; + gridView1.Name = "gridView1"; + // + // colFlag + // + colFlag.FieldName = "Flag"; + colFlag.MinWidth = 30; + colFlag.Name = "colFlag"; + colFlag.Visible = true; + colFlag.VisibleIndex = 0; + colFlag.Width = 62; + // + // colRunStatus + // + colRunStatus.FieldName = "RunStatus"; + colRunStatus.MinWidth = 30; + colRunStatus.Name = "colRunStatus"; + colRunStatus.Visible = true; + colRunStatus.VisibleIndex = 1; + colRunStatus.Width = 62; + // + // colInletWaterLevel + // + colInletWaterLevel.FieldName = "InletWaterLevel"; + colInletWaterLevel.MinWidth = 30; + colInletWaterLevel.Name = "colInletWaterLevel"; + colInletWaterLevel.Visible = true; + colInletWaterLevel.VisibleIndex = 2; + colInletWaterLevel.Width = 62; + // + // colOutletPressure + // + colOutletPressure.FieldName = "OutletPressure"; + colOutletPressure.MinWidth = 30; + colOutletPressure.Name = "colOutletPressure"; + colOutletPressure.Visible = true; + colOutletPressure.VisibleIndex = 3; + colOutletPressure.Width = 62; + // + // colInstantaneousFlow + // + colInstantaneousFlow.FieldName = "InstantaneousFlow"; + colInstantaneousFlow.MinWidth = 30; + colInstantaneousFlow.Name = "colInstantaneousFlow"; + colInstantaneousFlow.Width = 62; + // + // colActivePower + // + colActivePower.FieldName = "ActivePower"; + colActivePower.MinWidth = 30; + colActivePower.Name = "colActivePower"; + colActivePower.Visible = true; + colActivePower.VisibleIndex = 4; + colActivePower.Width = 62; + // + // colRotateSpeed + // + colRotateSpeed.FieldName = "RotateSpeed"; + colRotateSpeed.MinWidth = 30; + colRotateSpeed.Name = "colRotateSpeed"; + colRotateSpeed.Visible = true; + colRotateSpeed.VisibleIndex = 5; + colRotateSpeed.Width = 62; + // + // colMaintenanceState + // + colMaintenanceState.FieldName = "MaintenanceState"; + colMaintenanceState.MinWidth = 30; + colMaintenanceState.Name = "colMaintenanceState"; + colMaintenanceState.Width = 62; + // + // sidePanel1 + // + sidePanel1.Controls.Add(layoutControl2); + sidePanel1.Dock = DockStyle.Fill; + sidePanel1.Location = new Point(0, 79); + sidePanel1.Name = "sidePanel1"; + sidePanel1.Size = new Size(577, 923); + sidePanel1.TabIndex = 1; + sidePanel1.Text = "sidePanel1"; + // + // layoutControl2 + // + layoutControl2.Controls.Add(gridControl1); + layoutControl2.Controls.Add(gridControlStation1); + layoutControl2.Controls.Add(txtJD1Flow); + layoutControl2.Controls.Add(txtJD2Pressure); + layoutControl2.Controls.Add(txtJD2Flow); + layoutControl2.Controls.Add(txtJD1Pressure); + layoutControl2.Controls.Add(txtJD3Flow); + layoutControl2.Controls.Add(txtJD3Pressure); + layoutControl2.Controls.Add(txtTargetFlow1); + layoutControl2.Controls.Add(txtTargetPressure1); + layoutControl2.Dock = DockStyle.Fill; + layoutControl2.Location = new Point(0, 0); + layoutControl2.Name = "layoutControl2"; + layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1068, 661, 975, 600); + layoutControl2.Root = layoutControlGroup4; + layoutControl2.Size = new Size(577, 923); + layoutControl2.TabIndex = 0; + layoutControl2.Text = "layoutControl2"; + // + // gridControl1 + // + gridControl1.DataSource = realTimePumpScheduleViewModelBindingSource; + gridControl1.Location = new Point(1, 638); + gridControl1.MainView = gridView3; + gridControl1.Name = "gridControl1"; + gridControl1.Size = new Size(575, 284); + gridControl1.TabIndex = 10; + gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView3 }); + // + // realTimePumpScheduleViewModelBindingSource + // + realTimePumpScheduleViewModelBindingSource.DataSource = typeof(ViewModel.RealTimePumpScheduleViewModel); + // + // gridView3 + // + gridView3.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colFlag2, colRunStatus2, colOutletPressure2, colInstantaneousFlow2, colActivePower2, colRotateSpeed2, colActivePowerDiff, colRotateSpeedDiif }); + gridView3.GridControl = gridControl1; + gridView3.Name = "gridView3"; + gridView3.CustomDrawCell += gridView3_CustomDrawCell; + // + // colFlag2 + // + colFlag2.FieldName = "Flag"; + colFlag2.MinWidth = 30; + colFlag2.Name = "colFlag2"; + colFlag2.Visible = true; + colFlag2.VisibleIndex = 0; + colFlag2.Width = 112; + // + // colRunStatus2 + // + colRunStatus2.FieldName = "RunStatus"; + colRunStatus2.MinWidth = 30; + colRunStatus2.Name = "colRunStatus2"; + colRunStatus2.Visible = true; + colRunStatus2.VisibleIndex = 1; + colRunStatus2.Width = 112; + // + // colOutletPressure2 + // + colOutletPressure2.FieldName = "OutletPressure"; + colOutletPressure2.MinWidth = 30; + colOutletPressure2.Name = "colOutletPressure2"; + colOutletPressure2.Visible = true; + colOutletPressure2.VisibleIndex = 2; + colOutletPressure2.Width = 112; + // + // colInstantaneousFlow2 + // + colInstantaneousFlow2.FieldName = "InstantaneousFlow"; + colInstantaneousFlow2.MinWidth = 30; + colInstantaneousFlow2.Name = "colInstantaneousFlow2"; + colInstantaneousFlow2.Visible = true; + colInstantaneousFlow2.VisibleIndex = 3; + colInstantaneousFlow2.Width = 112; + // + // colActivePower2 + // + colActivePower2.FieldName = "ActivePower"; + colActivePower2.MinWidth = 30; + colActivePower2.Name = "colActivePower2"; + colActivePower2.Visible = true; + colActivePower2.VisibleIndex = 4; + colActivePower2.Width = 112; + // + // colRotateSpeed2 + // + colRotateSpeed2.FieldName = "RotateSpeed"; + colRotateSpeed2.MinWidth = 30; + colRotateSpeed2.Name = "colRotateSpeed2"; + colRotateSpeed2.Visible = true; + colRotateSpeed2.VisibleIndex = 5; + colRotateSpeed2.Width = 112; + // + // colActivePowerDiff + // + colActivePowerDiff.FieldName = "ActivePowerDiff"; + colActivePowerDiff.MinWidth = 30; + colActivePowerDiff.Name = "colActivePowerDiff"; + colActivePowerDiff.Width = 112; + // + // colRotateSpeedDiif + // + colRotateSpeedDiif.FieldName = "RotateSpeedDiif"; + colRotateSpeedDiif.MinWidth = 30; + colRotateSpeedDiif.Name = "colRotateSpeedDiif"; + colRotateSpeedDiif.Visible = true; + colRotateSpeedDiif.VisibleIndex = 6; + colRotateSpeedDiif.Width = 112; + // + // txtJD1Flow + // + txtJD1Flow.Location = new Point(97, 73); + txtJD1Flow.Margin = new Padding(2, 3, 2, 3); + txtJD1Flow.Name = "txtJD1Flow"; + txtJD1Flow.Size = new Size(185, 28); + txtJD1Flow.StyleController = layoutControl2; + txtJD1Flow.TabIndex = 0; + // + // txtJD2Pressure + // + txtJD2Pressure.Location = new Point(384, 105); + txtJD2Pressure.Margin = new Padding(2, 3, 2, 3); + txtJD2Pressure.Name = "txtJD2Pressure"; + txtJD2Pressure.Size = new Size(186, 28); + txtJD2Pressure.StyleController = layoutControl2; + txtJD2Pressure.TabIndex = 5; + // + // txtJD2Flow + // + txtJD2Flow.Location = new Point(97, 105); + txtJD2Flow.Margin = new Padding(2, 3, 2, 3); + txtJD2Flow.Name = "txtJD2Flow"; + txtJD2Flow.Size = new Size(185, 28); + txtJD2Flow.StyleController = layoutControl2; + txtJD2Flow.TabIndex = 2; + // + // txtJD1Pressure + // + txtJD1Pressure.Location = new Point(384, 73); + txtJD1Pressure.Margin = new Padding(2, 3, 2, 3); + txtJD1Pressure.Name = "txtJD1Pressure"; + txtJD1Pressure.Size = new Size(186, 28); + txtJD1Pressure.StyleController = layoutControl2; + txtJD1Pressure.TabIndex = 4; + // + // txtJD3Flow + // + txtJD3Flow.Location = new Point(97, 137); + txtJD3Flow.Margin = new Padding(2, 3, 2, 3); + txtJD3Flow.Name = "txtJD3Flow"; + txtJD3Flow.Size = new Size(185, 28); + txtJD3Flow.StyleController = layoutControl2; + txtJD3Flow.TabIndex = 3; + // + // txtJD3Pressure + // + txtJD3Pressure.Location = new Point(384, 137); + txtJD3Pressure.Margin = new Padding(2, 3, 2, 3); + txtJD3Pressure.Name = "txtJD3Pressure"; + txtJD3Pressure.Size = new Size(186, 28); + txtJD3Pressure.StyleController = layoutControl2; + txtJD3Pressure.TabIndex = 6; + // + // txtTargetFlow1 + // + txtTargetFlow1.Location = new Point(97, 570); + txtTargetFlow1.Margin = new Padding(2, 3, 2, 3); + txtTargetFlow1.Name = "txtTargetFlow1"; + txtTargetFlow1.Size = new Size(201, 28); + txtTargetFlow1.StyleController = layoutControl2; + txtTargetFlow1.TabIndex = 8; + // + // txtTargetPressure1 + // + txtTargetPressure1.Location = new Point(392, 570); + txtTargetPressure1.Margin = new Padding(2, 3, 2, 3); + txtTargetPressure1.Name = "txtTargetPressure1"; + txtTargetPressure1.Size = new Size(178, 28); + txtTargetPressure1.StyleController = layoutControl2; + txtTargetPressure1.TabIndex = 9; + // + // layoutControlGroup4 + // + layoutControlGroup4.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup5 }); + layoutControlGroup4.Name = "Root"; + layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup4.Size = new Size(577, 923); + layoutControlGroup4.TextVisible = false; + // + // layoutControlGroup5 + // + layoutControlGroup5.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup12, layoutControlGroup8, layoutControlGroup14 }); + layoutControlGroup5.Location = new Point(0, 0); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup5.Size = new Size(575, 921); + layoutControlGroup5.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup5.Text = "1杈撴按"; + // + // layoutControlGroup1 + // + layoutControlGroup1.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, layoutControlItem6, layoutControlItem8 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "layoutControlGroup1"; + layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup1.Size = new Size(287, 138); + layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Text = "鎬荤娴侀噺"; + // + // layoutControlItem4 + // + layoutControlItem4.Control = txtJD1Flow; + layoutControlItem4.Location = new Point(0, 0); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(279, 32); + layoutControlItem4.Text = "鍢夊畾1绾�:"; + layoutControlItem4.TextSize = new Size(78, 22); + // + // layoutControlItem6 + // + layoutControlItem6.Control = txtJD2Flow; + layoutControlItem6.Location = new Point(0, 32); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(279, 32); + layoutControlItem6.Text = "鍢夊畾2绾�:"; + layoutControlItem6.TextSize = new Size(78, 22); + // + // layoutControlItem8 + // + layoutControlItem8.Control = txtJD3Flow; + layoutControlItem8.Location = new Point(0, 64); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(279, 32); + layoutControlItem8.Text = "鍢夊畾3绾�:"; + layoutControlItem8.TextSize = new Size(78, 22); + // + // layoutControlGroup2 + // + layoutControlGroup2.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7, layoutControlItem5, layoutControlItem9 }); + layoutControlGroup2.Location = new Point(287, 0); + layoutControlGroup2.Name = "layoutControlGroup2"; + layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup2.Size = new Size(288, 138); + layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup2.Text = "鎬荤鍘嬪姏"; + // + // layoutControlItem7 + // + layoutControlItem7.Control = txtJD1Pressure; + layoutControlItem7.Location = new Point(0, 0); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(280, 32); + layoutControlItem7.Text = "鍢夊畾1绾�:"; + layoutControlItem7.TextSize = new Size(78, 22); + // + // layoutControlItem5 + // + layoutControlItem5.Control = txtJD2Pressure; + layoutControlItem5.Location = new Point(0, 32); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(280, 32); + layoutControlItem5.Text = "鍢夊畾2绾�:"; + layoutControlItem5.TextSize = new Size(78, 22); + // + // layoutControlItem9 + // + layoutControlItem9.Control = txtJD3Pressure; + layoutControlItem9.Location = new Point(0, 64); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(280, 32); + layoutControlItem9.Text = "鍢夊畾3绾�:"; + layoutControlItem9.TextSize = new Size(78, 22); + // + // layoutControlGroup12 + // + layoutControlGroup12.ExpandButtonVisible = true; + layoutControlGroup12.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup12.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem14, layoutControlItem15 }); + layoutControlGroup12.Location = new Point(0, 497); + layoutControlGroup12.Name = "layoutControlGroup12"; + layoutControlGroup12.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup12.Size = new Size(575, 74); + layoutControlGroup12.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup12.Text = "璋冨害鐩爣"; + // + // layoutControlItem14 + // + layoutControlItem14.Control = txtTargetFlow1; + layoutControlItem14.Location = new Point(0, 0); + layoutControlItem14.Name = "layoutControlItem14"; + layoutControlItem14.Size = new Size(295, 32); + layoutControlItem14.Text = "鐩爣娴侀噺:"; + layoutControlItem14.TextSize = new Size(78, 22); + // + // layoutControlItem15 + // + layoutControlItem15.Control = txtTargetPressure1; + layoutControlItem15.Location = new Point(295, 0); + layoutControlItem15.Name = "layoutControlItem15"; + layoutControlItem15.Size = new Size(272, 32); + layoutControlItem15.Text = "鐩爣鍘嬪姏:"; + layoutControlItem15.TextSize = new Size(78, 22); + // + // layoutControlGroup8 + // + layoutControlGroup8.ExpandButtonVisible = true; + layoutControlGroup8.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup8.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); + layoutControlGroup8.Location = new Point(0, 138); + layoutControlGroup8.Name = "layoutControlGroup8"; + layoutControlGroup8.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup8.Size = new Size(575, 359); + layoutControlGroup8.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup8.Text = "鏈烘车鍒楄〃"; + // + // layoutControlItem1 + // + layoutControlItem1.Control = gridControlStation1; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem1.Size = new Size(575, 326); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // layoutControlGroup14 + // + layoutControlGroup14.ExpandButtonVisible = true; + layoutControlGroup14.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup14.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem18 }); + layoutControlGroup14.Location = new Point(0, 571); + layoutControlGroup14.Name = "layoutControlGroup14"; + layoutControlGroup14.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup14.Size = new Size(575, 317); + layoutControlGroup14.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup14.Text = "璋冨害鍒楄〃"; + // + // layoutControlItem18 + // + layoutControlItem18.Control = gridControl1; + layoutControlItem18.Location = new Point(0, 0); + layoutControlItem18.Name = "layoutControlItem18"; + layoutControlItem18.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem18.Size = new Size(575, 284); + layoutControlItem18.TextSize = new Size(0, 0); + layoutControlItem18.TextVisible = false; + // + // sidePanel2 + // + sidePanel2.Controls.Add(layoutControl3); + sidePanel2.Dock = DockStyle.Right; + sidePanel2.Location = new Point(577, 79); + sidePanel2.Name = "sidePanel2"; + sidePanel2.Size = new Size(849, 923); + sidePanel2.TabIndex = 2; + sidePanel2.Text = "sidePanel2"; + // + // layoutControl3 + // + layoutControl3.Controls.Add(gridControl2); + layoutControl3.Controls.Add(gridControlStation2); + layoutControl3.Controls.Add(txtDN2400Flow); + layoutControl3.Controls.Add(txtDN2700Flow); + layoutControl3.Controls.Add(txtDN2400Pressure); + layoutControl3.Controls.Add(txtDN2700Pressure); + layoutControl3.Controls.Add(txtTargetFlow2); + layoutControl3.Controls.Add(txtTargetPressure2); + layoutControl3.Dock = DockStyle.Fill; + layoutControl3.Location = new Point(1, 0); + layoutControl3.Name = "layoutControl3"; + layoutControl3.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1585, 844, 975, 600); + layoutControl3.Root = layoutControlGroup6; + layoutControl3.Size = new Size(848, 923); + layoutControl3.TabIndex = 0; + layoutControl3.Text = "layoutControl3"; + // + // gridControl2 + // + gridControl2.DataSource = realTimePumpScheduleViewModelBindingSource1; + gridControl2.Location = new Point(1, 638); + gridControl2.MainView = gridView4; + gridControl2.Name = "gridControl2"; + gridControl2.Size = new Size(846, 284); + gridControl2.TabIndex = 8; + gridControl2.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView4 }); + // + // realTimePumpScheduleViewModelBindingSource1 + // + realTimePumpScheduleViewModelBindingSource1.DataSource = typeof(ViewModel.RealTimePumpScheduleViewModel); + // + // gridView4 + // + gridView4.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colFlag3, colRunStatus3, colOutletPressure3, colInstantaneousFlow3, colActivePower3, colRotateSpeed3, colActivePowerDiff1, colRotateSpeedDiif1 }); + gridView4.GridControl = gridControl2; + gridView4.Name = "gridView4"; + gridView4.CustomDrawCell += gridView4_CustomDrawCell; + // + // colFlag3 + // + colFlag3.FieldName = "Flag"; + colFlag3.MinWidth = 30; + colFlag3.Name = "colFlag3"; + colFlag3.Visible = true; + colFlag3.VisibleIndex = 0; + colFlag3.Width = 112; + // + // colRunStatus3 + // + colRunStatus3.FieldName = "RunStatus"; + colRunStatus3.MinWidth = 30; + colRunStatus3.Name = "colRunStatus3"; + colRunStatus3.Visible = true; + colRunStatus3.VisibleIndex = 1; + colRunStatus3.Width = 112; + // + // colOutletPressure3 + // + colOutletPressure3.FieldName = "OutletPressure"; + colOutletPressure3.MinWidth = 30; + colOutletPressure3.Name = "colOutletPressure3"; + colOutletPressure3.Visible = true; + colOutletPressure3.VisibleIndex = 2; + colOutletPressure3.Width = 112; + // + // colInstantaneousFlow3 + // + colInstantaneousFlow3.FieldName = "InstantaneousFlow"; + colInstantaneousFlow3.MinWidth = 30; + colInstantaneousFlow3.Name = "colInstantaneousFlow3"; + colInstantaneousFlow3.Visible = true; + colInstantaneousFlow3.VisibleIndex = 3; + colInstantaneousFlow3.Width = 112; + // + // colActivePower3 + // + colActivePower3.FieldName = "ActivePower"; + colActivePower3.MinWidth = 30; + colActivePower3.Name = "colActivePower3"; + colActivePower3.Visible = true; + colActivePower3.VisibleIndex = 4; + colActivePower3.Width = 112; + // + // colRotateSpeed3 + // + colRotateSpeed3.FieldName = "RotateSpeed"; + colRotateSpeed3.MinWidth = 30; + colRotateSpeed3.Name = "colRotateSpeed3"; + colRotateSpeed3.Visible = true; + colRotateSpeed3.VisibleIndex = 5; + colRotateSpeed3.Width = 112; + // + // colActivePowerDiff1 + // + colActivePowerDiff1.FieldName = "ActivePowerDiff"; + colActivePowerDiff1.MinWidth = 30; + colActivePowerDiff1.Name = "colActivePowerDiff1"; + colActivePowerDiff1.Width = 112; + // + // colRotateSpeedDiif1 + // + colRotateSpeedDiif1.FieldName = "RotateSpeedDiif"; + colRotateSpeedDiif1.MinWidth = 30; + colRotateSpeedDiif1.Name = "colRotateSpeedDiif1"; + colRotateSpeedDiif1.Visible = true; + colRotateSpeedDiif1.VisibleIndex = 6; + colRotateSpeedDiif1.Width = 112; + // + // txtDN2400Flow + // + txtDN2400Flow.Location = new Point(97, 73); + txtDN2400Flow.Margin = new Padding(2, 3, 2, 3); + txtDN2400Flow.Name = "txtDN2400Flow"; + txtDN2400Flow.Size = new Size(328, 28); + txtDN2400Flow.StyleController = layoutControl3; + txtDN2400Flow.TabIndex = 0; + // + // txtDN2700Flow + // + txtDN2700Flow.Location = new Point(97, 105); + txtDN2700Flow.Margin = new Padding(2, 3, 2, 3); + txtDN2700Flow.Name = "txtDN2700Flow"; + txtDN2700Flow.Size = new Size(328, 28); + txtDN2700Flow.StyleController = layoutControl3; + txtDN2700Flow.TabIndex = 2; + // + // txtDN2400Pressure + // + txtDN2400Pressure.Location = new Point(527, 73); + txtDN2400Pressure.Margin = new Padding(2, 3, 2, 3); + txtDN2400Pressure.Name = "txtDN2400Pressure"; + txtDN2400Pressure.Size = new Size(314, 28); + txtDN2400Pressure.StyleController = layoutControl3; + txtDN2400Pressure.TabIndex = 3; + // + // txtDN2700Pressure + // + txtDN2700Pressure.Location = new Point(527, 105); + txtDN2700Pressure.Margin = new Padding(2, 3, 2, 3); + txtDN2700Pressure.Name = "txtDN2700Pressure"; + txtDN2700Pressure.Size = new Size(314, 28); + txtDN2700Pressure.StyleController = layoutControl3; + txtDN2700Pressure.TabIndex = 4; + // + // txtTargetFlow2 + // + txtTargetFlow2.Location = new Point(97, 570); + txtTargetFlow2.Margin = new Padding(2, 3, 2, 3); + txtTargetFlow2.Name = "txtTargetFlow2"; + txtTargetFlow2.Size = new Size(324, 28); + txtTargetFlow2.StyleController = layoutControl3; + txtTargetFlow2.TabIndex = 6; + // + // txtTargetPressure2 + // + txtTargetPressure2.Location = new Point(515, 570); + txtTargetPressure2.Margin = new Padding(2, 3, 2, 3); + txtTargetPressure2.Name = "txtTargetPressure2"; + txtTargetPressure2.Size = new Size(326, 28); + txtTargetPressure2.StyleController = layoutControl3; + txtTargetPressure2.TabIndex = 7; + // + // layoutControlGroup6 + // + layoutControlGroup6.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + layoutControlGroup6.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup7 }); + layoutControlGroup6.Name = "Root"; + layoutControlGroup6.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup6.Size = new Size(848, 923); + layoutControlGroup6.TextVisible = false; + // + // layoutControlGroup7 + // + layoutControlGroup7.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup7.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup10, layoutControlGroup11, layoutControlGroup13, layoutControlGroup9, layoutControlGroup15 }); + layoutControlGroup7.Location = new Point(0, 0); + layoutControlGroup7.Name = "layoutControlGroup7"; + layoutControlGroup7.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup7.Size = new Size(846, 921); + layoutControlGroup7.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup7.Text = "2杈撴按"; + layoutControlGroup7.TextLocation = DevExpress.Utils.Locations.Default; + // + // layoutControlGroup10 + // + layoutControlGroup10.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup10.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem10, layoutControlItem11, emptySpaceItem1 }); + layoutControlGroup10.Location = new Point(0, 0); + layoutControlGroup10.Name = "layoutControlGroup10"; + layoutControlGroup10.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup10.Size = new Size(430, 143); + layoutControlGroup10.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup10.Text = "鎬荤娴侀噺"; + // + // layoutControlItem10 + // + layoutControlItem10.Control = txtDN2400Flow; + layoutControlItem10.Location = new Point(0, 0); + layoutControlItem10.Name = "layoutControlItem10"; + layoutControlItem10.Size = new Size(422, 32); + layoutControlItem10.Text = "DN2400:"; + layoutControlItem10.TextSize = new Size(78, 22); + // + // layoutControlItem11 + // + layoutControlItem11.Control = txtDN2700Flow; + layoutControlItem11.Location = new Point(0, 32); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.Size = new Size(422, 32); + layoutControlItem11.Text = "DN2700:"; + layoutControlItem11.TextSize = new Size(78, 22); + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 64); + emptySpaceItem1.MaxSize = new Size(0, 37); + emptySpaceItem1.MinSize = new Size(87, 37); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(422, 37); + emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlGroup11 + // + layoutControlGroup11.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup11.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { emptySpaceItem2, layoutControlItem12, layoutControlItem13 }); + layoutControlGroup11.Location = new Point(430, 0); + layoutControlGroup11.Name = "layoutControlGroup11"; + layoutControlGroup11.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup11.Size = new Size(416, 143); + layoutControlGroup11.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup11.Text = "鎬荤鍘嬪姏"; + // + // emptySpaceItem2 + // + emptySpaceItem2.AllowHotTrack = false; + emptySpaceItem2.Location = new Point(0, 64); + emptySpaceItem2.MaxSize = new Size(0, 37); + emptySpaceItem2.MinSize = new Size(87, 37); + emptySpaceItem2.Name = "emptySpaceItem2"; + emptySpaceItem2.Size = new Size(408, 37); + emptySpaceItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; + emptySpaceItem2.TextSize = new Size(0, 0); + // + // layoutControlItem12 + // + layoutControlItem12.Control = txtDN2400Pressure; + layoutControlItem12.Location = new Point(0, 0); + layoutControlItem12.Name = "layoutControlItem12"; + layoutControlItem12.Size = new Size(408, 32); + layoutControlItem12.Text = "DN2400:"; + layoutControlItem12.TextSize = new Size(78, 22); + // + // layoutControlItem13 + // + layoutControlItem13.Control = txtDN2700Pressure; + layoutControlItem13.Location = new Point(0, 32); + layoutControlItem13.Name = "layoutControlItem13"; + layoutControlItem13.Size = new Size(408, 32); + layoutControlItem13.Text = "DN2700:"; + layoutControlItem13.TextSize = new Size(78, 22); + // + // layoutControlGroup13 + // + layoutControlGroup13.ExpandButtonVisible = true; + layoutControlGroup13.GroupStyle = DevExpress.Utils.GroupStyle.Card; + layoutControlGroup13.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem16, layoutControlItem17 }); + layoutControlGroup13.Location = new Point(0, 497); + layoutControlGroup13.Name = "layoutControlGroup13"; + layoutControlGroup13.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 4, 4); + layoutControlGroup13.Size = new Size(846, 74); + layoutControlGroup13.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup13.Text = "璋冨害鐩爣"; + // + // layoutControlItem16 + // + layoutControlItem16.Control = txtTargetFlow2; + layoutControlItem16.Location = new Point(0, 0); + layoutControlItem16.Name = "layoutControlItem16"; + layoutControlItem16.Size = new Size(418, 32); + layoutControlItem16.Text = "鐩爣娴侀噺:"; + layoutControlItem16.TextSize = new Size(78, 22); + // + // layoutControlItem17 + // + layoutControlItem17.Control = txtTargetPressure2; + layoutControlItem17.Location = new Point(418, 0); + layoutControlItem17.Name = "layoutControlItem17"; + layoutControlItem17.Size = new Size(420, 32); + layoutControlItem17.Text = "鐩爣鍘嬪姏:"; + layoutControlItem17.TextSize = new Size(78, 22); + // + // layoutControlGroup9 + // + layoutControlGroup9.ExpandButtonVisible = true; + layoutControlGroup9.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup9.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); + layoutControlGroup9.Location = new Point(0, 143); + layoutControlGroup9.Name = "layoutControlGroup9"; + layoutControlGroup9.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup9.Size = new Size(846, 354); + layoutControlGroup9.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup9.Text = "鏈烘车鍒楄〃"; + // + // layoutControlItem2 + // + layoutControlItem2.Control = gridControlStation2; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem2.Size = new Size(846, 321); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // layoutControlGroup15 + // + layoutControlGroup15.ExpandButtonVisible = true; + layoutControlGroup15.GroupStyle = DevExpress.Utils.GroupStyle.Title; + layoutControlGroup15.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem19 }); + layoutControlGroup15.Location = new Point(0, 571); + layoutControlGroup15.Name = "layoutControlGroup15"; + layoutControlGroup15.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup15.Size = new Size(846, 317); + layoutControlGroup15.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup15.Text = "璋冨害鍒楄〃"; + // + // layoutControlItem19 + // + layoutControlItem19.Control = gridControl2; + layoutControlItem19.Location = new Point(0, 0); + layoutControlItem19.Name = "layoutControlItem19"; + layoutControlItem19.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlItem19.Size = new Size(846, 284); + layoutControlItem19.TextSize = new Size(0, 0); + layoutControlItem19.TextVisible = false; + // + // sidePanel3 + // + sidePanel3.Controls.Add(layoutControl1); + sidePanel3.Dock = DockStyle.Top; + sidePanel3.Location = new Point(0, 0); + sidePanel3.Name = "sidePanel3"; + sidePanel3.Size = new Size(1426, 79); + sidePanel3.TabIndex = 3; + sidePanel3.Text = "sidePanel3"; + // + // RealTimeZyScadaView + // + AutoScaleDimensions = new SizeF(10F, 22F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(sidePanel1); + Controls.Add(sidePanel2); + Controls.Add(sidePanel3); + Name = "RealTimeZyScadaView"; + Size = new Size(1426, 1002); + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridControlStation2).EndInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScadaViewModelBindingSource1).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridView2).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridControlStation1).EndInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScadaViewModelBindingSource).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridView1).EndInit(); + sidePanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)layoutControl2).EndInit(); + layoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScheduleViewModelBindingSource).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridView3).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD1Flow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD2Pressure.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD2Flow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD1Pressure.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD3Flow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtJD3Pressure.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetFlow1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetPressure1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup12).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup14).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); + sidePanel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)layoutControl3).EndInit(); + layoutControl3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)gridControl2).EndInit(); + ((System.ComponentModel.ISupportInitialize)realTimePumpScheduleViewModelBindingSource1).EndInit(); + ((System.ComponentModel.ISupportInitialize)gridView4).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2400Flow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2700Flow.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2400Pressure.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtDN2700Pressure.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetFlow2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtTargetPressure2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup10).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup11).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup13).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup9).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup15).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem19).EndInit(); + sidePanel3.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraGrid.GridControl gridControlStation2; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraGrid.GridControl gridControlStation1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraEditors.SimpleButton btnGetZyScada; + private DevExpress.XtraEditors.SidePanel sidePanel1; + private DevExpress.XtraLayout.LayoutControl layoutControl2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.SidePanel sidePanel2; + private DevExpress.XtraLayout.LayoutControl layoutControl3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.SidePanel sidePanel3; + private DevExpress.XtraEditors.SimpleButton btnGetScada; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit txtJD1Flow; + private DevExpress.XtraEditors.TextEdit txtJD2Pressure; + private DevExpress.XtraEditors.TextEdit txtJD2Flow; + private DevExpress.XtraEditors.TextEdit txtJD1Pressure; + private DevExpress.XtraEditors.TextEdit txtJD3Flow; + private DevExpress.XtraEditors.TextEdit txtJD3Pressure; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup8; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup9; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup10; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup11; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraEditors.TextEdit txtDN2400Flow; + private DevExpress.XtraEditors.TextEdit txtDN2700Flow; + private DevExpress.XtraEditors.TextEdit txtDN2400Pressure; + private DevExpress.XtraEditors.TextEdit txtDN2700Pressure; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.TextEdit txtTargetFlow1; + private DevExpress.XtraEditors.TextEdit txtTargetPressure1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup13; + private DevExpress.XtraEditors.TextEdit txtTargetFlow2; + private DevExpress.XtraEditors.TextEdit txtTargetPressure2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private BindingSource realTimePumpScadaViewModelBindingSource1; + private BindingSource realTimePumpScadaViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colFlag1; + private DevExpress.XtraGrid.Columns.GridColumn colRunStatus1; + private DevExpress.XtraGrid.Columns.GridColumn colInletWaterLevel1; + private DevExpress.XtraGrid.Columns.GridColumn colOutletPressure1; + private DevExpress.XtraGrid.Columns.GridColumn colInstantaneousFlow1; + private DevExpress.XtraGrid.Columns.GridColumn colActivePower1; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeed1; + private DevExpress.XtraGrid.Columns.GridColumn colMaintenanceState1; + private DevExpress.XtraGrid.Columns.GridColumn colFlag; + private DevExpress.XtraGrid.Columns.GridColumn colRunStatus; + private DevExpress.XtraGrid.Columns.GridColumn colInletWaterLevel; + private DevExpress.XtraGrid.Columns.GridColumn colOutletPressure; + private DevExpress.XtraGrid.Columns.GridColumn colInstantaneousFlow; + private DevExpress.XtraGrid.Columns.GridColumn colActivePower; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeed; + private DevExpress.XtraGrid.Columns.GridColumn colMaintenanceState; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + private DevExpress.XtraGrid.GridControl gridControl2; + private DevExpress.XtraGrid.Views.Grid.GridView gridView4; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup15; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; + private BindingSource realTimePumpScheduleViewModelBindingSource; + private BindingSource realTimePumpScheduleViewModelBindingSource1; + private DevExpress.XtraGrid.Columns.GridColumn colFlag2; + private DevExpress.XtraGrid.Columns.GridColumn colRunStatus2; + private DevExpress.XtraGrid.Columns.GridColumn colOutletPressure2; + private DevExpress.XtraGrid.Columns.GridColumn colInstantaneousFlow2; + private DevExpress.XtraGrid.Columns.GridColumn colActivePower2; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeed2; + private DevExpress.XtraGrid.Columns.GridColumn colActivePowerDiff; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeedDiif; + private DevExpress.XtraGrid.Columns.GridColumn colFlag3; + private DevExpress.XtraGrid.Columns.GridColumn colRunStatus3; + private DevExpress.XtraGrid.Columns.GridColumn colOutletPressure3; + private DevExpress.XtraGrid.Columns.GridColumn colInstantaneousFlow3; + private DevExpress.XtraGrid.Columns.GridColumn colActivePower3; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeed3; + private DevExpress.XtraGrid.Columns.GridColumn colActivePowerDiff1; + private DevExpress.XtraGrid.Columns.GridColumn colRotateSpeedDiif1; + } +} diff --git a/Test/IStation.Win.View/View/RealTimeZyScadaView.cs b/Test/IStation.Win.View/View/RealTimeZyScadaView.cs new file mode 100644 index 0000000..7b889aa --- /dev/null +++ b/Test/IStation.Win.View/View/RealTimeZyScadaView.cs @@ -0,0 +1,439 @@ +锘縰sing DevExpress.XtraEditors; +using IStation.Win.View.ViewModel; + +namespace IStation.Win.View +{ + public partial class RealTimeZyScadaView : DevExpress.XtraEditors.XtraUserControl + { + public RealTimeZyScadaView() + { + InitializeComponent(); + this.gridView1.SetNormalView(); + this.gridView2.SetNormalView(); + this.gridView3.SetNormalView(); + this.gridView4.SetNormalView(); + } + + private static readonly Service.Station _service_station = new(); + private static readonly Service.ScheduleConfig _service_schedule_config = new(); + + private void btnGetScada_Click(object sender, EventArgs e) + { + this.txtDN2400Flow.EditValue = null; + this.txtDN2400Pressure.EditValue = null; + this.txtDN2700Flow.EditValue = null; + this.txtDN2700Pressure.EditValue = null; + this.txtJD1Flow.EditValue = null; + this.txtJD1Pressure.EditValue = null; + this.txtJD2Flow.EditValue = null; + this.txtJD2Pressure.EditValue = null; + this.txtJD3Flow.EditValue = null; + this.txtJD3Pressure.EditValue = null; + + this.realTimePumpScadaViewModelBindingSource.DataSource = new List<RealTimePumpScadaViewModel>(); + this.realTimePumpScadaViewModelBindingSource1.DataSource = new List<RealTimePumpScadaViewModel>(); + + this.realTimePumpScheduleViewModelBindingSource.DataSource = new List<RealTimePumpScheduleViewModel>(); + this.realTimePumpScheduleViewModelBindingSource1.DataSource = new List<RealTimePumpScheduleViewModel>(); + + GlobalHelper.GetRealTimeZyScadaList(out List<Model.ZyScada> zy_scada_list, true); + if (zy_scada_list == null || !zy_scada_list.Any()) + { + return; + } + var zy_scada_dict = zy_scada_list.ToDictionary(x => x.Code, x => x.Value); + + var DN2400Flow = zy_scada_dict[GlobalHelper.DN2400鎬荤_鐬椂娴侀噺_闀挎睙绠$綉鍥綸; + var DN2400Pressure = zy_scada_dict[GlobalHelper.DN2400_鍑哄巶鍘嬪姏_闀挎睙绠$綉鍥綸; + var DN2700Flow = zy_scada_dict[GlobalHelper.DN2700鎬荤_鐬椂娴侀噺_闀挎睙绠$綉鍥綸; + var DN2700Pressure = zy_scada_dict[GlobalHelper.DN2700_鍑哄巶鍘嬪姏_闀挎睙绠$綉鍥綸; + var JD1Flow = zy_scada_dict[GlobalHelper.鍢夊畾1绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥綸; + var JD1Pressure = zy_scada_dict[GlobalHelper.鍢夊畾1绾縚鍘嬪姏_闀挎睙绠$綉鍥綸; + var JD2Flow = zy_scada_dict[GlobalHelper.鍢夊畾2绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥綸; + var JD2Pressure = zy_scada_dict[GlobalHelper.鍢夊畾2绾縚鍘嬪姏_闀挎睙绠$綉鍥綸; + var JD3Flow = zy_scada_dict[GlobalHelper.鍢夊畾3绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥綸; + var JD3Pressure = zy_scada_dict[GlobalHelper.鍢夊畾3绾縚鍘嬪姏_闀挎睙绠$綉鍥綸; + + #region RealScada + + this.txtDN2400Flow.EditValue = DN2400Flow; + this.txtDN2400Pressure.EditValue = DN2400Pressure; + this.txtDN2700Flow.EditValue = DN2700Flow; + this.txtDN2700Pressure.EditValue = DN2700Pressure; + this.txtJD1Flow.EditValue = JD1Flow; + this.txtJD1Pressure.EditValue = JD1Pressure; + this.txtJD2Flow.EditValue = JD2Flow; + this.txtJD2Pressure.EditValue = JD2Pressure; + this.txtJD3Flow.EditValue = JD3Flow; + this.txtJD3Pressure.EditValue = JD3Pressure; + + var pump_vm11 = new RealTimePumpScadaViewModel(); + var pump_vm12 = new RealTimePumpScadaViewModel(); + var pump_vm13 = new RealTimePumpScadaViewModel(); + var pump_vm14 = new RealTimePumpScadaViewModel(); + var pump_vm15 = new RealTimePumpScadaViewModel(); + var pump_vm16 = new RealTimePumpScadaViewModel(); + var pump_vm17 = new RealTimePumpScadaViewModel(); + var pump_vm18 = new RealTimePumpScadaViewModel(); + var pump_vm21 = new RealTimePumpScadaViewModel(); + var pump_vm22 = new RealTimePumpScadaViewModel(); + var pump_vm23 = new RealTimePumpScadaViewModel(); + var pump_vm24 = new RealTimePumpScadaViewModel(); + var pump_vm25 = new RealTimePumpScadaViewModel(); + var pump_vm26 = new RealTimePumpScadaViewModel(); + var pump_vm27 = new RealTimePumpScadaViewModel(); + + pump_vm11.Flag = GlobalHelper.Flag11; + pump_vm12.Flag = GlobalHelper.Flag12; + pump_vm13.Flag = GlobalHelper.Flag13; + pump_vm14.Flag = GlobalHelper.Flag14; + pump_vm15.Flag = GlobalHelper.Flag15; + pump_vm16.Flag = GlobalHelper.Flag16; + pump_vm17.Flag = GlobalHelper.Flag17; + pump_vm18.Flag = GlobalHelper.Flag18; + + pump_vm21.Flag = GlobalHelper.Flag21; + pump_vm22.Flag = GlobalHelper.Flag22; + pump_vm23.Flag = GlobalHelper.Flag23; + pump_vm24.Flag = GlobalHelper.Flag24; + pump_vm25.Flag = GlobalHelper.Flag25; + pump_vm26.Flag = GlobalHelper.Flag26; + pump_vm27.Flag = GlobalHelper.Flag27; + + + pump_vm11.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�11娉礯杩愯鐘舵�乚; + pump_vm12.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�12娉礯杩愯鐘舵�乚; + pump_vm13.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�13娉礯杩愯鐘舵�乚; + pump_vm14.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�14娉礯杩愯鐘舵�乚; + pump_vm15.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�15娉礯杩愯鐘舵�乚; + pump_vm16.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�16娉礯杩愯鐘舵�乚; + pump_vm17.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�17娉礯杩愯鐘舵�乚; + pump_vm18.RunStatus = zy_scada_dict[GlobalHelper.涓�杈�18娉礯杩愯鐘舵�乚; + + pump_vm21.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭21娉礯杩愯鐘舵�乚; + pump_vm22.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭22娉礯杩愯鐘舵�乚; + pump_vm23.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭23娉礯杩愯鐘舵�乚; + pump_vm24.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭24娉礯杩愯鐘舵�乚; + pump_vm25.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭25娉礯杩愯鐘舵�乚; + pump_vm26.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭26娉礯杩愯鐘舵�乚; + pump_vm27.RunStatus = zy_scada_dict[GlobalHelper.浜岃緭27娉礯杩愯鐘舵�乚; + + + pump_vm11.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鑰佸墠姹犲崡渚ф恫浣峕; + pump_vm12.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鑰佸墠姹犲崡渚ф恫浣峕; + pump_vm13.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鑰佸墠姹犲崡渚ф恫浣峕; + pump_vm14.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鑰佸墠姹犲寳渚ф恫浣峕; + pump_vm15.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鑰佸墠姹犲寳渚ф恫浣峕; + pump_vm16.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鏂板墠姹犳恫浣峕; + pump_vm17.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鏂板墠姹犳恫浣峕; + pump_vm18.InletWaterLevel = zy_scada_dict[GlobalHelper.涓�杈揰鏂板墠姹犳恫浣峕; + + pump_vm21.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭21娉礯娉典簳娑蹭綅]; + pump_vm22.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭22娉礯娉典簳娑蹭綅]; + pump_vm23.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭23娉礯娉典簳娑蹭綅]; + pump_vm24.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭24娉礯娉典簳娑蹭綅]; + pump_vm25.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭25娉礯娉典簳娑蹭綅]; + pump_vm26.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭26娉礯娉典簳娑蹭綅]; + pump_vm27.InletWaterLevel = zy_scada_dict[GlobalHelper.浜岃緭27娉礯娉典簳娑蹭綅]; + + + pump_vm11.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�11娉礯鍑哄彛鍘嬪姏]; + pump_vm12.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�12娉礯鍑哄彛鍘嬪姏]; + pump_vm13.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�13娉礯鍑哄彛鍘嬪姏]; + pump_vm14.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�14娉礯鍑哄彛鍘嬪姏]; + pump_vm15.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�15娉礯鍑哄彛鍘嬪姏]; + pump_vm16.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�16娉礯鍑哄彛鍘嬪姏]; + pump_vm17.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�17娉礯鍑哄彛鍘嬪姏]; + pump_vm18.OutletPressure = zy_scada_dict[GlobalHelper.涓�杈�18娉礯鍑哄彛鍘嬪姏]; + + pump_vm21.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭21娉礯鍑烘按鍘嬪姏]; + pump_vm22.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭22娉礯鍑烘按鍘嬪姏]; + pump_vm23.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭23娉礯鍑烘按鍘嬪姏]; + pump_vm24.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭24娉礯鍑烘按鍘嬪姏]; + pump_vm25.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭25娉礯鍑烘按鍘嬪姏]; + pump_vm26.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭26娉礯鍑烘按鍘嬪姏]; + pump_vm27.OutletPressure = zy_scada_dict[GlobalHelper.浜岃緭27娉礯鍑烘按鍘嬪姏]; + + + pump_vm11.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�11娉礯鏈夊姛鍔熺巼]; + pump_vm12.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�12娉礯鏈夊姛鍔熺巼]; + pump_vm13.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�13娉礯鏈夊姛鍔熺巼]; + pump_vm14.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�14娉礯鏈夊姛鍔熺巼]; + pump_vm15.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�15娉礯鏈夊姛鍔熺巼]; + pump_vm16.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�16娉礯鏈夊姛鍔熺巼]; + pump_vm17.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�17娉礯鏈夊姛鍔熺巼]; + pump_vm18.ActivePower = zy_scada_dict[GlobalHelper.涓�杈�18娉礯鏈夊姛鍔熺巼]; + + pump_vm21.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭21娉礯鏈夊姛鍔熺巼]; + pump_vm22.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭22娉礯鏈夊姛鍔熺巼]; + pump_vm23.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭23娉礯鏈夊姛鍔熺巼]; + pump_vm24.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭24娉礯鏈夊姛鍔熺巼]; + pump_vm25.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭25娉礯鏈夊姛鍔熺巼]; + pump_vm26.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭26娉礯鏈夊姛鍔熺巼]; + pump_vm27.ActivePower = zy_scada_dict[GlobalHelper.浜岃緭27娉礯鏈夊姛鍔熺巼]; + + pump_vm21.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭21娉礯鐬椂娴侀噺]; + pump_vm22.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭22娉礯鐬椂娴侀噺]; + pump_vm23.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭23娉礯鐬椂娴侀噺]; + pump_vm24.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭24娉礯鐬椂娴侀噺]; + pump_vm25.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭25娉礯鐬椂娴侀噺]; + pump_vm26.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭26娉礯鐬椂娴侀噺]; + pump_vm27.InstantaneousFlow = zy_scada_dict[GlobalHelper.浜岃緭27娉礯鐬椂娴侀噺]; + + + pump_vm11.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�11娉礯杞�焆; + pump_vm12.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�12娉礯杞�焆; + pump_vm13.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�13娉礯杞�焆; + pump_vm14.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�14娉礯杞�焆; + pump_vm15.RotateSpeed = pump_vm15.RunStatus == 1 ? 590 : 0; + pump_vm16.RotateSpeed = pump_vm16.RunStatus == 1 ? 590 : 0; + pump_vm17.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�17娉礯杞�焆; + pump_vm18.RotateSpeed = zy_scada_dict[GlobalHelper.涓�杈�18娉礯杞�焆; + + pump_vm21.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭21娉礯杞�焆; + pump_vm22.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭22娉礯杞�焆; + pump_vm23.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭23娉礯杞�焆; + pump_vm24.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭24娉礯杞�焆; + pump_vm25.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭25娉礯杞�焆; + pump_vm26.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭26娉礯杞�焆; + pump_vm27.RotateSpeed = zy_scada_dict[GlobalHelper.浜岃緭27娉礯杞�焆; + + + pump_vm11.MaintenanceState = null; + pump_vm12.MaintenanceState = null; + pump_vm13.MaintenanceState = null; + pump_vm14.MaintenanceState = null; + pump_vm15.MaintenanceState = null; + pump_vm16.MaintenanceState = null; + pump_vm17.MaintenanceState = null; + pump_vm18.MaintenanceState = null; + + pump_vm21.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭21娉礯妫�淇姸鎬乚; + pump_vm22.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭22娉礯妫�淇姸鎬乚; + pump_vm23.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭23娉礯妫�淇姸鎬乚; + pump_vm24.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭24娉礯妫�淇姸鎬乚; + pump_vm25.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭25娉礯妫�淇姸鎬乚; + pump_vm26.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭26娉礯妫�淇姸鎬乚; + pump_vm27.MaintenanceState = zy_scada_dict[GlobalHelper.浜岃緭27娉礯妫�淇姸鎬乚; + + + var real_time_pump_scada_vm_list_station1 = new List<RealTimePumpScadaViewModel> + { + pump_vm11, + pump_vm12, + pump_vm13, + pump_vm14, + pump_vm15, + pump_vm16, + pump_vm17, + pump_vm18 + }; + + var real_time_pump_scada_vm_list_station2 = new List<RealTimePumpScadaViewModel> + { + pump_vm21, + pump_vm22, + pump_vm23, + pump_vm24, + pump_vm25, + pump_vm26, + pump_vm27 + }; + + + real_time_pump_scada_vm_list_station1.ForEach(x => x.Set()); + this.realTimePumpScadaViewModelBindingSource.DataSource = real_time_pump_scada_vm_list_station1; + this.realTimePumpScadaViewModelBindingSource.ResetBindings(false); + this.gridView1.BestFitColumns(); + + real_time_pump_scada_vm_list_station2.ForEach(x => x.Set()); + this.realTimePumpScadaViewModelBindingSource1.DataSource = real_time_pump_scada_vm_list_station2; + this.realTimePumpScadaViewModelBindingSource.ResetBindings(false); + this.gridView2.BestFitColumns(); + + #endregion + + WaitHelper.ShowWaitForm("璋冨害..."); + var flow_list1 = new List<double?>() { JD1Flow, JD2Flow, JD3Flow }; + var flow_list2 = new List<double?>() { DN2400Flow, DN2700Flow }; + var pressure_list1 = new List<double?>() { JD1Pressure, JD2Pressure, JD3Pressure }; + var pressure_list2 = new List<double?>() { DN2400Pressure, DN2700Pressure }; + + var real_target_flow1 = flow_list1.Sum(); + var real_target_flow2 = flow_list2.Sum(); + var real_target_pressure1 = pressure_list1.Max() / 1000; + var real_target_pressure2 = pressure_list2.Max(); + + + this.txtTargetFlow1.EditValue = Math.Round(real_target_flow1 ?? 0, 2); + this.txtTargetPressure1.EditValue = Math.Round(real_target_pressure1 ?? 0, 2); + + this.txtTargetFlow2.EditValue = Math.Round(real_target_flow2 ?? 0, 2); + this.txtTargetPressure2.EditValue = Math.Round(real_target_pressure2 ?? 0, 2); + + + var target_flow1 = real_target_flow1 ?? 0; + var target_flow2 = real_target_flow2 ?? 0; + var target_pressure1 = real_target_pressure1 ?? 0; + var target_pressure2 = real_target_pressure2 ?? 0; + + if (double.TryParse(this.txtTargetFlow1.Text, out double flow1)) + target_flow1 = flow1; + if (double.TryParse(this.txtTargetFlow2.Text, out double flow2)) + target_flow2 = flow2; + + if (double.TryParse(this.txtTargetPressure1.Text, out double pressure1)) + target_pressure1 = pressure1; + + if (double.TryParse(this.txtTargetPressure2.Text, out double pressure2)) + target_pressure2 = pressure2; + + var target_head1 = Curve.PumpCalculateHelper.Mpa2M(target_pressure1); + var target_head2 = Curve.PumpCalculateHelper.Mpa2M(target_pressure2); + + var station_info = _service_station.Get(); + if (station_info == null) + { + WaitHelper.HideWaitForm(); + XtraMessageBox.Show("Station鏂囦欢缂哄け!"); + return; + } + + var station1 = station_info.Station1; + var station2 = station_info.Station2; + var station1_same_type_flag_group_first = GlobalHelper.Station1SameTypeFlagGroupFirst; + var station2_same_type_flag_group_first = GlobalHelper.Station2SameTypeFlagGroupFirst; + var station1_schedule_config = _service_schedule_config.GetStation1(); + var station2_schedule_config = _service_schedule_config.GetStation2(); + var station1_flag_list = GlobalHelper.Station1FlagList; + var station2_flag_list = GlobalHelper.Station2FlagList; + + GlobalHelper.GetStationOpenFlagList(zy_scada_list, out List<int> station1_open_flag_list, out List<int> station2_open_flag_list); + GlobalHelper.GetStationMaintenanceFlagList(zy_scada_list, out List<int> station1_maintenance_flag_list, out List<int> station2_maintenance_flag_list); + GlobalHelper.GetFlagInletWaterLevelDict(zy_scada_list, out Dictionary<int, double> station1_flag_inlet_water_level_dict, out Dictionary<int, double> station2_flag_inlet_water_level_dict); + + if (station1_maintenance_flag_list != null && station1_maintenance_flag_list.Any()) + { + station1_schedule_config.MustCloseFlagList.AddRange(station1_maintenance_flag_list); + } + if (station2_maintenance_flag_list != null && station2_maintenance_flag_list.Any()) + { + station2_schedule_config.MustCloseFlagList.AddRange(station2_maintenance_flag_list); + } + + var real_time_pump_schedule_vm_list_station1 = new List<RealTimePumpScheduleViewModel>(); + var real_time_pump_schedule_vm_list_station2 = new List<RealTimePumpScheduleViewModel>(); + + var helper = new Algorithm.ScheduleHelper(); + helper.Initial(station1_open_flag_list, station1_schedule_config); + var optimal_combine1 = helper.GetOptAnaCombine(station1, station1_same_type_flag_group_first, station1_flag_inlet_water_level_dict, target_flow1, target_head1); + + foreach (var flag in GlobalHelper.Station1FlagList) + { + var pump_schedule_vm = new RealTimePumpScheduleViewModel(); + pump_schedule_vm.Flag = flag; + + var ana_fre_pump = optimal_combine1?.AnaFrePumps?.Find(x => x.Flag == flag); + if (ana_fre_pump != null) + { + pump_schedule_vm.RunStatus = 1; + pump_schedule_vm.InstantaneousFlow = ana_fre_pump.Flow; + pump_schedule_vm.OutletPressure = Curve.PumpCalculateHelper.M2Mpa(ana_fre_pump.Head); + pump_schedule_vm.RotateSpeed = ana_fre_pump.Speed; + pump_schedule_vm.ActivePower = ana_fre_pump.Power; + } + var vm = real_time_pump_scada_vm_list_station1.Find(x => x.Flag == flag); + pump_schedule_vm.Set(vm); + pump_schedule_vm.Round(); + real_time_pump_schedule_vm_list_station1.Add(pump_schedule_vm); + } + + helper.Initial(station2_open_flag_list, station2_schedule_config); + var optimal_combine2 = helper.GetOptAnaCombine(station2, station2_same_type_flag_group_first, station2_flag_inlet_water_level_dict, target_flow2, target_head2); + + foreach (var flag in GlobalHelper.Station2FlagList) + { + var pump_schedule_vm = new RealTimePumpScheduleViewModel(); + pump_schedule_vm.Flag = flag; + + var ana_fre_pump = optimal_combine2?.AnaFrePumps?.Find(x => x.Flag == flag); + if (ana_fre_pump != null) + { + pump_schedule_vm.RunStatus = 1; + pump_schedule_vm.InstantaneousFlow = ana_fre_pump.Flow; + pump_schedule_vm.OutletPressure = Curve.PumpCalculateHelper.M2Mpa(ana_fre_pump.Head); + pump_schedule_vm.RotateSpeed = ana_fre_pump.Speed; + pump_schedule_vm.ActivePower = ana_fre_pump.Power; + } + + var vm = real_time_pump_scada_vm_list_station2.Find(x => x.Flag == flag); + pump_schedule_vm.Set(vm); + pump_schedule_vm.Round(); + real_time_pump_schedule_vm_list_station2.Add(pump_schedule_vm); + } + + + this.realTimePumpScheduleViewModelBindingSource.DataSource = real_time_pump_schedule_vm_list_station1; + this.realTimePumpScheduleViewModelBindingSource.ResetBindings(false); + this.gridView3.BestFitColumns(); + + this.realTimePumpScheduleViewModelBindingSource1.DataSource = real_time_pump_schedule_vm_list_station2; + this.realTimePumpScheduleViewModelBindingSource1.ResetBindings(false); + this.gridView4.BestFitColumns(); + + WaitHelper.HideWaitForm(); + } + + + + private void gridView3_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + if (e.Column == this.colRotateSpeedDiif) + { + if (e.CellValue != null) + { + var cell_value = e.CellValue.ToString() ?? string.Empty; + if (double.TryParse(cell_value, out double value)) + { + if (Math.Abs(value) < 0) + { + e.Appearance.ForeColor = Color.Red; + } + else + { + e.Appearance.ForeColor = Color.Green; + } + } + } + } + } + + private void gridView4_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + + if (e.Column == this.colRotateSpeedDiif1) + { + if (e.CellValue != null) + { + var cell_value = e.CellValue.ToString() ?? string.Empty; + if (double.TryParse(cell_value, out double value)) + { + if (Math.Abs(value) < 0) + { + e.Appearance.ForeColor = Color.Red; + } + else + { + e.Appearance.ForeColor = Color.Green; + } + } + } + } + + } + + + + } +} + diff --git a/Test/IStation.Win.View/View/RealTimeZyScadaView.resx b/Test/IStation.Win.View/View/RealTimeZyScadaView.resx new file mode 100644 index 0000000..e882c28 --- /dev/null +++ b/Test/IStation.Win.View/View/RealTimeZyScadaView.resx @@ -0,0 +1,132 @@ +锘�<?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="realTimePumpScadaViewModelBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>480, 17</value> + </metadata> + <metadata name="realTimePumpScadaViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="realTimePumpScheduleViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>954, 17</value> + </metadata> + <metadata name="realTimePumpScheduleViewModelBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 62</value> + </metadata> +</root> \ No newline at end of file diff --git a/Test/IStation.Win.View/ViewModel/RealTimePumpScadaViewModel.cs b/Test/IStation.Win.View/ViewModel/RealTimePumpScadaViewModel.cs new file mode 100644 index 0000000..d75efa7 --- /dev/null +++ b/Test/IStation.Win.View/ViewModel/RealTimePumpScadaViewModel.cs @@ -0,0 +1,48 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace IStation.Win.View.ViewModel +{ + public class RealTimePumpScadaViewModel + { + [Display(Name = "娉�")] + public int Flag { get; set; } + + [Display(Name = "杩愯鐘舵��")] + public double? RunStatus { get; set; } + + [Display(Name = "杩涘彛姘翠綅")] + public double? InletWaterLevel { get; set; } + + [Display(Name = "鍑哄彛鍘嬪姏")] + public double? OutletPressure { get; set; } + + [Display(Name = "鐬椂娴侀噺")] + public double? InstantaneousFlow { get; set; } + + [Display(Name = "鏈夊姛鍔熺巼")] + public double? ActivePower { get; set; } + + [Display(Name = "杞��")] + public double? RotateSpeed { get; set; } + + [Display(Name = "妫�淇姸鎬�")] + public double? MaintenanceState { get; set; } + + public void Set() + { + if (this.RunStatus != 1) + { + this.RunStatus = null; + this.InletWaterLevel = null; + this.OutletPressure = null; + this.InstantaneousFlow = null; + this.ActivePower = null; + this.RotateSpeed = null; + } + + } + } + + + +} diff --git a/Test/IStation.Win.View/ViewModel/RealTimePumpScheduleViewModel.cs b/Test/IStation.Win.View/ViewModel/RealTimePumpScheduleViewModel.cs new file mode 100644 index 0000000..70ef2df --- /dev/null +++ b/Test/IStation.Win.View/ViewModel/RealTimePumpScheduleViewModel.cs @@ -0,0 +1,62 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace IStation.Win.View.ViewModel +{ + public class RealTimePumpScheduleViewModel + { + [Display(Name = "娉�")] + public int Flag { get; set; } + + [Display(Name = "杩愯鐘舵��")] + public double? RunStatus { get; set; } + + [Display(Name = "鍑哄彛鍘嬪姏")] + public double? OutletPressure { get; set; } + + [Display(Name = "鐬椂娴侀噺")] + public double? InstantaneousFlow { get; set; } + + [Display(Name = "鏈夊姛鍔熺巼")] + public double? ActivePower { get; set; } + + [Display(Name = "杞��")] + public double? RotateSpeed { get; set; } + + + [Display(Name = "鏈夊姛鍔熺巼(鍋忓樊)")] + public double? ActivePowerDiff { get; set; } + + [Display(Name = "杞��(鍋忓樊)")] + public double? RotateSpeedDiif { get; set; } + + + public void Set(RealTimePumpScadaViewModel vm) + { + this.ActivePowerDiff = this.ActivePower - vm.ActivePower; + this.RotateSpeedDiif = this.RotateSpeed - vm.RotateSpeed; + } + + public void Round() + { + this.OutletPressure = Round(this.OutletPressure, 3); + this.InstantaneousFlow = Round(this.InstantaneousFlow, 1); + this.ActivePower = Round(this.ActivePower, 1); + this.RotateSpeed = Round(this.RotateSpeed, 1); + this.ActivePowerDiff = Round(this.ActivePowerDiff, 2); + this.RotateSpeedDiif = Round(this.RotateSpeedDiif, 2); + } + + private double? Round(double? value, int le) + { + if (value == null) + { + return null; + } + + return Math.Round(value.Value, le); + } + } + + + +} diff --git "a/Test/IStation.Win.View/ViewModel/RealTimeZyScadaViewModel - \345\244\215\345\210\266.cs" "b/Test/IStation.Win.View/ViewModel/RealTimeZyScadaViewModel - \345\244\215\345\210\266.cs" new file mode 100644 index 0000000..b3fd49d --- /dev/null +++ "b/Test/IStation.Win.View/ViewModel/RealTimeZyScadaViewModel - \345\244\215\345\210\266.cs" @@ -0,0 +1,260 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IStation.Win.View.ViewModel +{ + public class RealTimeZyScadaViewModel + { + + #region 浜屽彇 + public double? 闀挎睙姘翠綅 { get; set; } + public double? 浜屽彇鍓嶆睜娑蹭綅 { get; set; } + public double? 闄堣姘村簱姘翠綅 { get; set; } + + public double? 浜屽彇1娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜屽彇2娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜屽彇3娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜屽彇4娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜屽彇5娉礯鏈夊姛鍔熺巼 { get; set; } + + public double? 浜屽彇1娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 浜屽彇2娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 浜屽彇3娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 浜屽彇4娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 浜屽彇5娉礯鍑哄彛鍘嬪姏 { get; set; } + + public double? 浜屽彇1娉礯姘存车_杩愯鐘舵�� { get; set; } + public double? 浜屽彇2娉礯姘存车_杩愯鐘舵�� { get; set; } + public double? 浜屽彇3娉礯姘存车_杩愯鐘舵�� { get; set; } + public double? 浜屽彇4娉礯姘存车_杩愯鐘舵�� { get; set; } + public double? 浜屽彇5娉礯姘存车_杩愯鐘舵�� { get; set; } + + public double? 浜屽彇1娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜屽彇2娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜屽彇3娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜屽彇4娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜屽彇5娉礯鏈夊姛鐢佃兘 { get; set; } + + public double? 浜屽彇1娉礯绱娴侀噺 { get; set; } + public double? 浜屽彇2娉礯绱娴侀噺 { get; set; } + public double? 浜屽彇3娉礯绱娴侀噺 { get; set; } + public double? 浜屽彇4娉礯绱娴侀噺 { get; set; } + public double? 浜屽彇5娉礯绱娴侀噺 { get; set; } + + public double? 浜屽彇1娉礯鐬椂娴侀噺 { get; set; } + public double? 浜屽彇2娉礯鐬椂娴侀噺 { get; set; } + public double? 浜屽彇3娉礯鐬椂娴侀噺 { get; set; } + public double? 浜屽彇4娉礯鐬椂娴侀噺 { get; set; } + public double? 浜屽彇5娉礯鐬椂娴侀噺 { get; set; } + + public double? 浜屽彇1娉礯绱杩愯鏃堕棿 { get; set; } + public double? 浜屽彇2娉礯绱杩愯鏃堕棿 { get; set; } + public double? 浜屽彇3娉礯绱杩愯鏃堕棿 { get; set; } + public double? 浜屽彇4娉礯绱杩愯鏃堕棿 { get; set; } + public double? 浜屽彇5娉礯绱杩愯鏃堕棿 { get; set; } + + public double? 浜屽彇1娉礯妫�淇姸鎬� { get; set; } + public double? 浜屽彇2娉礯妫�淇姸鎬� { get; set; } + public double? 浜屽彇3娉礯妫�淇姸鎬� { get; set; } + public double? 浜屽彇4娉礯妫�淇姸鎬� { get; set; } + public double? 浜屽彇5娉礯妫�淇姸鎬� { get; set; } + + + #endregion + + #region 涓�杈� + + public double? 鍢夊畾1绾縚鐬椂娴侀噺 { get; set; } + public double? 鍢夊畾2绾縚鐬椂娴侀噺 { get; set; } + public double? 鍢夊畾3绾縚鐬椂娴侀噺 { get; set; } + + public double? 鍢夊畾1绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾2绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾3绾縚鐬椂娴侀噺_闀挎睙绠$綉鍥� { get; set; } + + public double? 鍢夊畾1绾縚琛ㄥご绱 { get; set; } + public double? 鍢夊畾2绾縚琛ㄥご绱 { get; set; } + public double? 鍢夊畾3绾縚琛ㄥご绱 { get; set; } + + public double? 鍢夊畾1绾縚绱娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾2绾縚绱娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾3绾縚绱娴侀噺_闀挎睙绠$綉鍥� { get; set; } + + public double? 鍢夊畾1绾縚鍘嬪姏 { get; set; } + public double? 鍢夊畾2绾縚鍘嬪姏 { get; set; } + public double? 鍢夊畾3绾縚鍘嬪姏 { get; set; } + + public double? 鍢夊畾1绾縚鍘嬪姏_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾2绾縚鍘嬪姏_闀挎睙绠$綉鍥� { get; set; } + public double? 鍢夊畾3绾縚鍘嬪姏_闀挎睙绠$綉鍥� { get; set; } + + public double? 涓�杈揰鑰佸墠姹犲崡渚ф恫浣� { get; set; } + public double? 涓�杈揰鑰佸墠姹犲寳渚ф恫浣� { get; set; } + public double? 涓�杈揰鏂板墠姹犳恫浣� { get; set; } + + public double? 涓�杈�11娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�12娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�13娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�14娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�15娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�16娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�17娉礯鍑哄彛鍘嬪姏 { get; set; } + public double? 涓�杈�18娉礯鍑哄彛鍘嬪姏 { get; set; } + + public double? 涓�杈�11娉礯杞�� { get; set; } + public double? 涓�杈�12娉礯杞�� { get; set; } + public double? 涓�杈�13娉礯杞�� { get; set; } + public double? 涓�杈�14娉礯杞�� { get; set; } + public double? 涓�杈�17娉礯杞�� { get; set; } + public double? 涓�杈�18娉礯杞�� { get; set; } + + public double? 涓�杈�11娉礯棰戠巼 { get; set; } + public double? 涓�杈�12娉礯棰戠巼 { get; set; } + public double? 涓�杈�13娉礯棰戠巼 { get; set; } + public double? 涓�杈�14娉礯棰戠巼 { get; set; } + public double? 涓�杈�17娉礯棰戠巼 { get; set; } + public double? 涓�杈�18娉礯棰戠巼 { get; set; } + + public double? 涓�杈�11娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�12娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�13娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�14娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�15娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�16娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�17娉礯杩愯鐘舵�� { get; set; } + public double? 涓�杈�18娉礯杩愯鐘舵�� { get; set; } + + public double? 涓�杈�11娉礯杩愯鏃堕棿 { get; set; } + public double? 涓�杈�12娉礯杩愯鏃堕棿 { get; set; } + public double? 涓�杈�13娉礯杩愯鏃堕棿 { get; set; } + public double? 涓�杈�14娉礯杩愯鏃堕棿 { get; set; } + + public double? 涓�杈�11娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�12娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�13娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�14娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�15娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�16娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�17娉礯绱杩愯鏃堕棿 { get; set; } + public double? 涓�杈�18娉礯绱杩愯鏃堕棿 { get; set; } + + public double? 涓�杈�11娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�12娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�13娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�14娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�15娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�16娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�17娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 涓�杈�18娉礯鏈夊姛鍔熺巼 { get; set; } + + #endregion + + #region 浜岃緭 + + public double? DN2400_鍑哄巶鍘嬪姏 { get; set; } + public double? DN2700_鍑哄巶鍘嬪姏 { get; set; } + + public double? DN2400_鍑哄巶鍘嬪姏_闀挎睙绠$綉鍥� { get; set; } + public double? DN2700_鍑哄巶鍘嬪姏_闀挎睙绠$綉鍥� { get; set; } + + public double? DN2400鎬荤_鐬椂娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? DN2700鎬荤_鐬椂娴侀噺_闀挎睙绠$綉鍥� { get; set; } + + public double? DN2400鎬荤_绱娴侀噺_闀挎睙绠$綉鍥� { get; set; } + public double? DN2700鎬荤_绱娴侀噺_闀挎睙绠$綉鍥� { get; set; } + + public double? 浜岃緭21娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭22娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭23娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭24娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭25娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭26娉礯娉典簳娑蹭綅 { get; set; } + public double? 浜岃緭27娉礯娉典簳娑蹭綅 { get; set; } + + public double? 浜岃緭21娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭22娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭23娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭24娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭25娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭26娉礯鍑烘按鍘嬪姏 { get; set; } + public double? 浜岃緭27娉礯鍑烘按鍘嬪姏 { get; set; } + + public double? 浜岃緭21娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭22娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭23娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭24娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭25娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭26娉礯鐬椂娴侀噺 { get; set; } + public double? 浜岃緭27娉礯鐬椂娴侀噺 { get; set; } + + public double? 浜岃緭21娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭22娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭23娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭24娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭25娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭26娉礯绱娴侀噺 { get; set; } + public double? 浜岃緭27娉礯绱娴侀噺 { get; set; } + + public double? 浜岃緭21娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭22娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭23娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭24娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭25娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭26娉礯鏈夊姛鐢佃兘 { get; set; } + public double? 浜岃緭27娉礯鏈夊姛鐢佃兘 { get; set; } + + public double? 浜岃緭22娉礯棰戠巼 { get; set; } + public double? 浜岃緭23娉礯棰戠巼 { get; set; } + public double? 浜岃緭24娉礯棰戠巼 { get; set; } + public double? 浜岃緭25娉礯棰戠巼 { get; set; } + public double? 浜岃緭26娉礯棰戠巼 { get; set; } + public double? 浜岃緭27娉礯棰戠巼 { get; set; } + + public double? 浜岃緭21娉礯杞�� { get; set; } + public double? 浜岃緭22娉礯杞�� { get; set; } + public double? 浜岃緭23娉礯杞�� { get; set; } + public double? 浜岃緭24娉礯杞�� { get; set; } + public double? 浜岃緭25娉礯杞�� { get; set; } + public double? 浜岃緭26娉礯杞�� { get; set; } + public double? 浜岃緭27娉礯杞�� { get; set; } + + public double? 浜岃緭21娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭22娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭23娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭24娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭25娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭26娉礯鏈夊姛鍔熺巼 { get; set; } + public double? 浜岃緭27娉礯鏈夊姛鍔熺巼 { get; set; } + + public double? 浜岃緭21娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭22娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭23娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭24娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭25娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭26娉礯杩愯鐘舵�� { get; set; } + public double? 浜岃緭27娉礯杩愯鐘舵�� { get; set; } + + public double? 浜岃緭21娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭22娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭23娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭24娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭25娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭26娉礯杩愯鏃堕棿 { get; set; } + public double? 浜岃緭27娉礯杩愯鏃堕棿 { get; set; } + + public double? 浜岃緭21娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭22娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭23娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭24娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭25娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭26娉礯妫�淇姸鎬� { get; set; } + public double? 浜岃緭27娉礯妫�淇姸鎬� { get; set; } + + #endregion + + + } +} diff --git a/Test/IStation.Win.View/viweMian.Designer.cs b/Test/IStation.Win.View/viweMian.Designer.cs new file mode 100644 index 0000000..36fb9cd --- /dev/null +++ b/Test/IStation.Win.View/viweMian.Designer.cs @@ -0,0 +1,132 @@ +锘縩amespace IStation.Win.View +{ + partial class viweMian + { + /// <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(); + realTimeZyScadaView1 = new RealTimeZyScadaView(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(realTimeZyScadaView1); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(727, 617, 975, 600); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(1672, 1193); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // realTimeZyScadaView1 + // + realTimeZyScadaView1.Location = new Point(3, 39); + realTimeZyScadaView1.Margin = new Padding(4, 3, 4, 3); + realTimeZyScadaView1.Name = "realTimeZyScadaView1"; + realTimeZyScadaView1.Size = new Size(1666, 1151); + realTimeZyScadaView1.TabIndex = 4; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { tabbedControlGroup1 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + Root.Size = new Size(1672, 1193); + Root.TextVisible = false; + // + // tabbedControlGroup1 + // + tabbedControlGroup1.Location = new Point(0, 0); + tabbedControlGroup1.Name = "tabbedControlGroup1"; + tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; + tabbedControlGroup1.Size = new Size(1672, 1193); + tabbedControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); + // + // layoutControlGroup1 + // + layoutControlGroup1.CustomizationFormText = "瀹炴椂璋冨害"; + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "layoutControlGroup1"; + layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Size = new Size(1670, 1155); + layoutControlGroup1.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + layoutControlGroup1.Text = "瀹炴椂鏁版嵁"; + // + // layoutControlItem1 + // + layoutControlItem1.Control = realTimeZyScadaView1; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(1670, 1155); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // viweMian + // + AutoScaleDimensions = new SizeF(10F, 22F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1672, 1193); + Controls.Add(layoutControl1); + Name = "viweMian"; + StartPosition = FormStartPosition.CenterScreen; + Text = "宸ュ叿"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private RealTimeZyScadaView realTimeZyScadaView1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + } +} \ No newline at end of file diff --git a/Test/IStation.Win.View/viweMian.cs b/Test/IStation.Win.View/viweMian.cs new file mode 100644 index 0000000..95b0632 --- /dev/null +++ b/Test/IStation.Win.View/viweMian.cs @@ -0,0 +1,23 @@ +锘縰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; + +namespace IStation.Win.View +{ + public partial class viweMian : DevExpress.XtraEditors.XtraForm + { + public viweMian() + { + InitializeComponent(); + } + + + } +} \ No newline at end of file diff --git a/Test/IStation.Win.View/viweMian.resx b/Test/IStation.Win.View/viweMian.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/Test/IStation.Win.View/viweMian.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file -- Gitblit v1.9.3