Temporarily removed notifications, as they require extra 20mb lib

This commit is contained in:
seerge
2023-02-22 19:24:04 +01:00
parent 249fef0bb1
commit ccf4ae5126
2 changed files with 2 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework> <TargetFramework>net7.0-windows8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<UseWindowsForms>True</UseWindowsForms> <UseWindowsForms>True</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -1,8 +1,6 @@
using System.Diagnostics; using System.Diagnostics;
using System.Timers; using System.Timers;
using System.Windows.Forms;
using Windows.UI.Notifications;
using Microsoft.Toolkit.Uwp.Notifications;
namespace GHelper namespace GHelper
{ {
@@ -411,8 +409,6 @@ namespace GHelper
labelPerf.Text = "Performance Mode: not supported"; 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); 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) public void AutoScreen(int Plugged = 1)
{ {
int ScreenAuto = Program.config.getConfig("screen_auto"); int ScreenAuto = Program.config.getConfig("screen_auto");