From ccf4ae5126f4b5c2f01114ff5559009f9633d741 Mon Sep 17 00:00:00 2001 From: seerge Date: Wed, 22 Feb 2023 19:24:04 +0100 Subject: [PATCH] Temporarily removed notifications, as they require extra 20mb lib --- GHelper.csproj | 2 +- Settings.cs | 24 +----------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/GHelper.csproj b/GHelper.csproj index 264e8698..9922ab92 100644 --- a/GHelper.csproj +++ b/GHelper.csproj @@ -2,7 +2,7 @@ WinExe - net7.0-windows10.0.17763.0 + net7.0-windows8.0 enable True enable diff --git a/Settings.cs b/Settings.cs index e18e30e6..93946810 100644 --- a/Settings.cs +++ b/Settings.cs @@ -1,8 +1,6 @@ using System.Diagnostics; using System.Timers; -using System.Windows.Forms; -using Windows.UI.Notifications; -using Microsoft.Toolkit.Uwp.Notifications; + namespace GHelper { @@ -411,8 +409,6 @@ namespace GHelper labelPerf.Text = "Performance Mode: not supported"; } - if(notify) - sendNotification(notifTitle, notifBody); } @@ -421,24 +417,6 @@ namespace GHelper SetPerformanceMode(Program.config.getConfig("performance_mode") + 1, true); } - - public void sendNotification(string title, string message) - { - var content = new ToastContentBuilder() - .AddText(title) - .AddText(message) - .SetToastDuration(ToastDuration.Short) - .GetToastContent(); - - var notification = new ToastNotification(content.GetXml()) - { - Priority = ToastNotificationPriority.High - }; - - ToastNotificationManagerCompat.CreateToastNotifier().Show(notification); - } - - public void AutoScreen(int Plugged = 1) { int ScreenAuto = Program.config.getConfig("screen_auto");