Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1220 feature requestquestion is it time to bring over kryptontoasts #1234

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
* Implemented [#1223](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1223), Move `UseKryptonFileDialogs` to a better designer location
* Implemented [#1222](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1222), Remove `CustomPalette` (Should be part of the palette definition)
* Implemented [#1204](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1204), Build on `KryptonCommandLinkButtons`
- [#1216](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1216), Add support for fonts
- [#1218](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1218), Default 'arrow' images, depending on OS version
- [#1217](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1217), Add support for text alignment
- [#1216](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1216), Add support for fonts
* Resolved [#996](https://github.com/Krypton-Suite/Standard-Toolkit/issues/996), DataGridView ComboBox Adding list over and over
* Resolved [#1207](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1207), Microsoft 365 - Black (Dark Mode) Drop button is not visible
* Resolved [#1206](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1206), Remove the Font Size (as it is already covered by the actual font !)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* [Support for .NET 7](#support-for-net-7)
* [`KryptonButton` Properties](#kryptonbutton-properties)
* [API Changes](#api-changes)
* [`KryptonInputBox`](#kryptoninputbox)
* [V80.## (2023-11-14 - Build 2311 - November 2023)](#v80-2023-11-14---build-2311---november-2023)
* [Support for .NET Core 3.1 and .NET 5](#support-for-net-core-31-and-net-5)
* [KryptonMessageBoxButtons](#kryptonmessageboxbuttons)
Expand Down Expand Up @@ -193,6 +194,9 @@ Some properties previously found in the root such as, `ShowSplitOption`, `UseAsA
### API Changes
If using `KryptonAboutToolkit`, please note that this has been superceeded by `KryptonAboutBox`. Or if you use `KryptonThemeBrowserForm`, it has now been moved to `KryptonThemeBrowser` as the public facing API.

### `KryptonInputBox`
The `KryptonInputBox` now uses the new `KryptonInputBoxData` API, to handle data.

## V80.## (2023-11-14 - Build 2311 - November 2023)
There are list of changes that have occurred during the development of the V80.## version

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Configuration", "Configurat
..\.editorconfig = ..\.editorconfig
..\..\.gitattributes = ..\..\.gitattributes
..\..\.gitignore = ..\..\.gitignore
Krypton Toolkit Suite 2022 - VS2022.sln.DotSettings = Krypton Toolkit Suite 2022 - VS2022.sln.DotSettings
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{950EE50E-C0E8-4A28-96D3-4735F5313610}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public bool AllowTabSelect
/// </summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ToolTipManager ToolTipManager { get; private set; }
public ToolTipManager? ToolTipManager { get; private set; }

#endregion

Expand Down Expand Up @@ -1834,7 +1834,7 @@ protected virtual void OnNeedPagePaint(object sender, NeedLayoutEventArgs e)

internal void InternalForceViewLayout() => ForceViewLayout();

internal ToolTipManager HoverManager { get; private set; }
internal ToolTipManager? HoverManager { get; private set; }

internal bool InternalDesignMode => DesignMode;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public KryptonGallery()
DropButtonRanges = [];

// Create the palette storage
StateCommon = new PaletteGalleryRedirect(Redirector!, NeedPaintDelegate);
StateCommon = new PaletteGalleryRedirect(Redirector, NeedPaintDelegate);
StateNormal = new PaletteGalleryState(StateCommon, NeedPaintDelegate);
StateDisabled = new PaletteGalleryState(StateCommon, NeedPaintDelegate);
StateActive = new PaletteGalleryState(StateCommon, NeedPaintDelegate);
Expand All @@ -129,7 +129,7 @@ public KryptonGallery()
// The draw layout that contains the actual selection images
_backBorder = new PaletteGalleryBackBorder(StateNormal);
_drawDocker = new ViewDrawDocker(_backBorder, _backBorder);
_drawItems = new ViewLayoutRibbonGalleryItems(Redirector!, this, NeedPaintDelegate, _buttonUp, _buttonDown, _buttonContext);
_drawItems = new ViewLayoutRibbonGalleryItems(Redirector, this, NeedPaintDelegate, _buttonUp, _buttonDown, _buttonContext);
_drawDocker.Add(_drawItems, ViewDockStyle.Fill);

// Top level layout view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ public bool DesignerGetHitTest(Point pt)
}

// Get the view the mouse is currently over
ViewBase? mouseView = ViewManager?.Root?.ViewFromPoint(pt);
ViewBase? mouseView = ViewManager?.Root.ViewFromPoint(pt);

// Do we match of the views we always allow?
var matchView = (mouseView?.Parent != null)
Expand Down Expand Up @@ -1210,7 +1210,7 @@ public Point ViewRectangleToPoint(ViewBase? view)
}

// Get the view the mouse is currently over
ViewBase? mouseView = ViewManager?.Root?.ViewFromPoint(pt);
ViewBase? mouseView = ViewManager?.Root.ViewFromPoint(pt);

if (mouseView is ViewDrawRibbonGroupDateTimePicker picker)
{
Expand Down Expand Up @@ -1270,7 +1270,7 @@ protected override void OnLayout(LayoutEventArgs levent)
// Cannot process a message for a disposed control
if (!IsDisposed && !Disposing)
{
TabsArea?.AppButtonVisibleChanged();
TabsArea.AppButtonVisibleChanged();

CaptionArea?.AppButtonVisibleChanged();
}
Expand Down Expand Up @@ -2524,7 +2524,7 @@ internal Point ViewPointToScreen(Point pt) => VisualPopupManager.Singleton.Curre

internal Rectangle ViewRectangleToScreen(ViewBase view) => view.OwningControl!.RectangleToScreen(view.ClientRectangle);

internal Rectangle KeyTipToScreen(ViewBase view) => view.OwningControl!.RectangleToScreen(view.ClientRectangle);
internal Rectangle KeyTipToScreen(ViewBase? view) => view!.OwningControl!.RectangleToScreen(view.ClientRectangle);

internal ViewBase? FocusView
{
Expand Down Expand Up @@ -2674,7 +2674,7 @@ private void CreateStorageObjects()
RibbonStrings = new RibbonStrings();
RibbonAppButton = new RibbonAppButton(this);
RibbonStyles = new PaletteRibbonStyles(this, NeedPaintPaletteDelegate);
StateCommon = new PaletteRibbonRedirect(Redirector!, PaletteBackStyle.PanelClient, NeedPaintPaletteDelegate);
StateCommon = new PaletteRibbonRedirect(Redirector, PaletteBackStyle.PanelClient, NeedPaintPaletteDelegate);
StateDisabled = new PaletteRibbonDisabled(StateCommon, NeedPaintPaletteDelegate);
StateNormal = new PaletteRibbonNormal(StateCommon, NeedPaintPaletteDelegate);
StateTracking = new PaletteRibbonAppGroupTab(StateCommon, NeedPaintPaletteDelegate);
Expand All @@ -2685,7 +2685,7 @@ private void CreateStorageObjects()
StateContextTracking = new PaletteRibbonGroupTab(StateCommon, NeedPaintPaletteDelegate);
StateContextCheckedNormal = new PaletteRibbonGroupAreaTab(StateCommon, NeedPaintPaletteDelegate);
StateContextCheckedTracking = new PaletteRibbonJustTab(StateCommon, NeedPaintPaletteDelegate);
OverrideFocus = new PaletteRibbonFocus(Redirector!, NeedPaintPaletteDelegate);
OverrideFocus = new PaletteRibbonFocus(Redirector, NeedPaintPaletteDelegate);
}

private void CreateViewManager()
Expand Down Expand Up @@ -2713,14 +2713,14 @@ private void CreateViewManager()
};

// Create caption area which is used if custom chrome cannot perform task
CaptionArea = new ViewDrawRibbonCaptionArea(this, Redirector!, _compositionArea, NeedPaintDelegate);
CaptionArea = new ViewDrawRibbonCaptionArea(this, Redirector, _compositionArea, NeedPaintDelegate);

// Create tabs area containing the tabs, pendant buttons etc...
TabsArea = new ViewLayoutRibbonTabsArea(this, Redirector!, CaptionArea, CaptionArea.ContextTitles!, NeedPaintDelegate);
TabsArea = new ViewLayoutRibbonTabsArea(this, Redirector, CaptionArea, CaptionArea.ContextTitles!, NeedPaintDelegate);
TabsArea.PaintBackground += OnTabsAreaPaintBackground;

// Create groups area containing the groups of the selected tab
GroupsArea = new ViewLayoutRibbonGroupsArea(this, Redirector!, _needPaintGroups);
GroupsArea = new ViewLayoutRibbonGroupsArea(this, Redirector, _needPaintGroups);

// Create the quick access toolbar for when below the ribbon
_qatBelowContents = new ViewLayoutRibbonQATFromRibbon(this, NeedPaintDelegate, true);
Expand Down Expand Up @@ -3101,9 +3101,10 @@ private void OnTabPropertyChanged(object sender, PropertyChangedEventArgs e)
private void OnRibbonQATButtonsClearing(object sender, EventArgs e)
{
// Stop tracking changes in button properties
foreach (IQuickAccessToolbarButton qatButton in QATButtons)
// TODO: Use typed 'where' clause
foreach (IQuickAccessToolbarButton component in QATButtons)
{
qatButton.PropertyChanged -= OnQATButtonPropertyChanged;
component.PropertyChanged -= OnQATButtonPropertyChanged;
}
}

Expand Down Expand Up @@ -3211,7 +3212,7 @@ private void ShowMinimizedPopup()
// Create a popup control with the minimized panel as the view
var popupManager = new ViewRibbonMinimizedManager(this, GroupsArea.ViewGroups,
_drawMinimizedPanel, true, _needPaintGroups);
_minimizedPopup = new VisualPopupMinimized(this, popupManager, CaptionArea!, Renderer!);
_minimizedPopup = new VisualPopupMinimized(this, popupManager, CaptionArea!, Renderer);
_minimizedPopup.Disposed += OnMinimizedPopupDisposed;
popupManager.Attach(_minimizedPopup, _drawMinimizedPanel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ internal interface IRibbonViewGroupSize
/// Update the group with the provided sizing solution.
/// </summary>
/// <param name="size">Array of values for the group containers.</param>
void SetSolutionSize(ItemSizeWidth[] size);
void SetSolutionSize(ItemSizeWidth[]? size);
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ internal class GroupSizeWidth
/// </summary>
/// <param name="width">Width available for sizing a group.</param>
/// <param name="sizing">Sizing information for applying to group.</param>
public GroupSizeWidth(int width, ItemSizeWidth[] sizing)
public GroupSizeWidth(int width, ItemSizeWidth[]? sizing)
{
Width = width;
Sizing = sizing;
Expand All @@ -86,7 +86,7 @@ public GroupSizeWidth(int width, ItemSizeWidth[] sizing)
/// <summary>
/// Gets and sets the array of sizing information for group.
/// </summary>
public ItemSizeWidth[] Sizing { get; set; }
public ItemSizeWidth[]? Sizing { get; set; }

#endregion
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public override Component[] GetChildComponents()
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public ViewBase ClusterView { get; set; }
public ViewBase? ClusterView { get; set; }

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,15 @@ public override ViewBase CreateView(KryptonRibbon ribbon,
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public IKryptonDesignObject NumericUpDownDesigner { get; set; }
public IKryptonDesignObject? NumericUpDownDesigner { get; set; }

/// <summary>
/// Internal design time properties.
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)]
public ViewBase NumericUpDownView { get; set; }
public ViewBase? NumericUpDownView { get; set; }

#endregion

Expand Down Expand Up @@ -638,7 +638,7 @@ public override ViewBase CreateView(KryptonRibbon ribbon,
#endregion

#region Internal
internal Control LastParentControl { get; set; }
internal Control? LastParentControl { get; set; }

internal KryptonNumericUpDown? LastNumericUpDown { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Krypton.Ribbon
public class RibbonAppButton : Storage
{
#region Static Fields
private static readonly Image _defaultAppImage = GenericImageResources.AppButtonDefault;
private static readonly Image? _defaultAppImage = GenericImageResources.AppButtonDefault;
private const string DEFAULT_APP_TEXT = @"File";
private static readonly Color _defaultAppBaseColorDark = Color.FromArgb(31, 72, 161);
private static readonly Color _defaultAppBaseColorLight = Color.FromArgb(84, 158, 243);
Expand All @@ -45,7 +45,7 @@ public AppMenuButtonSpecCollection(KryptonRibbon owner)

#region Instance Fields
private readonly KryptonRibbon _ribbon;
private Image _appButtonImage;
private Image? _appButtonImage;
private readonly KryptonContextMenuItems _appButtonMenuItems;
private bool _appButtonVisible;
private Color _appButtonBaseColorDark;
Expand All @@ -62,15 +62,15 @@ public AppMenuButtonSpecCollection(KryptonRibbon owner)
public RibbonAppButton([DisallowNull] KryptonRibbon ribbon)
{
Debug.Assert(ribbon != null);
_ribbon = ribbon;
_ribbon = ribbon!;

// Default values
_appButtonMenuItems = new KryptonContextMenuItems
{
ImageColumn = false
};
_appButtonImage = _defaultAppImage;
AppButtonSpecs = new AppMenuButtonSpecCollection(ribbon);
AppButtonSpecs = new AppMenuButtonSpecCollection(ribbon!);
AppButtonRecentDocs = [];
AppButtonToolTipTitle = string.Empty;
AppButtonToolTipBody = string.Empty;
Expand Down Expand Up @@ -121,7 +121,7 @@ public RibbonAppButton([DisallowNull] KryptonRibbon ribbon)
[Category(@"Values")]
[Description(@"Application button image.")]
[RefreshProperties(RefreshProperties.All)]
public Image AppButtonImage
public Image? AppButtonImage
{
get => _appButtonImage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context)
Debug.Assert(context != null);

// We take on all the available display area
ClientRectangle = context.DisplayRectangle;
ClientRectangle = context!.DisplayRectangle;
_clipRect = ClientRectangle;

// Update to reflect full size of actual button
Expand Down Expand Up @@ -164,7 +164,7 @@ public override void RenderBefore(RenderContext context)
}

// Draw the background
_mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonApplicationButton(_ribbon.RibbonShape, context, ClientRectangle, State, palette, _mementos[memento]);
_mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonApplicationButton(_ribbon.RibbonShape, context, ClientRectangle, State, palette, _mementos[memento]!);

// If there is an application button to be drawn
if (_ribbon.RibbonAppButton.AppButtonImage != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class ViewDrawRibbonAppMenuDocs : ViewLayoutDocker
{
#region Instance Fields
private readonly KryptonRibbon _ribbon;
private IDisposable _memento;
private IDisposable? _memento;
#endregion

#region Identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class ViewDrawRibbonAppMenuInner : ViewLayoutDocker
{
#region Instance Fields
private readonly KryptonRibbon _ribbon;
private IDisposable _memento;
private IDisposable? _memento;
#endregion

#region Identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class ViewDrawRibbonAppMenuOuter : ViewLayoutDocker
{
#region Instance Fields
private readonly KryptonRibbon _ribbon;
private IDisposable _memento;
private IDisposable? _memento;
#endregion

#region Identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ViewDrawRibbonAppMenuRecentDec(KryptonRibbon ribbon,
int maxWidth,
NeedPaintHandler needPaintDelegate,
int index)
: base(provider.ProviderStateNormal.ItemHighlight.Back,
: base(provider.ProviderStateNormal.ItemHighlight!.Back,
provider.ProviderStateNormal.ItemHighlight.Border,
provider.ProviderStateNormal.ItemHighlight,
PaletteMetricPadding.ContextMenuItemHighlight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public GroupSizeWidth[] GetPossibleSizes(ViewLayoutContext context)
/// Update the group with the provided sizing solution.
/// </summary>
/// <param name="size">Solution size.</param>
public void SetSolutionSize(ItemSizeWidth[] size)
public void SetSolutionSize(ItemSizeWidth[]? size)
{
// Should we become collapsed?
Collapsed = size == null;
Expand Down
Loading