mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
refactor: use AddOwnedForm for group behavior
This commit is contained in:
@@ -547,6 +547,7 @@ namespace GHelper
|
|||||||
if (matrix == null || matrix.Text == "")
|
if (matrix == null || matrix.Text == "")
|
||||||
{
|
{
|
||||||
matrix = new Matrix();
|
matrix = new Matrix();
|
||||||
|
AddOwnedForm(matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matrix.Visible)
|
if (matrix.Visible)
|
||||||
@@ -615,6 +616,7 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
keyb = new Extra();
|
keyb = new Extra();
|
||||||
keyb.Show();
|
keyb.Show();
|
||||||
|
AddOwnedForm(keyb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -643,6 +645,7 @@ namespace GHelper
|
|||||||
if (fans == null || fans.Text == "")
|
if (fans == null || fans.Text == "")
|
||||||
{
|
{
|
||||||
fans = new Fans();
|
fans = new Fans();
|
||||||
|
AddOwnedForm(fans);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fans.Visible)
|
if (fans.Visible)
|
||||||
@@ -839,6 +842,9 @@ namespace GHelper
|
|||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes all forms except the settings. Hides the settings
|
||||||
|
/// </summary>
|
||||||
public void HideAll()
|
public void HideAll()
|
||||||
{
|
{
|
||||||
this.Hide();
|
this.Hide();
|
||||||
@@ -849,14 +855,9 @@ namespace GHelper
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Brings all visible windows to the top, with settings being the focus
|
/// Brings all visible windows to the top, with settings being the focus
|
||||||
/// <br/>
|
|
||||||
/// Note: this will not respect previous focus i.e. will always focus settings
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ShowAll()
|
public void ShowAll()
|
||||||
{
|
{
|
||||||
if (fans != null && fans.Visible) fans.Activate();
|
|
||||||
if (keyb != null && keyb.Visible) keyb.Activate();
|
|
||||||
if (updates != null && updates.Visible) updates.Activate();
|
|
||||||
this.Activate();
|
this.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user