Skip to content

Commit

Permalink
- Add in new KryptonMessageBoxButtons type that emualtes the .net6 …
Browse files Browse the repository at this point in the history
…`MessageBoxButtons`

- Fix fallout for the new dialogResult type
- Fix Help button not being shown
- Add missing `private` monikers
- Fix usage of controls in the KryptonMessageBox demo
- Remove some usages of .net 5
- Remove some compile warnings / messages from Example projects

##867
##728)
  • Loading branch information
Smurf-IV committed Dec 11, 2022
1 parent 8e58cf7 commit e4e1df6
Show file tree
Hide file tree
Showing 18 changed files with 176 additions and 131 deletions.
3 changes: 3 additions & 0 deletions Documents/Help/Changelog.md
Expand Up @@ -5,6 +5,9 @@
=======

## 2023-11-xx - Build 2311 - November 2023
* Resolved [#867](https://github.com/Krypton-Suite/Standard-Toolkit/issues/867), KryptonMessageBox does not show help button
* Resolved [#728](https://github.com/Krypton-Suite/Standard-Toolkit/issues/728),
Bring MessageBox States inline with latest .Net 6
* Resolved [#861](https://github.com/Krypton-Suite/Standard-Toolkit/issues/861), Ribbon QAT Button downscaled when disabling HiDPI
* Implemented [#854](https://github.com/Krypton-Suite/Standard-Toolkit/issues/854), Please remove "2019" from the build sequence etc.
* Resolved [#848](https://github.com/Krypton-Suite/Standard-Toolkit/issues/848), KryptonTreeView Font Issues
Expand Down
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -124,15 +124,20 @@ Follow the links to see the different objects and layouts that this framework al
=======

# Breaking Changes
## V80.## (2023-11-xx - Build 2311 - November 2023)
There are list of changes that have occurred during the development of the V70.## version
### KryptonMessageBoxButtons
- https://github.com/Krypton-Suite/Standard-Toolkit/issues/728:
Bring MessageBox States inline with latest .Net 6 by using a new `KryptonMessageBoxButtons` type, which is effectively the same as .Net6 enum version of `MessageBoxButtons` but backward compatible with .net4.6.x onwards

## V70.## (2022-11-08 - Build 2211 - November 2022)
There are list of changes that have occurred during the development of the V70.## version

### Ribbon Tooltips
- https://github.com/Krypton-Suite/Standard-Toolkit/issues/382
- https://github.com/Krypton-Suite/Standard-Toolkit/issues/511
![][image_ref_tnqwpvc0]### Ribbon Tooltips

## Be Aware

### `dpiAware`
If you are getting scaling problems in high dpi monitors, then please add an application manifest to your MainForm application, and uncomment the section that covers the `dpiAware` setting.

Expand Down
Expand Up @@ -12,6 +12,9 @@

// ReSharper disable MemberCanBePrivate.Global

using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace Krypton.Toolkit
{
/// <summary>
Expand Down Expand Up @@ -576,7 +579,24 @@ protected override void OnClick(EventArgs e)
if (owner != null)
{
// Update owner with our dialog result setting
owner.DialogResult = DialogResult;
try
{
owner.DialogResult = DialogResult;
}
catch (InvalidEnumArgumentException )
{
// Is it https://github.com/Krypton-Suite/Standard-Toolkit/issues/728
if (owner is KryptonMessageBoxForm)
{
// need to gain access to `dialogResult` and set it forcefully
FieldInfo fi = typeof(Form).GetField("dialogResult", BindingFlags.NonPublic | BindingFlags.Instance);
fi.SetValue(owner, DialogResult);
}
else
{
throw;
}
}
}

// Let base class fire standard event
Expand Down
Expand Up @@ -1287,7 +1287,7 @@ private void OnKryptonContextMenuClosed(object sender, EventArgs e)
HookContextMenuEvents(_kryptonContextMenu.Items, false);
}

void OnButtonSelect(object sender, MouseEventArgs e)
private void OnButtonSelect(object sender, MouseEventArgs e)
{
// Take the focus if allowed
if (CanFocus)
Expand Down
Expand Up @@ -29,10 +29,8 @@ public class KryptonDataGridViewDomainUpDownColumn : KryptonDataGridViewIconColu
/// Initialize a new instance of the KryptonDataGridViewDomainUpDownColumn class.
/// </summary>
public KryptonDataGridViewDomainUpDownColumn()
: base(new KryptonDataGridViewDomainUpDownCell())
{
: base(new KryptonDataGridViewDomainUpDownCell()) =>
Items = new StringCollection();
}

/// <summary>
/// Returns a standard compact string representation of the column.
Expand Down
Expand Up @@ -31,10 +31,8 @@ public class KryptonDataGridViewTextBoxColumn : KryptonDataGridViewIconColumn
/// Initialize a new instance of the KryptonDataGridViewTextBoxColumn class.
/// </summary>
public KryptonDataGridViewTextBoxColumn()
: base(new KryptonDataGridViewTextBoxCell())
{
: base(new KryptonDataGridViewTextBoxCell()) =>
SortMode = DataGridViewColumnSortMode.Automatic;
}

/// <summary>
/// Returns a String that represents the current Object.
Expand Down Expand Up @@ -78,7 +76,7 @@ protected override void Dispose(bool disposing)

base.Dispose(disposing);
}

#endregion

#region Public
Expand Down
Expand Up @@ -915,7 +915,7 @@ private void OnKryptonContextMenuClosed(object sender, EventArgs e)
ContextMenuClosed();
}

void OnButtonSelect(object sender, MouseEventArgs e)
private void OnButtonSelect(object sender, MouseEventArgs e)
{
// Take the focus if allowed
if (CanFocus)
Expand Down
Expand Up @@ -104,7 +104,7 @@ public bool DisplayIsPrinterFontDescription
// //return ret;// || _commonDialogHandler._T;
//}

const int CLR_COMBOBOX_ID = 1139;
private const int CLR_COMBOBOX_ID = 1139;
private IntPtr clrComboBoxHwnd;
/// <inheritdoc />
protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
Expand Down

0 comments on commit e4e1df6

Please sign in to comment.