mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Temporarily removed notifications, as they require extra 20mb lib
This commit is contained in:
24
Settings.cs
24
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");
|
||||
|
||||
Reference in New Issue
Block a user