From e12faaba27c6d7a09dc7a4ae2752ec38c919d1b5 Mon Sep 17 00:00:00 2001 From: Vincent Maas Date: Mon, 27 Dec 2021 17:50:10 +0100 Subject: [PATCH] remove asp.net framework dependency --- ColorControl/App.config | 29 ----------------------------- ColorControl/ColorControl.csproj | 10 ++-------- ColorControl/MainForm.cs | 4 ++++ ColorControl/Utils.cs | 9 ++++++--- 4 files changed, 12 insertions(+), 40 deletions(-) delete mode 100644 ColorControl/App.config diff --git a/ColorControl/App.config b/ColorControl/App.config deleted file mode 100644 index 4427404..0000000 --- a/ColorControl/App.config +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ColorControl/ColorControl.csproj b/ColorControl/ColorControl.csproj index 3c672ed..eff96f5 100644 --- a/ColorControl/ColorControl.csproj +++ b/ColorControl/ColorControl.csproj @@ -18,8 +18,8 @@ Maassoft Maassoft 0 - 5.0.0.0 - 5.0.0.0 + 5.0.1.0 + 5.0.1.0 false true false @@ -81,10 +81,8 @@ - - @@ -92,12 +90,8 @@ - - - - SettingsSingleFileGenerator diff --git a/ColorControl/MainForm.cs b/ColorControl/MainForm.cs index 21faafe..42493a1 100644 --- a/ColorControl/MainForm.cs +++ b/ColorControl/MainForm.cs @@ -1435,6 +1435,10 @@ namespace ColorControl _lgService.RefreshApps().ContinueWith((task) => BeginInvoke(new Action(FillLgApps))); } + btnLgDeviceConvertToCustom.Enabled = devices.Any(); + btnLgExpert.Enabled = devices.Any(); + btnLgGameBar.Enabled = devices.Any(); + SetLgDevicePowerOptions(); } diff --git a/ColorControl/Utils.cs b/ColorControl/Utils.cs index e412588..d0690ea 100644 --- a/ColorControl/Utils.cs +++ b/ColorControl/Utils.cs @@ -1,5 +1,6 @@ using Microsoft.Win32; using Microsoft.Win32.TaskScheduler; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NStandard; using NWin32; @@ -1017,14 +1018,16 @@ namespace ColorControl var response = await httpClient.GetAsync(url); if (response.IsSuccessStatusCode) { - var result = await response.Content.ReadAsAsync(); + var result = await response.Content.ReadAsStringAsync(); + + var data = JsonConvert.DeserializeObject(result); if (callBack != null) { - callBack(result); + callBack(data); } - return result; + return data; } if (callBack != null)