Extra icons for OSD
@@ -21,6 +21,10 @@ namespace GHelper
|
|||||||
|
|
||||||
private void SetKeyCombo(ComboBox combo, TextBox txbox, string name)
|
private void SetKeyCombo(ComboBox combo, TextBox txbox, string name)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (name == "m3")
|
||||||
|
customActions[""] = Properties.Strings.MuteMic;
|
||||||
|
|
||||||
if (name == "m4")
|
if (name == "m4")
|
||||||
customActions[""] = Properties.Strings.OpenGHelper;
|
customActions[""] = Properties.Strings.OpenGHelper;
|
||||||
|
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ namespace GHelper
|
|||||||
var commDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Communications);
|
var commDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Communications);
|
||||||
bool muteStatus = !commDevice.AudioEndpointVolume.Mute;
|
bool muteStatus = !commDevice.AudioEndpointVolume.Mute;
|
||||||
commDevice.AudioEndpointVolume.Mute = muteStatus;
|
commDevice.AudioEndpointVolume.Mute = muteStatus;
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, muteStatus ? "Muted" : "Unmuted", ToastIcon.Microphone);
|
settingsForm.BeginInvoke(settingsForm.RunToast, muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -323,25 +323,25 @@ namespace GHelper
|
|||||||
brightness = Math.Max(0, brightness - 1);
|
brightness = Math.Max(0, brightness - 1);
|
||||||
config.setConfig("keyboard_brightness", brightness);
|
config.setConfig("keyboard_brightness", brightness);
|
||||||
AsusUSB.ApplyBrightness(brightness);
|
AsusUSB.ApplyBrightness(brightness);
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, "Down", ToastIcon.Backlight);
|
settingsForm.BeginInvoke(settingsForm.RunToast, "Backlight", ToastIcon.BacklightDown);
|
||||||
break;
|
break;
|
||||||
case 196: // FN+F3
|
case 196: // FN+F3
|
||||||
brightness = Math.Min(3, brightness + 1);
|
brightness = Math.Min(3, brightness + 1);
|
||||||
config.setConfig("keyboard_brightness", brightness);
|
config.setConfig("keyboard_brightness", brightness);
|
||||||
AsusUSB.ApplyBrightness(brightness);
|
AsusUSB.ApplyBrightness(brightness);
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, "Up", ToastIcon.Backlight);
|
settingsForm.BeginInvoke(settingsForm.RunToast, "Backlight", ToastIcon.BacklightUp);
|
||||||
break;
|
break;
|
||||||
case 16: // FN+F7
|
case 16: // FN+F7
|
||||||
ScreenBrightness.Adjust(-10);
|
ScreenBrightness.Adjust(-10);
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, "Down", ToastIcon.Brightness);
|
settingsForm.BeginInvoke(settingsForm.RunToast, "Brightness", ToastIcon.BrightnessDown);
|
||||||
break;
|
break;
|
||||||
case 32: // FN+F8
|
case 32: // FN+F8
|
||||||
ScreenBrightness.Adjust(+10);
|
ScreenBrightness.Adjust(+10);
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, "Up", ToastIcon.Brightness);
|
settingsForm.BeginInvoke(settingsForm.RunToast, "Brightness", ToastIcon.BrightnessUp);
|
||||||
break;
|
break;
|
||||||
case 107: // FN+F10
|
case 107: // FN+F10
|
||||||
AsusUSB.TouchpadToggle();
|
AsusUSB.TouchpadToggle();
|
||||||
settingsForm.BeginInvoke(settingsForm.RunToast, "Toggle", ToastIcon.Touchpad);
|
settingsForm.BeginInvoke(settingsForm.RunToast, "Touchpad", ToastIcon.Touchpad);
|
||||||
break;
|
break;
|
||||||
case 108: // FN+F11
|
case 108: // FN+F11
|
||||||
Application.SetSuspendState(PowerState.Suspend, true, true);
|
Application.SetSuspendState(PowerState.Suspend, true, true);
|
||||||
|
|||||||
70
app/Properties/Resources.Designer.cs
generated
@@ -60,6 +60,46 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap backlight_down {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("backlight_down", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap backlight_up {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("backlight_up", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap brightness_down {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("brightness_down", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap brightness_up {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("brightness_up", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -90,16 +130,6 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap icons8_brightness_96 {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("icons8_brightness_96", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -240,6 +270,16 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icons8_mute_unmute_96 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icons8_mute_unmute_96", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -340,16 +380,6 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
internal static System.Drawing.Bitmap icons8_sunset_96 {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("icons8_sunset_96", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -211,16 +211,25 @@
|
|||||||
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_brightness_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-brightness-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8_sunset_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\icons8-sunset-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="icons8_microphone_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_microphone_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_touchpad_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="icons8_touchpad_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\icons8-touchpad-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\icons8-touchpad-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="backlight_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="icons8_mute_unmute_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
10
app/Properties/Strings.Designer.cs
generated
@@ -1,6 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -779,6 +780,15 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Mute Mic.
|
||||||
|
/// </summary>
|
||||||
|
internal static string MuteMic {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MuteMic", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Open G-Helper window.
|
/// Looks up a localized string similar to Open G-Helper window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -357,6 +357,9 @@
|
|||||||
<data name="Multizone" xml:space="preserve">
|
<data name="Multizone" xml:space="preserve">
|
||||||
<value>Multizone</value>
|
<value>Multizone</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MuteMic" xml:space="preserve">
|
||||||
|
<value>Mute Mic</value>
|
||||||
|
</data>
|
||||||
<data name="OpenGHelper" xml:space="preserve">
|
<data name="OpenGHelper" xml:space="preserve">
|
||||||
<value>Open G-Helper window</value>
|
<value>Open G-Helper window</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
BIN
app/Resources/backlight-down.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/Resources/backlight-up.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/Resources/brightness-down.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/Resources/brightness-up.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
BIN
app/Resources/icons8-mute-unmute-96.png
Normal file
|
After Width: | Height: | Size: 979 B |
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -6,6 +6,7 @@ using System.Net;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
using System.Windows.Forms;
|
||||||
using Tools;
|
using Tools;
|
||||||
|
|
||||||
namespace GHelper
|
namespace GHelper
|
||||||
@@ -272,7 +273,11 @@ namespace GHelper
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM");
|
Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM");
|
||||||
|
|
||||||
|
if (Program.config.getConfigPerf("auto_apply") == 1)
|
||||||
|
AsusUSB.SetXGMFan(Program.config.getFanConfig(AsusFan.XGM));
|
||||||
}
|
}
|
||||||
|
|
||||||
InitXGM();
|
InitXGM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,13 @@ namespace GHelper
|
|||||||
|
|
||||||
public enum ToastIcon
|
public enum ToastIcon
|
||||||
{
|
{
|
||||||
Brightness,
|
BrightnessUp,
|
||||||
Backlight,
|
BrightnessDown,
|
||||||
|
BacklightUp,
|
||||||
|
BacklightDown,
|
||||||
Touchpad,
|
Touchpad,
|
||||||
Microphone
|
Microphone,
|
||||||
|
MicrophoneMute
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ToastForm : OSDNativeForm
|
public class ToastForm : OSDNativeForm
|
||||||
@@ -79,15 +82,24 @@ namespace GHelper
|
|||||||
|
|
||||||
switch (toastIcon)
|
switch (toastIcon)
|
||||||
{
|
{
|
||||||
case ToastIcon.Brightness:
|
case ToastIcon.BrightnessUp:
|
||||||
icon = Properties.Resources.icons8_brightness_96;
|
icon = Properties.Resources.brightness_up;
|
||||||
break;
|
break;
|
||||||
case ToastIcon.Backlight:
|
case ToastIcon.BrightnessDown:
|
||||||
icon = Properties.Resources.icons8_sunset_96;
|
icon = Properties.Resources.brightness_down;
|
||||||
|
break;
|
||||||
|
case ToastIcon.BacklightUp:
|
||||||
|
icon = Properties.Resources.backlight_up;
|
||||||
|
break;
|
||||||
|
case ToastIcon.BacklightDown:
|
||||||
|
icon = Properties.Resources.backlight_down;
|
||||||
break;
|
break;
|
||||||
case ToastIcon.Microphone:
|
case ToastIcon.Microphone:
|
||||||
icon = Properties.Resources.icons8_microphone_96;
|
icon = Properties.Resources.icons8_microphone_96;
|
||||||
break;
|
break;
|
||||||
|
case ToastIcon.MicrophoneMute:
|
||||||
|
icon = Properties.Resources.icons8_mute_unmute_96;
|
||||||
|
break;
|
||||||
case ToastIcon.Touchpad:
|
case ToastIcon.Touchpad:
|
||||||
icon = Properties.Resources.icons8_touchpad_96;
|
icon = Properties.Resources.icons8_touchpad_96;
|
||||||
break;
|
break;
|
||||||
@@ -112,7 +124,7 @@ namespace GHelper
|
|||||||
|
|
||||||
public void RunToast(string text, ToastIcon? icon = null)
|
public void RunToast(string text, ToastIcon? icon = null)
|
||||||
{
|
{
|
||||||
Hide();
|
//Hide();
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
|
|
||||||
toastText = text;
|
toastText = text;
|
||||||
|
|||||||