mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
UI Tweaks
This commit is contained in:
111
app/Settings.cs
111
app/Settings.cs
@@ -471,11 +471,17 @@ namespace GHelper
|
|||||||
|
|
||||||
public void SetVersionLabel(string label, bool update = false)
|
public void SetVersionLabel(string label, bool update = false)
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
if (InvokeRequired)
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
labelVersion.Text = label;
|
||||||
|
if (update) labelVersion.ForeColor = colorTurbo;
|
||||||
|
});
|
||||||
|
else
|
||||||
{
|
{
|
||||||
labelVersion.Text = label;
|
labelVersion.Text = label;
|
||||||
if (update) labelVersion.ForeColor = colorTurbo;
|
if (update) labelVersion.ForeColor = colorTurbo;
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -659,18 +665,14 @@ namespace GHelper
|
|||||||
|
|
||||||
public void FansInit()
|
public void FansInit()
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
if (fansForm == null || fansForm.Text == "") return;
|
||||||
{
|
Invoke(fansForm.InitAll);
|
||||||
if (fansForm != null && fansForm.Text != "") fansForm.InitAll();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GPUInit()
|
public void GPUInit()
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
if (fansForm == null || fansForm.Text == "") return;
|
||||||
{
|
Invoke(fansForm.InitGPU);
|
||||||
if (fansForm != null && fansForm.Text != "") fansForm.InitGPU();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FansToggle(int index = 0)
|
public void FansToggle(int index = 0)
|
||||||
@@ -764,12 +766,19 @@ namespace GHelper
|
|||||||
|
|
||||||
public void VisualiseAura()
|
public void VisualiseAura()
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
if (InvokeRequired)
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
pictureColor.BackColor = Aura.Color1;
|
||||||
|
pictureColor2.BackColor = Aura.Color2;
|
||||||
|
pictureColor2.Visible = Aura.HasSecondColor();
|
||||||
|
});
|
||||||
|
else
|
||||||
{
|
{
|
||||||
pictureColor.BackColor = Aura.Color1;
|
pictureColor.BackColor = Aura.Color1;
|
||||||
pictureColor2.BackColor = Aura.Color2;
|
pictureColor2.BackColor = Aura.Color2;
|
||||||
pictureColor2.Visible = Aura.HasSecondColor();
|
pictureColor2.Visible = Aura.HasSecondColor();
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitMatrix()
|
public void InitMatrix()
|
||||||
@@ -1028,42 +1037,50 @@ namespace GHelper
|
|||||||
|
|
||||||
public void ShowMode(int mode)
|
public void ShowMode(int mode)
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
if (InvokeRequired)
|
||||||
{
|
Invoke(delegate
|
||||||
buttonSilent.Activated = false;
|
|
||||||
buttonBalanced.Activated = false;
|
|
||||||
buttonTurbo.Activated = false;
|
|
||||||
buttonFans.Activated = false;
|
|
||||||
|
|
||||||
menuSilent.Checked = false;
|
|
||||||
menuBalanced.Checked = false;
|
|
||||||
menuTurbo.Checked = false;
|
|
||||||
|
|
||||||
switch (mode)
|
|
||||||
{
|
{
|
||||||
case AsusACPI.PerformanceSilent:
|
VisualiseMode(mode);
|
||||||
buttonSilent.Activated = true;
|
});
|
||||||
menuSilent.Checked = true;
|
else
|
||||||
break;
|
VisualiseMode(mode);
|
||||||
case AsusACPI.PerformanceTurbo:
|
}
|
||||||
buttonTurbo.Activated = true;
|
|
||||||
menuTurbo.Checked = true;
|
protected void VisualiseMode(int mode)
|
||||||
break;
|
{
|
||||||
case AsusACPI.PerformanceBalanced:
|
buttonSilent.Activated = false;
|
||||||
buttonBalanced.Activated = true;
|
buttonBalanced.Activated = false;
|
||||||
menuBalanced.Checked = true;
|
buttonTurbo.Activated = false;
|
||||||
break;
|
buttonFans.Activated = false;
|
||||||
default:
|
|
||||||
buttonFans.Activated = true;
|
menuSilent.Checked = false;
|
||||||
buttonFans.BorderColor = Modes.GetBase(mode) switch
|
menuBalanced.Checked = false;
|
||||||
{
|
menuTurbo.Checked = false;
|
||||||
AsusACPI.PerformanceSilent => colorEco,
|
|
||||||
AsusACPI.PerformanceTurbo => colorTurbo,
|
switch (mode)
|
||||||
_ => colorStandard,
|
{
|
||||||
};
|
case AsusACPI.PerformanceSilent:
|
||||||
break;
|
buttonSilent.Activated = true;
|
||||||
}
|
menuSilent.Checked = true;
|
||||||
});
|
break;
|
||||||
|
case AsusACPI.PerformanceTurbo:
|
||||||
|
buttonTurbo.Activated = true;
|
||||||
|
menuTurbo.Checked = true;
|
||||||
|
break;
|
||||||
|
case AsusACPI.PerformanceBalanced:
|
||||||
|
buttonBalanced.Activated = true;
|
||||||
|
menuBalanced.Checked = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
buttonFans.Activated = true;
|
||||||
|
buttonFans.BorderColor = Modes.GetBase(mode) switch
|
||||||
|
{
|
||||||
|
AsusACPI.PerformanceSilent => colorEco,
|
||||||
|
AsusACPI.PerformanceTurbo => colorTurbo,
|
||||||
|
_ => colorStandard,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user