# HG changeset patch # User StephaneLenclud # Date 1454008966 -3600 # Node ID 017874772461fde80dd4dbea15005e1a48d7ac90 # Parent 79a3f5946a8733827c9e6b0ee360b6b0e7ef5d4e Migration to Visual Studio 2015. SharpLibDisplay: Now closing client upon server request. diff -r 79a3f5946a87 -r 017874772461 GUI/SharpDisplay.cs --- a/GUI/SharpDisplay.cs Mon Jan 25 21:05:35 2016 +0100 +++ b/GUI/SharpDisplay.cs Thu Jan 28 20:22:46 2016 +0100 @@ -18,7 +18,6 @@ using OpenHardwareMonitor.Hardware; using OpenHardwareMonitor.Utilities; using System.Runtime.InteropServices; -using UacHelpers; using System.ServiceModel; using SharpLib.Display; @@ -54,19 +53,26 @@ //Connect our client //Instance context is then managed by our client class iClient = new Client(); + iClient.CloseOrderEvent += OnCloseOrder; // - iTextFieldTop = new TextField("", ContentAlignment.MiddleLeft,0,0); + iTextFieldTop = new TextField("", ContentAlignment.MiddleLeft,0,0); iTextFieldBottom = new TextField("", ContentAlignment.MiddleLeft, 0, 1); iTextFieldTopRight = new TextField("", ContentAlignment.MiddleRight,1,0); iTextFieldBottomRight = new TextField("", ContentAlignment.MiddleRight,1,1); // iClient.Open(); iClient.SetName("Open Hardware Monitor"); - iClient.SetPriority(Priorities.SystemMonitor); + iClient.SetPriority(Priorities.SystemMonitor); - CreateFields(); + CreateFields(); } + public void OnCloseOrder() + { + iClient.Close(); + } + + private void HardwareRemoved(IHardware hardware) { hardware.SensorAdded -= new SensorEventHandler(SensorAdded); @@ -136,8 +142,6 @@ { const int KNumberOfTickBeforeSwitch = 4; const int KMaxCharacterPerLine = 16; - string packedFirstLine = ""; //We have 16 chars per line on our VFD - string packedSecondLine = ""; int count = 0; //string time = DateTime.Now.ToShortTimeString(); @@ -344,7 +348,6 @@ iTextFieldTop.Text = aUpperLine; iTextFieldBottom.Text = aLowerLine; iClient.SetFields(iTextFields); - } public void Quit() diff -r 79a3f5946a87 -r 017874772461 GUI/SoundGraphDisplay.cs --- a/GUI/SoundGraphDisplay.cs Mon Jan 25 21:05:35 2016 +0100 +++ b/GUI/SoundGraphDisplay.cs Thu Jan 28 20:22:46 2016 +0100 @@ -21,11 +21,6 @@ using UacHelpers; - - - - - namespace OpenHardwareMonitor.GUI { public class SoundGraphDisplay : IDisposable diff -r 79a3f5946a87 -r 017874772461 OpenHardwareMonitor.csproj --- a/OpenHardwareMonitor.csproj Mon Jan 25 21:05:35 2016 +0100 +++ b/OpenHardwareMonitor.csproj Thu Jan 28 20:22:46 2016 +0100 @@ -227,7 +227,7 @@ OpenHardwareMonitorLib - {D043A646-FE7A-4334-B23D-E327593C1AE2} + {d043a646-fe7a-4334-b23d-e327593c1ae2} UacHelpers.UserAccountControl diff -r 79a3f5946a87 -r 017874772461 OpenHardwareMonitor.sln --- a/OpenHardwareMonitor.sln Mon Jan 25 21:05:35 2016 +0100 +++ b/OpenHardwareMonitor.sln Thu Jan 28 20:22:46 2016 +0100 @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenHardwareMonitorLib", "OpenHardwareMonitorLib.csproj", "{B0397530-545A-471D-BB74-027AE456DF1A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenHardwareMonitor", "OpenHardwareMonitor.csproj", "{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}" @@ -81,14 +83,13 @@ $0.DotNetNamingPolicy = $1 $1.DirectoryNamespaceAssociation = None $1.ResourceNamePolicy = FileFormatDefault - $0.TextStylePolicy = $2 + $0.TextStylePolicy = $3 $2.FileWidth = 120 $2.TabWidth = 2 $2.NoTabsAfterNonTabs = True $2.inheritsSet = VisualStudio $2.inheritsScope = text/plain $2.scope = text/plain - $0.TextStylePolicy = $3 $3.inheritsSet = null $3.scope = text/x-csharp $0.CSharpFormattingPolicy = $4 diff -r 79a3f5946a87 -r 017874772461 UacHelpers.CppLibrary/UacHelpers.CppLibrary.vcxproj --- a/UacHelpers.CppLibrary/UacHelpers.CppLibrary.vcxproj Mon Jan 25 21:05:35 2016 +0100 +++ b/UacHelpers.CppLibrary/UacHelpers.CppLibrary.vcxproj Thu Jan 28 20:22:46 2016 +0100 @@ -1,5 +1,5 @@  - + Debug @@ -39,22 +39,26 @@ Unicode true true + v140 DynamicLibrary Unicode true + v140 DynamicLibrary Unicode true true + v140 DynamicLibrary Unicode true + v140