From a8fd8f3f46ea2d9ae734733c30338a6a11e7dae2 Mon Sep 17 00:00:00 2001 From: DangHome Date: Mon, 3 Jul 2023 01:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=87=E5=AF=AB=E6=AD=BB=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=B4=BB=E8=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMMModel/CMMModel.csproj | 27 +++ CMMModel/Model/SMonitorModel.cs | 17 ++ CMMService/CMMService.csproj | 32 +++ ControlMyMonitorManagement.sln | 14 +- .../ControlMyMonitorManagement.csproj | 2 +- DellMonitorControl/ControlPanel.xaml | 15 +- DellMonitorControl/ControlPanel.xaml.cs | 64 +++++- DellMonitorControl/DellMonitorControl.csproj | 25 ++- DellMonitorControl/MainWindow.xaml | 5 +- DellMonitorControl/MainWindow.xaml.cs | 5 + DellMonitorControl/Style/Btn.xaml | 1 - Language/Language.csproj | 2 +- Library/Base/ObservableRangeCollection.cs | 119 +++++----- Library/Base/PropertyBase.cs | 43 ++-- Library/Config/Config.cs | 96 ++++---- Library/Helpers/ConsoleHelper.cs | 124 ++++++----- Library/Helpers/JsonHelper.cs | 205 +++++++++--------- Library/Helpers/UAC.cs | 22 +- Library/Library.csproj | 5 +- Library/Method/AssemblyData.cs | 78 +++---- Library/Method/CMMCommand.cs | 113 +++++----- Library/Method/CMMMgr.cs | 36 ++- Library/ViewModel/XMonitor.cs | 126 +++++------ Library/ViewModel/XMonitorStatus.cs | 9 +- Tester/CommnadTest.cs | 38 ++++ Tester/Tester.csproj | 10 +- Tester/UnitTest1.cs | 16 -- 27 files changed, 703 insertions(+), 546 deletions(-) create mode 100644 CMMModel/CMMModel.csproj create mode 100644 CMMModel/Model/SMonitorModel.cs create mode 100644 CMMService/CMMService.csproj create mode 100644 Tester/CommnadTest.cs delete mode 100644 Tester/UnitTest1.cs diff --git a/CMMModel/CMMModel.csproj b/CMMModel/CMMModel.csproj new file mode 100644 index 0000000..0cbd1f4 --- /dev/null +++ b/CMMModel/CMMModel.csproj @@ -0,0 +1,27 @@ + + + + net7.0-windows + CMM.Model + CMM.Model + ControlMyMonitorManagement + enable + enable + Dang + Copyright © DangWang $([System.DateTime]::Now.ToString(yyyy)) + + + + 1 + 0 + $([System.DateTime]::op_Subtraction($([System.DateTime]::get_Now().get_Date()),$([System.DateTime]::new(2017,9,17))).get_TotalDays()) + $([System.DateTime]::Now.ToString(Hmm)) + $([System.DateTime]::Now.ToString(yyyyMMdd)) + $(Major).$(Minor).$(ProjectStartedDate).$(DaysSinceProjectStarted) + 0.0.0.1 + $(VersionSuffix) + 0.0.0.1 + $(DateTimeSuffix) + + + diff --git a/CMMModel/Model/SMonitorModel.cs b/CMMModel/Model/SMonitorModel.cs new file mode 100644 index 0000000..e94e8db --- /dev/null +++ b/CMMModel/Model/SMonitorModel.cs @@ -0,0 +1,17 @@ +using System.Text.Json.Serialization; + +public class SMonitorModel +{ + [JsonPropertyName("VCP Code")] + public string? VCPCode { get; set; } + [JsonPropertyName("VCP Code Name")] + public string? VCPCodeName { get; set; } + [JsonPropertyName("Read-Write")] + public string? ReadWrite { get; set; } + [JsonPropertyName("Current Value")] + public string? CurrentValue { get; set; } + [JsonPropertyName("Maximum Value")] + public string? MaximumValue { get; set; } + [JsonPropertyName("Possible Values")] + public string? PossibleValues { get; set; } +} \ No newline at end of file diff --git a/CMMService/CMMService.csproj b/CMMService/CMMService.csproj new file mode 100644 index 0000000..134eab8 --- /dev/null +++ b/CMMService/CMMService.csproj @@ -0,0 +1,32 @@ + + + + net7.0-windows + enable + CMM.Service + CMM.Service + ControlMyMonitorManagement + enable + Dang + Copyright © DangWang $([System.DateTime]::Now.ToString(yyyy)) + + + + 1 + 0 + $([System.DateTime]::op_Subtraction($([System.DateTime]::get_Now().get_Date()),$([System.DateTime]::new(2023,7,2))).get_TotalDays()) + $([System.DateTime]::Now.ToString(Hmm)) + $([System.DateTime]::Now.ToString(yyyyMMdd)) + $(Major).$(Minor).$(ProjectStartedDate).$(DaysSinceProjectStarted) + 0.0.0.1 + $(VersionSuffix) + 0.0.0.1 + $(DateTimeSuffix) + + + + + + + + diff --git a/ControlMyMonitorManagement.sln b/ControlMyMonitorManagement.sln index dfd99ed..822f1a8 100644 --- a/ControlMyMonitorManagement.sln +++ b/ControlMyMonitorManagement.sln @@ -11,7 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Language", "Language\Langua EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tester", "Tester\Tester.csproj", "{0D34DD73-3282-40EB-8F59-DF190944BF12}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DellMonitorControl", "DellMonitorControl\DellMonitorControl.csproj", "{64E96610-D431-40B9-A00B-55CE195B4B58}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DellMonitorControl", "DellMonitorControl\DellMonitorControl.csproj", "{64E96610-D431-40B9-A00B-55CE195B4B58}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMMService", "CMMService\CMMService.csproj", "{FEA2B019-32BC-4704-939F-1CD26F373F55}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMMModel", "CMMModel\CMMModel.csproj", "{88440737-DB6E-4ACA-B1BC-E40350153F96}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,6 +43,14 @@ Global {64E96610-D431-40B9-A00B-55CE195B4B58}.Debug|Any CPU.Build.0 = Debug|Any CPU {64E96610-D431-40B9-A00B-55CE195B4B58}.Release|Any CPU.ActiveCfg = Release|Any CPU {64E96610-D431-40B9-A00B-55CE195B4B58}.Release|Any CPU.Build.0 = Release|Any CPU + {FEA2B019-32BC-4704-939F-1CD26F373F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEA2B019-32BC-4704-939F-1CD26F373F55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEA2B019-32BC-4704-939F-1CD26F373F55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEA2B019-32BC-4704-939F-1CD26F373F55}.Release|Any CPU.Build.0 = Release|Any CPU + {88440737-DB6E-4ACA-B1BC-E40350153F96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88440737-DB6E-4ACA-B1BC-E40350153F96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88440737-DB6E-4ACA-B1BC-E40350153F96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88440737-DB6E-4ACA-B1BC-E40350153F96}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ControlMyMonitorManagement/ControlMyMonitorManagement.csproj b/ControlMyMonitorManagement/ControlMyMonitorManagement.csproj index 04191ea..3062287 100644 --- a/ControlMyMonitorManagement/ControlMyMonitorManagement.csproj +++ b/ControlMyMonitorManagement/ControlMyMonitorManagement.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net7.0-windows CMM.Management true Copyright © DangWang $([System.DateTime]::Now.ToString(yyyy)) diff --git a/DellMonitorControl/ControlPanel.xaml b/DellMonitorControl/ControlPanel.xaml index 9f5ac20..6f786ef 100644 --- a/DellMonitorControl/ControlPanel.xaml +++ b/DellMonitorControl/ControlPanel.xaml @@ -7,21 +7,8 @@ mc:Ignorable="d"> - - - - -