Skip to content

Commit

Permalink
Merge pull request #730 from Krypton-Suite/alpha-fr#728
Browse files Browse the repository at this point in the history
* Semi implement #728, with points 2 & 4 outstanding
  • Loading branch information
Smurf-IV authored Jun 11, 2022
2 parents fb36e1d + 3aef414 commit 66e42f7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
=======

## 2022-11-xx - Build 2211 - November 2022 <!--Possible August or September release?-->
* Implemented [#728](https://github.com/Krypton-Suite/Standard-Toolkit/issues/728), Bring MessageBox `States` inline with latest .Net 6
* Made enumeration `SchemeOfficeColors` public, so they can be used to make external themes
* Resolved [#722](https://github.com/Krypton-Suite/Standard-Toolkit/issues/722), KryptonRichTextBox disabled colour cannot be set
* Resolved [#662](https://github.com/Krypton-Suite/Standard-Toolkit/issues/662), Can not "Control / Set Disabled" Background Colour Of Comboboxes, in DropDown mode
* Resolved [#737](https://github.com/Krypton-Suite/Standard-Toolkit/issues/737), `Office 2013 - Dark Grey` for `PaletteMode` in designer causes a crash
* Resolved [#578](https://github.com/Krypton-Suite/Standard-Toolkit/issues/578), ComboBox Center no longer draws text centered
* Resolved [#20](https://github.com/Krypton-Suite/Standard-Toolkit/issues/20), Selected text in ComboBox is drawn in a different font
Expand All @@ -29,8 +32,6 @@
* Blue dark mode themes now have a darker alternate colour
* Added new `GetPaletteModeManager()` method to the `ThemeManager` API, to return the current `PaletteModeManager` of the selected `KryptonManager`
* Update documentation for `PaletteMode` and `PaletteModeManager`
* Resolved [#722](https://github.com/Krypton-Suite/Standard-Toolkit/issues/722), KryptonRichTextBox disabled colour cannot be set
* Resolved [#662](https://github.com/Krypton-Suite/Standard-Toolkit/issues/662), Can not "Control / Set Disabled" Background Colour Of Comboboxes, in DropDown mode
* Resolved [#701](https://github.com/Krypton-Suite/Standard-Toolkit/issues/701), `CueHint` in `KryptonPalette` does not work
* Resolved [#697](https://github.com/Krypton-Suite/Standard-Toolkit/issues/697), Number 9 is handled in ribbon textbox/richtextbox.
* Resolved [#693](https://github.com/Krypton-Suite/Standard-Toolkit/issues/693), Docked controls are rendered with smaller size which hides the caption/title text.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,22 @@ private void UpdateButtons()
_button3.Enabled = true;
ControlBox = false;
break;
#if NET6_0_OR_GREATER
case MessageBoxButtons.CancelTryContinue:
_button1.Text = KryptonManager.Strings.Cancel;
_button2.Text = KryptonManager.Strings.TryAgain;
_button3.Text = KryptonManager.Strings.Continue;
_button1.DialogResult = DialogResult.Cancel;
_button2.DialogResult = DialogResult.TryAgain;
_button3.DialogResult = DialogResult.Continue;
_button1.Visible = true;
_button1.Enabled = true;
_button2.Visible = true;
_button2.Enabled = true;
_button3.Visible = true;
_button3.Enabled = true;
break;
#endif
}

// Do we ignore the Alt+F4 on the buttons?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,25 @@ public void RecalcNonClient()
PI.SWP_.NOOWNERZORDER | PI.SWP_.FRAMECHANGED);
}
}
#endregion

#if NET6_0_OR_GREATER
/// <summary>Gets or sets the anchoring for minimized MDI children.</summary>
/// <value> <c>true</c> to anchor minimized MDI children to the bottom left of the parent form; <c>false</c> to anchor to the top left of the parent form.</value>
[Category(@"Window Style")]
[Description(@"Gets or sets the anchoring for minimized MDI children.")]
[DefaultValue(true)]
public new bool MdiChildrenMinimizedAnchorBottom
{
get => base.MdiChildrenMinimizedAnchorBottom;

set
{
base.MdiChildrenMinimizedAnchorBottom = value;
throw new NotSupportedException(@"Please use .NET 6 or newer to use this feature.");
}
}
#endif
#endregion

#region Public Chrome
/// <summary>
Expand Down
33 changes: 31 additions & 2 deletions Source/Krypton Components/Krypton.Toolkit/General/GlobalStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public class GlobalStrings : GlobalId
private const string DEFAULT_CLOSE = "Cl&ose";
private const string DEFAULT_TODAY = "T&oday";
private const string DEFAULT_HELP = "H&elp";

// NET 6 & newer
private const string DEFAULT_CONTINUE = "Co&ntinue";
private const string DEFAULT_TRY_AGAIN = "&Try Again";
#endregion

#region Instance Fields
Expand All @@ -57,6 +61,7 @@ public GlobalStrings()
#endregion

#region Public

/// <summary>
/// Gets a value indicating if all the strings are default values.
/// </summary>
Expand All @@ -71,7 +76,9 @@ public GlobalStrings()
Ignore.Equals(DEFAULT_IGNORE) &&
Close.Equals(DEFAULT_CLOSE) &&
Today.Equals(DEFAULT_TODAY) &&
Help.Equals(DEFAULT_HELP);
Help.Equals(DEFAULT_HELP) &&
Continue.Equals(DEFAULT_CONTINUE) &&
TryAgain.Equals(DEFAULT_TRY_AGAIN);

/// <summary>
/// Reset all strings to default values.
Expand All @@ -88,6 +95,10 @@ public void Reset()
Close = DEFAULT_CLOSE;
Today = DEFAULT_TODAY;
Help = DEFAULT_HELP;

// NET 6 & newer
Continue = DEFAULT_CONTINUE;
TryAgain = DEFAULT_TRY_AGAIN;
}

/// <summary>
Expand Down Expand Up @@ -190,6 +201,24 @@ public void Reset()
[DefaultValue(DEFAULT_HELP)]
[RefreshProperties(RefreshProperties.All)]
public string Help { get; set; }
#endregion

/// <summary>
/// Gets and sets the Continue string used in calendars.
/// </summary>
[Localizable(true)]
[Category(@"Visuals")]
[Description(@"Continue string used for Message Box Buttons.")]
[DefaultValue(DEFAULT_CONTINUE)]
public string Continue { get; set; }

/// <summary>
/// Gets and sets the Try Again string used in calendars.
/// </summary>
[Localizable(true)]
[Category(@"Visuals")]
[Description(@"Try Again string used for Message Box Buttons.")]
[DefaultValue(DEFAULT_TRY_AGAIN)]
public string TryAgain { get; set; }
#endregion
}
}

0 comments on commit 66e42f7

Please sign in to comment.