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:
@@ -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>
|
||||||
|
|||||||
24
Settings.cs
24
Settings.cs
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user