From a1cc269cb29f8936f1394a9f0c1b7d153c56fa1f Mon Sep 17 00:00:00 2001 From: Orestes Zoupanos Date: Wed, 18 Feb 2026 17:41:15 +0000 Subject: [PATCH 1/2] add sln file --- PerformanceMonitor.sln | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 PerformanceMonitor.sln diff --git a/PerformanceMonitor.sln b/PerformanceMonitor.sln new file mode 100644 index 00000000..3d235b77 --- /dev/null +++ b/PerformanceMonitor.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36930.0 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dashboard", "Dashboard\Dashboard.csproj", "{15117113-EE40-8DCA-BC4D-4D4D68604E97}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PerformanceMonitorLite", "Lite\PerformanceMonitorLite.csproj", "{48718A1C-3679-AB80-1D5F-A9C20CC7EF9A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InstallerGui", "InstallerGui\InstallerGui.csproj", "{B9F4D012-5FA6-6773-E3A5-63482B482B9A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lite.Tests", "Lite.Tests\Lite.Tests.csproj", "{C4E76DA8-A115-7291-3AD0-12C648E24FF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PerformanceMonitorInstaller", "Installer\PerformanceMonitorInstaller.csproj", "{0F1EFD0D-61B6-D475-3A2E-ED7FD83BCE6E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {15117113-EE40-8DCA-BC4D-4D4D68604E97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15117113-EE40-8DCA-BC4D-4D4D68604E97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15117113-EE40-8DCA-BC4D-4D4D68604E97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15117113-EE40-8DCA-BC4D-4D4D68604E97}.Release|Any CPU.Build.0 = Release|Any CPU + {48718A1C-3679-AB80-1D5F-A9C20CC7EF9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48718A1C-3679-AB80-1D5F-A9C20CC7EF9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48718A1C-3679-AB80-1D5F-A9C20CC7EF9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48718A1C-3679-AB80-1D5F-A9C20CC7EF9A}.Release|Any CPU.Build.0 = Release|Any CPU + {B9F4D012-5FA6-6773-E3A5-63482B482B9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9F4D012-5FA6-6773-E3A5-63482B482B9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9F4D012-5FA6-6773-E3A5-63482B482B9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9F4D012-5FA6-6773-E3A5-63482B482B9A}.Release|Any CPU.Build.0 = Release|Any CPU + {C4E76DA8-A115-7291-3AD0-12C648E24FF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4E76DA8-A115-7291-3AD0-12C648E24FF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4E76DA8-A115-7291-3AD0-12C648E24FF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4E76DA8-A115-7291-3AD0-12C648E24FF2}.Release|Any CPU.Build.0 = Release|Any CPU + {0F1EFD0D-61B6-D475-3A2E-ED7FD83BCE6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F1EFD0D-61B6-D475-3A2E-ED7FD83BCE6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F1EFD0D-61B6-D475-3A2E-ED7FD83BCE6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F1EFD0D-61B6-D475-3A2E-ED7FD83BCE6E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {88C537F3-44C6-43A9-AFDC-65D59D9FB5E7} + EndGlobalSection +EndGlobal From 2ee24e8a099d0c966306375c2782b1cec8193647 Mon Sep 17 00:00:00 2001 From: Orestes Zoupanos Date: Wed, 18 Feb 2026 17:44:33 +0000 Subject: [PATCH 2/2] fix some warnings --- Dashboard/ColumnFilterPopup.xaml.cs | 2 +- Lite/Controls/ColumnFilterPopup.xaml.cs | 2 +- Lite/Services/AlertStateService.cs | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dashboard/ColumnFilterPopup.xaml.cs b/Dashboard/ColumnFilterPopup.xaml.cs index e4d27978..c71d3c3f 100644 --- a/Dashboard/ColumnFilterPopup.xaml.cs +++ b/Dashboard/ColumnFilterPopup.xaml.cs @@ -32,7 +32,7 @@ private void PopulateOperatorComboBox() { OperatorComboBox.Items.Clear(); - foreach (FilterOperator op in Enum.GetValues(typeof(FilterOperator))) + foreach (FilterOperator op in Enum.GetValues()) { OperatorComboBox.Items.Add(new ComboBoxItem { diff --git a/Lite/Controls/ColumnFilterPopup.xaml.cs b/Lite/Controls/ColumnFilterPopup.xaml.cs index b431eb21..3252f2a4 100644 --- a/Lite/Controls/ColumnFilterPopup.xaml.cs +++ b/Lite/Controls/ColumnFilterPopup.xaml.cs @@ -32,7 +32,7 @@ private void PopulateOperatorComboBox() { OperatorComboBox.Items.Clear(); - foreach (FilterOperator op in Enum.GetValues(typeof(FilterOperator))) + foreach (FilterOperator op in Enum.GetValues()) { OperatorComboBox.Items.Add(new ComboBoxItem { diff --git a/Lite/Services/AlertStateService.cs b/Lite/Services/AlertStateService.cs index 02b8d5e3..f25830b0 100644 --- a/Lite/Services/AlertStateService.cs +++ b/Lite/Services/AlertStateService.cs @@ -21,7 +21,7 @@ namespace PerformanceMonitorLite.Services /// public class AlertStateService { - private readonly object _lock = new object(); + private readonly object _lock = new(); private readonly string _stateFilePath; private readonly HashSet _silencedServers; @@ -154,6 +154,11 @@ private bool ShouldShowAlertsInternal(string serverId) return true; } + private static readonly JsonSerializerOptions s_writeOptions = new() + { + WriteIndented = true + }; + private void Save() { try @@ -163,7 +168,7 @@ private void Save() SilencedServers = _silencedServers.ToList(), AcknowledgedAlerts = _acknowledgedAlerts.ToDictionary(kv => kv.Key, kv => kv.Value) }; - var json = JsonSerializer.Serialize(state, new JsonSerializerOptions { WriteIndented = true }); + var json = JsonSerializer.Serialize(state, s_writeOptions); File.WriteAllText(_stateFilePath, json); } catch