-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
181 additions
and
4 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFormClose.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#region BSD License | ||
/* | ||
* | ||
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | ||
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. | ||
* | ||
*/ | ||
#endregion | ||
|
||
namespace Krypton.Navigator | ||
{ | ||
public class ButtonSpecNavFormClose : ButtonSpecNavFixed | ||
{ | ||
#region Instance Fields | ||
|
||
private bool _enabled = true; | ||
|
||
#endregion | ||
|
||
#region Identity | ||
|
||
/// <summary>Initializes a new instance of the <see cref="ButtonSpecNavFormClose" /> class.</summary> | ||
/// <param name="navigator">The navigator.</param> | ||
public ButtonSpecNavFormClose(KryptonNavigator navigator) : base(navigator, PaletteButtonSpecStyle.FormClose) | ||
{ | ||
} | ||
|
||
#endregion | ||
|
||
#region Implementation | ||
|
||
/* | ||
/// <summary> | ||
/// Form Close Button Enabled: This will also Disable the System Menu `Close` BUT NOT the `Alt+F4` key action | ||
/// </summary> | ||
[Category(@"Appearance")] | ||
[DefaultValue(true)] | ||
[Description("Form Close Button Enabled: This will also Disable the System Menu `Close` BUT NOT the `Alt+F4` key action")] | ||
public bool Enabled | ||
{ | ||
get => _enabled; | ||
set | ||
{ | ||
if (_enabled != value) | ||
{ | ||
_enabled = value; | ||
IntPtr hSystemMenu = PI.GetSystemMenu(KryptonForm.Handle, false); | ||
if (hSystemMenu != IntPtr.Zero) | ||
{ | ||
PI.EnableMenuItem(hSystemMenu, PI.SC_.CLOSE, _enabled ? PI.MF_.ENABLED : PI.MF_.DISABLED); | ||
} | ||
} | ||
} | ||
} | ||
*/ | ||
#endregion | ||
|
||
#region ButtonSpecNavFixed Implementation | ||
|
||
public override bool GetVisible(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonCheckState GetChecked(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonEnabled GetEnabled(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFormMaximize.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#region BSD License | ||
/* | ||
* | ||
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | ||
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. | ||
* | ||
*/ | ||
#endregion | ||
|
||
namespace Krypton.Navigator | ||
{ | ||
public class ButtonSpecNavFormMaximize : ButtonSpecNavFixed | ||
{ | ||
public ButtonSpecNavFormMaximize(KryptonNavigator navigator, PaletteButtonSpecStyle fixedStyle) : base(navigator, fixedStyle) | ||
{ | ||
} | ||
|
||
public override bool GetVisible(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonCheckState GetChecked(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonEnabled GetEnabled(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFormMinimize.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#region BSD License | ||
/* | ||
* | ||
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | ||
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. | ||
* | ||
*/ | ||
#endregion | ||
|
||
namespace Krypton.Navigator | ||
{ | ||
public class ButtonSpecNavFormMinimize : ButtonSpecNavFixed | ||
{ | ||
public ButtonSpecNavFormMinimize(KryptonNavigator navigator, PaletteButtonSpecStyle fixedStyle) : base(navigator, fixedStyle) | ||
{ | ||
} | ||
|
||
public override bool GetVisible(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonCheckState GetChecked(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonEnabled GetEnabled(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFormRestore.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#region BSD License | ||
/* | ||
* | ||
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | ||
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. | ||
* | ||
*/ | ||
#endregion | ||
|
||
namespace Krypton.Navigator | ||
{ | ||
public class ButtonSpecNavFormRestore : ButtonSpecNavFixed | ||
{ | ||
public ButtonSpecNavFormRestore(KryptonNavigator navigator, PaletteButtonSpecStyle fixedStyle) : base(navigator, fixedStyle) | ||
{ | ||
} | ||
|
||
public override bool GetVisible(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonCheckState GetChecked(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override ButtonEnabled GetEnabled(PaletteBase palette) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters