mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added brightness control to M-hotkeys
This commit is contained in:
@@ -19,6 +19,8 @@ namespace GHelper
|
|||||||
{"screen", Properties.Strings.ToggleScreen},
|
{"screen", Properties.Strings.ToggleScreen},
|
||||||
{"miniled", Properties.Strings.ToggleMiniled},
|
{"miniled", Properties.Strings.ToggleMiniled},
|
||||||
{"fnlock", Properties.Strings.ToggleFnLock},
|
{"fnlock", Properties.Strings.ToggleFnLock},
|
||||||
|
{"brightness_down", Properties.Strings.BrightnessDown},
|
||||||
|
{"brightness_up", Properties.Strings.BrightnessUp},
|
||||||
{"custom", Properties.Strings.Custom}
|
{"custom", Properties.Strings.Custom}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -339,6 +339,12 @@ namespace GHelper
|
|||||||
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "brightness_up":
|
||||||
|
OptimizationEvent(32);
|
||||||
|
break;
|
||||||
|
case "brightness_down":
|
||||||
|
OptimizationEvent(16);
|
||||||
|
break;
|
||||||
case "custom":
|
case "custom":
|
||||||
CustomKey(name);
|
CustomKey(name);
|
||||||
break;
|
break;
|
||||||
|
|||||||
18
app/Properties/Strings.Designer.cs
generated
18
app/Properties/Strings.Designer.cs
generated
@@ -339,6 +339,24 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Brightness Down.
|
||||||
|
/// </summary>
|
||||||
|
internal static string BrightnessDown {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BrightnessDown", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Brightness Up.
|
||||||
|
/// </summary>
|
||||||
|
internal static string BrightnessUp {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BrightnessUp", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Color.
|
/// Looks up a localized string similar to Color.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -210,6 +210,12 @@
|
|||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Brightness</value>
|
<value>Brightness</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BrightnessDown" xml:space="preserve">
|
||||||
|
<value>Brightness Down</value>
|
||||||
|
</data>
|
||||||
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
|
<value>Brightness Up</value>
|
||||||
|
</data>
|
||||||
<data name="Color" xml:space="preserve">
|
<data name="Color" xml:space="preserve">
|
||||||
<value>Color</value>
|
<value>Color</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -247,8 +247,9 @@ namespace GHelper
|
|||||||
public void SetContextMenu()
|
public void SetContextMenu()
|
||||||
{
|
{
|
||||||
|
|
||||||
contextMenuStrip.Items.Clear();
|
var mode = AppConfig.getConfig("performance_mode");
|
||||||
|
|
||||||
|
contextMenuStrip.Items.Clear();
|
||||||
Padding padding = new Padding(15, 5, 5, 5);
|
Padding padding = new Padding(15, 5, 5, 5);
|
||||||
|
|
||||||
var title = new ToolStripMenuItem(Properties.Strings.PerformanceMode);
|
var title = new ToolStripMenuItem(Properties.Strings.PerformanceMode);
|
||||||
@@ -259,17 +260,19 @@ namespace GHelper
|
|||||||
menuSilent = new ToolStripMenuItem(Properties.Strings.Silent);
|
menuSilent = new ToolStripMenuItem(Properties.Strings.Silent);
|
||||||
menuSilent.Click += ButtonSilent_Click;
|
menuSilent.Click += ButtonSilent_Click;
|
||||||
menuSilent.Margin = padding;
|
menuSilent.Margin = padding;
|
||||||
|
menuSilent.Checked = (mode == AsusACPI.PerformanceSilent);
|
||||||
contextMenuStrip.Items.Add(menuSilent);
|
contextMenuStrip.Items.Add(menuSilent);
|
||||||
|
|
||||||
menuBalanced = new ToolStripMenuItem(Properties.Strings.Balanced);
|
menuBalanced = new ToolStripMenuItem(Properties.Strings.Balanced);
|
||||||
menuBalanced.Click += ButtonBalanced_Click;
|
menuBalanced.Click += ButtonBalanced_Click;
|
||||||
menuBalanced.Margin = padding;
|
menuBalanced.Margin = padding;
|
||||||
|
menuBalanced.Checked = (mode == AsusACPI.PerformanceBalanced);
|
||||||
contextMenuStrip.Items.Add(menuBalanced);
|
contextMenuStrip.Items.Add(menuBalanced);
|
||||||
|
|
||||||
menuTurbo = new ToolStripMenuItem(Properties.Strings.Turbo);
|
menuTurbo = new ToolStripMenuItem(Properties.Strings.Turbo);
|
||||||
menuTurbo.Click += ButtonTurbo_Click;
|
menuTurbo.Click += ButtonTurbo_Click;
|
||||||
menuTurbo.Checked = true;
|
|
||||||
menuTurbo.Margin = padding;
|
menuTurbo.Margin = padding;
|
||||||
|
menuTurbo.Checked = (mode == AsusACPI.PerformanceTurbo);
|
||||||
contextMenuStrip.Items.Add(menuTurbo);
|
contextMenuStrip.Items.Add(menuTurbo);
|
||||||
|
|
||||||
contextMenuStrip.Items.Add("-");
|
contextMenuStrip.Items.Add("-");
|
||||||
@@ -1256,6 +1259,10 @@ namespace GHelper
|
|||||||
buttonBalanced.Activated = false;
|
buttonBalanced.Activated = false;
|
||||||
buttonTurbo.Activated = false;
|
buttonTurbo.Activated = false;
|
||||||
|
|
||||||
|
menuSilent.Checked = false;
|
||||||
|
menuBalanced.Checked = false;
|
||||||
|
menuTurbo.Checked = false;
|
||||||
|
|
||||||
switch (PerformanceMode)
|
switch (PerformanceMode)
|
||||||
{
|
{
|
||||||
case AsusACPI.PerformanceSilent:
|
case AsusACPI.PerformanceSilent:
|
||||||
@@ -1271,8 +1278,8 @@ namespace GHelper
|
|||||||
default:
|
default:
|
||||||
buttonBalanced.Activated = true;
|
buttonBalanced.Activated = true;
|
||||||
menuBalanced.Checked = true;
|
menuBalanced.Checked = true;
|
||||||
PerformanceMode = AsusACPI.PerformanceBalanced;
|
|
||||||
perfName = Properties.Strings.Balanced;
|
perfName = Properties.Strings.Balanced;
|
||||||
|
PerformanceMode = AsusACPI.PerformanceBalanced;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user