From d973b741555af76d26fc6cba8d5e3824173c24f9 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Wed, 19 Apr 2017 18:44:48 +0200 Subject: [PATCH 01/36] Update build image --- .appveyor.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5ad60262..8bb23f8d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,12 +1,9 @@ version: '{build}' clone_depth: 5 -image: Visual Studio 2015 +image: Visual Studio 2017 configuration: ReleaseWindows platform: Any CPU -install: - - cinst wixtoolset --version 3.10.3.3007 --checksumtype=sha256 --checksum=3C125E3551C035F69ED24ACD8FB4EF7B74C1311ECACF1F8FC1EB7E0DD47D9C75 - before_build: - nuget restore From 88f79078079436f75b0de2e11ec5a931df5b11af Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Wed, 19 Apr 2017 23:24:37 +0200 Subject: [PATCH 02/36] Project file cleanup --- .../OpenHardwareMonitorLib.csproj | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/Core/Plugins/OpenHardwareMonitor/OpenHardwareMonitorLib.csproj b/Core/Plugins/OpenHardwareMonitor/OpenHardwareMonitorLib.csproj index 1e551005..d24410e8 100644 --- a/Core/Plugins/OpenHardwareMonitor/OpenHardwareMonitorLib.csproj +++ b/Core/Plugins/OpenHardwareMonitor/OpenHardwareMonitorLib.csproj @@ -3,8 +3,6 @@ Debug AnyCPU - 9.0.30729 - 2.0 {B0397530-545A-471D-BB74-027AE456DF1A} Library Properties @@ -12,25 +10,6 @@ OpenHardwareMonitorLib v4.5 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true @@ -42,7 +21,6 @@ TRACE;DEBUG prompt 4 - AllRules.ruleset false @@ -52,7 +30,6 @@ TRACE prompt 4 - AllRules.ruleset false @@ -149,23 +126,6 @@ - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - From 13c4dbaa88ad9d6e6bd7e742bfac9b7cfa617e2c Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Wed, 19 Apr 2017 23:24:53 +0200 Subject: [PATCH 03/36] Project file cleanup --- Core/NbfcCli/NbfcCli.csproj | 29 ------------- Core/NbfcProbe/NbfcProbe.csproj | 3 -- Core/NbfcService/NbfcService.csproj | 41 ------------------- ...gWare.Plugins.CpuTemperatureMonitor.csproj | 1 - .../StagWare.Plugins.ECLinux.csproj | 1 - .../StagWare.Plugins.ECSysLinux.csproj | 1 - ...agWare.Plugins.FSTemperatureMonitor.csproj | 1 - .../StagWare.FanControl.csproj | 2 - 8 files changed, 79 deletions(-) diff --git a/Core/NbfcCli/NbfcCli.csproj b/Core/NbfcCli/NbfcCli.csproj index dc848466..6f92a4bb 100644 --- a/Core/NbfcCli/NbfcCli.csproj +++ b/Core/NbfcCli/NbfcCli.csproj @@ -13,21 +13,6 @@ 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true AnyCPU @@ -60,7 +45,6 @@ pdbonly AnyCPU prompt - MinimumRecommendedRules.ruleset App.Linux.config false @@ -74,7 +58,6 @@ full AnyCPU prompt - MinimumRecommendedRules.ruleset App.Linux.config @@ -152,18 +135,6 @@ Reference.cs - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - diff --git a/Core/NbfcProbe/NbfcProbe.csproj b/Core/NbfcProbe/NbfcProbe.csproj index 4b776eee..dc317fd3 100644 --- a/Core/NbfcProbe/NbfcProbe.csproj +++ b/Core/NbfcProbe/NbfcProbe.csproj @@ -3,8 +3,6 @@ Debug x86 - 10.0.0 - 2.0 {F6104868-81A7-4D09-8AD2-8CF261D58319} Exe NbfcProbe @@ -47,7 +45,6 @@ full AnyCPU prompt - MinimumRecommendedRules.ruleset diff --git a/Core/NbfcService/NbfcService.csproj b/Core/NbfcService/NbfcService.csproj index cec62e77..1b652ab5 100644 --- a/Core/NbfcService/NbfcService.csproj +++ b/Core/NbfcService/NbfcService.csproj @@ -3,8 +3,6 @@ Debug x86 - 8.0.30703 - 2.0 {820ABB59-7F86-4D7F-89C9-8F7DA013D992} WinExe Properties @@ -14,21 +12,6 @@ 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true NbfcService.Program @@ -57,14 +40,12 @@ TRACE true AnyCPU - MinimumRecommendedRules.ruleset App.Linux.config true bin\DebugLinux\ AnyCPU - MinimumRecommendedRules.ruleset App.Linux.config @@ -110,28 +91,6 @@ - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 4.5 - true - - diff --git a/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj b/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj index 8d77075a..42e37646 100644 --- a/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj +++ b/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj @@ -40,7 +40,6 @@ pdbonly AnyCPU prompt - MinimumRecommendedRules.ruleset diff --git a/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj b/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj index d30b917e..c175c467 100644 --- a/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj +++ b/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj @@ -46,7 +46,6 @@ pdbonly AnyCPU prompt - MinimumRecommendedRules.ruleset diff --git a/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj b/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj index 6e0aab01..c0522d40 100644 --- a/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj +++ b/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj @@ -43,7 +43,6 @@ pdbonly AnyCPU prompt - MinimumRecommendedRules.ruleset diff --git a/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj b/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj index 955513ea..48caa786 100644 --- a/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj +++ b/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj @@ -40,7 +40,6 @@ pdbonly AnyCPU prompt - MinimumRecommendedRules.ruleset diff --git a/Core/StagWare.FanControl/StagWare.FanControl.csproj b/Core/StagWare.FanControl/StagWare.FanControl.csproj index c2836591..edf51342 100644 --- a/Core/StagWare.FanControl/StagWare.FanControl.csproj +++ b/Core/StagWare.FanControl/StagWare.FanControl.csproj @@ -23,7 +23,6 @@ DEBUG;TRACE prompt 4 - MinimumRecommendedRules.ruleset false @@ -33,7 +32,6 @@ TRACE prompt 4 - BasicCorrectnessRules.ruleset false From a72d73692354a2344f03d6f36b541f275b4eb61f Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sat, 22 Apr 2017 16:31:08 +0200 Subject: [PATCH 04/36] Only clear the taskbar icon if the new icon is null --- .../UserControls/BindableTaskbarIcon.cs | 66 ++++++++++++++----- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs b/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs index 6abc2ddd..04995837 100644 --- a/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs +++ b/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs @@ -47,33 +47,65 @@ private static void OnIconBitmapSourceChanged(DependencyObject source, Dependenc return; } - Icon oldIcon = icon.Icon; + if(e.NewValue == null) + { + UpdateTaskbarIcon(icon, null); + return; + } + var src = e.NewValue as BitmapSource; + // Keep old icon in case the BitmapSource cannot be converted to an icon if (src == null) { - icon.Icon = null; + return; } - else + + Icon newIcon = BitmapSourceToIcon(src); + + if (newIcon != null) { - var enc = new PngBitmapEncoder(); - enc.Frames.Add(BitmapFrame.Create(src)); + UpdateTaskbarIcon(icon, newIcon); + } + } - using (var ms = new MemoryStream()) - { - enc.Save(ms); - ms.Position = 0; + private static void UpdateTaskbarIcon(TaskbarIcon icon, Icon newIcon) + { + Icon oldIcon = icon.Icon; + IntPtr handle = oldIcon.Handle; - using (Bitmap bmp = (Bitmap)Bitmap.FromStream(ms)) - { - icon.Icon = Icon.FromHandle(bmp.GetHicon()); - } - } - } + icon.Icon = newIcon; - IntPtr iconHandle = oldIcon.Handle; oldIcon.Dispose(); - NativeMethods.DestroyIcon(iconHandle); + NativeMethods.DestroyIcon(handle); + } + + /// + /// Creates an Icon from a BitmapSource. + /// The returned Icon's handle must be destroyed manually after use. Calling Dispose() is not enough. + /// + /// + /// An Icon object on success or null on failure + private static Icon BitmapSourceToIcon(BitmapSource src) + { + if(src == null) + { + return null; + } + + var enc = new PngBitmapEncoder(); + enc.Frames.Add(BitmapFrame.Create(src)); + + using (var ms = new MemoryStream()) + { + enc.Save(ms); + ms.Position = 0; + + using (Bitmap bmp = (Bitmap)Bitmap.FromStream(ms)) + { + return Icon.FromHandle(bmp.GetHicon()); + } + } } #endregion From cb2e4db1ded740b50a54d8b993f3d5a4c0ba2dc8 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sat, 22 Apr 2017 16:45:24 +0200 Subject: [PATCH 05/36] Add logging support --- Windows/NbfcClient/App.xaml.cs | 15 +++++++ Windows/NbfcClient/NbfcClient.csproj | 3 ++ Windows/NbfcClient/Properties/AssemblyInfo.cs | 6 +-- .../NbfcClient/Services/FanControlClient.cs | 6 ++- .../UserControls/BindableTaskbarIcon.cs | 13 ++++++ Windows/NbfcClient/app.config | 41 +++++++++++++++++++ Windows/NbfcClient/packages.config | 1 + 7 files changed, 81 insertions(+), 4 deletions(-) diff --git a/Windows/NbfcClient/App.xaml.cs b/Windows/NbfcClient/App.xaml.cs index 608b0779..f591fb1b 100644 --- a/Windows/NbfcClient/App.xaml.cs +++ b/Windows/NbfcClient/App.xaml.cs @@ -1,4 +1,5 @@ using NbfcClient.Properties; +using NLog; using System.Globalization; using System.Windows; using System.Windows.Markup; @@ -10,8 +11,22 @@ namespace NbfcClient /// public partial class App : Application { + private static readonly Logger logger = LogManager.GetCurrentClassLogger(); + public App() { + logger.Info("App start"); + + this.DispatcherUnhandledException += (sender, args) => + { + logger.Error(args.Exception, "An unhandled exception occurred"); + }; + + this.Exit += (sender, args) => + { + logger.Info("App exit"); + }; + if (Settings.Default.UpgradeRequired) { Settings.Default.Upgrade(); diff --git a/Windows/NbfcClient/NbfcClient.csproj b/Windows/NbfcClient/NbfcClient.csproj index 72c379cf..e791c4cf 100644 --- a/Windows/NbfcClient/NbfcClient.csproj +++ b/Windows/NbfcClient/NbfcClient.csproj @@ -84,6 +84,9 @@ ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll True + + ..\..\packages\NLog.4.4.6\lib\net45\NLog.dll + diff --git a/Windows/NbfcClient/Properties/AssemblyInfo.cs b/Windows/NbfcClient/Properties/AssemblyInfo.cs index e89547e9..49114280 100644 --- a/Windows/NbfcClient/Properties/AssemblyInfo.cs +++ b/Windows/NbfcClient/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("StagWare")] [assembly: AssemblyProduct("NoteBook FanControl")] -[assembly: AssemblyCopyright("Copyright © 2013-2016 Stefan Hirschmann")] +[assembly: AssemblyCopyright("Copyright © 2013-2017 Stefan Hirschmann")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -49,7 +49,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.2.0")] -[assembly: AssemblyFileVersion("1.4.2.0")] +[assembly: AssemblyVersion("1.4.3.0")] +[assembly: AssemblyFileVersion("1.4.3.0")] [assembly: AssemblyInformationalVersion("1.5.1")] [assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Windows/NbfcClient/Services/FanControlClient.cs b/Windows/NbfcClient/Services/FanControlClient.cs index 31026360..a10e2dcf 100644 --- a/Windows/NbfcClient/Services/FanControlClient.cs +++ b/Windows/NbfcClient/Services/FanControlClient.cs @@ -2,6 +2,7 @@ using NbfcClient.NbfcService; using System; using System.Windows.Threading; +using NLog; namespace NbfcClient.Services { @@ -9,6 +10,8 @@ public class FanControlClient : IDisposable, IFanControlClient { #region Private Fields + private static readonly Logger logger = LogManager.GetCurrentClassLogger(); + private FanControlServiceClient client; private FanControlInfo fanControlInfo; private DispatcherTimer timer; @@ -180,8 +183,9 @@ private void CallServiceMethod(Action action) action(client); } - catch (Exception) + catch (Exception e) { + logger.Warn(e, "Attempt to call a service method failed"); client.Abort(); client = null; } diff --git a/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs b/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs index 04995837..aebde4f4 100644 --- a/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs +++ b/Windows/NbfcClient/UserControls/BindableTaskbarIcon.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media.Imaging; +using NLog; namespace NbfcClient.UserControls { @@ -20,6 +21,12 @@ private static class NativeMethods #endregion + #region Private Fields + + private static readonly Logger logger = LogManager.GetCurrentClassLogger(); + + #endregion + #region Properties public BitmapSource IconBitmapSource @@ -44,6 +51,7 @@ private static void OnIconBitmapSourceChanged(DependencyObject source, Dependenc if (icon == null) { + logger.Warn(() => $"The event source is not a {nameof(BindableTaskbarIcon)}"); return; } @@ -58,6 +66,7 @@ private static void OnIconBitmapSourceChanged(DependencyObject source, Dependenc // Keep old icon in case the BitmapSource cannot be converted to an icon if (src == null) { + logger.Warn(() => $"The new icon value is not a {nameof(BitmapSource)}"); return; } @@ -67,6 +76,10 @@ private static void OnIconBitmapSourceChanged(DependencyObject source, Dependenc { UpdateTaskbarIcon(icon, newIcon); } + else + { + logger.Warn(() => $"Could not convert {nameof(BitmapSource)} to icon"); + } } private static void UpdateTaskbarIcon(TaskbarIcon icon, Icon newIcon) diff --git a/Windows/NbfcClient/app.config b/Windows/NbfcClient/app.config index ed60682d..49f093e7 100644 --- a/Windows/NbfcClient/app.config +++ b/Windows/NbfcClient/app.config @@ -1,6 +1,7 @@ +
@@ -25,6 +26,46 @@ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/Windows/NbfcClient/packages.config b/Windows/NbfcClient/packages.config index ce7e91af..03d53bec 100644 --- a/Windows/NbfcClient/packages.config +++ b/Windows/NbfcClient/packages.config @@ -3,4 +3,5 @@ + \ No newline at end of file From 53e4fe5d5e990cb337b07197ae79585ff1acc869 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sat, 22 Apr 2017 22:02:44 +0200 Subject: [PATCH 06/36] Add NLog to setup --- Windows/Setup/NbfcSetup/Application.wxs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Windows/Setup/NbfcSetup/Application.wxs b/Windows/Setup/NbfcSetup/Application.wxs index b134001b..9ca73ff7 100644 --- a/Windows/Setup/NbfcSetup/Application.wxs +++ b/Windows/Setup/NbfcSetup/Application.wxs @@ -219,6 +219,15 @@ Source="$(var.NbfcClient.TargetDir)Hardcodet.Wpf.TaskbarNotification.dll"/> + + + + Date: Sun, 23 Apr 2017 16:16:03 +0200 Subject: [PATCH 07/36] Log first chance exceptions --- Windows/NbfcClient/App.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Windows/NbfcClient/App.xaml.cs b/Windows/NbfcClient/App.xaml.cs index f591fb1b..05237bea 100644 --- a/Windows/NbfcClient/App.xaml.cs +++ b/Windows/NbfcClient/App.xaml.cs @@ -1,5 +1,6 @@ using NbfcClient.Properties; using NLog; +using System; using System.Globalization; using System.Windows; using System.Windows.Markup; @@ -22,6 +23,11 @@ public App() logger.Error(args.Exception, "An unhandled exception occurred"); }; + AppDomain.CurrentDomain.FirstChanceException += (sender, args) => + { + logger.Debug(args.Exception, "A first chance exception occurred"); + }; + this.Exit += (sender, args) => { logger.Info("App exit"); From 75889173454f601c358d86d33a3fcc79749fbd2b Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 14:43:10 +0200 Subject: [PATCH 08/36] Create settings lib --- .../LoadSettingsFailedEventArgs.cs | 14 + .../Properties/AssemblyInfo.cs | 36 +++ .../RestoreDefaultsIgnoreAttribute.cs | 9 + Core/StagWare.Settings/SettingsBase.cs | 13 + Core/StagWare.Settings/SettingsService.cs | 251 ++++++++++++++++++ .../StagWare.Settings.csproj | 51 ++++ Core/StagWare.Settings/XmlWrapper.cs | 77 ++++++ NoteBookFanControl.sln | 99 ++++++- 8 files changed, 548 insertions(+), 2 deletions(-) create mode 100644 Core/StagWare.Settings/LoadSettingsFailedEventArgs.cs create mode 100644 Core/StagWare.Settings/Properties/AssemblyInfo.cs create mode 100644 Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs create mode 100644 Core/StagWare.Settings/SettingsBase.cs create mode 100644 Core/StagWare.Settings/SettingsService.cs create mode 100644 Core/StagWare.Settings/StagWare.Settings.csproj create mode 100644 Core/StagWare.Settings/XmlWrapper.cs diff --git a/Core/StagWare.Settings/LoadSettingsFailedEventArgs.cs b/Core/StagWare.Settings/LoadSettingsFailedEventArgs.cs new file mode 100644 index 00000000..6fe75c99 --- /dev/null +++ b/Core/StagWare.Settings/LoadSettingsFailedEventArgs.cs @@ -0,0 +1,14 @@ +using System; + +namespace StagWare.Settings +{ + public class LoadSettingsFailedEventArgs : EventArgs + { + public LoadSettingsFailedEventArgs(Exception e) + { + this.Exception = e; + } + + public Exception Exception { get; set; } + } +} diff --git a/Core/StagWare.Settings/Properties/AssemblyInfo.cs b/Core/StagWare.Settings/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..089a0314 --- /dev/null +++ b/Core/StagWare.Settings/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("StagWare.Settings")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("StagWare")] +[assembly: AssemblyProduct("StagWare.Settings")] +[assembly: AssemblyCopyright("Copyright © 2017 Stefan Hirschmann")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("44c3959a-3565-4fb6-9bf6-694b146cd032")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs b/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs new file mode 100644 index 00000000..c17cbb25 --- /dev/null +++ b/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs @@ -0,0 +1,9 @@ +using System; + +namespace StagWare.Settings +{ + [AttributeUsage(AttributeTargets.Property)] + public class RestoreDefaultsIgnoreAttribute : Attribute + { + } +} diff --git a/Core/StagWare.Settings/SettingsBase.cs b/Core/StagWare.Settings/SettingsBase.cs new file mode 100644 index 00000000..54e51c33 --- /dev/null +++ b/Core/StagWare.Settings/SettingsBase.cs @@ -0,0 +1,13 @@ +namespace StagWare.Settings +{ + public abstract class SettingsBase + { + [RestoreDefaultsIgnore] + public int SettingsVersion { get; set; } + + public virtual void UpgradeSettings(int fileVersion, int settingsVersion) + { + SettingsVersion = settingsVersion; + } + } +} diff --git a/Core/StagWare.Settings/SettingsService.cs b/Core/StagWare.Settings/SettingsService.cs new file mode 100644 index 00000000..96a06ed4 --- /dev/null +++ b/Core/StagWare.Settings/SettingsService.cs @@ -0,0 +1,251 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace StagWare.Settings +{ + public sealed class SettingsService where T : SettingsBase, new() + { + #region Nested Types + + private class Properties + { + #region Private Fields + + internal static readonly T instance; + + #endregion + + #region Constructors + + private Properties() + { } + + // Explicit static constructor to tell C# compiler + // not to mark type as 'beforefieldinit'. + static Properties() + { + instance = new T(); + int settingsVersion = instance.SettingsVersion; + + if (SettingsFileExists) + { + try + { + using (FileStream fs = new FileStream(SettingsFilePath, FileMode.Open)) + { + var serializer = new XmlSerializer(typeof(T)); + instance = (T)serializer.Deserialize(fs); + int fileVersion = instance.SettingsVersion; + + if (fileVersion != settingsVersion) + { + instance.UpgradeSettings(fileVersion, settingsVersion); + } + } + } + catch (Exception e) + { + OnLoadSettingsFailed(e); + RestoreDefaults(); + } + } + } + + #endregion + } + + #endregion + + #region Constants + + private const string DefaultSettingsFileNameSuffix = "Settings.xml"; + + #endregion + + #region Events + + public static event EventHandler LoadSettingsFailed; + + #endregion + + #region Properties + + public static T Settings => Properties.instance; + public static bool SettingsFileExists => File.Exists(SettingsFilePath); + public static string SettingsFilePath { get; private set; } + + private static string baseDirectory; + + public static string BaseDirectory + { + get { return baseDirectory; } + set + { + if (baseDirectory != value) + { + baseDirectory = value; UpdateSettingsFilePath(); + } + } + } + + private static string settingsFolderName; + + public static string SettingsFolderName + { + get { return settingsFolderName; } + set + { + if (settingsFolderName != value) + { + settingsFolderName = value; UpdateSettingsFilePath(); + } + } + } + + private static string settingsFileName; + + public static string SettingsFileName + { + get { return settingsFileName; } + set + { + if (settingsFileName != value) + { + settingsFileName = value; UpdateSettingsFilePath(); + } + } + } + + #endregion + + #region Constructors + + static SettingsService() + { + BaseDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + SettingsFolderName = Assembly.GetExecutingAssembly().GetName().Name; + + if (SettingsFolderName == null) + { + SettingsFileName = DefaultSettingsFileNameSuffix; + } + else + { + SettingsFileName = SettingsFolderName + DefaultSettingsFileNameSuffix; + } + } + + // Hide constructor (Singleton) + private SettingsService() + { + RestoreDefaults(Settings, true); + } + + #endregion + + #region Public Methods + + public static void RestoreDefaults() + { + RestoreDefaults(Settings); + } + + public static void Save() + { + string dir = Path.GetDirectoryName(SettingsFilePath); + + if (!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } + + using (FileStream fs = new FileStream(SettingsFilePath, FileMode.Create)) + { + var serializer = new XmlSerializer(typeof(T)); + serializer.Serialize(fs, Settings); + } + } + + public static void DeleteSettingsFile() + { + if (SettingsFileExists) + { + File.Delete(SettingsFilePath); + } + + string dir = Path.GetDirectoryName(SettingsFilePath); + + if (Directory.Exists(dir)) + { + Directory.Delete(dir, true); + } + } + + #endregion + + #region Private Methods + + private static void RestoreDefaults(T settings, bool force = false) + { + foreach (PropertyInfo pInfo in GetNonStaticProperties(typeof(T))) + { + if (force || !HasRestoreDefaultsIgnoreAttribute(pInfo)) + { + var defaultAttrib = pInfo.GetCustomAttributes(typeof(DefaultValueAttribute), false) + .FirstOrDefault() as DefaultValueAttribute; + + // If there is no DefaultValueAttribute, the property + // will be set to the default value of the property's type + pInfo.SetValue(settings, defaultAttrib?.Value, null); + } + } + } + + private static IEnumerable GetNonStaticProperties(Type type) + { + foreach (PropertyInfo propInfo in type.GetProperties()) + { + MethodInfo methInfo = propInfo.GetGetMethod(false); + + if ((methInfo != null) && (!methInfo.IsStatic)) + { + yield return propInfo; + } + } + } + + private static bool HasRestoreDefaultsIgnoreAttribute(PropertyInfo info) + { + return info.GetCustomAttributes(typeof(RestoreDefaultsIgnoreAttribute), false).Length > 0; + } + + private static void OnLoadSettingsFailed(Exception e) + { + LoadSettingsFailed?.Invoke(null, new LoadSettingsFailedEventArgs(e)); + } + + private static void UpdateSettingsFilePath() + { + string path = Path.Combine( + BaseDirectory ?? "", + SettingsFolderName ?? "", + SettingsFileName ?? ""); + + foreach (char c in Path.GetInvalidPathChars()) + { + path = path.Replace(c, '_'); + } + + SettingsFilePath = path; + } + + #endregion + } +} + diff --git a/Core/StagWare.Settings/StagWare.Settings.csproj b/Core/StagWare.Settings/StagWare.Settings.csproj new file mode 100644 index 00000000..6031e5f7 --- /dev/null +++ b/Core/StagWare.Settings/StagWare.Settings.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + {44C3959A-3565-4FB6-9BF6-694B146CD032} + Library + Properties + StagWare.Settings + StagWare.Settings + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Core/StagWare.Settings/XmlWrapper.cs b/Core/StagWare.Settings/XmlWrapper.cs new file mode 100644 index 00000000..f43b3f01 --- /dev/null +++ b/Core/StagWare.Settings/XmlWrapper.cs @@ -0,0 +1,77 @@ +using System.ComponentModel; +using System.Globalization; + +namespace StagWare.Settings +{ + public sealed class XmlWrapper + { + #region Private Fields + + T wrappedItem; + + #endregion + + #region Constructors + + public XmlWrapper() + { + this.wrappedItem = default(T); + } + + public XmlWrapper(T wrappedItem) + { + this.wrappedItem = wrappedItem; + } + + public XmlWrapper(string wrappedItemValue) + { + this.Value = wrappedItemValue; + } + + #endregion + + #region Properties + + public string Value + { + get + { + return TypeDescriptor.GetConverter(typeof(T)).ConvertToString(null, CultureInfo.InvariantCulture, wrappedItem); + } + set + { + wrappedItem = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromString(null, CultureInfo.InvariantCulture, value); + } + } + + #endregion + + #region Operators + + public static implicit operator XmlWrapper(T item) + { + if (item != null) + { + return new XmlWrapper(item); + } + else + { + return null; + } + } + + public static implicit operator T(XmlWrapper wrapper) + { + if (wrapper != null) + { + return wrapper.wrappedItem; + } + else + { + return default(T); + } + } + + #endregion + } +} diff --git a/NoteBookFanControl.sln b/NoteBookFanControl.sln index f08e86ff..38d227ee 100644 --- a/NoteBookFanControl.sln +++ b/NoteBookFanControl.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26403.7 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StagWare.FanControl", "Core\StagWare.FanControl\StagWare.FanControl.csproj", "{12084B38-C1A2-414C-80A7-B8D02D6F5B84}" EndProject @@ -61,159 +61,253 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{DC9BC2E5 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StagWare.FanControl.Tests", "Tests\StagWare.FanControl.Tests\StagWare.FanControl.Tests.csproj", "{75F46626-9B87-497E-8565-51A5C8798ED4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StagWare.Settings", "Core\StagWare.Settings\StagWare.Settings.csproj", "{44C3959A-3565-4FB6-9BF6-694B146CD032}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU DebugLinux|Any CPU = DebugLinux|Any CPU DebugWindows|Any CPU = DebugWindows|Any CPU + Release|Any CPU = Release|Any CPU ReleaseLinux|Any CPU = ReleaseLinux|Any CPU ReleaseWindows|Any CPU = ReleaseWindows|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Debug|Any CPU.Build.0 = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Release|Any CPU.Build.0 = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Debug|Any CPU.Build.0 = Debug|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Release|Any CPU.ActiveCfg = Release|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Release|Any CPU.Build.0 = Release|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.Debug|Any CPU.Build.0 = Debug|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.Release|Any CPU.Build.0 = Release|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Debug|Any CPU.Build.0 = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Release|Any CPU.Build.0 = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {15B3E0D2-6217-493A-A690-158C497F5318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15B3E0D2-6217-493A-A690-158C497F5318}.Debug|Any CPU.Build.0 = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {15B3E0D2-6217-493A-A690-158C497F5318}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15B3E0D2-6217-493A-A690-158C497F5318}.Release|Any CPU.Build.0 = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Debug|Any CPU.Build.0 = Debug|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Release|Any CPU.Build.0 = Release|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Release|Any CPU.Build.0 = Release|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.Debug|Any CPU.ActiveCfg = Debug|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 + {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.Release|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseWindows|Any CPU.Build.0 = Release|x86 + {088065D5-99ED-4A8B-9301-3666C5B88718}.Debug|Any CPU.ActiveCfg = Debug|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 + {088065D5-99ED-4A8B-9301-3666C5B88718}.Release|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseWindows|Any CPU.Build.0 = Release|x86 + {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {B0397530-545A-471D-BB74-027AE456DF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0397530-545A-471D-BB74-027AE456DF1A}.Release|Any CPU.Build.0 = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.Debug|Any CPU.ActiveCfg = Debug|x86 {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.Release|Any CPU.ActiveCfg = Release|x86 {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.Build.0 = Release|x86 + {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Release|Any CPU.Build.0 = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Release|Any CPU.Build.0 = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Release|Any CPU.Build.0 = Release|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Release|Any CPU.Build.0 = Release|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU + {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Debug|Any CPU.Build.0 = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Release|Any CPU.Build.0 = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.Debug|Any CPU.Build.0 = Debug|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.Release|Any CPU.Build.0 = Release|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Release|Any CPU.Build.0 = Release|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.Release|Any CPU.Build.0 = Release|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Release|Any CPU.Build.0 = Release|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU + {75F46626-9B87-497E-8565-51A5C8798ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75F46626-9B87-497E-8565-51A5C8798ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {75F46626-9B87-497E-8565-51A5C8798ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75F46626-9B87-497E-8565-51A5C8798ED4}.Release|Any CPU.Build.0 = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.Release|Any CPU.Build.0 = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU + {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -242,5 +336,6 @@ Global {11380AFB-D406-4F4E-B260-2C892CD067B4} = {0288F2E8-672E-49DA-9B93-86CEE224D996} {D92D1F2A-8B4F-4946-9385-74EA13DF86AC} = {0288F2E8-672E-49DA-9B93-86CEE224D996} {75F46626-9B87-497E-8565-51A5C8798ED4} = {DC9BC2E5-2F5C-4D98-A590-A60674554415} + {44C3959A-3565-4FB6-9BF6-694B146CD032} = {656212AC-91B4-49EC-9460-7BC3D6DD500C} EndGlobalSection EndGlobal From e382d10c300f32db197a343158b345b113105fc1 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 20:04:52 +0200 Subject: [PATCH 09/36] Add replace System.ComponentModel.DefaultValueAttribute with custom DefaultValueAttribute --- .../DefaultValueAttribute.cs | 67 +++++++++++++++++++ Core/StagWare.Settings/SettingsService.cs | 2 - .../StagWare.Settings.csproj | 1 + 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Core/StagWare.Settings/DefaultValueAttribute.cs diff --git a/Core/StagWare.Settings/DefaultValueAttribute.cs b/Core/StagWare.Settings/DefaultValueAttribute.cs new file mode 100644 index 00000000..a4ff9cc4 --- /dev/null +++ b/Core/StagWare.Settings/DefaultValueAttribute.cs @@ -0,0 +1,67 @@ +using System; +using System.Reflection; + +namespace StagWare.Settings +{ + [AttributeUsage(AttributeTargets.Property)] + public sealed class DefaultValueAttribute : Attribute + { + #region Properties + + public object Value { get; set; } + + #endregion + + #region Constructors + + public DefaultValueAttribute(object value) + { + this.Value = value; + } + + public DefaultValueAttribute(Type propertyType, params object[] constructorParameters) + { + Type[] types = new Type[constructorParameters.Length]; + + for (int i = 0; i < constructorParameters.Length; i++) + { + types[i] = constructorParameters[i].GetType(); + } + + ConstructorInfo constructor = propertyType.GetConstructor(types); + + if (constructor != null) + { + this.Value = constructor.Invoke(constructorParameters); + } + else + { + if (types.Length <= 0) + { + string msg = "There ist no default constructor for the type " + propertyType; + + throw new ArgumentException(msg); + } + else + { + string msg = "There ist no default constructor for the type " + + propertyType.ToString() + " which accepts the following arguments: "; + + for (int i = 0; i < types.Length; i++) + { + msg += types[i].ToString(); + + if (i < types.Length - 1) + { + msg += ", "; + } + } + + throw new ArgumentException(msg); + } + } + } + + #endregion + } +} diff --git a/Core/StagWare.Settings/SettingsService.cs b/Core/StagWare.Settings/SettingsService.cs index 96a06ed4..0d24968c 100644 --- a/Core/StagWare.Settings/SettingsService.cs +++ b/Core/StagWare.Settings/SettingsService.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; diff --git a/Core/StagWare.Settings/StagWare.Settings.csproj b/Core/StagWare.Settings/StagWare.Settings.csproj index 6031e5f7..69a9cd51 100644 --- a/Core/StagWare.Settings/StagWare.Settings.csproj +++ b/Core/StagWare.Settings/StagWare.Settings.csproj @@ -40,6 +40,7 @@ + From 0d48731690837c258f34953b4e08ac41f469fe07 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 20:07:12 +0200 Subject: [PATCH 10/36] Initialize SettingsFolderName with entry assembly name instead of executing assembly name --- Core/StagWare.Settings/SettingsService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/StagWare.Settings/SettingsService.cs b/Core/StagWare.Settings/SettingsService.cs index 0d24968c..c941276d 100644 --- a/Core/StagWare.Settings/SettingsService.cs +++ b/Core/StagWare.Settings/SettingsService.cs @@ -127,7 +127,7 @@ public static string SettingsFileName static SettingsService() { BaseDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - SettingsFolderName = Assembly.GetExecutingAssembly().GetName().Name; + SettingsFolderName = Assembly.GetEntryAssembly()?.GetName()?.Name; if (SettingsFolderName == null) { From 0c758fa959bf61b8d92d1dcd061b987bdcdbf01f Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 20:08:40 +0200 Subject: [PATCH 11/36] Refactoring --- .../RestoreDefaultsIgnoreAttribute.cs | 2 +- Core/StagWare.Settings/SettingsService.cs | 12 +++++------- Core/StagWare.Settings/XmlWrapper.cs | 10 ++++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs b/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs index c17cbb25..13eda6fb 100644 --- a/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs +++ b/Core/StagWare.Settings/RestoreDefaultsIgnoreAttribute.cs @@ -3,7 +3,7 @@ namespace StagWare.Settings { [AttributeUsage(AttributeTargets.Property)] - public class RestoreDefaultsIgnoreAttribute : Attribute + public sealed class RestoreDefaultsIgnoreAttribute : Attribute { } } diff --git a/Core/StagWare.Settings/SettingsService.cs b/Core/StagWare.Settings/SettingsService.cs index c941276d..f8a07910 100644 --- a/Core/StagWare.Settings/SettingsService.cs +++ b/Core/StagWare.Settings/SettingsService.cs @@ -7,7 +7,7 @@ namespace StagWare.Settings { - public sealed class SettingsService where T : SettingsBase, new() + public static class SettingsService where T : SettingsBase, new() { #region Nested Types @@ -53,6 +53,10 @@ static Properties() RestoreDefaults(); } } + else + { + RestoreDefaults(); + } } #endregion @@ -139,12 +143,6 @@ static SettingsService() } } - // Hide constructor (Singleton) - private SettingsService() - { - RestoreDefaults(Settings, true); - } - #endregion #region Public Methods diff --git a/Core/StagWare.Settings/XmlWrapper.cs b/Core/StagWare.Settings/XmlWrapper.cs index f43b3f01..345ef695 100644 --- a/Core/StagWare.Settings/XmlWrapper.cs +++ b/Core/StagWare.Settings/XmlWrapper.cs @@ -36,11 +36,17 @@ public string Value { get { - return TypeDescriptor.GetConverter(typeof(T)).ConvertToString(null, CultureInfo.InvariantCulture, wrappedItem); + return TypeDescriptor.GetConverter(typeof(T)).ConvertToString( + null, + CultureInfo.InvariantCulture, + wrappedItem); } set { - wrappedItem = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromString(null, CultureInfo.InvariantCulture, value); + wrappedItem = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromString( + null, + CultureInfo.InvariantCulture, + value); } } From 762f3c45c52a2c08204893e9ed87fe41de90cfab Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 20:12:15 +0200 Subject: [PATCH 12/36] Replace ServiceSettings with StagWare.Settings.SettingsService --- .../FanControlService.cs | 62 ++--- .../Properties/AssemblyInfo.cs | 6 +- ...ttingsProperties.cs => ServiceSettings.cs} | 11 +- .../Settings/LoadSettingsFailedEventArgs.cs | 14 - .../RestoreDefaultsIgnoreAttribute.cs | 9 - .../Settings/ServiceSettings.cs | 244 ------------------ .../StagWare.FanControl.Service.csproj | 9 +- 7 files changed, 41 insertions(+), 314 deletions(-) rename Core/StagWare.FanControl.Service/{Settings/ServiceSettingsProperties.cs => ServiceSettings.cs} (53%) delete mode 100644 Core/StagWare.FanControl.Service/Settings/LoadSettingsFailedEventArgs.cs delete mode 100644 Core/StagWare.FanControl.Service/Settings/RestoreDefaultsIgnoreAttribute.cs delete mode 100644 Core/StagWare.FanControl.Service/Settings/ServiceSettings.cs diff --git a/Core/StagWare.FanControl.Service/FanControlService.cs b/Core/StagWare.FanControl.Service/FanControlService.cs index 90566fef..921814f0 100644 --- a/Core/StagWare.FanControl.Service/FanControlService.cs +++ b/Core/StagWare.FanControl.Service/FanControlService.cs @@ -1,12 +1,12 @@ using StagWare.FanControl.Configurations; -using StagWare.Settings; using System; using System.Collections.ObjectModel; using System.IO; +using System.Linq; using System.Reflection; using System.ServiceModel; -using System.Linq; using System.Threading; +using SettingsService = StagWare.Settings.SettingsService; namespace StagWare.FanControl.Service { @@ -38,27 +38,13 @@ public class FanControlService : IFanControlService, IDisposable public FanControlService() { - string dir = ""; - - if (Environment.OSVersion.Platform == PlatformID.Unix) - { - dir = "/etc/"; - } - else - { - dir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); - } - - string settingsFile = Path.Combine( - dir, - SettingsFolderName, - SettingsFileName); - - ServiceSettings.SettingsFileName = settingsFile; + SettingsService.BaseDirectory = Environment.OSVersion.Platform == PlatformID.Unix + ? "/etc/" + : Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); - if (ServiceSettings.Default.Autostart) + if (SettingsService.Settings.Autostart) { - Start(ServiceSettings.Default.ReadOnly); + Start(SettingsService.Settings.ReadOnly); } } @@ -78,8 +64,8 @@ public void SetTargetFanSpeed(float value, int fanIndex) { this.fanControl.SetTargetFanSpeed(value, fanIndex); - ServiceSettings.Default.TargetFanSpeeds[fanIndex] = value; - ServiceSettings.Save(); + SettingsService.Settings.TargetFanSpeeds[fanIndex] = value; + SettingsService.Save(); } } } @@ -146,8 +132,8 @@ public void Start(bool readOnly = true) if (TryInitializeFanControl(cfg, out this.fanControl)) { this.fansCount = this.fanControl.FanInformation.Count; - ServiceSettings.Default.Autostart = this.fanControl.Enabled; - ServiceSettings.Save(); + SettingsService.Settings.Autostart = this.fanControl.Enabled; + SettingsService.Save(); } } } @@ -156,9 +142,9 @@ public void Start(bool readOnly = true) { this.fanControl.Start(readOnly); - ServiceSettings.Default.Autostart = this.fanControl.Enabled; - ServiceSettings.Default.ReadOnly = this.fanControl.ReadOnly; - ServiceSettings.Save(); + SettingsService.Settings.Autostart = this.fanControl.Enabled; + SettingsService.Settings.ReadOnly = this.fanControl.ReadOnly; + SettingsService.Save(); } } @@ -168,8 +154,8 @@ public void Stop() { try { - ServiceSettings.Default.Autostart = false; - ServiceSettings.Save(); + SettingsService.Settings.Autostart = false; + SettingsService.Save(); } catch { @@ -191,8 +177,8 @@ public void SetConfig(string configUniqueId) } else { - ServiceSettings.Default.SelectedConfigId = configUniqueId; - ServiceSettings.Save(); + SettingsService.Settings.SelectedConfigId = configUniqueId; + SettingsService.Save(); if (this.fanControl != null) { @@ -255,12 +241,12 @@ public void Continue() { try { - this.fanControl.Start(ServiceSettings.Default.ReadOnly); + this.fanControl.Start(SettingsService.Settings.ReadOnly); } catch (TimeoutException) { Thread.Sleep(3000); - this.fanControl.Start(ServiceSettings.Default.ReadOnly); + this.fanControl.Start(SettingsService.Settings.ReadOnly); } } } @@ -276,7 +262,7 @@ private static bool TryInitializeFanControl(FanControlConfigV2 cfg, out FanContr try { - float[] speeds = ServiceSettings.Default.TargetFanSpeeds; + float[] speeds = SettingsService.Settings.TargetFanSpeeds; if (speeds == null || speeds.Length != cfg.FanConfigurations.Count) { @@ -287,8 +273,8 @@ private static bool TryInitializeFanControl(FanControlConfigV2 cfg, out FanContr speeds[i] = FanControl.AutoFanSpeedPercentage; } - ServiceSettings.Default.TargetFanSpeeds = speeds; - ServiceSettings.Save(); + SettingsService.Settings.TargetFanSpeeds = speeds; + SettingsService.Save(); } fanControl = new FanControl(cfg); @@ -329,7 +315,7 @@ private bool TryLoadConfig(out FanControlConfigV2 config) { bool result = false; var configManager = new FanControlConfigManager(FanControlService.ConfigsDirectory); - string id = ServiceSettings.Default.SelectedConfigId; + string id = SettingsService.Settings.SelectedConfigId; if (!string.IsNullOrWhiteSpace(id) && configManager.SelectConfig(id)) { diff --git a/Core/StagWare.FanControl.Service/Properties/AssemblyInfo.cs b/Core/StagWare.FanControl.Service/Properties/AssemblyInfo.cs index 84596f61..e4df3698 100644 --- a/Core/StagWare.FanControl.Service/Properties/AssemblyInfo.cs +++ b/Core/StagWare.FanControl.Service/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("StagWare")] [assembly: AssemblyProduct("StagWare.FanControl.Service")] -[assembly: AssemblyCopyright("Copyright © 2013-2016 Stefan Hirschmann")] +[assembly: AssemblyCopyright("Copyright © 2013-2017 Stefan Hirschmann")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.2.0")] -[assembly: AssemblyFileVersion("1.4.2.0")] +[assembly: AssemblyVersion("1.4.3.0")] +[assembly: AssemblyFileVersion("1.4.3.0")] diff --git a/Core/StagWare.FanControl.Service/Settings/ServiceSettingsProperties.cs b/Core/StagWare.FanControl.Service/ServiceSettings.cs similarity index 53% rename from Core/StagWare.FanControl.Service/Settings/ServiceSettingsProperties.cs rename to Core/StagWare.FanControl.Service/ServiceSettings.cs index f1f47b6a..cf9ac3e5 100644 --- a/Core/StagWare.FanControl.Service/Settings/ServiceSettingsProperties.cs +++ b/Core/StagWare.FanControl.Service/ServiceSettings.cs @@ -1,7 +1,14 @@ -namespace StagWare.Settings +using StagWare.Settings; + +namespace StagWare { - public sealed partial class ServiceSettings + public class ServiceSettings : SettingsBase { + public ServiceSettings() + { + SettingsVersion = 0; + } + public string SelectedConfigId { get; set; } public bool Autostart { get; set; } public bool ReadOnly { get; set; } diff --git a/Core/StagWare.FanControl.Service/Settings/LoadSettingsFailedEventArgs.cs b/Core/StagWare.FanControl.Service/Settings/LoadSettingsFailedEventArgs.cs deleted file mode 100644 index 6fe75c99..00000000 --- a/Core/StagWare.FanControl.Service/Settings/LoadSettingsFailedEventArgs.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace StagWare.Settings -{ - public class LoadSettingsFailedEventArgs : EventArgs - { - public LoadSettingsFailedEventArgs(Exception e) - { - this.Exception = e; - } - - public Exception Exception { get; set; } - } -} diff --git a/Core/StagWare.FanControl.Service/Settings/RestoreDefaultsIgnoreAttribute.cs b/Core/StagWare.FanControl.Service/Settings/RestoreDefaultsIgnoreAttribute.cs deleted file mode 100644 index c17cbb25..00000000 --- a/Core/StagWare.FanControl.Service/Settings/RestoreDefaultsIgnoreAttribute.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace StagWare.Settings -{ - [AttributeUsage(AttributeTargets.Property)] - public class RestoreDefaultsIgnoreAttribute : Attribute - { - } -} diff --git a/Core/StagWare.FanControl.Service/Settings/ServiceSettings.cs b/Core/StagWare.FanControl.Service/Settings/ServiceSettings.cs deleted file mode 100644 index 237228b6..00000000 --- a/Core/StagWare.FanControl.Service/Settings/ServiceSettings.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Reflection; -using System.Xml.Serialization; -using System.Globalization; -using System.Linq; -using System.Diagnostics; - -namespace StagWare.Settings -{ - public sealed partial class ServiceSettings - { - #region Nested Types - - private class Properties - { - #region Private Fields - - internal static readonly ServiceSettings instance; - - #endregion - - #region Constructors - - private Properties() - { } - - // Explicit static constructor to tell C# compiler - // not to mark type as 'beforefieldinit'. - static Properties() - { - instance = new ServiceSettings(); - - if (ServiceSettings.SettingsFileExists) - { - try - { - using (FileStream fs = new FileStream(SettingsFileName, FileMode.Open)) - { - var serializer = new XmlSerializer(typeof(ServiceSettings)); - Properties.instance = (ServiceSettings)serializer.Deserialize(fs); - } - } - catch (Exception e) - { - OnLoadSettingsFailed(e); - RestoreDefaults(); - } - } - } - - #endregion - } - - #endregion - - #region Constants - - private const string DefaultSettingsFolderName = "AppSettings"; - private const string DefaultSettingsFileName = "settings.xml"; - - #endregion - - #region Private Fields - - Dictionary storedValues; - - #endregion - - #region Events - - public static event EventHandler LoadSettingsFailed; - - #endregion - - #region Properties - - // Singleton instance. - public static ServiceSettings Default - { - get { return Properties.instance; } - } - - public static string SettingsFileName { get; set; } - - public static bool SettingsFileExists - { - get - { - return File.Exists(SettingsFileName); - } - } - - #endregion - - #region Constructors - - static ServiceSettings() - { - string folderName = GetProductName(); - - if (string.IsNullOrWhiteSpace(folderName)) - { - folderName = DefaultSettingsFolderName; - } - - SettingsFileName = Path.Combine(Environment.GetFolderPath( - Environment.SpecialFolder.ApplicationData), folderName, DefaultSettingsFileName); - - foreach (char c in Path.GetInvalidPathChars()) - { - SettingsFileName = SettingsFileName.Replace(c, '_'); - } - } - - // Hide constructor (Singleton) - private ServiceSettings() - { - this.storedValues = new Dictionary(); - RestoreDefaults(this, true); - } - - #endregion - - #region Public Methods - - public static void RestoreDefaults() - { - RestoreDefaults(ServiceSettings.Default, false); - } - - public static void Save() - { - string dir = Path.GetDirectoryName(SettingsFileName); - - if (!Directory.Exists(dir)) - { - Directory.CreateDirectory(dir); - } - - using (FileStream fs = new FileStream(SettingsFileName, FileMode.Create)) - { - var serializer = new XmlSerializer(typeof(ServiceSettings)); - serializer.Serialize(fs, ServiceSettings.Default); - } - } - - public static void StoreCurrentSettings() - { - Properties.instance.storedValues.Clear(); - - foreach (PropertyInfo info in GetNonStaticProperties(typeof(ServiceSettings))) - { - object value = info.GetValue(Default, null); - ServiceSettings.Default.storedValues.Add(info.Name, value); - } - } - - public static void LoadStoredSettings() - { - foreach (PropertyInfo info in GetNonStaticProperties(typeof(ServiceSettings))) - { - if (ServiceSettings.Default.storedValues.ContainsKey(info.Name)) - { - object value = ServiceSettings.Default.storedValues[info.Name]; - info.SetValue(Default, value, null); - } - } - } - - public static void DeleteSettingsFile() - { - if (ServiceSettings.SettingsFileExists) - { - File.Delete(SettingsFileName); - } - - string dir = Path.GetDirectoryName(SettingsFileName); - - if (Directory.Exists(dir)) - { - Directory.Delete(dir, true); - } - } - - #endregion - - #region Private Methods - - private static void RestoreDefaults(ServiceSettings settings, bool force) - { - foreach (PropertyInfo pInfo in GetNonStaticProperties(typeof(ServiceSettings))) - { - if (force || !HasRestoreDefaultsIgnoreAttribute(pInfo)) - { - var defaultAttrib = pInfo.GetCustomAttributes(typeof(DefaultValueAttribute), false) - .FirstOrDefault() as DefaultValueAttribute; - - if (defaultAttrib != null) - { - pInfo.SetValue(settings, defaultAttrib.Value, null); - } - } - } - } - - private static IEnumerable GetNonStaticProperties(Type type) - { - foreach (PropertyInfo propInfo in type.GetProperties()) - { - MethodInfo methInfo = propInfo.GetGetMethod(false); - - if ((methInfo != null) && (!methInfo.IsStatic)) - { - yield return propInfo; - } - } - } - - private static bool HasRestoreDefaultsIgnoreAttribute(PropertyInfo info) - { - return info.GetCustomAttributes(typeof(RestoreDefaultsIgnoreAttribute), false).Length > 0; - } - - private static string GetProductName() - { - var info = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); - return info.ProductName; - } - - private static void OnLoadSettingsFailed(Exception e) - { - if (ServiceSettings.LoadSettingsFailed != null) - { - ServiceSettings.LoadSettingsFailed(null, new LoadSettingsFailedEventArgs(e)); - } - } - - #endregion - } -} - diff --git a/Core/StagWare.FanControl.Service/StagWare.FanControl.Service.csproj b/Core/StagWare.FanControl.Service/StagWare.FanControl.Service.csproj index 1a9bcb61..70e938fe 100644 --- a/Core/StagWare.FanControl.Service/StagWare.FanControl.Service.csproj +++ b/Core/StagWare.FanControl.Service/StagWare.FanControl.Service.csproj @@ -58,15 +58,12 @@ - - - - + @@ -82,6 +79,10 @@ {12084b38-c1a2-414c-80a7-b8d02d6f5b84} StagWare.FanControl + + {44c3959a-3565-4fb6-9bf6-694b146cd032} + StagWare.Settings + From aa0d30a8bf07c29ca95c5d445db44ff230adb8a8 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Thu, 25 May 2017 20:13:44 +0200 Subject: [PATCH 13/36] Replace .net application settings with StagWare.Settings.SettingsService --- Windows/NbfcClient/App.xaml.cs | 7 -- Windows/NbfcClient/AppSettings.cs | 25 +++++ Windows/NbfcClient/NbfcClient.csproj | 20 ++-- Windows/NbfcClient/Properties/AssemblyInfo.cs | 6 +- .../Properties/Settings.Designer.cs | 91 ------------------- .../NbfcClient/Properties/Settings.settings | 21 ----- Windows/NbfcClient/Settings.cs | 28 ++++++ .../NbfcClient/ViewModels/MainViewModel.cs | 6 +- .../ViewModels/SettingsViewModel.cs | 17 ++-- Windows/NbfcClient/Views/MainWindow.xaml.cs | 13 +-- Windows/NbfcClient/app.config | 35 ++----- 11 files changed, 89 insertions(+), 180 deletions(-) create mode 100644 Windows/NbfcClient/AppSettings.cs delete mode 100644 Windows/NbfcClient/Properties/Settings.Designer.cs delete mode 100644 Windows/NbfcClient/Properties/Settings.settings create mode 100644 Windows/NbfcClient/Settings.cs diff --git a/Windows/NbfcClient/App.xaml.cs b/Windows/NbfcClient/App.xaml.cs index 608b0779..c15e95c8 100644 --- a/Windows/NbfcClient/App.xaml.cs +++ b/Windows/NbfcClient/App.xaml.cs @@ -12,13 +12,6 @@ public partial class App : Application { public App() { - if (Settings.Default.UpgradeRequired) - { - Settings.Default.Upgrade(); - Settings.Default.UpgradeRequired = false; - Settings.Default.Save(); - } - FrameworkElement.LanguageProperty.OverrideMetadata( typeof(FrameworkElement), new FrameworkPropertyMetadata( diff --git a/Windows/NbfcClient/AppSettings.cs b/Windows/NbfcClient/AppSettings.cs new file mode 100644 index 00000000..98c18060 --- /dev/null +++ b/Windows/NbfcClient/AppSettings.cs @@ -0,0 +1,25 @@ +using StagWare.Settings; +using System.Windows.Media; + +namespace NbfcClient +{ + public class AppSettings : SettingsBase + { + public AppSettings() + { + SettingsVersion = 0; + } + + [DefaultValue(typeof(XmlWrapper), "White")] + public XmlWrapper TrayIconForegroundColor { get; set; } + + [DefaultValue(false)] + public bool CloseToTray { get; set; } + + [DefaultValue(350.0)] + public double WindowHeight { get; set; } + + [DefaultValue(430.0)] + public double WindowWidth { get; set; } + } +} diff --git a/Windows/NbfcClient/NbfcClient.csproj b/Windows/NbfcClient/NbfcClient.csproj index 72c379cf..decbec82 100644 --- a/Windows/NbfcClient/NbfcClient.csproj +++ b/Windows/NbfcClient/NbfcClient.csproj @@ -111,6 +111,7 @@ MSBuild:Compile Designer + @@ -120,6 +121,7 @@ + @@ -208,24 +210,15 @@ True Resources.resx - - True - Settings.settings - True - ResXFileCodeGenerator Resources.Designer.cs - + Designer - - SettingsSingleFileGenerator - Settings.Designer.cs - Designer @@ -283,7 +276,12 @@ - + + + {44c3959a-3565-4fb6-9bf6-694b146cd032} + StagWare.Settings + + - \ No newline at end of file + diff --git a/Core/NbfcProbe/NbfcProbe.csproj b/Core/NbfcProbe/NbfcProbe.csproj index dc317fd3..578fce60 100644 --- a/Core/NbfcProbe/NbfcProbe.csproj +++ b/Core/NbfcProbe/NbfcProbe.csproj @@ -11,7 +11,7 @@ - + true full false @@ -23,7 +23,7 @@ true false - + full true bin\Release @@ -40,12 +40,20 @@ App.manifest - bin\ReleaseLinux\ + bin\Release\ true full AnyCPU prompt + + true + bin\Debug\ + DEBUG; + full + AnyCPU + prompt + ..\..\packages\clipr.1.5.1\lib\net35\clipr.dll @@ -63,9 +71,15 @@ + - + + + + + + {60a11809-e19b-46a2-8e91-bf6ada47bbc6} @@ -81,4 +95,4 @@ - \ No newline at end of file + diff --git a/Core/NbfcService/App.config b/Core/NbfcService/App.Windows.config similarity index 100% rename from Core/NbfcService/App.config rename to Core/NbfcService/App.Windows.config diff --git a/Core/NbfcService/NbfcService.csproj b/Core/NbfcService/NbfcService.csproj index 160788e1..07517c8c 100644 --- a/Core/NbfcService/NbfcService.csproj +++ b/Core/NbfcService/NbfcService.csproj @@ -20,17 +20,19 @@ - + AnyCPU - bin\Debug\ + bin\DebugWindows\ false + App.Windows.config - + AnyCPU - bin\Release\ + bin\ReleaseWindows\ TRACE true false + App.Windows.config App.manifest @@ -86,7 +88,7 @@ - + Designer @@ -96,21 +98,34 @@ + - - - + + + + - - \ No newline at end of file + diff --git a/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj b/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj index 42e37646..1a3006d6 100644 --- a/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj +++ b/Core/Plugins/StagWare.Plugins.CpuTemperatureMonitor/StagWare.Plugins.CpuTemperatureMonitor.csproj @@ -14,7 +14,7 @@ - + true full false @@ -24,7 +24,7 @@ 4 false - + pdbonly true bin\Release\ @@ -34,13 +34,21 @@ false - bin\ReleaseLinux\ + bin\Release\ TRACE true pdbonly AnyCPU prompt + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + @@ -66,17 +74,28 @@ + - - + + + + + + + + + + - + + - - \ No newline at end of file + diff --git a/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj b/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj index c175c467..8d1be315 100644 --- a/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj +++ b/Core/Plugins/StagWare.Plugins.ECLinux/StagWare.Plugins.ECLinux.csproj @@ -12,34 +12,8 @@ 512 v4.5 - - v4.5 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - false - - bin\ReleaseLinux\ + bin\Release\ TRACE true true @@ -47,6 +21,15 @@ AnyCPU prompt + + true + bin\Debug\ + DEBUG;TRACE + true + full + AnyCPU + prompt + @@ -73,17 +56,27 @@ + - - + + + + + + + + + + - + + - - \ No newline at end of file + diff --git a/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj b/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj index c0522d40..c23379df 100644 --- a/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj +++ b/Core/Plugins/StagWare.Plugins.ECSysLinux/StagWare.Plugins.ECSysLinux.csproj @@ -12,38 +12,22 @@ 512 v4.5 - - v4.5 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - bin\ReleaseLinux\ + bin\Release\ TRACE true pdbonly AnyCPU prompt + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + @@ -65,17 +49,27 @@ + - + + + + + + + + + - + + - - \ No newline at end of file + diff --git a/Core/Plugins/StagWare.Plugins.ECWindows/StagWare.Plugins.ECWindows.csproj b/Core/Plugins/StagWare.Plugins.ECWindows/StagWare.Plugins.ECWindows.csproj index f0923621..279bad23 100644 --- a/Core/Plugins/StagWare.Plugins.ECWindows/StagWare.Plugins.ECWindows.csproj +++ b/Core/Plugins/StagWare.Plugins.ECWindows/StagWare.Plugins.ECWindows.csproj @@ -14,7 +14,7 @@ - + true full false @@ -24,7 +24,7 @@ 4 false - + pdbonly true bin\Release\ diff --git a/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj b/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj index 48caa786..69ef146e 100644 --- a/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj +++ b/Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/StagWare.Plugins.FSTemperatureMonitor.csproj @@ -14,7 +14,7 @@ - + true full false @@ -24,7 +24,7 @@ 4 false - + pdbonly true bin\Release\ @@ -34,13 +34,21 @@ false - bin\ReleaseLinux\ + bin\Release\ TRACE true pdbonly AnyCPU prompt + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + @@ -63,17 +71,27 @@ + - + + + + + + + + + - + + - - \ No newline at end of file + diff --git a/Core/StagWare.FanControl.Service/App.config b/Core/StagWare.FanControl.Service/App.config index 2efb030f..24a0b340 100644 --- a/Core/StagWare.FanControl.Service/App.config +++ b/Core/StagWare.FanControl.Service/App.config @@ -1,12 +1,6 @@ - - -
- - - @@ -47,28 +41,5 @@ - - - - - - True - - - - - - - - False - - - - - - - - - - + diff --git a/NoteBookFanControl.sln b/NoteBookFanControl.sln index 38d227ee..fd84c6c7 100644 --- a/NoteBookFanControl.sln +++ b/NoteBookFanControl.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26430.6 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StagWare.FanControl", "Core\StagWare.FanControl\StagWare.FanControl.csproj", "{12084B38-C1A2-414C-80A7-B8D02D6F5B84}" EndProject @@ -65,245 +65,163 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StagWare.Settings", "Core\S EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU DebugLinux|Any CPU = DebugLinux|Any CPU DebugWindows|Any CPU = DebugWindows|Any CPU - Release|Any CPU = Release|Any CPU ReleaseLinux|Any CPU = ReleaseLinux|Any CPU ReleaseWindows|Any CPU = ReleaseWindows|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Debug|Any CPU.Build.0 = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.Release|Any CPU.Build.0 = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {12084B38-C1A2-414C-80A7-B8D02D6F5B84}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Debug|Any CPU.Build.0 = Debug|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Release|Any CPU.ActiveCfg = Release|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.Release|Any CPU.Build.0 = Release|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.Release|Any CPU.Build.0 = Release|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {820ABB59-7F86-4D7F-89C9-8F7DA013D992}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {F6104868-81A7-4D09-8AD2-8CF261D58319}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.Release|Any CPU.Build.0 = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {EB60FFBC-51F9-42F7-B22B-2200C3F0CB64}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {15B3E0D2-6217-493A-A690-158C497F5318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15B3E0D2-6217-493A-A690-158C497F5318}.Debug|Any CPU.Build.0 = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {15B3E0D2-6217-493A-A690-158C497F5318}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15B3E0D2-6217-493A-A690-158C497F5318}.Release|Any CPU.Build.0 = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {15B3E0D2-6217-493A-A690-158C497F5318}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.Release|Any CPU.Build.0 = Release|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.Release|Any CPU.Build.0 = Release|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.Debug|Any CPU.ActiveCfg = Debug|x86 + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugLinux|Any CPU.ActiveCfg = DebugWindows|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {A2E2E628-7BDA-4072-83DE-B28DE7EA85A9}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugLinux|Any CPU.ActiveCfg = DebugWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.Build.0 = ReleaseWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 - {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.Release|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.ReleaseWindows|Any CPU.Build.0 = Release|x86 - {088065D5-99ED-4A8B-9301-3666C5B88718}.Debug|Any CPU.ActiveCfg = Debug|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 - {088065D5-99ED-4A8B-9301-3666C5B88718}.Release|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 {088065D5-99ED-4A8B-9301-3666C5B88718}.ReleaseWindows|Any CPU.Build.0 = Release|x86 - {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0397530-545A-471D-BB74-027AE456DF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {B0397530-545A-471D-BB74-027AE456DF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0397530-545A-471D-BB74-027AE456DF1A}.Release|Any CPU.Build.0 = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {B0397530-545A-471D-BB74-027AE456DF1A}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.Debug|Any CPU.ActiveCfg = Debug|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugWindows|Any CPU.ActiveCfg = Debug|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.Release|Any CPU.ActiveCfg = Release|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseLinux|Any CPU.ActiveCfg = Release|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.ActiveCfg = Release|x86 - {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.Build.0 = Release|x86 - {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugLinux|Any CPU.ActiveCfg = DebugWindows|x86 + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|x86 + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseWindows|x86 + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|x86 + {98EE4668-8F55-43B7-B2F9-A8C4B0DAFA79}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|x86 {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1D5D7C81-802F-46E0-913F-8519F157BC3C}.Release|Any CPU.Build.0 = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {1D5D7C81-802F-46E0-913F-8519F157BC3C}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.Release|Any CPU.Build.0 = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {B45BBD0F-9345-4EC8-B70D-8369659DA3B4}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.Release|Any CPU.Build.0 = Release|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.Release|Any CPU.Build.0 = Release|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugLinux|Any CPU.ActiveCfg = DebugWindows|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {6C6F4E15-FC36-4298-A7E9-83CD854BDFDB}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.DebugWindows|Any CPU.ActiveCfg = DebugLinux|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F5B3D05-7615-4E74-84E6-4F00FAD0413C}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.Release|Any CPU.Build.0 = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {66BAE497-003D-4F8A-B26E-DE5FA3361D38}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.Release|Any CPU.Build.0 = Release|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {281A8541-1845-44DF-BBB9-3E0934C753A3}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.Release|Any CPU.Build.0 = Release|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.Release|Any CPU.Build.0 = Release|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {60A11809-E19B-46A2-8E91-BF6ADA47BBC6}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.Release|Any CPU.Build.0 = Release|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {11380AFB-D406-4F4E-B260-2C892CD067B4}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.ActiveCfg = DebugLinux|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugLinux|Any CPU.Build.0 = DebugLinux|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.DebugWindows|Any CPU.ActiveCfg = DebugLinux|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseLinux|Any CPU.Build.0 = ReleaseLinux|Any CPU - {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU - {75F46626-9B87-497E-8565-51A5C8798ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75F46626-9B87-497E-8565-51A5C8798ED4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D92D1F2A-8B4F-4946-9385-74EA13DF86AC}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseLinux|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {75F46626-9B87-497E-8565-51A5C8798ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75F46626-9B87-497E-8565-51A5C8798ED4}.Release|Any CPU.Build.0 = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU {75F46626-9B87-497E-8565-51A5C8798ED4}.ReleaseWindows|Any CPU.Build.0 = Release|Any CPU - {44C3959A-3565-4FB6-9BF6-694B146CD032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {44C3959A-3565-4FB6-9BF6-694B146CD032}.Debug|Any CPU.Build.0 = Debug|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugLinux|Any CPU.ActiveCfg = Debug|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugLinux|Any CPU.Build.0 = Debug|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugWindows|Any CPU.ActiveCfg = Debug|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.DebugWindows|Any CPU.Build.0 = Debug|Any CPU - {44C3959A-3565-4FB6-9BF6-694B146CD032}.Release|Any CPU.ActiveCfg = Release|Any CPU - {44C3959A-3565-4FB6-9BF6-694B146CD032}.Release|Any CPU.Build.0 = Release|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseLinux|Any CPU.ActiveCfg = Release|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseLinux|Any CPU.Build.0 = Release|Any CPU {44C3959A-3565-4FB6-9BF6-694B146CD032}.ReleaseWindows|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Windows/ConfigEditor/ConfigEditor.csproj b/Windows/ConfigEditor/ConfigEditor.csproj index 5ccba21e..4c93e607 100644 --- a/Windows/ConfigEditor/ConfigEditor.csproj +++ b/Windows/ConfigEditor/ConfigEditor.csproj @@ -16,7 +16,7 @@ - + AnyCPU true full @@ -27,7 +27,7 @@ 4 false - + AnyCPU pdbonly true diff --git a/Windows/NbfcClient/NbfcClient.csproj b/Windows/NbfcClient/NbfcClient.csproj index 1dc4a851..4c5effd1 100644 --- a/Windows/NbfcClient/NbfcClient.csproj +++ b/Windows/NbfcClient/NbfcClient.csproj @@ -31,7 +31,7 @@ false true - + AnyCPU true full @@ -42,7 +42,7 @@ 4 false - + AnyCPU pdbonly true diff --git a/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj b/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj index a3b48a96..b04543bd 100644 --- a/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj +++ b/Windows/Setup/DriverSetupWixAction/DriverSetupWixAction.csproj @@ -16,7 +16,7 @@ - + true full false @@ -26,7 +26,7 @@ 4 false - + pdbonly true bin\Release\ From 0ef6a92e82ce7ad983275721696051e0f8ac9ef7 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sun, 28 May 2017 19:22:51 +0200 Subject: [PATCH 26/36] Log to file by default --- Core/NbfcService/App.Linux.config | 43 ++++++++++++++++++++++++++--- Core/NbfcService/App.Windows.config | 39 ++++++++++++++++++++++++-- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/Core/NbfcService/App.Linux.config b/Core/NbfcService/App.Linux.config index be4cd8ec..2efff3ea 100644 --- a/Core/NbfcService/App.Linux.config +++ b/Core/NbfcService/App.Linux.config @@ -44,11 +44,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" useInvariantCulture="true"> + + @@ -60,10 +62,43 @@ - + + + + + +
+ + + + + + + + + + + + + - + diff --git a/Core/NbfcService/App.Windows.config b/Core/NbfcService/App.Windows.config index 5325b6a8..d2273ce4 100644 --- a/Core/NbfcService/App.Windows.config +++ b/Core/NbfcService/App.Windows.config @@ -43,6 +43,8 @@ xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" useInvariantCulture="true"> + + + + + + + +
+ + + + + + + + + + + + - + - + From 892892d844a2e9c85e1d0e1c05fa871042fd3a62 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sun, 28 May 2017 19:23:34 +0200 Subject: [PATCH 27/36] Log service events --- Core/NbfcService/NbfcService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/NbfcService/NbfcService.cs b/Core/NbfcService/NbfcService.cs index 854c534a..32735dc8 100644 --- a/Core/NbfcService/NbfcService.cs +++ b/Core/NbfcService/NbfcService.cs @@ -49,6 +49,7 @@ public void Main() protected override void OnStart(string[] args) { + logger.Info("Starting NoteBookFanControlService"); StopServiceHost(); this.service = new FanControlService(); @@ -58,21 +59,26 @@ protected override void OnStart(string[] args) protected override void OnStop() { + logger.Info("Stopping NoteBookFanControlService"); StopServiceHost(); } protected override void OnContinue() { + logger.Info("Continuing NoteBookFanControlService"); this.service.Continue(); } protected override void OnPause() { + logger.Info("Pausing NoteBookFanControlService"); this.service.Pause(); } protected override bool OnPowerEvent(PowerBroadcastStatus powerStatus) { + logger.Info(() => "Handling power event: " + powerStatus.ToString()); + switch (powerStatus) { case PowerBroadcastStatus.ResumeAutomatic: From b406cbd4df8f4b9bc1bcebae4558962c385bf626 Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sun, 28 May 2017 19:24:08 +0200 Subject: [PATCH 28/36] Use async logger --- Windows/NbfcClient/app.config | 57 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/Windows/NbfcClient/app.config b/Windows/NbfcClient/app.config index 4f7943e0..0ad63b9c 100644 --- a/Windows/NbfcClient/app.config +++ b/Windows/NbfcClient/app.config @@ -34,37 +34,44 @@ useInvariantCulture="true"> + - - - -
- - - - - - - - + + + + +
+ + + + + + + + + - + - + From c569b89a55dfff5251cffce39f33a17388169c8d Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sun, 28 May 2017 19:51:19 +0200 Subject: [PATCH 29/36] Exclude NbfcClient from Linux build configuration --- NoteBookFanControl.sln | 1 - 1 file changed, 1 deletion(-) diff --git a/NoteBookFanControl.sln b/NoteBookFanControl.sln index fd84c6c7..6e009587 100644 --- a/NoteBookFanControl.sln +++ b/NoteBookFanControl.sln @@ -121,7 +121,6 @@ Global {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.ActiveCfg = ReleaseWindows|Any CPU - {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseLinux|Any CPU.Build.0 = ReleaseWindows|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU {DF818D02-6FBC-44E1-88FA-0D62BD73CA95}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {D709446B-7DEC-4F18-B2A2-638A2EF8AAA6}.DebugLinux|Any CPU.ActiveCfg = Debug|x86 From e52f32490dc9f3d451b211906cf018e05b47ca1e Mon Sep 17 00:00:00 2001 From: Stefan Hirschmann Date: Sun, 28 May 2017 20:59:47 +0200 Subject: [PATCH 30/36] Don't override ReleaseLinux AfterBuild target --- Core/NbfcCli/NbfcCli.csproj | 19 +++++--- Core/NbfcProbe/NbfcProbe.csproj | 16 ++++--- Core/NbfcService/NbfcService.csproj | 45 +++++++++++++------ ...gWare.Plugins.CpuTemperatureMonitor.csproj | 22 ++++----- .../StagWare.Plugins.ECLinux.csproj | 23 +++++----- .../StagWare.Plugins.ECSysLinux.csproj | 21 +++++---- ...agWare.Plugins.FSTemperatureMonitor.csproj | 21 +++++---- 7 files changed, 105 insertions(+), 62 deletions(-) diff --git a/Core/NbfcCli/NbfcCli.csproj b/Core/NbfcCli/NbfcCli.csproj index f8a8ee3c..6e132c36 100644 --- a/Core/NbfcCli/NbfcCli.csproj +++ b/Core/NbfcCli/NbfcCli.csproj @@ -138,12 +138,21 @@ - - - - - + + + + + + - + \ No newline at end of file diff --git a/Core/NbfcCli/packages.config b/Core/NbfcCli/packages.config index 08be8515..02d5e498 100644 --- a/Core/NbfcCli/packages.config +++ b/Core/NbfcCli/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Core/NbfcProbe/NbfcProbe.csproj b/Core/NbfcProbe/NbfcProbe.csproj index 7c8cfc5b..6d5d74fb 100644 --- a/Core/NbfcProbe/NbfcProbe.csproj +++ b/Core/NbfcProbe/NbfcProbe.csproj @@ -55,9 +55,8 @@ prompt - - ..\..\packages\clipr.1.5.1\lib\net35\clipr.dll - True + + ..\..\packages\clipr.1.6.0\lib\net35\clipr.dll @@ -71,21 +70,10 @@ - - - - + + - {60a11809-e19b-46a2-8e91-bf6ada47bbc6} @@ -101,4 +89,4 @@ - + \ No newline at end of file diff --git a/Core/NbfcProbe/packages.config b/Core/NbfcProbe/packages.config index 08be8515..02d5e498 100644 --- a/Core/NbfcProbe/packages.config +++ b/Core/NbfcProbe/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj b/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj index fe18b6f6..cd010d8e 100644 --- a/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj +++ b/Tests/StagWare.FanControl.Tests/StagWare.FanControl.Tests.csproj @@ -1,6 +1,6 @@  - + Debug @@ -10,10 +10,11 @@ Properties StagWare.FanControl.Tests StagWare.FanControl.Tests - v4.5 + v4.5.2 512 + true @@ -33,9 +34,8 @@ 4 - - ..\..\packages\FakeItEasy.2.3.1\lib\net40\FakeItEasy.dll - True + + ..\..\packages\FakeItEasy.3.3.2\lib\net40\FakeItEasy.dll @@ -46,20 +46,16 @@ - ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - True + ..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll - - ..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll - True + + ..\..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll - - ..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - True + + ..\..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll - - ..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - True + + ..\..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll @@ -87,9 +83,9 @@ - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - +