From 5ef51411acf34b5fb1403400cdca38bc7e831c18 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Tue, 5 Dec 2023 17:08:28 +0000 Subject: [PATCH 01/14] * Partly implement #1204 --- Documents/Help/Changelog.md | 5 +- .../KryptonAlternateCommandLinkButton.cs | 2 +- .../KryptonCommandLinkButton.cs | 94 ++++++++----- .../Global/GlobalDeclarations.cs | 1 + .../Krypton.Toolkit 2022.csproj | 9 ++ .../PaletteContent/PaletteContentText.cs | 2 +- .../CommandLinkImageResources.Designer.cs | 83 +++++++++++ .../CommandLinkImageResources.resx | 127 +++++++++++++++++ .../Windows 10 CommandLink Arrow.png | Bin 0 -> 557 bytes .../Windows 11 CommandLink Arrow.png | Bin 0 -> 653 bytes .../Krypton.Toolkit/Values/CaptionValues.cs | 1 + .../Values/CommandLinkImageValues.cs | 30 +++- .../Values/CommandLinkTextValues.cs | 129 +++++++++++++++++- .../Values/HeaderValuesBase.cs | 9 +- .../TestForm/Form7.Designer.cs | 14 -- Source/Krypton Components/TestForm/Form7.resx | 4 +- 16 files changed, 454 insertions(+), 56 deletions(-) create mode 100644 Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.Designer.cs create mode 100644 Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.resx create mode 100644 Source/Krypton Components/Krypton.Toolkit/Resources/Windows 10 CommandLink Arrow.png create mode 100644 Source/Krypton Components/Krypton.Toolkit/Resources/Windows 11 CommandLink Arrow.png diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md index ccbe1659b..4f0c2820b 100644 --- a/Documents/Help/Changelog.md +++ b/Documents/Help/Changelog.md @@ -3,12 +3,15 @@ ======= ## 2024-11-xx - Build 2411 - November 2024 +* 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 + - [#1217](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1217), Add support for text alignment * 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 !) * Resolved [#1197](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1197), `KryptonTaskDialog` Footer Images * Resolved [#1189](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1189), The Context and Next/Pervious buttons of the `KryptonDockableNavigator` cannot be used -* Implement [#1187](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1187), Bring over the `KryptonCommandLinkButtons` +* Implemented [#1187](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1187), Bring over the `KryptonCommandLinkButtons` * Resolved [#1176](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1176), KryptonProgressBar: small values escape drawing area * Resolved [#1169](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1169), Button Spec Krypton Context Menu (Canary) * Implemented [#1166](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1166), Use a struct to contain `KryptonMessageBox` data diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs index 60ed3cb06..27863eff7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs @@ -2,7 +2,7 @@ /* * * 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. 2023 - 2023. All rights reserved. + * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. * */ #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs index d22d78500..391a7d77a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs @@ -2,7 +2,7 @@ /* * * 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. 2023 - 2023. All rights reserved. + * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2023. All rights reserved. * */ #endregion @@ -75,6 +75,7 @@ public KryptonCommandLinkButton() // Create content storage CommandLinkImageValues = new CommandLinkImageValues(NeedPaintDelegate); + CommandLinkImageValues.Image = CommandLinkImageResources.Windows_11_CommandLink_Arrow; CommandLinkTextValues = new CommandLinkTextValues(NeedPaintDelegate); // Create the palette storage @@ -182,19 +183,14 @@ public override string Text set => CommandLinkTextValues.Heading = value; } - private bool ShouldSerializeText() - { + private bool ShouldSerializeText() => // Never serialize, let the button values serialize instead - return false; - } + false; /// /// Resets the Text property to its default value. /// - public override void ResetText() - { - CommandLinkTextValues.ResetText(); - } + public override void ResetText() => CommandLinkTextValues.ResetText(); /// /// Gets and sets the visual orientation of the control. @@ -240,15 +236,9 @@ public ButtonStyle ButtonStyle } } - private bool ShouldSerializeButtonStyle() - { - return (ButtonStyle != ButtonStyle.Command); - } + private bool ShouldSerializeButtonStyle() => (ButtonStyle != ButtonStyle.Command); - private void ResetButtonStyle() - { - ButtonStyle = ButtonStyle.Command; - } + private void ResetButtonStyle() => ButtonStyle = ButtonStyle.Command; /// /// Gets access to the button content. @@ -266,10 +256,7 @@ private void ResetButtonStyle() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public CommandLinkImageValues CommandLinkImageValues { get; } - private bool ShouldSerializeValues() - { - return false; - } + private bool ShouldSerializeValues() => false; /// /// Gets access to the common button appearance that other states can override. @@ -279,10 +266,7 @@ private bool ShouldSerializeValues() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTripleRedirect StateCommon { get; } - private bool ShouldSerializeStateCommon() - { - return !StateCommon.IsDefault; - } + private bool ShouldSerializeStateCommon() => !StateCommon.IsDefault; /// /// Gets access to the disabled button appearance entries. @@ -499,7 +483,7 @@ public virtual void SetFixedState(PaletteState state) /// /// Gets the default size of the control. /// - protected override Size DefaultSize => new Size(287, 61); + protected override Size DefaultSize => new Size(319, 61); /// /// Gets the default Input Method Editor (IME) mode supported by this control. @@ -618,11 +602,59 @@ protected override void ContextMenuClosed() /// protected override void OnPaint(PaintEventArgs? e) { - //if (CommandLinkImageValues.ShowUACShield) - //{ - // SendMessage(new HandleRef(this, Handle), BCM_SETSHIELD, IntPtr.Zero, - // CommandLinkImageValues.ShowUACShield); - //} + if (CommandLinkTextValues.DescriptionFont != null) + { + StateCommon.Content.LongText.Font = CommandLinkTextValues.DescriptionFont; + } + else + { + StateCommon.Content.LongText.Font = null; + } + + if (CommandLinkTextValues.HeadingFont != null) + { + StateCommon.Content.ShortText.Font = CommandLinkTextValues.HeadingFont; + } + else + { + StateCommon.Content.ShortText.Font = null; + } + + if (CommandLinkTextValues.DescriptionTextHAlignment != null) + { + StateCommon.Content.LongText.TextH = CommandLinkTextValues.DescriptionTextHAlignment ?? PaletteRelativeAlign.Near; + } + else + { + StateCommon.Content.LongText.TextH = PaletteRelativeAlign.Near; + } + + if (CommandLinkTextValues.DescriptionTextVAlignment != null) + { + StateCommon.Content.LongText.TextV = CommandLinkTextValues.DescriptionTextVAlignment ?? PaletteRelativeAlign.Far; + } + else + { + StateCommon.Content.LongText.TextV = PaletteRelativeAlign.Far; + } + + if (CommandLinkTextValues.HeadingTextHAlignment != null) + { + StateCommon.Content.ShortText.TextH = CommandLinkTextValues.HeadingTextHAlignment ?? PaletteRelativeAlign.Near; + } + else + { + StateCommon.Content.ShortText.TextH = PaletteRelativeAlign.Near; + } + + if (CommandLinkTextValues.HeadingTextVAlignment != null) + { + StateCommon.Content.ShortText.TextV = CommandLinkTextValues.HeadingTextVAlignment ?? PaletteRelativeAlign.Center; + } + else + { + StateCommon.Content.ShortText.TextV = PaletteRelativeAlign.Center; + } base.OnPaint(e); } diff --git a/Source/Krypton Components/Krypton.Toolkit/Global/GlobalDeclarations.cs b/Source/Krypton Components/Krypton.Toolkit/Global/GlobalDeclarations.cs index 2b69b7d55..5afe795c8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Global/GlobalDeclarations.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Global/GlobalDeclarations.cs @@ -48,6 +48,7 @@ global using Krypton.Toolkit.ResourceFiles.Arrows; global using Krypton.Toolkit.ResourceFiles.ButtonSpecs; global using Krypton.Toolkit.ResourceFiles.CheckBoxes; +global using Krypton.Toolkit.ResourceFiles.CommandLink; global using Krypton.Toolkit.ResourceFiles.ControlBox; global using Krypton.Toolkit.ResourceFiles.Dialogs; global using Krypton.Toolkit.ResourceFiles.DropDown; diff --git a/Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj b/Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj index 408e28c06..a87a10b5e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj +++ b/Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj @@ -204,6 +204,11 @@ True ColourScaleImageResources.resx + + True + True + CommandLinkImageResources.resx + True True @@ -633,6 +638,10 @@ ResXFileCodeGenerator ColourScaleImageResources.Designer.cs + + ResXFileCodeGenerator + CommandLinkImageResources.Designer.cs + ResXFileCodeGenerator Microsoft365ControlBoxResources.Designer.cs diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs index e351fa045..ce65988fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs @@ -273,7 +273,7 @@ public virtual PaletteTextHotkeyPrefix Prefix } } #endregion - + #region TextH /// /// Gets the horizontal relative alignment of the text. diff --git a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.Designer.cs b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.Designer.cs new file mode 100644 index 000000000..6ab65a537 --- /dev/null +++ b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Krypton.Toolkit.ResourceFiles.CommandLink { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class CommandLinkImageResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal CommandLinkImageResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Krypton.Toolkit.ResourceFiles.CommandLink.CommandLinkImageResources", typeof(CommandLinkImageResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Windows_10_CommandLink_Arrow { + get { + object obj = ResourceManager.GetObject("Windows_10_CommandLink_Arrow", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Windows_11_CommandLink_Arrow { + get { + object obj = ResourceManager.GetObject("Windows_11_CommandLink_Arrow", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.resx b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.resx new file mode 100644 index 000000000..3530f23ae --- /dev/null +++ b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/CommandLink/CommandLinkImageResources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\..\Resources\Windows 10 CommandLink Arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\..\Resources\Windows 11 CommandLink Arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/Windows 10 CommandLink Arrow.png b/Source/Krypton Components/Krypton.Toolkit/Resources/Windows 10 CommandLink Arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..8c850f59de54e5a0fefd38c15e3b0b47a4ba1250 GIT binary patch literal 557 zcmV+|0@D47P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0m4Z{K~z{r?UheU z0znwYXSPzic<^9{4q@yeM3IOL`U-Q2KFjtg@>_WAIv=E4NE9Lwi5T9>_K)woj<&On zvNJnIfzQj!;NX5WZLEXIc=s0bl?rh(HU%N&*P6XoSE$al%hCK~Qle zE*z=d!|8++U==zl!t=|2NeFI-L)z)F`x|jbDJg-d0Ba}(dX1+*%0M*Sr!Wqex7H>h z1K2JYhXdnqd2=O13IORXm)MxcyrG2nkw7X)D~%91j+z2O0*D{pRK*a!cf{)w#Af$^ zqHvi>B>=|ak#vBTI*N!7$Fk2Jq+|Iz34nPpB%MLZ9F^JwSW15Lj#uu0c~AL5+H3+M z_Lmjrs3k!BX`MoUXf~KAD~{diyt2o&uVU3(JhLiYw_L0R6Ix1rKj0^tzp>l literal 0 HcmV?d00001 diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/Windows 11 CommandLink Arrow.png b/Source/Krypton Components/Krypton.Toolkit/Resources/Windows 11 CommandLink Arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..f90e44ca0c8004713702ee0b4f9296df972649f1 GIT binary patch literal 653 zcmV;80&@L{P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0wPI7K~z{r?Nvcb zTR{+>mHY<(LJtLRy@rc*y+~5dxmPSS*U71S~xk3WY*%{)O(& z^qbATmyL%ZNxwgpbbOeICb8jaZBR z_3%6*@$14)?PT}AW{5|#YyT(+ebHS%J z+XsQ@4u2eJ69M(Yis-3NH-fK8leys2@iTLXsgPtq4zb{IIZ@@4@pGFmnG1U&h7k*M zxS&swc6CMAJ=;J#nxq|3enGvlcg2szBFu^Ic%u*_fgCB&?81-=wBcRxbG2>Q9ltGb z-qM7VPdkHANQQ9o;XJt_tAI_A8^$Xb9-wLKp&gwu1oB@C base.Description; set => base.Description = value; } + #endregion } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs index 39600a039..1be1cefcb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs @@ -15,6 +15,10 @@ public class CommandLinkImageValues : Storage, IContentValues private static readonly Image DEFAULT_IMAGE = MessageBoxImageResources.GenericQuestion; + private static readonly Image DEFAULT_WINDOWS_11_IMAGE = CommandLinkImageResources.Windows_11_CommandLink_Arrow; + + private static readonly Image DEFAULT_WINDOWS_10_IMAGE = CommandLinkImageResources.Windows_10_CommandLink_Arrow; + #endregion #region Instance Fields @@ -31,6 +35,7 @@ public class CommandLinkImageValues : Storage, IContentValues #region Public + [DefaultValue(false)] public bool DisplayUACShield { get => _displayUACShield; @@ -101,6 +106,7 @@ public Color ImageTransparentColor [Category("Visuals")] [Description("The image.")] [RefreshProperties(RefreshProperties.All)] + //[DefaultValue()] public Image? Image { get => _image; @@ -115,9 +121,29 @@ public Image? Image } - private bool ShouldSerializeImage() => Image != DEFAULT_IMAGE; + private bool ShouldSerializeImage() => Image != DEFAULT_WINDOWS_11_IMAGE; - public void ResetImage() => Image = DEFAULT_IMAGE; + public void ResetImage() + { + //if (OSUtilities.IsWindowsEleven) + //{ + // Image = DEFAULT_WINDOWS_11_IMAGE; + //} + //else if (OSUtilities.IsWindowsTen) + //{ + // Image = DEFAULT_WINDOWS_10_IMAGE; + //} + //else if (OSUtilities.IsWindowsEightPointOne || OSUtilities.IsWindowsEight || OSUtilities.IsWindowsSeven) + //{ + + //} + //else + //{ + // Image = DEFAULT_IMAGE; + //} + + Image = DEFAULT_WINDOWS_11_IMAGE; + } [DefaultValue(UACShieldIconSize.Small), Description(@"")] public UACShieldIconSize UACShieldIconSize diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs index 0fc04cab8..3a3f3893c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs @@ -9,7 +9,7 @@ namespace Krypton.Toolkit { - public class CommandLinkTextValues : CaptionValues + public class CommandLinkTextValues : CaptionValues, IContentValues { #region Static Fields @@ -19,12 +19,39 @@ public class CommandLinkTextValues : CaptionValues #endregion + #region Instance Fields + + private Font? _descriptionFont; + + private Font? _headingFont; + + private PaletteRelativeAlign? _descriptionTextHAlignment; + + private PaletteRelativeAlign? _descriptionTextVAlignment; + + private PaletteRelativeAlign? _headingTextHAlignment; + + private PaletteRelativeAlign? _headingTextVAlignment; + + #endregion + #region Identity /// Initializes a new instance of the class. /// Delegate for notifying paint requests. public CommandLinkTextValues(NeedPaintHandler needPaint) : base(needPaint) { + _descriptionFont = null; + + _headingFont = null; + + _descriptionTextHAlignment = PaletteRelativeAlign.Near; + + _descriptionTextVAlignment = PaletteRelativeAlign.Far; + + _headingTextHAlignment = PaletteRelativeAlign.Near; + + _headingTextVAlignment = PaletteRelativeAlign.Center; } #endregion @@ -51,6 +78,106 @@ public void ResetText() Heading = DEFAULT_HEADING; Description = DEFAULT_DESCRIPTION; + + DescriptionFont = _descriptionFont; + + HeadingFont = _headingFont; + } + + [DefaultValue(null)] + public Font? DescriptionFont + { + get => _descriptionFont; + + set + { + if (_descriptionFont != value) + { + _descriptionFont = value; + + PerformNeedPaint(true); + } + } + } + + [DefaultValue(null)] + public Font? HeadingFont + { + get => _headingFont; + + set + { + if (_headingFont != value) + { + _headingFont = value; + + PerformNeedPaint(true); + } + } + } + + [DefaultValue(null)] + public PaletteRelativeAlign? DescriptionTextHAlignment + { + get => _descriptionTextHAlignment; + + set + { + if (_descriptionTextHAlignment != value) + { + _descriptionTextHAlignment = value; + + PerformNeedPaint(true); + } + } + } + + [DefaultValue(null)] + public PaletteRelativeAlign? DescriptionTextVAlignment + { + get => _descriptionTextVAlignment; + + set + { + if (_descriptionTextVAlignment != value) + { + _descriptionTextVAlignment = value; + + PerformNeedPaint(true); + } + } + } + + [DefaultValue(null)] + public PaletteRelativeAlign? HeadingTextHAlignment + { + get => _headingTextHAlignment; + + set + { + if (_headingTextHAlignment != value) + { + _headingTextHAlignment = value; + + PerformNeedPaint(true); + } + } + } + + [DefaultValue(null)] + public PaletteRelativeAlign? HeadingTextVAlignment + { + get => _headingTextVAlignment; + + set + { + if (_headingTextVAlignment != value) + { + _headingTextVAlignment = value; + + PerformNeedPaint(true); + } + } } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs b/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs index 25e3e7e80..5e4756502 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs @@ -19,7 +19,9 @@ public abstract class HeaderValuesBase : Storage, IContentValues { #region Static Fields + private static readonly Image _defaultImage = GenericImageResources.KryptonLogoGeneric; + #endregion #region Instance Fields @@ -35,7 +37,7 @@ public abstract class HeaderValuesBase : Storage, /// public event EventHandler? TextChanged; #endregion - + #region Identity /// /// Initialize a new instance of the HeaderValuesBase class. @@ -45,7 +47,7 @@ protected HeaderValuesBase(NeedPaintHandler? needPaint) { // Store the provided paint notification delegate NeedPaint = needPaint; - + // Set initial values to the default _image = GetImageDefault(); _transparent = Color.Empty; @@ -67,6 +69,7 @@ protected HeaderValuesBase(NeedPaintHandler? needPaint) #endregion #region Default Values + /// /// Gets the default image value. /// @@ -162,7 +165,7 @@ public Color ImageTransparentColor public virtual Color GetImageTransparentColor(PaletteState state) => ImageTransparentColor; #endregion - + #region Heading /// /// Gets and sets the heading text. diff --git a/Source/Krypton Components/TestForm/Form7.Designer.cs b/Source/Krypton Components/TestForm/Form7.Designer.cs index 601d117bd..081a28a52 100644 --- a/Source/Krypton Components/TestForm/Form7.Designer.cs +++ b/Source/Krypton Components/TestForm/Form7.Designer.cs @@ -57,8 +57,6 @@ private void InitializeComponent() // kryptonCommandLinkButton5 // this.kryptonCommandLinkButton5.ButtonStyle = Krypton.Toolkit.ButtonStyle.Standalone; - this.kryptonCommandLinkButton5.CommandLinkImageValues.DisplayUACShield = false; - this.kryptonCommandLinkButton5.CommandLinkImageValues.Image = null; this.kryptonCommandLinkButton5.CommandLinkTextValues.Description = "What happens when the text is really long, \r\nand wants to go off the edge?\r\nThen " + "Use a Multi-line ;-)\r\n"; this.kryptonCommandLinkButton5.CommandLinkTextValues.Heading = "&Control the World"; @@ -86,7 +84,6 @@ private void InitializeComponent() this.kryptonCommandLinkButton5.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton5.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far; this.kryptonCommandLinkButton5.StateCommon.Content.LongText.Trim = Krypton.Toolkit.PaletteTextTrim.Word; - this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center; this.kryptonCommandLinkButton5.TabIndex = 5; @@ -94,7 +91,6 @@ private void InitializeComponent() // kryptonCommandLinkButton4 // this.kryptonCommandLinkButton4.ButtonStyle = Krypton.Toolkit.ButtonStyle.NavigatorMini; - this.kryptonCommandLinkButton4.CommandLinkImageValues.DisplayUACShield = false; this.kryptonCommandLinkButton4.CommandLinkImageValues.Image = ((System.Drawing.Image)(resources.GetObject("kryptonCommandLinkButton4.CommandLinkImageValues.Image"))); this.kryptonCommandLinkButton4.CommandLinkTextValues.Description = " Demo the Shortcut display and rounded borders"; this.kryptonCommandLinkButton4.CommandLinkTextValues.Heading = "&Disabled Navigator Mini style"; @@ -116,7 +112,6 @@ private void InitializeComponent() this.kryptonCommandLinkButton4.StateCommon.Border.Width = 2; this.kryptonCommandLinkButton4.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton4.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far; - this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center; this.kryptonCommandLinkButton4.TabIndex = 4; @@ -124,8 +119,6 @@ private void InitializeComponent() // kryptonCommandLinkButton3 // this.kryptonCommandLinkButton3.ButtonStyle = Krypton.Toolkit.ButtonStyle.NavigatorMini; - this.kryptonCommandLinkButton3.CommandLinkImageValues.DisplayUACShield = false; - this.kryptonCommandLinkButton3.CommandLinkImageValues.Image = null; this.kryptonCommandLinkButton3.CommandLinkTextValues.Description = " Demo the Shortcut display and rounded borders"; this.kryptonCommandLinkButton3.CommandLinkTextValues.Heading = "&Navigator Mini style"; this.kryptonCommandLinkButton3.Location = new System.Drawing.Point(12, 247); @@ -145,7 +138,6 @@ private void InitializeComponent() this.kryptonCommandLinkButton3.StateCommon.Border.Width = 2; this.kryptonCommandLinkButton3.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton3.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far; - this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center; this.kryptonCommandLinkButton3.TabIndex = 3; @@ -153,8 +145,6 @@ private void InitializeComponent() // kryptonCommandLinkButton2 // this.kryptonCommandLinkButton2.ButtonStyle = Krypton.Toolkit.ButtonStyle.Standalone; - this.kryptonCommandLinkButton2.CommandLinkImageValues.DisplayUACShield = false; - this.kryptonCommandLinkButton2.CommandLinkImageValues.Image = null; this.kryptonCommandLinkButton2.CommandLinkTextValues.Description = " Here be the extra Text with some spaces"; this.kryptonCommandLinkButton2.CommandLinkTextValues.Heading = "Standalone Style"; this.kryptonCommandLinkButton2.Location = new System.Drawing.Point(12, 180); @@ -167,7 +157,6 @@ private void InitializeComponent() this.kryptonCommandLinkButton2.Size = new System.Drawing.Size(341, 61); this.kryptonCommandLinkButton2.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton2.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far; - this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center; this.kryptonCommandLinkButton2.TabIndex = 2; @@ -190,8 +179,6 @@ private void InitializeComponent() // // kryptonCommandLinkButton1 // - this.kryptonCommandLinkButton1.CommandLinkImageValues.DisplayUACShield = false; - this.kryptonCommandLinkButton1.CommandLinkImageValues.UACShieldIconSize = Krypton.Toolkit.UACShieldIconSize.Small; this.kryptonCommandLinkButton1.CommandLinkTextValues.Description = "Here be the \"Note Text\""; this.kryptonCommandLinkButton1.CommandLinkTextValues.Heading = "Default Ext Command Link"; this.kryptonCommandLinkButton1.Location = new System.Drawing.Point(12, 99); @@ -204,7 +191,6 @@ private void InitializeComponent() this.kryptonCommandLinkButton1.Size = new System.Drawing.Size(341, 61); this.kryptonCommandLinkButton1.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton1.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far; - this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center; this.kryptonCommandLinkButton1.TabIndex = 0; diff --git a/Source/Krypton Components/TestForm/Form7.resx b/Source/Krypton Components/TestForm/Form7.resx index 224a170ed..dcaac645d 100644 --- a/Source/Krypton Components/TestForm/Form7.resx +++ b/Source/Krypton Components/TestForm/Form7.resx @@ -165,7 +165,7 @@ XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+ tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/ - 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEAAACxABrSO9dQAAA2ZJREFUWEftl+lOU0EU + 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAA2ZJREFUWEftl+lOU0EU x3kK30JfQF+D730Al0QTWQqlYIMBIVAoCFUsFgHZZAfZkRLQgFIWQYSutKUbhUJpWXOcM8lc59Jb29uE fvLDLyXnP3Pmz6znZu1durLN0TVD5lk1NG8a72bNRucMrf42qHfXZw5XPTQ49VDQX6igBrSuGvhxNAF9 vhZYOZqEF7YiyLE8h7FAJyyGhuHb4Sh89nfA78gCaJ3lVJNLi6cBpoOfYCE0BM3EhNqsFhv4TgzggEuH @@ -230,7 +230,7 @@ XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+ tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/ - 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEAAACxABrSO9dQAAA2ZJREFUWEftl+lOU0EU + 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAA2ZJREFUWEftl+lOU0EU x3kK30JfQF+D730Al0QTWQqlYIMBIVAoCFUsFgHZZAfZkRLQgFIWQYSutKUbhUJpWXOcM8lc59Jb29uE fvLDLyXnP3Pmz6znZu1durLN0TVD5lk1NG8a72bNRucMrf42qHfXZw5XPTQ49VDQX6igBrSuGvhxNAF9 vhZYOZqEF7YiyLE8h7FAJyyGhuHb4Sh89nfA78gCaJ3lVJNLi6cBpoOfYCE0BM3EhNqsFhv4TgzggEuH From 3e1acc77ccd7ba4f90f18dfc2fefbd9a06787933 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Tue, 5 Dec 2023 18:10:44 +0000 Subject: [PATCH 02/14] Update CommandLinkTextValues.cs --- .../Values/CommandLinkTextValues.cs | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs index 3a3f3893c..f79ff9450 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs @@ -7,9 +7,10 @@ */ #endregion +// ReSharper disable PossibleUnintendedReferenceComparison namespace Krypton.Toolkit { - public class CommandLinkTextValues : CaptionValues, IContentValues + public class CommandLinkTextValues : CaptionValues { #region Static Fields @@ -69,6 +70,8 @@ public CommandLinkTextValues(NeedPaintHandler needPaint) : base(needPaint) #region Implementation /// + [Category(@"CommandLink")] + [Description(@"The description text for the command link button.")] [DefaultValue(DEFAULT_DESCRIPTION)] public override string Description { get => base.Description; set => base.Description = value; } @@ -84,6 +87,11 @@ public void ResetText() HeadingFont = _headingFont; } + /// Gets or sets the description font. + /// The description font. + [Category(@"CommandLink")] + [Description(@"The description text font for the command link button.")] + [DefaultValue(null)] public Font? DescriptionFont { @@ -100,6 +108,10 @@ public Font? DescriptionFont } } + /// Gets or sets the heading font. + /// The heading font. + [Category(@"CommandLink")] + [Description(@"The heading text font for the command link button.")] [DefaultValue(null)] public Font? HeadingFont { @@ -116,6 +128,10 @@ public Font? HeadingFont } } + /// Gets or sets the description text horizontal alignment. + /// The description text horizontal alignment. + [Category(@"CommandLink")] + [Description(@"The description text horizontal alignment for the command link button.")] [DefaultValue(null)] public PaletteRelativeAlign? DescriptionTextHAlignment { @@ -132,6 +148,10 @@ public PaletteRelativeAlign? DescriptionTextHAlignment } } + /// Gets or sets the description text vertical alignment. + /// The description text vertical alignment. + [Category(@"CommandLink")] + [Description(@"The description text verticl alignment for the command link button.")] [DefaultValue(null)] public PaletteRelativeAlign? DescriptionTextVAlignment { @@ -148,6 +168,10 @@ public PaletteRelativeAlign? DescriptionTextVAlignment } } + /// Gets or sets the heading text horizontal alignment. + /// The heading text horizontal alignment. + [Category(@"CommandLink")] + [Description(@"The heading text horizontal alignment for the command link button.")] [DefaultValue(null)] public PaletteRelativeAlign? HeadingTextHAlignment { @@ -164,6 +188,10 @@ public PaletteRelativeAlign? HeadingTextHAlignment } } + /// Gets or sets the heading text vertical alignment. + /// The heading text vertical alignment. + [Category(@"CommandLink")] + [Description(@"The heading text vertical alignment for the command link button.")] [DefaultValue(null)] public PaletteRelativeAlign? HeadingTextVAlignment { From 6dcca7ba6915cc19b25f6f2516a461cae97590b2 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Tue, 5 Dec 2023 18:25:47 +0000 Subject: [PATCH 03/14] Update KryptonCustomPaletteBase.cs --- .../KryptonCustomPaletteBase.cs | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs index 770974f1b..fd1b566fe 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs @@ -128,7 +128,7 @@ public KryptonCustomPaletteBase() /// Initialize a new instance of the KryptonPalette class. /// /// Container that owns the component. - public KryptonCustomPaletteBase([DisallowNull] IContainer container) + public KryptonCustomPaletteBase(IContainer container) : this() { Debug.Assert(container != null); @@ -4436,15 +4436,15 @@ private static Type StringToType(string s) case PaletteBackStyle.ControlCustom3: return GetPaletteBackControl(ControlStyles.ControlCustom3, state); case PaletteBackStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Back; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Back; case PaletteBackStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Back; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Back; case PaletteBackStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Back; case PaletteBackStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Back; case PaletteBackStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Back; case PaletteBackStyle.FormMain: return GetPaletteBackForm(FormStyles.FormMain, state); case PaletteBackStyle.FormCustom1: @@ -4566,9 +4566,9 @@ private static Type StringToType(string s) case PaletteBackStyle.ContextMenuItemSplit: return GetPaletteBackContextMenuItemSplit(state); case PaletteBackStyle.ContextMenuItemImageColumn: - return ContextMenu.StateCommon.ItemImageColumn.Back; + return ContextMenu.StateCommon.ItemImageColumn!.Back; case PaletteBackStyle.ContextMenuSeparator: - return ContextMenu.StateCommon.Separator.Back; + return ContextMenu.StateCommon.Separator!.Back; default: // Should never happen! Debug.Assert(false); @@ -4640,15 +4640,15 @@ private static Type StringToType(string s) case PaletteBorderStyle.ControlCustom3: return GetPaletteBorderControl(ControlStyles.ControlCustom3, state); case PaletteBorderStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Border; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Border; case PaletteBorderStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Border; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Border; case PaletteBorderStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Border; case PaletteBorderStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Border; case PaletteBorderStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Border; case PaletteBorderStyle.FormMain: return GetPaletteBorderForm(FormStyles.FormMain, state); case PaletteBorderStyle.FormCustom1: @@ -4748,9 +4748,9 @@ private static Type StringToType(string s) case PaletteBorderStyle.ContextMenuItemSplit: return GetPaletteBorderContextMenuItemSplit(state); case PaletteBorderStyle.ContextMenuItemImageColumn: - return ContextMenu.StateCommon.ItemImageColumn.Border; + return ContextMenu.StateCommon.ItemImageColumn!.Border; case PaletteBorderStyle.ContextMenuSeparator: - return ContextMenu.StateCommon.Separator.Border; + return ContextMenu.StateCommon.Separator!.Border; default: // Should never happen! Debug.Assert(false); @@ -4882,15 +4882,15 @@ private static Type StringToType(string s) case PaletteContentStyle.LabelCustom3: return GetPaletteLabel(LabelStyles.LabelCustom3, state); case PaletteContentStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Content; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Content; case PaletteContentStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Content; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Content; case PaletteContentStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Content; case PaletteContentStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Content; case PaletteContentStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Content; case PaletteContentStyle.TabHighProfile: return GetPaletteContentTab(TabStyles.TabHighProfile, state); case PaletteContentStyle.TabStandardProfile: @@ -5715,11 +5715,11 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemSplit.Back; + return ContextMenu.StateDisabled.ItemSplit!.Back; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemSplit.Back; + return ContextMenu.StateNormal.ItemSplit!.Back; case PaletteState.Tracking: - return ContextMenu.StateHighlight.ItemSplit.Back; + return ContextMenu.StateHighlight.ItemSplit!.Back; default: // Should never happen! Debug.Assert(false); @@ -5732,9 +5732,9 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemHighlight.Back; + return ContextMenu.StateDisabled.ItemHighlight!.Back; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemHighlight.Back; + return ContextMenu.StateNormal.ItemHighlight!.Back; case PaletteState.Tracking: return ContextMenu.StateHighlight.ItemHighlight.Back; default: @@ -5766,9 +5766,9 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemHighlight.Border; + return ContextMenu.StateDisabled.ItemHighlight!.Border; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemHighlight.Border; + return ContextMenu.StateNormal.ItemHighlight!.Border; case PaletteState.Tracking: return ContextMenu.StateHighlight.ItemHighlight.Border; default: @@ -5783,11 +5783,11 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemSplit.Border; + return ContextMenu.StateDisabled.ItemSplit!.Border; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemSplit.Border; + return ContextMenu.StateNormal.ItemSplit!.Border; case PaletteState.Tracking: - return ContextMenu.StateHighlight.ItemSplit.Border; + return ContextMenu.StateHighlight.ItemSplit!.Border; default: // Should never happen! Debug.Assert(false); @@ -5919,7 +5919,7 @@ private void SetPalette(PaletteBase? basePalette) _redirector.Target = _basePalette; // Update the color table we inherit from - ToolMenuStatus.BaseKCT = _basePalette.ColorTable; + ToolMenuStatus.BaseKCT = _basePalette!.ColorTable; // Hook to new palette events if (_basePalette != null) From 81bed06b49654e62d60f3095af28cc47bf0c0f32 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Tue, 5 Dec 2023 19:22:08 +0000 Subject: [PATCH 04/14] * `nullable`s --- .../KryptonCheckButtonActionList.cs | 2 +- .../KryptonColorButtonActionList.cs | 64 +++++++++---------- .../Action Lists/KryptonComboBoxActionList.cs | 26 ++++---- .../Action Lists/KryptonCommandActionList.cs | 16 ++--- .../KryptonContextMenuActionList.cs | 8 +-- .../KryptonDateTimePickerActionList.cs | 34 +++++----- .../KryptonDomainUpDownActionList.cs | 22 +++---- .../KryptonDropButtonActionList.cs | 56 ++++++++-------- 8 files changed, 114 insertions(+), 114 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs index a7380c2a0..a8962b78c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs @@ -114,7 +114,7 @@ private void OnCheckedClick(object sender, EventArgs e) _action = isChecked ? "Uncheck the button" : "Check the button"; // Get access to the actual Orientation property - PropertyDescriptor checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; + PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs index 7525c3428..5c50b4f64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs @@ -41,11 +41,11 @@ public KryptonColorButtonActionList(KryptonColorButtonDesigner owner) /// public ButtonStyle ButtonStyle { - get => _colorButton.ButtonStyle; + get => _colorButton!.ButtonStyle; set { - if (_colorButton.ButtonStyle != value) + if (_colorButton!.ButtonStyle != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.ButtonStyle, value); _colorButton.ButtonStyle = value; @@ -58,11 +58,11 @@ public ButtonStyle ButtonStyle /// public VisualOrientation ButtonOrientation { - get => _colorButton.ButtonOrientation; + get => _colorButton!.ButtonOrientation; set { - if (_colorButton.ButtonOrientation != value) + if (_colorButton!.ButtonOrientation != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.ButtonOrientation, value); _colorButton.ButtonOrientation = value; @@ -74,11 +74,11 @@ public VisualOrientation ButtonOrientation /// The selected colour. public Color SelectedColour { - get => _colorButton.SelectedColor; + get => _colorButton!.SelectedColor; set { - if (_colorButton.SelectedColor != value) + if (_colorButton!.SelectedColor != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.SelectedColor, value); @@ -92,11 +92,11 @@ public Color SelectedColour /// public VisualOrientation DropDownPosition { - get => _colorButton.DropDownPosition; + get => _colorButton!.DropDownPosition; set { - if (_colorButton.DropDownPosition != value) + if (_colorButton!.DropDownPosition != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.DropDownPosition, value); _colorButton.DropDownPosition = value; @@ -109,11 +109,11 @@ public VisualOrientation DropDownPosition /// public VisualOrientation DropDownOrientation { - get => _colorButton.DropDownOrientation; + get => _colorButton!.DropDownOrientation; set { - if (_colorButton.DropDownOrientation != value) + if (_colorButton!.DropDownOrientation != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.DropDownOrientation, value); _colorButton.DropDownOrientation = value; @@ -126,11 +126,11 @@ public VisualOrientation DropDownOrientation /// public bool Splitter { - get => _colorButton.Splitter; + get => _colorButton!.Splitter; set { - if (_colorButton.Splitter != value) + if (_colorButton!.Splitter != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Splitter, value); _colorButton.Splitter = value; @@ -143,11 +143,11 @@ public bool Splitter /// public string Text { - get => _colorButton.Values.Text; + get => _colorButton!.Values.Text; set { - if (_colorButton.Values.Text != value) + if (_colorButton!.Values.Text != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.Text, value); _colorButton.Values.Text = value; @@ -160,11 +160,11 @@ public string Text /// public string ExtraText { - get => _colorButton.Values.ExtraText; + get => _colorButton!.Values.ExtraText; set { - if (_colorButton.Values.ExtraText != value) + if (_colorButton!.Values.ExtraText != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.ExtraText, value); _colorButton.Values.ExtraText = value; @@ -177,11 +177,11 @@ public string ExtraText /// public Image? Image { - get => _colorButton.Values.Image; + get => _colorButton!.Values.Image; set { - if (_colorButton.Values.Image != value) + if (_colorButton!.Values.Image != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.Image, value); _colorButton.Values.Image = value; @@ -194,11 +194,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _colorButton.PaletteMode; + get => _colorButton!.PaletteMode; set { - if (_colorButton.PaletteMode != value) + if (_colorButton!.PaletteMode != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.PaletteMode, value); _colorButton.PaletteMode = value; @@ -208,13 +208,13 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font StateCommonShortTextFont + public Font? StateCommonShortTextFont { - get => _colorButton.StateCommon.Content.ShortText.Font; + get => _colorButton!.StateCommon.Content.ShortText.Font; set { - if (_colorButton.StateCommon.Content.ShortText.Font != value) + if (_colorButton!.StateCommon.Content.ShortText.Font != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Content.ShortText.Font, value); @@ -225,13 +225,13 @@ public Font StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font StateCommonLongTextFont + public Font? StateCommonLongTextFont { - get => _colorButton.StateCommon.Content.LongText.Font; + get => _colorButton!.StateCommon.Content.LongText.Font; set { - if (_colorButton.StateCommon.Content.LongText.Font != value) + if (_colorButton!.StateCommon.Content.LongText.Font != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Content.LongText.Font, value); @@ -245,11 +245,11 @@ public Font StateCommonLongTextFont [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _colorButton.StateCommon.Border.Rounding; + get => _colorButton!.StateCommon.Border.Rounding; set { - if (_colorButton.StateCommon.Border.Rounding != value) + if (_colorButton!.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Border.Rounding, value); @@ -260,11 +260,11 @@ public float StateCommonCornerRoundingRadius public bool AllowFullOpen { - get => _colorButton.AllowFullOpen; + get => _colorButton!.AllowFullOpen; set { - if (_colorButton.AllowFullOpen != value) + if (_colorButton!.AllowFullOpen != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.AllowFullOpen, value); @@ -275,11 +275,11 @@ public bool AllowFullOpen public Rectangle SelectedRect { - get => _colorButton.SelectedRect; + get => _colorButton!.SelectedRect; set { - if (_colorButton.SelectedRect != value) + if (_colorButton!.SelectedRect != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.SelectedRect, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs index 257d777b7..3fa40ee7d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs @@ -40,11 +40,11 @@ public KryptonComboBoxActionList(KryptonComboBoxDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _comboBox.KryptonContextMenu; + get => _comboBox!.KryptonContextMenu; set { - if (_comboBox.KryptonContextMenu != value) + if (_comboBox!.KryptonContextMenu != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.KryptonContextMenu, value); @@ -57,11 +57,11 @@ public KryptonContextMenu? KryptonContextMenu /// The drop down style. public ComboBoxStyle DropDownStyle { - get => _comboBox.DropDownStyle; + get => _comboBox!.DropDownStyle; set { - if (_comboBox.DropDownStyle != value) + if (_comboBox!.DropDownStyle != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.DropDownStyle, value); @@ -75,11 +75,11 @@ public ComboBoxStyle DropDownStyle /// public PaletteMode PaletteMode { - get => _comboBox.PaletteMode; + get => _comboBox!.PaletteMode; set { - if (_comboBox.PaletteMode != value) + if (_comboBox!.PaletteMode != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.PaletteMode, value); _comboBox.PaletteMode = value; @@ -92,11 +92,11 @@ public PaletteMode PaletteMode /// public InputControlStyle InputControlStyle { - get => _comboBox.InputControlStyle; + get => _comboBox!.InputControlStyle; set { - if (_comboBox.InputControlStyle != value) + if (_comboBox!.InputControlStyle != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.InputControlStyle, value); _comboBox.InputControlStyle = value; @@ -106,13 +106,13 @@ public InputControlStyle InputControlStyle /// Gets or sets the font. /// The font. - public Font Font + public Font? Font { - get => _comboBox.StateCommon.ComboBox.Content.Font; + get => _comboBox!.StateCommon.ComboBox.Content.Font; set { - if (_comboBox.StateCommon.ComboBox.Content.Font != value) + if (_comboBox!.StateCommon.ComboBox.Content.Font != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.StateCommon.ComboBox.Content.Font, value); @@ -126,11 +126,11 @@ public Font Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _comboBox.StateCommon.ComboBox.Border.Rounding; + get => _comboBox!.StateCommon.ComboBox.Border.Rounding; set { - if (_comboBox.StateCommon.ComboBox.Border.Rounding != value) + if (_comboBox!.StateCommon.ComboBox.Border.Rounding != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.StateCommon.ComboBox.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs index 833227ea7..158b2b3a6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs @@ -37,11 +37,11 @@ public KryptonCommandActionList(KryptonCommandDesigner owner) public string Text { - get => _command.Text; + get => _command!.Text; set { - if (_command.Text != value) + if (_command!.Text != value) { _service.OnComponentChanged(_command, null, _command.Text, value); @@ -52,11 +52,11 @@ public string Text public Image? ImageSmall { - get => _command.ImageSmall; + get => _command!.ImageSmall; set { - if (_command.ImageSmall != value) + if (_command!.ImageSmall != value) { _service.OnComponentChanged(_command, null, _command.ImageSmall, value); @@ -67,11 +67,11 @@ public Image? ImageSmall public Image? ImageLarge { - get => _command.ImageLarge; + get => _command!.ImageLarge; set { - if (_command.ImageLarge != value) + if (_command!.ImageLarge != value) { _service.OnComponentChanged(_command, null, _command.ImageLarge, value); @@ -82,11 +82,11 @@ public Image? ImageLarge public Color ImageTransparentColor { - get => _command.ImageTransparentColor; + get => _command!.ImageTransparentColor; set { - if (_command.ImageTransparentColor != value) + if (_command!.ImageTransparentColor != value) { _service.OnComponentChanged(_command, null, _command.ImageTransparentColor, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs index 87af5b1ef..db24a81ce 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs @@ -66,11 +66,11 @@ public override DesignerActionItemCollection GetSortedActionItems() /// public PaletteMode PaletteMode { - get => _contextMenu.PaletteMode; + get => _contextMenu!.PaletteMode; set { - if (_contextMenu.PaletteMode != value) + if (_contextMenu!.PaletteMode != value) { _service.OnComponentChanged(_contextMenu, null, _contextMenu.PaletteMode, value); _contextMenu.PaletteMode = value; @@ -82,11 +82,11 @@ public PaletteMode PaletteMode /// The items. public KryptonContextMenuCollection Items { - get => _contextMenu.Items; + get => _contextMenu!.Items; set { - if (_contextMenu.Items != value) + if (_contextMenu!.Items != value) { _service.OnComponentChanged(_contextMenu, null, _contextMenu.Items, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs index 85d3ee663..db16ad791 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs @@ -40,11 +40,11 @@ public KryptonDateTimePickerActionList(KryptonDateTimePickerDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _dateTimePicker.KryptonContextMenu; + get => _dateTimePicker!.KryptonContextMenu; set { - if (_dateTimePicker.KryptonContextMenu != value) + if (_dateTimePicker!.KryptonContextMenu != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.KryptonContextMenu, value); @@ -58,11 +58,11 @@ public KryptonContextMenu? KryptonContextMenu /// public DateTimePickerFormat Format { - get => _dateTimePicker.Format; + get => _dateTimePicker!.Format; set { - if (_dateTimePicker.Format != value) + if (_dateTimePicker!.Format != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.Format, value); _dateTimePicker.Format = value; @@ -75,11 +75,11 @@ public DateTimePickerFormat Format /// public bool ShowUpDown { - get => _dateTimePicker.ShowUpDown; + get => _dateTimePicker!.ShowUpDown; set { - if (_dateTimePicker.ShowUpDown != value) + if (_dateTimePicker!.ShowUpDown != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.ShowUpDown, value); _dateTimePicker.ShowUpDown = value; @@ -92,11 +92,11 @@ public bool ShowUpDown /// public bool ShowCheckBox { - get => _dateTimePicker.ShowCheckBox; + get => _dateTimePicker!.ShowCheckBox; set { - if (_dateTimePicker.ShowCheckBox != value) + if (_dateTimePicker!.ShowCheckBox != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.ShowCheckBox, value); _dateTimePicker.ShowCheckBox = value; @@ -109,11 +109,11 @@ public bool ShowCheckBox /// public bool Checked { - get => _dateTimePicker.Checked; + get => _dateTimePicker!.Checked; set { - if (_dateTimePicker.Checked != value) + if (_dateTimePicker!.Checked != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.Checked, value); _dateTimePicker.Checked = value; @@ -126,11 +126,11 @@ public bool Checked /// public PaletteMode PaletteMode { - get => _dateTimePicker.PaletteMode; + get => _dateTimePicker!.PaletteMode; set { - if (_dateTimePicker.PaletteMode != value) + if (_dateTimePicker!.PaletteMode != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.PaletteMode, value); _dateTimePicker.PaletteMode = value; @@ -138,13 +138,13 @@ public PaletteMode PaletteMode } } - public Font Font + public Font? Font { - get => _dateTimePicker.StateCommon.Content.Font; + get => _dateTimePicker!.StateCommon.Content.Font; set { - if (_dateTimePicker.StateCommon.Content.Font != value) + if (_dateTimePicker!.StateCommon.Content.Font != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.StateCommon.Content.Font, value); @@ -158,11 +158,11 @@ public Font Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _dateTimePicker.StateCommon.Border.Rounding; + get => _dateTimePicker!.StateCommon.Border.Rounding; set { - if (_dateTimePicker.StateCommon.Border.Rounding != value) + if (_dateTimePicker!.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.StateCommon.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs index d12d58cf5..20baba26e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs @@ -40,11 +40,11 @@ public KryptonDomainUpDownActionList(KryptonDomainUpDownDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _domainUpDown.KryptonContextMenu; + get => _domainUpDown!.KryptonContextMenu; set { - if (_domainUpDown.KryptonContextMenu != value) + if (_domainUpDown!.KryptonContextMenu != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.KryptonContextMenu, value); @@ -58,11 +58,11 @@ public KryptonContextMenu? KryptonContextMenu /// public PaletteMode PaletteMode { - get => _domainUpDown.PaletteMode; + get => _domainUpDown!.PaletteMode; set { - if (_domainUpDown.PaletteMode != value) + if (_domainUpDown!.PaletteMode != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.PaletteMode, value); _domainUpDown.PaletteMode = value; @@ -75,11 +75,11 @@ public PaletteMode PaletteMode /// public InputControlStyle InputControlStyle { - get => _domainUpDown.InputControlStyle; + get => _domainUpDown!.InputControlStyle; set { - if (_domainUpDown.InputControlStyle != value) + if (_domainUpDown!.InputControlStyle != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.InputControlStyle, value); _domainUpDown.InputControlStyle = value; @@ -87,13 +87,13 @@ public InputControlStyle InputControlStyle } } - public Font Font + public Font? Font { - get => _domainUpDown.StateCommon.Content.Font; + get => _domainUpDown!.StateCommon.Content.Font; set { - if (_domainUpDown.StateCommon.Content.Font != value) + if (_domainUpDown!.StateCommon.Content.Font != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.StateCommon.Content.Font, value); @@ -107,11 +107,11 @@ public Font Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _domainUpDown.StateCommon.Border.Rounding; + get => _domainUpDown!.StateCommon.Border.Rounding; set { - if (_domainUpDown.StateCommon.Border.Rounding != value) + if (_domainUpDown!.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.StateCommon.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs index 49ce24947..89979f75c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs @@ -41,11 +41,11 @@ public KryptonDropButtonActionList(KryptonDropButtonDesigner owner) /// public ButtonStyle ButtonStyle { - get => _dropButton.ButtonStyle; + get => _dropButton!.ButtonStyle; set { - if (_dropButton.ButtonStyle != value) + if (_dropButton!.ButtonStyle != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.ButtonStyle, value); _dropButton.ButtonStyle = value; @@ -58,11 +58,11 @@ public ButtonStyle ButtonStyle /// public VisualOrientation ButtonOrientation { - get => _dropButton.ButtonOrientation; + get => _dropButton!.ButtonOrientation; set { - if (_dropButton.ButtonOrientation != value) + if (_dropButton!.ButtonOrientation != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.ButtonOrientation, value); _dropButton.ButtonOrientation = value; @@ -74,11 +74,11 @@ public VisualOrientation ButtonOrientation /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _dropButton.KryptonContextMenu; + get => _dropButton!.KryptonContextMenu; set { - if (_dropButton.KryptonContextMenu != value) + if (_dropButton!.KryptonContextMenu != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.KryptonContextMenu, value); @@ -92,11 +92,11 @@ public KryptonContextMenu? KryptonContextMenu /// public VisualOrientation DropDownPosition { - get => _dropButton.DropDownPosition; + get => _dropButton!.DropDownPosition; set { - if (_dropButton.DropDownPosition != value) + if (_dropButton!.DropDownPosition != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.DropDownPosition, value); _dropButton.DropDownPosition = value; @@ -109,11 +109,11 @@ public VisualOrientation DropDownPosition /// public VisualOrientation DropDownOrientation { - get => _dropButton.DropDownOrientation; + get => _dropButton!.DropDownOrientation; set { - if (_dropButton.DropDownOrientation != value) + if (_dropButton!.DropDownOrientation != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.DropDownOrientation, value); _dropButton.DropDownOrientation = value; @@ -126,11 +126,11 @@ public VisualOrientation DropDownOrientation /// public bool Splitter { - get => _dropButton.Splitter; + get => _dropButton!.Splitter; set { - if (_dropButton.Splitter != value) + if (_dropButton!.Splitter != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Splitter, value); _dropButton.Splitter = value; @@ -143,11 +143,11 @@ public bool Splitter /// public string Text { - get => _dropButton.Values.Text; + get => _dropButton!.Values.Text; set { - if (_dropButton.Values.Text != value) + if (_dropButton!.Values.Text != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.Text, value); _dropButton.Values.Text = value; @@ -160,11 +160,11 @@ public string Text /// public string ExtraText { - get => _dropButton.Values.ExtraText; + get => _dropButton!.Values.ExtraText; set { - if (_dropButton.Values.ExtraText != value) + if (_dropButton!.Values.ExtraText != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.ExtraText, value); _dropButton.Values.ExtraText = value; @@ -177,11 +177,11 @@ public string ExtraText /// public Image? Image { - get => _dropButton.Values.Image; + get => _dropButton!.Values.Image; set { - if (_dropButton.Values.Image != value) + if (_dropButton!.Values.Image != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.Image, value); _dropButton.Values.Image = value; @@ -194,11 +194,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _dropButton.PaletteMode; + get => _dropButton!.PaletteMode; set { - if (_dropButton.PaletteMode != value) + if (_dropButton!.PaletteMode != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.PaletteMode, value); _dropButton.PaletteMode = value; @@ -208,13 +208,13 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font StateCommonShortTextFont + public Font? StateCommonShortTextFont { - get => _dropButton.StateCommon.Content.ShortText.Font; + get => _dropButton!.StateCommon.Content.ShortText.Font; set { - if (_dropButton.StateCommon.Content.ShortText.Font != value) + if (_dropButton!.StateCommon.Content.ShortText.Font != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Content.ShortText.Font, value); @@ -225,13 +225,13 @@ public Font StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font StateCommonLongTextFont + public Font? StateCommonLongTextFont { - get => _dropButton.StateCommon.Content.LongText.Font; + get => _dropButton!.StateCommon.Content.LongText.Font; set { - if (_dropButton.StateCommon.Content.LongText.Font != value) + if (_dropButton!.StateCommon.Content.LongText.Font != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Content.LongText.Font, value); @@ -245,11 +245,11 @@ public Font StateCommonLongTextFont [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _dropButton.StateCommon.Border.Rounding; + get => _dropButton!.StateCommon.Border.Rounding; set { - if (_dropButton.StateCommon.Border.Rounding != value) + if (_dropButton!.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Border.Rounding, value); From f3f55611369499b47b9c3f7b9b342f9ff2264115 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Wed, 6 Dec 2023 12:44:59 +0000 Subject: [PATCH 05/14] * More `null` checking --- .../ButtonSpec/ButtonSpecManagerDraw.cs | 1 + .../ButtonSpec/ButtonSpecToContent.cs | 6 +- .../KryptonBorderEdgeActionList.cs | 4 +- .../KryptonCheckButtonActionList.cs | 4 +- .../Action Lists/KryptonGroupActionList.cs | 22 +++--- .../Action Lists/KryptonGroupBoxActionList.cs | 56 +++++++------- .../Action Lists/KryptonHeaderActionList.cs | 40 +++++----- .../KryptonHeaderGroupActionList.cs | 48 ++++++------ .../Action Lists/KryptonLabelActionList.cs | 56 +++++++------- .../KryptonLinkLabelActionList.cs | 70 ++++++++--------- .../KryptonLinkWrapLabelActionList.cs | 24 +++--- .../Designers/KryptonBreadCrumbDesigner.cs | 16 ++-- .../KryptonBreadCrumbItemDesigner.cs | 2 +- .../KryptonComboBoxColumnDesigner.cs | 8 +- .../Designers/KryptonComboBoxDesigner.cs | 14 ++-- .../Designers/KryptonContextMenuDesigner.cs | 2 +- .../KryptonContextMenuItemDesigner.cs | 2 +- .../KryptonContextMenuItemsDesigner.cs | 2 +- .../KryptonDateTimePickerColumnDesigner.cs | 10 +-- .../KryptonDateTimePickerDesigner.cs | 22 +++--- .../KryptonDomainUpDownColumnDesigner.cs | 8 +- .../Designers/KryptonDomainUpDownDesigner.cs | 16 ++-- .../Designers/KryptonGroupBoxDesigner.cs | 6 +- .../Designers/KryptonGroupDesigner.cs | 4 +- .../Designers/KryptonGroupPanelDesigner.cs | 12 +-- .../Designers/KryptonHeaderDesigner.cs | 22 +++--- .../Designers/KryptonHeaderGroupDesigner.cs | 24 +++--- .../Designers/KryptonListBoxDesigner.cs | 2 +- .../KryptonMaskedTextBoxColumnDesigner.cs | 8 +- .../Designers/KryptonMaskedTextBoxDesigner.cs | 18 ++--- .../Designers/KryptonMonthCalendarDesigner.cs | 22 +++--- .../KryptonNumericUpDownColumnDesigner.cs | 8 +- .../Designers/KryptonNumericUpDownDesigner.cs | 16 ++-- .../Designers/KryptonRichTextBoxDesigner.cs | 16 ++-- .../KryptonSplitContainerDesigner.cs | 2 +- .../Designers/KryptonSplitterPanelDesigner.cs | 18 ++--- .../Designers/KryptonTextBoxColumnDesigner.cs | 8 +- .../Designers/KryptonTextBoxDesigner.cs | 14 ++-- .../Designers/KryptonTrackBarDesigner.cs | 6 +- .../Designers/KryptonTreeViewDesigner.cs | 2 +- .../Designers/KryptonWebBrowserDesigner.cs | 2 +- .../Designers/ScrollBarControlDesigner.cs | 4 +- .../Editors/KryptonBreadCrumbItemsEditor.cs | 77 ++++++++++--------- .../KryptonCheckButtonCollectionEditor.cs | 2 +- .../Editors/PaletteDrawBordersEditor.cs | 8 +- .../Other/KryptonDesignerActionItem.cs | 4 +- .../Other/KryptonSplitContainerBehavior.cs | 6 +- .../Other/KryptonSplitContainerGlyph.cs | 18 ++--- .../OverrideComboBoxStyleDropDownStyle.cs | 4 +- .../UX/KryptonCheckButtonCollectionForm.cs | 20 ++--- .../UX/KryptonContextMenuCollectionForm.cs | 57 +++++++------- .../General/KryptonAboutBoxUtilities.cs | 8 +- 52 files changed, 429 insertions(+), 422 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs index 6bb56ba88..da661ad52 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs @@ -81,6 +81,7 @@ public ButtonSpecManagerDraw(Control control, viewMetricPaddings, getRenderer, needPaint) { Debug.Assert(viewDockers != null); + Debug.Assert(viewDockers != null, nameof(viewDockers) + " != null"); Debug.Assert(viewDockers.Length == viewMetrics.Length); Debug.Assert(viewDockers.Length == viewMetricPaddings.Length); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs index 34eb0f087..9a3a0909d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs @@ -28,13 +28,13 @@ public class ButtonSpecToContent : IContentValues /// /// Palette for sourcing information. /// Source button spec instance. - public ButtonSpecToContent([DisallowNull] PaletteBase? palette, - [DisallowNull] ButtonSpec buttonSpec) + public ButtonSpecToContent(PaletteBase? palette, + ButtonSpec buttonSpec) { Debug.Assert(palette != null); Debug.Assert(buttonSpec != null); _palette = palette; - _buttonSpec = buttonSpec; + _buttonSpec = buttonSpec!; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs index 9e73f916b..0b96a7b4e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs @@ -40,7 +40,7 @@ public KryptonBorderEdgeActionList(KryptonBorderEdgeDesigner owner) if (orientationProp != null) { // Decide on the next action to take given the current setting - _action = (Orientation)orientationProp.GetValue(_borderEdge) == Orientation.Vertical + _action = (Orientation)orientationProp.GetValue(_borderEdge)! == Orientation.Vertical ? "Horizontal border orientation" : "Vertical border orientation"; } @@ -164,7 +164,7 @@ private void OnOrientationClick(object sender, EventArgs e) _action = orientation == Orientation.Vertical ? "Horizontal border orientation" : "Vertical border orientation"; // Get access to the actual Orientation property - PropertyDescriptor? orientationProp = TypeDescriptor.GetProperties(_borderEdge)[nameof(Orientation)]; + PropertyDescriptor? orientationProp = TypeDescriptor.GetProperties(_borderEdge!)[nameof(Orientation)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs index a8962b78c..25be0f412 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs @@ -41,7 +41,7 @@ public KryptonCheckButtonActionList(KryptonCheckButtonDesigner owner) if (checkedProp != null) { // Decide on the next action to take given the current setting - _action = (bool)checkedProp.GetValue(_checkButton) ? "Uncheck the button" : "Check the button"; + _action = (bool)checkedProp.GetValue(_checkButton)! ? "Uncheck the button" : "Check the button"; } } @@ -114,7 +114,7 @@ private void OnCheckedClick(object sender, EventArgs e) _action = isChecked ? "Uncheck the button" : "Check the button"; // Get access to the actual Orientation property - PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; + PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton!)[nameof(Checked)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs index 451580234..8e328fd64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs @@ -24,7 +24,7 @@ internal class KryptonGroupActionList : DesignerActionList /// Initialize a new instance of the KryptonGroupActionList class. /// /// Designer that owns this action list instance. - public KryptonGroupActionList(KryptonGroupDesigner owner) + public KryptonGroupActionList(KryptonGroupDesigner owner) : base(owner.Component) { // Remember the group instance @@ -34,18 +34,18 @@ public KryptonGroupActionList(KryptonGroupDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the group background style. /// public PaletteBackStyle GroupBackStyle { - get => _group.GroupBackStyle; + get => _group!.GroupBackStyle; set { - if (_group.GroupBackStyle != value) + if (_group!.GroupBackStyle != value) { _service.OnComponentChanged(_group, null, _group.GroupBackStyle, value); _group.GroupBackStyle = value; @@ -58,11 +58,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _group.GroupBorderStyle; + get => _group!.GroupBorderStyle; - set + set { - if (_group.GroupBorderStyle != value) + if (_group!.GroupBorderStyle != value) { _service.OnComponentChanged(_group, null, _group.GroupBorderStyle, value); _group.GroupBorderStyle = value; @@ -75,11 +75,11 @@ public PaletteBorderStyle GroupBorderStyle /// public PaletteMode PaletteMode { - get => _group.PaletteMode; + get => _group!.PaletteMode; - set + set { - if (_group.PaletteMode != value) + if (_group!.PaletteMode != value) { _service.OnComponentChanged(_group, null, _group.PaletteMode, value); _group.PaletteMode = value; @@ -108,7 +108,7 @@ public override DesignerActionItemCollection GetSortedActionItems() actions.Add(new DesignerActionHeaderItem(@"Visuals")); actions.Add(new DesignerActionPropertyItem(nameof(PaletteMode), @"Palette", @"Visuals", @"Palette applied to drawing")); } - + return actions; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs index 8b5554662..ec0b7708c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs @@ -41,11 +41,11 @@ public KryptonGroupBoxActionList(KryptonGroupBoxDesigner owner) /// public PaletteBackStyle GroupBackStyle { - get => _groupBox.GroupBackStyle; + get => _groupBox!.GroupBackStyle; set { - if (_groupBox.GroupBackStyle != value) + if (_groupBox!.GroupBackStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.GroupBackStyle, value); _groupBox.GroupBackStyle = value; @@ -58,11 +58,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _groupBox.GroupBorderStyle; + get => _groupBox!.GroupBorderStyle; set { - if (_groupBox.GroupBorderStyle != value) + if (_groupBox!.GroupBorderStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.GroupBorderStyle, value); _groupBox.GroupBorderStyle = value; @@ -75,11 +75,11 @@ public PaletteBorderStyle GroupBorderStyle /// public LabelStyle CaptionStyle { - get => _groupBox.CaptionStyle; + get => _groupBox!.CaptionStyle; set { - if (_groupBox.CaptionStyle != value) + if (_groupBox!.CaptionStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionStyle, value); _groupBox.CaptionStyle = value; @@ -92,11 +92,11 @@ public LabelStyle CaptionStyle /// public VisualOrientation CaptionEdge { - get => _groupBox.CaptionEdge; + get => _groupBox!.CaptionEdge; set { - if (_groupBox.CaptionEdge != value) + if (_groupBox!.CaptionEdge != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionEdge, value); _groupBox.CaptionEdge = value; @@ -109,11 +109,11 @@ public VisualOrientation CaptionEdge /// public double CaptionOverlap { - get => _groupBox.CaptionOverlap; + get => _groupBox!.CaptionOverlap; set { - if (_groupBox.CaptionOverlap != value) + if (_groupBox!.CaptionOverlap != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionOverlap, value); _groupBox.CaptionOverlap = value; @@ -126,11 +126,11 @@ public double CaptionOverlap /// public PaletteMode PaletteMode { - get => _groupBox.PaletteMode; + get => _groupBox!.PaletteMode; set { - if (_groupBox.PaletteMode != value) + if (_groupBox!.PaletteMode != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.PaletteMode, value); _groupBox.PaletteMode = value; @@ -142,11 +142,11 @@ public PaletteMode PaletteMode /// The description. public string Description { - get => _groupBox.Values.Description; + get => _groupBox!.Values.Description; set { - if (_groupBox.Values.Description != value) + if (_groupBox!.Values.Description != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Description, value); @@ -159,11 +159,11 @@ public string Description /// The heading. public string Heading { - get => _groupBox.Values.Heading; + get => _groupBox!.Values.Heading; set { - if (_groupBox.Values.Heading != value) + if (_groupBox!.Values.Heading != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Heading, value); @@ -176,11 +176,11 @@ public string Heading /// The image. public Image? Image { - get => _groupBox.Values.Image; + get => _groupBox!.Values.Image; set { - if (_groupBox.Values.Image != value) + if (_groupBox!.Values.Image != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Image, value); @@ -191,34 +191,34 @@ public Image? Image /// Gets or sets the State Common State Common Long Text Font. /// The State Common State Common Long Text Font. - public Font StateCommonLongTextFont + public Font? StateCommonLongTextFont { - get => _groupBox.StateCommon.Content.LongText.Font; + get => _groupBox!.StateCommon!.Content.LongText.Font; set { - if (_groupBox.StateCommon.Content.LongText.Font != value) + if (_groupBox!.StateCommon?.Content.LongText.Font != value) { - _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon.Content.LongText.Font, value); + _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon?.Content.LongText.Font, value); - _groupBox.StateCommon.Content.LongText.Font = value; + _groupBox.StateCommon!.Content.LongText.Font = value; } } } /// Gets or sets the State Common Short Text Font. /// The State Common Short Text Font. - public Font StateCommonShortTextFont + public Font? StateCommonShortTextFont { - get => _groupBox.StateCommon.Content.ShortText.Font; + get => _groupBox!.StateCommon!.Content.ShortText.Font; set { - if (_groupBox.StateCommon.Content.ShortText.Font != value) + if (_groupBox!.StateCommon?.Content.ShortText.Font != value) { - _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon.Content.ShortText.Font, value); + _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon?.Content.ShortText.Font, value); - _groupBox.StateCommon.Content.ShortText.Font = value; + _groupBox.StateCommon!.Content.ShortText.Font = value; } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs index 9101b7f56..6085a2650 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs @@ -34,18 +34,18 @@ public KryptonHeaderActionList(KryptonHeaderDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the header style. /// public HeaderStyle HeaderStyle { - get => _header.HeaderStyle; + get => _header!.HeaderStyle; - set + set { - if (_header.HeaderStyle != value) + if (_header!.HeaderStyle != value) { _service.OnComponentChanged(_header, null, _header.HeaderStyle, value); _header.HeaderStyle = value; @@ -58,11 +58,11 @@ public HeaderStyle HeaderStyle /// public VisualOrientation Orientation { - get => _header.Orientation; + get => _header!.Orientation; - set + set { - if (_header.Orientation != value) + if (_header!.Orientation != value) { _service.OnComponentChanged(_header, null, _header.Orientation, value); _header.Orientation = value; @@ -75,11 +75,11 @@ public VisualOrientation Orientation /// public string Heading { - get => _header.Values.Heading; + get => _header!.Values.Heading; - set + set { - if (_header.Values.Heading != value) + if (_header!.Values.Heading != value) { _service.OnComponentChanged(_header, null, _header.Values.Heading, value); _header.Values.Heading = value; @@ -92,11 +92,11 @@ public string Heading /// public string Description { - get => _header.Values.Description; + get => _header!.Values.Description; - set + set { - if (_header.Values.Description != value) + if (_header!.Values.Description != value) { _service.OnComponentChanged(_header, null, _header.Values.Description, value); _header.Values.Description = value; @@ -109,11 +109,11 @@ public string Description /// public Image? Image { - get => _header.Values.Image; + get => _header!.Values.Image; - set + set { - if (_header.Values.Image != value) + if (_header!.Values.Image != value) { _service.OnComponentChanged(_header, null, _header.Values.Image, value); _header.Values.Image = value; @@ -126,11 +126,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _header.PaletteMode; + get => _header!.PaletteMode; - set + set { - if (_header.PaletteMode != value) + if (_header!.PaletteMode != value) { _service.OnComponentChanged(_header, null, _header.PaletteMode, value); _header.PaletteMode = value; @@ -163,7 +163,7 @@ public override DesignerActionItemCollection GetSortedActionItems() actions.Add(new DesignerActionHeaderItem(@"Visuals")); actions.Add(new DesignerActionPropertyItem(nameof(PaletteMode), @"Palette", @"Visuals", @"Palette applied to drawing")); } - + return actions; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs index 39848a045..270798b63 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs @@ -38,18 +38,18 @@ public KryptonHeaderGroupActionList(KryptonHeaderGroupDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the group background style. /// public PaletteBackStyle GroupBackStyle { - get => _headerGroup.GroupBackStyle; + get => _headerGroup!.GroupBackStyle; - set + set { - if (_headerGroup.GroupBackStyle != value) + if (_headerGroup!.GroupBackStyle != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.GroupBackStyle, value); _headerGroup.GroupBackStyle = value; @@ -62,11 +62,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _headerGroup.GroupBorderStyle; + get => _headerGroup!.GroupBorderStyle; - set + set { - if (_headerGroup.GroupBorderStyle != value) + if (_headerGroup!.GroupBorderStyle != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.GroupBorderStyle, value); _headerGroup.GroupBorderStyle = value; @@ -79,11 +79,11 @@ public PaletteBorderStyle GroupBorderStyle /// public HeaderStyle HeaderStylePrimary { - get => _headerGroup.HeaderStylePrimary; + get => _headerGroup!.HeaderStylePrimary; - set - { - if (_headerGroup.HeaderStylePrimary != value) + set + { + if (_headerGroup!.HeaderStylePrimary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderStylePrimary, value); _headerGroup.HeaderStylePrimary = value; @@ -96,11 +96,11 @@ public HeaderStyle HeaderStylePrimary /// public HeaderStyle HeaderStyleSecondary { - get => _headerGroup.HeaderStyleSecondary; + get => _headerGroup!.HeaderStyleSecondary; - set + set { - if (_headerGroup.HeaderStyleSecondary != value) + if (_headerGroup!.HeaderStyleSecondary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderStyleSecondary, value); _headerGroup.HeaderStyleSecondary = value; @@ -113,11 +113,11 @@ public HeaderStyle HeaderStyleSecondary /// public VisualOrientation HeaderPositionPrimary { - get => _headerGroup.HeaderPositionPrimary; + get => _headerGroup!.HeaderPositionPrimary; - set + set { - if (_headerGroup.HeaderPositionPrimary != value) + if (_headerGroup!.HeaderPositionPrimary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderPositionPrimary, value); _headerGroup.HeaderPositionPrimary = value; @@ -130,11 +130,11 @@ public VisualOrientation HeaderPositionPrimary /// public VisualOrientation HeaderPositionSecondary { - get => _headerGroup.HeaderPositionSecondary; + get => _headerGroup!.HeaderPositionSecondary; - set + set { - if (_headerGroup.HeaderPositionSecondary != value) + if (_headerGroup!.HeaderPositionSecondary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderPositionSecondary, value); _headerGroup.HeaderPositionSecondary = value; @@ -147,11 +147,11 @@ public VisualOrientation HeaderPositionSecondary /// public PaletteMode PaletteMode { - get => _headerGroup.PaletteMode; + get => _headerGroup!.PaletteMode; - set + set { - if (_headerGroup.PaletteMode != value) + if (_headerGroup!.PaletteMode != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.PaletteMode, value); _headerGroup.PaletteMode = value; @@ -215,7 +215,7 @@ private void OnVisibleClick(object sender, EventArgs e) var header1 = verb == _visible1; // The new visible value should be the opposite of the current value - var newVisible = !(header1 ? _headerGroup.HeaderVisiblePrimary : _headerGroup.HeaderVisibleSecondary); + var newVisible = !(header1 ? _headerGroup!.HeaderVisiblePrimary : _headerGroup!.HeaderVisibleSecondary); // Assign the new text to the correct header text if (header1) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs index b2777b886..8ad242fa2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs @@ -16,7 +16,7 @@ internal class KryptonLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLabel? _label; - private readonly IComponentChangeService _service; + private readonly IComponentChangeService? _service; #endregion #region Identity @@ -31,7 +31,7 @@ public KryptonLabelActionList(KryptonLabelDesigner owner) _label = owner.Component as KryptonLabel; // Cache service used to notify when a property has changed - _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion @@ -41,13 +41,13 @@ public KryptonLabelActionList(KryptonLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _label.LabelStyle; + get => _label!.LabelStyle; set { - if (_label.LabelStyle != value) + if (_label!.LabelStyle != value) { - _service.OnComponentChanged(_label, null, _label.LabelStyle, value); + _service?.OnComponentChanged(_label, null, _label.LabelStyle, value); _label.LabelStyle = value; } } @@ -58,13 +58,13 @@ public LabelStyle LabelStyle /// public VisualOrientation Orientation { - get => _label.Orientation; + get => _label!.Orientation; set { - if (_label.Orientation != value) + if (_label!.Orientation != value) { - _service.OnComponentChanged(_label, null, _label.Orientation, value); + _service?.OnComponentChanged(_label, null, _label.Orientation, value); _label.Orientation = value; } } @@ -75,13 +75,13 @@ public VisualOrientation Orientation /// public string Text { - get => _label.Values.Text; + get => _label!.Values.Text; set { - if (_label.Values.Text != value) + if (_label!.Values.Text != value) { - _service.OnComponentChanged(_label, null, _label.Values.Text, value); + _service?.OnComponentChanged(_label, null, _label.Values.Text, value); _label.Values.Text = value; } } @@ -92,13 +92,13 @@ public string Text /// public string ExtraText { - get => _label.Values.ExtraText; + get => _label!.Values.ExtraText; set { - if (_label.Values.ExtraText != value) + if (_label!.Values.ExtraText != value) { - _service.OnComponentChanged(_label, null, _label.Values.ExtraText, value); + _service?.OnComponentChanged(_label, null, _label.Values.ExtraText, value); _label.Values.ExtraText = value; } } @@ -109,13 +109,13 @@ public string ExtraText /// public Image? Image { - get => _label.Values.Image; + get => _label!.Values.Image; set { - if (_label.Values.Image != value) + if (_label!.Values.Image != value) { - _service.OnComponentChanged(_label, null, _label.Values.Image, value); + _service?.OnComponentChanged(_label, null, _label.Values.Image, value); _label.Values.Image = value; } } @@ -126,13 +126,13 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _label.PaletteMode; + get => _label!.PaletteMode; set { - if (_label.PaletteMode != value) + if (_label!.PaletteMode != value) { - _service.OnComponentChanged(_label, null, _label.PaletteMode, value); + _service?.OnComponentChanged(_label, null, _label.PaletteMode, value); _label.PaletteMode = value; } } @@ -140,15 +140,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font StateCommonShortTextFont + public Font? StateCommonShortTextFont { - get => _label.StateCommon.ShortText.Font; + get => _label!.StateCommon.ShortText.Font; set { - if (_label.StateCommon.ShortText.Font != value) + if (_label!.StateCommon.ShortText.Font != value) { - _service.OnComponentChanged(_label, null, _label.StateCommon.ShortText.Font, value); + _service?.OnComponentChanged(_label, null, _label.StateCommon.ShortText.Font, value); _label.StateCommon.ShortText.Font = value; } @@ -157,15 +157,15 @@ public Font StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font StateCommonLongTextFont + public Font? StateCommonLongTextFont { - get => _label.StateCommon.LongText.Font; + get => _label!.StateCommon.LongText.Font; set { - if (_label.StateCommon.LongText.Font != value) + if (_label!.StateCommon.LongText.Font != value) { - _service.OnComponentChanged(_label, null, _label.StateCommon.LongText.Font, value); + _service?.OnComponentChanged(_label, null, _label.StateCommon.LongText.Font, value); _label.StateCommon.LongText.Font = value; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs index 4bcb582a0..34053a1b8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs @@ -16,7 +16,7 @@ internal class KryptonLinkLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLinkLabel? _linkLabel; - private readonly IComponentChangeService _service; + private readonly IComponentChangeService? _service; private string _action; #endregion @@ -39,7 +39,7 @@ public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) } // Cache service used to notify when a property has changed - _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion @@ -49,13 +49,13 @@ public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _linkLabel.LabelStyle; + get => _linkLabel!.LabelStyle; set { - if (_linkLabel.LabelStyle != value) + if (_linkLabel!.LabelStyle != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.LabelStyle, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LabelStyle, value); _linkLabel.LabelStyle = value; } } @@ -66,13 +66,13 @@ public LabelStyle LabelStyle /// public VisualOrientation Orientation { - get => _linkLabel.Orientation; + get => _linkLabel!.Orientation; set { - if (_linkLabel.Orientation != value) + if (_linkLabel!.Orientation != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.Orientation, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Orientation, value); _linkLabel.Orientation = value; } } @@ -83,13 +83,13 @@ public VisualOrientation Orientation /// public KryptonLinkBehavior LinkBehavior { - get => _linkLabel.LinkBehavior; + get => _linkLabel!.LinkBehavior; set { - if (_linkLabel.LinkBehavior != value) + if (_linkLabel!.LinkBehavior != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.LinkBehavior, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LinkBehavior, value); _linkLabel.LinkBehavior = value; } } @@ -100,13 +100,13 @@ public KryptonLinkBehavior LinkBehavior /// public bool LinkVisited { - get => _linkLabel.LinkVisited; + get => _linkLabel!.LinkVisited; set { - if (_linkLabel.LinkVisited != value) + if (_linkLabel!.LinkVisited != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.LinkVisited, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LinkVisited, value); _linkLabel.LinkVisited = value; } } @@ -117,13 +117,13 @@ public bool LinkVisited /// public string Text { - get => _linkLabel.Values.Text; + get => _linkLabel!.Values.Text; set { - if (_linkLabel.Values.Text != value) + if (_linkLabel!.Values.Text != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Text, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Text, value); _linkLabel.Values.Text = value; } } @@ -134,13 +134,13 @@ public string Text /// public string ExtraText { - get => _linkLabel.Values.ExtraText; + get => _linkLabel!.Values.ExtraText; set { - if (_linkLabel.Values.ExtraText != value) + if (_linkLabel!.Values.ExtraText != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.ExtraText, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.ExtraText, value); _linkLabel.Values.ExtraText = value; } } @@ -151,13 +151,13 @@ public string ExtraText /// public Image? Image { - get => _linkLabel.Values.Image; + get => _linkLabel!.Values.Image; set { - if (_linkLabel.Values.Image != value) + if (_linkLabel!.Values.Image != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Image, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Image, value); _linkLabel.Values.Image = value; } } @@ -168,13 +168,13 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _linkLabel.PaletteMode; + get => _linkLabel!.PaletteMode; set { - if (_linkLabel.PaletteMode != value) + if (_linkLabel!.PaletteMode != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.PaletteMode, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.PaletteMode, value); _linkLabel.PaletteMode = value; } } @@ -182,15 +182,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font StateCommonShortTextFont + public Font? StateCommonShortTextFont { - get => _linkLabel.StateCommon.ShortText.Font; + get => _linkLabel!.StateCommon.ShortText.Font; set { - if (_linkLabel.StateCommon.ShortText.Font != value) + if (_linkLabel!.StateCommon.ShortText.Font != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.ShortText.Font, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.ShortText.Font, value); _linkLabel.StateCommon.ShortText.Font = value; } @@ -199,15 +199,15 @@ public Font StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font StateCommonLongTextFont + public Font? StateCommonLongTextFont { - get => _linkLabel.StateCommon.LongText.Font; + get => _linkLabel!.StateCommon.LongText.Font; set { - if (_linkLabel.StateCommon.LongText.Font != value) + if (_linkLabel!.StateCommon.LongText.Font != value) { - _service.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.LongText.Font, value); + _service?.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.LongText.Font, value); _linkLabel.StateCommon.LongText.Font = value; } @@ -257,7 +257,7 @@ private void OnLinkVisitedClick(object sender, EventArgs e) if (sender is DesignerVerb) { // Invert the visited setting - _linkLabel.LinkVisited = !_linkLabel.LinkVisited; + _linkLabel!.LinkVisited = !_linkLabel.LinkVisited; // Decide on the next action to take given the new setting _action = _linkLabel.LinkVisited ? "Link has not been visited" : "Link has been visited"; diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs index dc6b46dbf..5be74d79e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs @@ -13,7 +13,7 @@ internal class KryptonLinkWrapLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLinkWrapLabel? _linkWrapLabel; - private readonly IComponentChangeService _service; + private readonly IComponentChangeService? _service; #endregion #region Identity @@ -28,7 +28,7 @@ public KryptonLinkWrapLabelActionList(KryptonLinkWrapLabelDesigner owner) _linkWrapLabel = owner.Component as KryptonLinkWrapLabel; // Cache service used to notify when a property has changed - _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion @@ -38,13 +38,13 @@ public KryptonLinkWrapLabelActionList(KryptonLinkWrapLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _linkWrapLabel.LabelStyle; + get => _linkWrapLabel!.LabelStyle; set { - if (_linkWrapLabel.LabelStyle != value) + if (_linkWrapLabel!.LabelStyle != value) { - _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.LabelStyle, value); + _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.LabelStyle, value); _linkWrapLabel.LabelStyle = value; } } @@ -55,13 +55,13 @@ public LabelStyle LabelStyle /// public PaletteMode PaletteMode { - get => _linkWrapLabel.PaletteMode; + get => _linkWrapLabel!.PaletteMode; set { - if (_linkWrapLabel.PaletteMode != value) + if (_linkWrapLabel!.PaletteMode != value) { - _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.PaletteMode, value); + _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.PaletteMode, value); _linkWrapLabel.PaletteMode = value; } } @@ -69,15 +69,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font Font + public Font? Font { - get => _linkWrapLabel.StateCommon.Font; + get => _linkWrapLabel!.StateCommon.Font; set { - if (_linkWrapLabel.StateCommon.Font != value) + if (_linkWrapLabel!.StateCommon.Font != value) { - _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.StateCommon.Font, value); + _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.StateCommon.Font, value); _linkWrapLabel.StateCommon.Font = value; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs index 112f14645..608b0dd9f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonBreadCrumbDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_breadCrumb != null) { // Hook into bread crumb events - _breadCrumb.GetViewManager().MouseUpProcessed += OnBreadCrumbMouseUp; - _breadCrumb.GetViewManager().DoubleClickProcessed += OnBreadCrumbDoubleClick; + _breadCrumb.GetViewManager()!.MouseUpProcessed += OnBreadCrumbMouseUp; + _breadCrumb.GetViewManager()!.DoubleClickProcessed += OnBreadCrumbDoubleClick; } // Get access to the design services @@ -106,8 +106,8 @@ protected override void Dispose(bool disposing) // Unhook from events if (_breadCrumb != null) { - _breadCrumb.GetViewManager().MouseUpProcessed -= OnBreadCrumbMouseUp; - _breadCrumb.GetViewManager().DoubleClickProcessed -= OnBreadCrumbDoubleClick; + _breadCrumb.GetViewManager()!.MouseUpProcessed -= OnBreadCrumbMouseUp; + _breadCrumb.GetViewManager()!.DoubleClickProcessed -= OnBreadCrumbDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -188,10 +188,10 @@ private void OnBreadCrumbDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -201,7 +201,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_breadCrumb != null) && (e.Component == _breadCrumb)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _breadCrumb.ButtonSpecs.Count - 1; i >= 0; i--) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs index 6e05251c2..ebf1d031f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonBreadCrumbItemDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs index a86cf91f8..0cc8ac1a9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonComboBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewComboBoxColumn _comboBox; - private IComponentChangeService _changeService; + private KryptonDataGridViewComboBoxColumn? _comboBox; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonComboBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _comboBox = component as KryptonDataGridViewComboBoxColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs index 6724c9f1a..8893d9c7f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonComboBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_comboBox != null) { // Hook into combobox events - _comboBox.GetViewManager().MouseUpProcessed += OnComboBoxMouseUp; - _comboBox.GetViewManager().DoubleClickProcessed += OnComboBoxDoubleClick; + _comboBox.GetViewManager()!.MouseUpProcessed += OnComboBoxMouseUp; + _comboBox.GetViewManager()!.DoubleClickProcessed += OnComboBoxDoubleClick; } // Get access to the design services @@ -168,10 +168,10 @@ private void OnComboBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -181,7 +181,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_comboBox != null) && (e.Component == _comboBox)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _comboBox.ButtonSpecs.Count - 1; i >= 0; i--) @@ -196,7 +196,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _comboBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_comboBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs index 656c1e41d..c2fb020fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs index 32da0b30f..5dbfd033f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuItemDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs index 8c5d8ec16..1ea3613bd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuItemsDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs index 667cee8bb..826640a27 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonDateTimePickerColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewDateTimePickerColumn _dateTimePicker; - private IComponentChangeService _changeService; + private KryptonDataGridViewDateTimePickerColumn? _dateTimePicker; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonDateTimePickerColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _dateTimePicker = component as KryptonDataGridViewDateTimePickerColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion @@ -47,7 +47,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_dateTimePicker != null) && (e.Component == _dateTimePicker)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; } } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs index 5d9e13747..de286794e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonDateTimePickerDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_dateTimePicker != null) { // Hook into date time picker events - _dateTimePicker.GetViewManager().MouseUpProcessed += OnDateTimePickerMouseUp; - _dateTimePicker.GetViewManager().DoubleClickProcessed += OnDateTimePickerDoubleClick; + _dateTimePicker.GetViewManager()!.MouseUpProcessed += OnDateTimePickerMouseUp; + _dateTimePicker.GetViewManager()!.DoubleClickProcessed += OnDateTimePickerDoubleClick; } // Acquire service interfaces @@ -105,8 +105,8 @@ protected override void Dispose(bool disposing) if (_dateTimePicker != null) { // Unhook from events - _dateTimePicker.GetViewManager().MouseUpProcessed -= OnDateTimePickerMouseUp; - _dateTimePicker.GetViewManager().DoubleClickProcessed -= OnDateTimePickerDoubleClick; + _dateTimePicker.GetViewManager()!.MouseUpProcessed -= OnDateTimePickerMouseUp; + _dateTimePicker.GetViewManager()!.DoubleClickProcessed -= OnDateTimePickerDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -182,15 +182,15 @@ private void OnDateTimePickerMouseUp(object sender, MouseEventArgs e) private void OnDateTimePickerDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _dateTimePicker.DesignerComponentFromPoint(pt); + Component? component = _dateTimePicker?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -200,10 +200,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _dateTimePicker) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances - for (var i = _dateTimePicker.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _dateTimePicker!.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _dateTimePicker.ButtonSpecs[i]; @@ -215,7 +215,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _dateTimePicker.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_dateTimePicker, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs index e45c208fb..16d98d8b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonDomainUpDownColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewDomainUpDownColumn _domainUpDown; - private IComponentChangeService _changeService; + private KryptonDataGridViewDomainUpDownColumn? _domainUpDown; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonDomainUpDownColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _domainUpDown = component as KryptonDataGridViewDomainUpDownColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs index e6f447e86..5c7726fbd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonDomainUpDownDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -44,9 +44,9 @@ public override void Initialize([DisallowNull] IComponent component) if (_domainUpDown != null) { - // Hook into numeric updown events - _domainUpDown.GetViewManager().MouseUpProcessed += OnDomainUpDownMouseUp; - _domainUpDown.GetViewManager().DoubleClickProcessed += OnDomainUpDownDoubleClick; + // Hook into numeric up-down events + _domainUpDown.GetViewManager()!.MouseUpProcessed += OnDomainUpDownMouseUp; + _domainUpDown.GetViewManager()!.DoubleClickProcessed += OnDomainUpDownDoubleClick; } // Get access to the design services @@ -171,10 +171,10 @@ private void OnDomainUpDownDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -184,7 +184,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_domainUpDown != null) && (e.Component == _domainUpDown)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _domainUpDown.ButtonSpecs.Count - 1; i >= 0; i--) @@ -199,7 +199,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _domainUpDown.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_domainUpDown, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs index cf09cb58c..7c3cb4a47 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonGroupBoxDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -65,8 +65,8 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (_groupBox != null) && (internalControlIndex == 0) - ? (ControlDesigner)_designerHost.GetDesigner(_groupBox.Panel) + (_groupBox != null) && (internalControlIndex == 0) + ? (ControlDesigner)_designerHost.GetDesigner(_groupBox.Panel!)! : null; /// diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs index 8dc2de679..b62abdf07 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs @@ -63,8 +63,8 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (internalControlIndex == 0) && (_group != null) - ? (ControlDesigner)_designerHost.GetDesigner(_group.Panel) + (internalControlIndex == 0) && (_group != null) + ? (ControlDesigner)_designerHost.GetDesigner(_group.Panel)! : null; /// diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs index c2e6a05c7..1944e93f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs @@ -25,7 +25,7 @@ internal class KryptonGroupPanelDesigner : KryptonPanelDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Perform common base class initializing base.Initialize(component); @@ -41,7 +41,7 @@ public override void Initialize([DisallowNull] IComponent component) // If inside a Krypton group container then always lock the component from user size/location change if (_panel != null) { - PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; + PropertyDescriptor? descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; if ((descriptor != null) && (_panel.Parent is KryptonGroup or KryptonHeaderGroup)) { descriptor.SetValue(component, true); @@ -146,10 +146,10 @@ protected override void PreFilterProperties(IDictionary properties) foreach (DictionaryEntry entry in properties) { // Get the property descriptor for the entry - var descriptor = (PropertyDescriptor)entry.Value; + var descriptor = entry.Value as PropertyDescriptor; // Is this the 'Name' we are searching for? - if (descriptor.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) + if (descriptor!.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) { // Hide the 'Name' property so the user cannot modify it var attributeArray = new Attribute[2] { BrowsableAttribute.No, DesignerSerializationVisibilityAttribute.Hidden }; @@ -164,7 +164,7 @@ protected override void PreFilterProperties(IDictionary properties) /// /// Gets an attribute that indicates the type of inheritance of the associated component. /// - protected override InheritanceAttribute InheritanceAttribute + protected override InheritanceAttribute? InheritanceAttribute { get { @@ -172,7 +172,7 @@ protected override InheritanceAttribute InheritanceAttribute if (_panel?.Parent != null) { // Then get the attribute associated with the parent of the panel - return (InheritanceAttribute)TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)]; + return TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)] as InheritanceAttribute; } else { diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs index cc80b383b..43d2326ed 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs @@ -18,7 +18,7 @@ internal class KryptonHeaderDesigner : ControlDesigner private bool _lastHitTest; private KryptonHeader? _header; private IDesignerHost _designerHost; - private IComponentChangeService _changeService; + private IComponentChangeService? _changeService; private ISelectionService _selectionService; #endregion @@ -30,7 +30,7 @@ internal class KryptonHeaderDesigner : ControlDesigner protected override void Dispose(bool disposing) { // Unhook from events - ViewManager vm = _header?.GetViewManager(); + ViewManager? vm = _header?.GetViewManager(); if (vm != null) { vm.MouseUpProcessed -= OnHeaderMouseUp; @@ -52,7 +52,7 @@ protected override void Dispose(bool disposing) /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -70,8 +70,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_header != null) { // Hook into header event - _header.GetViewManager().MouseUpProcessed += OnHeaderMouseUp; - _header.GetViewManager().DoubleClickProcessed += OnHeaderDoubleClick; + _header.GetViewManager()!.MouseUpProcessed += OnHeaderMouseUp; + _header.GetViewManager()!.DoubleClickProcessed += OnHeaderDoubleClick; } // Get access to the design services @@ -181,10 +181,10 @@ private void OnHeaderDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -194,7 +194,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_header != null) && (e.Component == _header)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _header.ButtonSpecs.Count - 1; i >= 0; i--) @@ -203,16 +203,16 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) ButtonSpec spec = _header.ButtonSpecs[i]; // Must wrap button spec removal in change notifications - _changeService.OnComponentChanging(_header, null); + _changeService?.OnComponentChanging(_header, null); // Perform actual removal of button spec from header _header.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications - _changeService.OnComponentChanged(_header, null, null, null); + _changeService?.OnComponentChanged(_header, null, null, null); } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs index 088d6b72e..392e2fbcf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs @@ -32,8 +32,8 @@ protected override void Dispose(bool disposing) if (_headerGroup != null) { // Unhook from events - _headerGroup.GetViewManager().MouseUpProcessed -= OnHeaderGroupMouseUp; - _headerGroup.GetViewManager().DoubleClickProcessed -= OnHeaderGroupDoubleClick; + _headerGroup.GetViewManager()!.MouseUpProcessed -= OnHeaderGroupMouseUp; + _headerGroup.GetViewManager()!.DoubleClickProcessed -= OnHeaderGroupDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -48,7 +48,7 @@ protected override void Dispose(bool disposing) /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -61,8 +61,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_headerGroup != null) { // Hook into header event - _headerGroup.GetViewManager().MouseUpProcessed += OnHeaderGroupMouseUp; - _headerGroup.GetViewManager().DoubleClickProcessed += OnHeaderGroupDoubleClick; + _headerGroup.GetViewManager()!.MouseUpProcessed += OnHeaderGroupMouseUp; + _headerGroup.GetViewManager()!.DoubleClickProcessed += OnHeaderGroupDoubleClick; } // The resizing handles around the control need to change depending on the @@ -129,7 +129,7 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (_headerGroup != null) && (internalControlIndex == 0) ? (ControlDesigner)_designerHost.GetDesigner(_headerGroup.Panel) : null; + (_headerGroup != null) && (internalControlIndex == 0) ? _designerHost.GetDesigner(_headerGroup.Panel!) as ControlDesigner : null; /// /// Returns the number of internal control designers in the ControlDesigner. @@ -224,15 +224,15 @@ private void OnHeaderGroupMouseUp(object sender, MouseEventArgs e) private void OnHeaderGroupDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _headerGroup.DesignerComponentFromPoint(pt); + Component? component = _headerGroup?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -242,10 +242,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _headerGroup) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances - for (var i = _headerGroup.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _headerGroup!.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _headerGroup.ButtonSpecs[i]; @@ -257,7 +257,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _headerGroup.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_headerGroup, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs index a0eafc492..a0c463af4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs @@ -19,7 +19,7 @@ internal class KryptonListBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs index 6e05ecccf..a531d0f60 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonMaskedTextBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewMaskedTextBoxColumn _maskedTextBox; - private IComponentChangeService _changeService; + private KryptonDataGridViewMaskedTextBoxColumn? _maskedTextBox; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonMaskedTextBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _maskedTextBox = component as KryptonDataGridViewMaskedTextBoxColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs index c9a254a01..541e3afae 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonMaskedTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_maskedTextBox != null) { // Hook into masked textbox events - _maskedTextBox.GetViewManager().MouseUpProcessed += OnMaskedTextBoxMouseUp; - _maskedTextBox.GetViewManager().DoubleClickProcessed += OnMaskedTextBoxDoubleClick; + _maskedTextBox.GetViewManager()!.MouseUpProcessed += OnMaskedTextBoxMouseUp; + _maskedTextBox.GetViewManager()!.DoubleClickProcessed += OnMaskedTextBoxDoubleClick; } // Get access to the design services @@ -172,15 +172,15 @@ private void OnMaskedTextBoxMouseUp(object sender, MouseEventArgs e) private void OnMaskedTextBoxDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _maskedTextBox.DesignerComponentFromPoint(pt); + Component? component = _maskedTextBox?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -190,10 +190,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _maskedTextBox) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances - for (var i = _maskedTextBox.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _maskedTextBox!.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _maskedTextBox.ButtonSpecs[i]; @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _maskedTextBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_maskedTextBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs index ec9d66160..4cf8aa8db 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonMonthCalendarDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_monthCalendar != null) { // Hook into header event - _monthCalendar.GetViewManager().MouseUpProcessed += OnCalendarMouseUp; - _monthCalendar.GetViewManager().DoubleClickProcessed += OnCalendarDoubleClick; + _monthCalendar.GetViewManager()!.MouseUpProcessed += OnCalendarMouseUp; + _monthCalendar.GetViewManager()!.DoubleClickProcessed += OnCalendarDoubleClick; } // Acquire service interfaces @@ -128,8 +128,8 @@ protected override void Dispose(bool disposing) if (_monthCalendar != null) { // Unhook from events - _monthCalendar.GetViewManager().MouseUpProcessed -= OnCalendarMouseUp; - _monthCalendar.GetViewManager().DoubleClickProcessed -= OnCalendarDoubleClick; + _monthCalendar.GetViewManager()!.MouseUpProcessed -= OnCalendarMouseUp; + _monthCalendar.GetViewManager()!.DoubleClickProcessed -= OnCalendarDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -205,15 +205,15 @@ private void OnCalendarMouseUp(object sender, MouseEventArgs e) private void OnCalendarDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component component = _monthCalendar.DesignerComponentFromPoint(pt); + Component? component = _monthCalendar?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -223,10 +223,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _monthCalendar) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances - for (var i = _monthCalendar.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _monthCalendar!.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _monthCalendar.ButtonSpecs[i]; @@ -238,7 +238,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _monthCalendar.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_monthCalendar, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs index 9c2fbce77..73d1bc496 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonNumericUpDownColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewNumericUpDownColumn _numericUpDown; - private IComponentChangeService _changeService; + private KryptonDataGridViewNumericUpDownColumn? _numericUpDown; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonNumericUpDownColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _numericUpDown = component as KryptonDataGridViewNumericUpDownColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs index af48140a8..e796e92fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonNumericUpDownDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_numericUpDown != null) { // Hook into numeric updown events - _numericUpDown.GetViewManager().MouseUpProcessed += OnNumericUpDownMouseUp; - _numericUpDown.GetViewManager().DoubleClickProcessed += OnNumericUpDownDoubleClick; + _numericUpDown.GetViewManager()!.MouseUpProcessed += OnNumericUpDownMouseUp; + _numericUpDown.GetViewManager()!.DoubleClickProcessed += OnNumericUpDownDoubleClick; } // Get access to the design services @@ -166,15 +166,15 @@ private void OnNumericUpDownMouseUp(object sender, MouseEventArgs e) private void OnNumericUpDownDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component component = _numericUpDown?.DesignerComponentFromPoint(pt); + Component? component = _numericUpDown?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -184,7 +184,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_numericUpDown != null) && (e.Component == _numericUpDown)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _numericUpDown.ButtonSpecs.Count - 1; i >= 0; i--) @@ -199,7 +199,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _numericUpDown.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_numericUpDown, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs index 687ced2fc..a92aaa5ad 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonRichTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_richTextBox != null) { // Hook into rich textbox events - _richTextBox.GetViewManager().MouseUpProcessed += OnTextBoxMouseUp; - _richTextBox.GetViewManager().DoubleClickProcessed += OnTextBoxDoubleClick; + _richTextBox.GetViewManager()!.MouseUpProcessed += OnTextBoxMouseUp; + _richTextBox.GetViewManager()!.DoubleClickProcessed += OnTextBoxDoubleClick; } // Get access to the design services @@ -177,10 +177,10 @@ private void OnTextBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -190,10 +190,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _richTextBox) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances - for (var i = _richTextBox.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _richTextBox!.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _richTextBox.ButtonSpecs[i]; @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _richTextBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_richTextBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs index 609fb2c03..50d751f4d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonSplitContainerDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs index 1b550a76a..9c8010253 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs @@ -25,7 +25,7 @@ internal class KryptonSplitterPanelDesigner : KryptonPanelDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Perform common base class initializating base.Initialize(component); @@ -48,8 +48,8 @@ public override void Initialize([DisallowNull] IComponent component) // If inside a Krypton split container then always lock the component from user size/location change if (_panel != null) { - PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; - if ((descriptor != null) && (_panel.Parent is KryptonSplitContainer)) + PropertyDescriptor? descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; + if (descriptor != null && _panel.Parent is KryptonSplitContainer) { descriptor.SetValue(component, true); } @@ -152,10 +152,10 @@ protected override void PreFilterProperties(IDictionary properties) foreach (DictionaryEntry entry in properties) { // Get the property descriptor for the entry - var descriptor = (PropertyDescriptor)entry.Value; + var descriptor = entry.Value as PropertyDescriptor; // Is this the 'Name' we are searching for? - if (descriptor.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) + if (descriptor!.Name.Equals(@"Name") && descriptor.DesignTimeOnly) { // Hide the 'Name' property so the user cannot modify it var attributeArray = new Attribute[2] { BrowsableAttribute.No, DesignerSerializationVisibilityAttribute.Hidden }; @@ -170,7 +170,7 @@ protected override void PreFilterProperties(IDictionary properties) /// /// Gets an attribute that indicates the type of inheritance of the associated component. /// - protected override InheritanceAttribute InheritanceAttribute + protected override InheritanceAttribute? InheritanceAttribute { get { @@ -178,7 +178,7 @@ protected override InheritanceAttribute InheritanceAttribute if (_panel?.Parent != null) { // Then get the attribute associated with the parent of the panel - return (InheritanceAttribute)TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)]; + return TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)] as InheritanceAttribute; } else { @@ -225,8 +225,8 @@ private void DrawWaterMark(Graphics g) SizeF sizeF = g.MeasureString(drawText, f); // Find the drawing position to centre the text - var middleX = (clientRect.Width / 2) - (((int)sizeF.Width) / 2); - var middleY = (clientRect.Height / 2) - (((int)sizeF.Height) / 2); + var middleX = clientRect.Width / 2 - (int)sizeF.Width / 2; + var middleY = clientRect.Height / 2 - (int)sizeF.Height / 2; // Draw the name of the panel in the centre TextRenderer.DrawText(g, drawText, f, diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs index d1b8edaca..7279f870b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonTextBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewTextBoxColumn _textBox; - private IComponentChangeService _changeService; + private KryptonDataGridViewTextBoxColumn? _textBox; + private IComponentChangeService? _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonTextBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize([DisallowNull] IComponent component) _textBox = component as KryptonDataGridViewTextBoxColumn; // Get access to the design services - _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs index 5160de779..42552ca61 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize([DisallowNull] IComponent component) if (_textBox != null) { // Hook into textbox events - _textBox.GetViewManager().MouseUpProcessed += OnTextBoxMouseUp; - _textBox.GetViewManager().DoubleClickProcessed += OnTextBoxDoubleClick; + _textBox.GetViewManager()!.MouseUpProcessed += OnTextBoxMouseUp; + _textBox.GetViewManager()!.DoubleClickProcessed += OnTextBoxDoubleClick; } // Get access to the design services @@ -177,10 +177,10 @@ private void OnTextBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner designer = _designerHost.GetDesigner(component); + IDesigner? designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer.DoDefaultAction(); + designer?.DoDefaultAction(); } } @@ -190,7 +190,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_textBox != null) && (e.Component == _textBox)) { // Need access to host in order to delete a component - var host = (IDesignerHost)GetService(typeof(IDesignerHost)); + var host = GetService(typeof(IDesignerHost)) as IDesignerHost; // We need to remove all the button spec instances for (var i = _textBox.ButtonSpecs.Count - 1; i >= 0; i--) @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _textBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host.DestroyComponent(spec); + host?.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_textBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs index 379e19ffc..530925cfe 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs @@ -15,7 +15,7 @@ namespace Krypton.Toolkit internal class KryptonTrackBarDesigner : ControlDesigner { #region Instance Fields - private KryptonTrackBar _trackBar; + private KryptonTrackBar? _trackBar; #endregion #region Public Overrides @@ -23,7 +23,7 @@ internal class KryptonTrackBarDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // ReSharper disable RedundantBaseQualifier // Let base class do standard stuff @@ -45,7 +45,7 @@ public override SelectionRules SelectionRules { get { - if (!_trackBar.AutoSize) + if (!_trackBar!.AutoSize) { return SelectionRules.AllSizeable | SelectionRules.Moveable; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs index 885064f76..e481b8fb2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs @@ -19,7 +19,7 @@ internal class KryptonTreeViewDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs index b0a298e00..a71b638f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs @@ -20,7 +20,7 @@ internal class KryptonWebBrowserDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs index e997c45d6..a7ffe7902 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs @@ -25,7 +25,7 @@ public override SelectionRules SelectionRules get { // gets the property descriptor for the property "Orientation" - PropertyDescriptor propDescriptor = + PropertyDescriptor? propDescriptor = TypeDescriptor.GetProperties(Component)[nameof(Orientation)]; // if not null - we can read the current orientation of the scroll bar @@ -33,7 +33,7 @@ public override SelectionRules SelectionRules { // get the current orientation var orientation = - (ScrollBarOrientation)propDescriptor.GetValue(Component); + (ScrollBarOrientation)propDescriptor.GetValue(Component)!; // if vertical orientation return orientation == ScrollBarOrientation.Vertical diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs index 677527fd8..8b5a4c731 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs @@ -32,7 +32,7 @@ protected class DictItemBase : Dictionary /// Item to act as proxy for. - public CrumbProxy(KryptonBreadCrumbItem item) => _item = item; + public CrumbProxy(KryptonBreadCrumbItem? item) => _item = item; #endregion @@ -51,8 +51,8 @@ protected class CrumbProxy [Category(@"Appearance")] public string ShortText { - get => _item.ShortText; - set => _item.ShortText = value; + get => _item!.ShortText; + set => _item!.ShortText = value; } #endregion @@ -63,8 +63,8 @@ public string ShortText [Category(@"Appearance")] public string LongText { - get => _item.LongText; - set => _item.LongText = value; + get => _item!.LongText; + set => _item!.LongText = value; } #endregion @@ -76,8 +76,8 @@ public string LongText [DefaultValue(null)] public Image? Image { - get => _item.Image; - set => _item.Image = value; + get => _item!.Image; + set => _item!.Image = value; } #endregion @@ -89,8 +89,8 @@ public Image? Image [DefaultValue(typeof(Color), "Empty")] public Color ImageTransparentColor { - get => _item.ImageTransparentColor; - set => _item.ImageTransparentColor = value; + get => _item!.ImageTransparentColor; + set => _item!.ImageTransparentColor = value; } #endregion @@ -103,8 +103,8 @@ public Color ImageTransparentColor [DefaultValue(null)] public object? Tag { - get => _item.Tag; - set => _item.Tag = value; + get => _item!.Tag; + set => _item!.Tag = value; } #endregion } @@ -119,15 +119,18 @@ protected class MenuTreeNode : TreeNode /// Initialize a new instance of the MenuTreeNode class. /// /// Menu item to represent. - public MenuTreeNode(KryptonBreadCrumbItem item) + public MenuTreeNode(KryptonBreadCrumbItem? item) { Item = item; PropertyObject = item; - Text = Item.ToString(); + Text = Item?.ToString(); // Hook into property changes - Item.PropertyChanged += OnPropertyChanged; + if (Item != null) + { + Item.PropertyChanged += OnPropertyChanged; + } } #endregion @@ -135,26 +138,26 @@ public MenuTreeNode(KryptonBreadCrumbItem item) /// /// Gets access to the associated item. /// - public KryptonBreadCrumbItem Item { get; } + public KryptonBreadCrumbItem? Item { get; } /// /// Gets access to object wrapper for use in the property grid. /// - public object PropertyObject { get; } + public object? PropertyObject { get; } #endregion #region Implementation private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) => // Update with correct string for new state - Text = Item.ToString(); + Text = Item?.ToString(); #endregion } /// /// Site that allows the property grid to discover Visual Studio services. /// - protected class PropertyGridSite : ISite, IServiceProvider + protected class PropertyGridSite : ISite { #region Instance Fields @@ -436,7 +439,7 @@ protected override void OnEditValueChanged() // Add all the top level clones treeView1.Nodes.Clear(); - foreach (KryptonBreadCrumbItem item in Items) + foreach (KryptonBreadCrumbItem? item in Items) { AddMenuTreeNode(item, null); } @@ -460,7 +463,7 @@ protected override void OnEditValueChanged() private void buttonOK_Click(object sender, EventArgs e) { // Create an array with all the root items - var rootItems = new object[treeView1.Nodes.Count]; + var rootItems = new object?[treeView1.Nodes.Count]; for (var i = 0; i < rootItems.Length; i++) { rootItems[i] = ((MenuTreeNode)treeView1.Nodes[i]).Item; @@ -595,7 +598,7 @@ private void buttonMoveUp_Click(object sender, EventArgs e) // Remove cell from parent collection var parentNode = (MenuTreeNode)node.Parent; TreeNodeCollection parentCollection = node.Parent == null ? treeView1.Nodes : node.Parent.Nodes; - parentNode?.Item.Items.Remove(node.Item); + parentNode?.Item?.Items.Remove(node.Item!); parentCollection.Remove(node); if (contained) @@ -618,13 +621,13 @@ private void buttonMoveUp_Click(object sender, EventArgs e) } } - previousParent?.Item.Items.Insert(pageIndex, node.Item); + previousParent?.Item?.Items.Insert(pageIndex, node.Item!); parentCollection.Insert(pageIndex, node); } else { parentNode = previousNode; - parentNode.Item.Items.Insert(parentNode.Nodes.Count, node.Item); + parentNode.Item?.Items.Insert(parentNode.Nodes.Count, node.Item!); parentNode.Nodes.Insert(parentNode.Nodes.Count, node); } } @@ -652,7 +655,7 @@ private void buttonMoveDown_Click(object sender, EventArgs e) // Remove cell from parent collection var parentNode = node.Parent as MenuTreeNode; TreeNodeCollection parentCollection = node.Parent == null ? treeView1.Nodes : node.Parent.Nodes; - parentNode?.Item.Items.Remove(node.Item); + parentNode?.Item?.Items.Remove(node.Item!); parentCollection.Remove(node); if (contained) @@ -661,13 +664,13 @@ private void buttonMoveDown_Click(object sender, EventArgs e) var previousParent = (MenuTreeNode)nextNode.Parent; parentCollection = nextNode.Parent == null ? treeView1.Nodes : nextNode.Parent.Nodes; var pageIndex = parentCollection.IndexOf(nextNode); - previousParent?.Item.Items.Insert(pageIndex + 1, node.Item); + previousParent?.Item?.Items.Insert(pageIndex + 1, node.Item!); parentCollection.Insert(pageIndex + 1, node); } else { parentNode = nextNode; - parentNode.Item.Items.Insert(0, node.Item); + parentNode.Item?.Items.Insert(0, node.Item!); parentNode.Nodes.Insert(0, node); } } @@ -683,7 +686,7 @@ private void buttonMoveDown_Click(object sender, EventArgs e) private void buttonAddSibling_Click(object sender, EventArgs e) { var item = CreateInstance(typeof(KryptonBreadCrumbItem)) as KryptonBreadCrumbItem; - TreeNode newNode = new MenuTreeNode(item); + TreeNode? newNode = new MenuTreeNode(item); TreeNode selectedNode = treeView1.SelectedNode; // If there is no selection then append to root @@ -702,7 +705,7 @@ private void buttonAddSibling_Click(object sender, EventArgs e) else { var parentMenu = (MenuTreeNode)parentNode; - parentMenu.Item.Items.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, item); + parentMenu.Item?.Items.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, item!); parentNode.Nodes.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, newNode); } } @@ -721,7 +724,7 @@ private void buttonAddSibling_Click(object sender, EventArgs e) private void buttonAddChild_Click(object sender, EventArgs e) { var item = (KryptonBreadCrumbItem)CreateInstance(typeof(KryptonBreadCrumbItem)); - TreeNode newNode = new MenuTreeNode(item); + TreeNode? newNode = new MenuTreeNode(item); TreeNode selectedNode = treeView1.SelectedNode; // If there is no selection then append to root @@ -732,7 +735,7 @@ private void buttonAddChild_Click(object sender, EventArgs e) else { var selectedMenu = (MenuTreeNode)selectedNode; - selectedMenu.Item.Items.Add(item); + selectedMenu.Item?.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -765,7 +768,7 @@ private void buttonDelete_Click(object sender, EventArgs e) { TreeNode parentNode = node.Parent; var treeParentNode = parentNode as MenuTreeNode; - treeParentNode.Item.Items.Remove(treeNode.Item); + treeParentNode?.Item?.Items.Remove(treeNode?.Item!); node.Parent.Nodes.Remove(node); } @@ -793,10 +796,10 @@ private void UpdateButtons() private void UpdatePropertyGrid() { TreeNode node = treeView1.SelectedNode; - propertyGrid1.SelectedObject = node == null ? null : new CrumbProxy((KryptonBreadCrumbItem)((MenuTreeNode)node).PropertyObject); + propertyGrid1.SelectedObject = node == null ? null : new CrumbProxy(((MenuTreeNode)node).PropertyObject as KryptonBreadCrumbItem); } - private DictItemBase CreateItemsDictionary(object[] items) + private DictItemBase CreateItemsDictionary(object?[] items) { var dictItems = new DictItemBase(); @@ -820,7 +823,7 @@ private void AddItemsToDictionary(DictItemBase dictItems, KryptonBreadCrumbItem } } - private void AddMenuTreeNode(KryptonBreadCrumbItem item, MenuTreeNode? parent) + private void AddMenuTreeNode(KryptonBreadCrumbItem? item, MenuTreeNode? parent) { // Create a node to match the item var node = new MenuTreeNode(item); @@ -836,7 +839,7 @@ private void AddMenuTreeNode(KryptonBreadCrumbItem item, MenuTreeNode? parent) } // Add children of an items collection - foreach (KryptonBreadCrumbItem child in item.Items) + foreach (KryptonBreadCrumbItem? child in item?.Items!) { AddMenuTreeNode(child, node); } @@ -866,7 +869,7 @@ private void SynchronizeCollections(DictItemBase before, } } - var changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + var changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (changeService != null) { // Mark components as changed when not added or removed diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs index cd591aadd..9e4fac43a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs @@ -34,7 +34,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte if ((context?.Instance != null) && (provider != null)) { // Must use the editor service for showing dialogs - var editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); + var editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (editorService != null) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs index 15f09cd5d..db6eec7f5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs @@ -33,14 +33,14 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte /// An IServiceProvider that this editor can use to obtain services. /// The object to edit. /// The new value of the object. - public override object? EditValue(ITypeDescriptorContext? context, - IServiceProvider? provider, + public override object? EditValue(ITypeDescriptorContext? context, + IServiceProvider? provider, object? value) { if ((context != null) && (provider != null) && (value != null)) { // Grab the service needed to show the drop down - var service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); + var service = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (service != null) { @@ -59,7 +59,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte } } - return base.EditValue(context, provider, value); + return base.EditValue(context, provider!, value); } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs index f4eeee7ed..1b44fc322 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs @@ -28,7 +28,7 @@ public class KryptonDesignerActionItem : DesignerActionMethodItem /// /// Verb instance to wrap. /// Name of the category the action belongs to. - public KryptonDesignerActionItem([DisallowNull] DesignerVerb verb, [DisallowNull] string category) + public KryptonDesignerActionItem(DesignerVerb verb, string category) : base(null, null, null) { Debug.Assert(verb != null); @@ -69,7 +69,7 @@ public KryptonDesignerActionItem([DisallowNull] DesignerVerb verb, [DisallowNull /// /// Gets the name of the method that this item is associated with. /// - public override string MemberName => null; + public override string? MemberName => null; #endregion } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs index cacdfb800..f3e895a5a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs @@ -116,13 +116,13 @@ public override bool OnMouseLeave(Glyph? g) #endregion #region Implementation Static - private static Point PointToSplitContainer(Glyph g, Point pt) + private static Point PointToSplitContainer(Glyph? g, Point pt) { // Cast the correct type - var splitGlyph = (KryptonSplitContainerGlyph)g; + var splitGlyph = g as KryptonSplitContainerGlyph; // Gets the bounds of the glyph in adorner coordinates - Rectangle bounds = splitGlyph.Bounds; + Rectangle bounds = splitGlyph!.Bounds; // Convert from adorner coordinates to the control client coordinates return new Point(pt.X - bounds.X, pt.Y - bounds.Y); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs index c5168fce7..fcb369199 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs @@ -17,7 +17,7 @@ internal class KryptonSplitContainerGlyph : Glyph #region Instance Fields private readonly KryptonSplitContainer? _splitContainer; private readonly ISelectionService _selectionService; - private readonly BehaviorService _behaviorService; + private readonly BehaviorService _behaviorService; private readonly Adorner _adorner; #endregion @@ -29,10 +29,10 @@ internal class KryptonSplitContainerGlyph : Glyph /// Reference to the behavior service. /// Reference to the containing adorner. /// Reference to the containing designer. - public KryptonSplitContainerGlyph([DisallowNull] ISelectionService selectionService, - [DisallowNull] BehaviorService behaviorService, - [DisallowNull] Adorner adorner, - [DisallowNull] IDesigner relatedDesigner) + public KryptonSplitContainerGlyph(ISelectionService selectionService, + BehaviorService behaviorService, + Adorner adorner, + IDesigner relatedDesigner) : base(new KryptonSplitContainerBehavior(relatedDesigner)) { Debug.Assert(selectionService != null); @@ -41,12 +41,12 @@ public KryptonSplitContainerGlyph([DisallowNull] ISelectionService selectionServ Debug.Assert(relatedDesigner != null); // Remember incoming references - _selectionService = selectionService; - _behaviorService = behaviorService; - _adorner = adorner; + _selectionService = selectionService!; + _behaviorService = behaviorService!; + _adorner = adorner!; // Find the related control - _splitContainer = relatedDesigner.Component as KryptonSplitContainer; + _splitContainer = relatedDesigner!.Component as KryptonSplitContainer; // We want to know whenever the selection has changed or a property has changed _selectionService.SelectionChanged += OnSelectionChanged; diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs index 8d9154557..3cf42875f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs @@ -29,7 +29,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider? provider, object? value) { - var svc = (IWindowsFormsEditorService)provider?.GetService(typeof(IWindowsFormsEditorService)); + var svc = provider?.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (svc != null) { var ctrl = new UserControl(); @@ -38,7 +38,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte clb.Items.Add(ComboBoxStyle.DropDownList); clb.SelectedIndexChanged += delegate { - value = Enum.Parse(typeof(ComboBoxStyle), clb.SelectedItem.ToString()); + value = Enum.Parse(typeof(ComboBoxStyle), clb.SelectedItem?.ToString()!); svc.CloseDropDown(); }; ctrl.Controls.Add(clb); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs index 98d93c71f..3e27846b6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs @@ -22,17 +22,17 @@ private class ListEntry /// Initialize a new instance of the ListEntry class. /// /// CheckButton to encapsulate. - public ListEntry([DisallowNull] KryptonCheckButton checkButton) + public ListEntry(KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); - CheckButton = checkButton; + CheckButton = checkButton!; } /// /// Gets a string representation of the encapsulated check button. /// /// String instance. - public override string ToString() => $"{CheckButton.Site.Name} (Text: {CheckButton.Text})"; + public override string ToString() => $"{CheckButton.Site?.Name} (Text: {CheckButton.Text})"; #endregion @@ -47,7 +47,7 @@ public ListEntry([DisallowNull] KryptonCheckButton checkButton) #endregion #region Instance Fields - private readonly KryptonCheckSet _checkSet; + private readonly KryptonCheckSet? _checkSet; #endregion #region Identity @@ -62,7 +62,7 @@ public KryptonCheckButtonCollectionForm() /// /// Initialize a new instance of the KryptonCheckButtonCollectionForm class. /// - public KryptonCheckButtonCollectionForm(KryptonCheckSet checkSet) + public KryptonCheckButtonCollectionForm(KryptonCheckSet? checkSet) { // Remember the owning control _checkSet = checkSet; @@ -75,7 +75,7 @@ public KryptonCheckButtonCollectionForm(KryptonCheckSet checkSet) private void KryptonCheckButtonCollectionForm_Load(object sender, EventArgs e) { // Get access to the container of the check set - IContainer container = _checkSet.Container; + IContainer? container = _checkSet?.Container; // Assuming we manage to find a container if (container != null) @@ -91,7 +91,7 @@ private void KryptonCheckButtonCollectionForm_Load(object sender, EventArgs e) // Add a new entry to the list box but only check it if // it is already present in the check buttons collection checkedListBox.Items.Add(new ListEntry(checkButton), - _checkSet.CheckButtons.Contains(checkButton)); + _checkSet!.CheckButtons.Contains(checkButton)); } } } @@ -101,13 +101,13 @@ private void buttonOK_Click(object sender, EventArgs e) { // Create a copy of the current check set buttons var copy = new List(); - foreach (KryptonCheckButton checkButton in _checkSet.CheckButtons) + foreach (KryptonCheckButton checkButton in _checkSet?.CheckButtons!) { copy.Add(checkButton); } // Process each of the list entries in turn - for(var i=0; i /// Menu item to represent. - public MenuTreeNode([DisallowNull] KryptonContextMenuItemBase item) + public MenuTreeNode(KryptonContextMenuItemBase item) { Debug.Assert(item != null); - Item = item; - PropertyObject = item; + Item = item!; + PropertyObject = item!; // Setup the initial starting image and description strings ImageIndex = ImageIndexFromItem(); @@ -739,12 +740,12 @@ private void buttonMoveUp_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode.Item); - items1.Items.Insert(index - 1, treeNode.Item); + items1.Items.Remove(treeNode?.Item!); + items1.Items.Insert(index - 1, treeNode?.Item); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode.Item); - items.Items.Insert(index - 1, treeNode.Item); + items.Items.Remove(treeNode?.Item!); + items.Items.Insert(index - 1, treeNode?.Item); break; } @@ -785,12 +786,12 @@ private void buttonMoveDown_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode.Item); - items1.Items.Insert(index + 1, treeNode.Item); + items1.Items.Remove(treeNode?.Item!); + items1.Items.Insert(index + 1, treeNode?.Item); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode.Item); - items.Items.Insert(index + 1, treeNode.Item); + items.Items.Remove(treeNode?.Item!); + items.Items.Insert(index + 1, treeNode?.Item); break; } @@ -852,10 +853,10 @@ private void buttonDelete_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode.Item); + items1.Items.Remove(treeNode?.Item!); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode.Item); + items.Items.Remove(treeNode?.Item!); break; } @@ -961,7 +962,7 @@ private void AddNewItem(KryptonContextMenuItemBase item) { var treeSelectedNode = selectedNode as MenuTreeNode; Debug.Assert(treeSelectedNode?.Item is KryptonContextMenuItem); - var items = treeSelectedNode.Item as KryptonContextMenuItem; + var items = treeSelectedNode?.Item as KryptonContextMenuItem; items!.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -976,7 +977,7 @@ private void AddNewItem(KryptonContextMenuItemBase item) { var treeSelectedNode = selectedNode as MenuTreeNode; Debug.Assert(treeSelectedNode?.Item is KryptonContextMenuItems); - var items = treeSelectedNode.Item as KryptonContextMenuItems; + var items = treeSelectedNode?.Item as KryptonContextMenuItems; items!.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -1007,7 +1008,7 @@ private void UpdateButtons() { parentNodeCount = node.Parent.Nodes.Count; nodeIndex = node.Parent.Nodes.IndexOf(node); - node = node.Parent! as MenuTreeNode; + node = (node.Parent! as MenuTreeNode)!; if (node != null) { parent = node.Item; @@ -1017,17 +1018,17 @@ private void UpdateButtons() _buttonMoveUp.Enabled = (item != null) && (nodeIndex > 0); _buttonMoveDown.Enabled = (item != null) && (nodeIndex < (parentNodeCount - 1)); - _buttonAddItem.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuItem)); - _buttonAddItems.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuItems)); - _buttonAddSeparator.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuSeparator)); - _buttonAddHeading.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuHeading)); - _buttonAddMonthCalendar.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuMonthCalendar)); - _buttonAddCheckBox.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuCheckBox)); - _buttonAddCheckButton.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuCheckButton)); - _buttonAddRadioButton.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuRadioButton)); - _buttonAddLinkLabel.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuLinkLabel)); - _buttonAddColorColumns.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuColorColumns)); - _buttonAddImageSelect.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuImageSelect)); + _buttonAddItem.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuItem)); + _buttonAddItems.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuItems)); + _buttonAddSeparator.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuSeparator)); + _buttonAddHeading.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuHeading)); + _buttonAddMonthCalendar.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuMonthCalendar)); + _buttonAddCheckBox.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuCheckBox)); + _buttonAddCheckButton.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuCheckButton)); + _buttonAddRadioButton.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuRadioButton)); + _buttonAddLinkLabel.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuLinkLabel)); + _buttonAddColorColumns.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuColorColumns)); + _buttonAddImageSelect.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuImageSelect)); _buttonDelete.Enabled = item != null; } @@ -1137,7 +1138,7 @@ private void SynchronizeCollections(DictItemBase before, context.Container?.Remove(item); } - var changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); + var changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (changeService != null) { // Mark components as changed when not added or removed diff --git a/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs b/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs index 40bf357e0..d96186ac0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs @@ -36,13 +36,15 @@ public static DateTime AssemblyLastWriteTime(Assembly assembly) } catch (Exception e) { + ExceptionHandler.CaptureException(e); + return DateTime.MaxValue; } } public static DateTime AssemblyBuildDate(Assembly assembly, bool forceFileDate) { - Version assemblyVersion = assembly.GetName().Version; + Version? assemblyVersion = assembly.GetName().Version; DateTime dateTime; @@ -52,7 +54,7 @@ public static DateTime AssemblyBuildDate(Assembly assembly, bool forceFileDate) } else { - dateTime = DateTime.Parse(@"01/01/1970").AddDays(assemblyVersion.Build).AddSeconds(assemblyVersion.Revision * 2); + dateTime = DateTime.Parse(@"01/01/1970").AddDays(assemblyVersion!.Build).AddSeconds(assemblyVersion.Revision * 2); if (TimeZone.IsDaylightSavingTime(dateTime, TimeZone.CurrentTimeZone.GetDaylightChanges(dateTime.Year))) { @@ -167,7 +169,7 @@ public static NameValueCollection AssemblyAttribs(Assembly assembly) // codebase try { - nvc.Add("CodeBase", assembly.CodeBase.Replace("file:///", "")); + nvc.Add("CodeBase", assembly.CodeBase?.Replace("file:///", "")); } catch (NotSupportedException) { From b183b75e92a8f7148ce001447ff4ef345799e885 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Wed, 6 Dec 2023 15:57:25 +0000 Subject: [PATCH 06/14] * Removal of redundant `[DisallowNull]` --- .../Control Docking/KryptonStorePage.cs | 2 +- .../Elements Impl/KryptonDockingControl.cs | 6 +- .../KryptonDockingFloatingWindow.cs | 2 +- .../Elements Impl/KryptonDockingManager.cs | 102 +++++------ .../Elements Impl/KryptonDockingNavigator.cs | 4 +- .../Elements Impl/KryptonDockingSpace.cs | 2 +- .../Elements Impl/KryptonDockingWorkspace.cs | 24 +-- .../Event Args/CancelUniqueNameEventArgs.cs | 2 +- .../ViewDraw/ViewDrawAutoHiddenTab.cs | 2 +- .../ButtonSpecs/ButtonSpecNavFixed.cs | 2 +- .../ButtonSpecs/ButtonSpecNavRemap.cs | 2 +- .../Controller/DragViewController.cs | 6 +- .../Controller/OutlookMiniController.cs | 6 +- .../Controls Navigator/KryptonNavigator.cs | 8 +- .../KryptonNavigatorControlCollection.cs | 4 +- .../Controls Visuals/VisualPopupPage.cs | 4 +- .../Dragging/DragFeedback.cs | 8 +- .../Dragging/DragFeedbackSolid.cs | 2 +- .../General/PageToToolTipMapping.cs | 2 +- .../Navigator/KryptonNavigatorDesigner.cs | 2 +- .../Navigator/KryptonPageDesigner.cs | 2 +- .../Palette/HeaderGroupMappingBase.cs | 2 +- .../Krypton.Navigator/Palette/NavigatorBar.cs | 2 +- .../Palette/NavigatorButton.cs | 2 +- .../Palette/NavigatorGroup.cs | 2 +- .../Palette/NavigatorHeader.cs | 2 +- .../Palette/NavigatorOutlook.cs | 2 +- .../Palette/NavigatorOutlookFull.cs | 2 +- .../Palette/NavigatorOutlookMini.cs | 2 +- .../Palette/NavigatorPanel.cs | 2 +- .../Palette/NavigatorPopupPages.cs | 4 +- .../Palette/NavigatorStack.cs | 2 +- .../Palette/NavigatorToolTips.cs | 4 +- .../Palette/PaletteBarRedirect.cs | 2 +- .../Palette/PaletteNavContent.cs | 2 +- .../Palette/PaletteNavigatorHeaderGroup.cs | 2 +- .../PaletteNavigatorHeaderGroupRedirect.cs | 4 +- .../Palette/PaletteRibbonGeneralRedirect.cs | 2 +- .../Palette/PaletteRibbonTabContent.cs | 6 +- .../PaletteRibbonTabContentInheritOverride.cs | 12 +- .../PaletteRibbonTabContentRedirect.cs | 2 +- .../Palette/RibbonTabToContent.cs | 6 +- .../View Builder/ViewBuilderBase.cs | 6 +- .../View Builder/ViewBuilderGroup.cs | 2 +- .../ViewBuilderHeaderBarTabGroup.cs | 2 +- .../View Builder/ViewBuilderHeaderGroup.cs | 6 +- .../View Builder/ViewBuilderItemBase.cs | 6 +- .../View Builder/ViewBuilderOutlookBase.cs | 6 +- .../View Builder/ViewBuilderPanel.cs | 4 +- .../ViewBuilderStackCheckButtonBase.cs | 6 +- .../View Builder/ViewletHeaderGroup.cs | 4 +- .../View Draw/ViewDrawNavCheckButtonBase.cs | 2 +- .../View Draw/ViewDrawNavRibbonTab.cs | 4 +- .../View Layout/ViewLayoutBar.cs | 4 +- .../View Layout/ViewLayoutDockerOverlap.cs | 6 +- .../View Layout/ViewLayoutInsetOverlap.cs | 6 +- .../View Layout/ViewLayoutOutlookFull.cs | 2 +- .../View Layout/ViewLayoutOutlookMini.cs | 2 +- .../View Layout/ViewLayoutPageHide.cs | 6 +- .../View Layout/ViewLayoutPageShow.cs | 6 +- .../View Layout/ViewLayoutPopupPage.cs | 8 +- .../ButtonSpec/ButtonSpecExpandRibbon.cs | 2 +- .../ButtonSpecManagerLayoutAppButton.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildClose.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildMin.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildRestore.cs | 2 +- .../ButtonSpec/ButtonSpecMinimizeRibbon.cs | 2 +- .../Controller/AppButtonController.cs | 2 +- .../Controller/AppTabController.cs | 2 +- .../ButtonSpecAppButtonController.cs | 4 +- .../Controller/ButtonSpecRibbonController.cs | 2 +- .../Controller/CollapsedGroupController.cs | 8 +- .../Controller/ComboBoxController.cs | 8 +- .../Controller/ContextTitleController.cs | 2 +- .../Controller/CustomControlController.cs | 8 +- .../Controller/DateTimePickerController.cs | 8 +- .../DialogLauncherButtonController.cs | 2 +- .../Controller/DomainUpDownController.cs | 8 +- .../Controller/GalleryButtonController.cs | 2 +- .../Controller/GalleryController.cs | 8 +- .../Controller/GalleryItemController.cs | 10 +- .../Controller/GroupButtonController.cs | 8 +- .../Controller/GroupCheckBoxController.cs | 10 +- .../Controller/GroupRadioButtonController.cs | 10 +- .../Controller/LeftDownButtonController.cs | 6 +- .../Controller/LeftUpButtonController.cs | 4 +- .../Controller/MaskedTextBoxController.cs | 8 +- .../Controller/NumericUpDownController.cs | 8 +- .../Controller/QATButtonController.cs | 2 +- .../Controller/QATExtraButtonController.cs | 2 +- .../Controller/RecentDocController.cs | 14 +- .../Controller/RepeatButtonController.cs | 4 +- .../Controller/RibbonTabController.cs | 6 +- .../Controller/RibbonTabsController.cs | 2 +- .../Controller/RichTextBoxController.cs | 8 +- .../Controller/TextBoxController.cs | 8 +- .../Controller/TrackBarController.cs | 8 +- .../Controller/ViewHighlightController.cs | 4 +- .../Controls Ribbon/KryptonRibbonContext.cs | 1 - .../Controls Visuals/VisualPopupGroup.cs | 4 +- .../Controls Visuals/VisualPopupMinimized.cs | 4 +- .../VisualPopupQATOverflow.cs | 2 +- .../Designers/KryptonGalleryDesigner.cs | 2 +- .../Designers/KryptonRibbonDesigner.cs | 2 +- .../KryptonRibbonGroupButtonDesigner.cs | 2 +- .../KryptonRibbonGroupCheckBoxDesigner.cs | 2 +- ...KryptonRibbonGroupClusterButtonDesigner.cs | 2 +- ...onRibbonGroupClusterColorButtonDesigner.cs | 2 +- .../KryptonRibbonGroupClusterDesigner.cs | 2 +- .../KryptonRibbonGroupColorButtonDesigner.cs | 2 +- .../KryptonRibbonGroupComboBoxDesigner.cs | 2 +- ...KryptonRibbonGroupCustomControlDesigner.cs | 2 +- ...ryptonRibbonGroupDateTimePickerDesigner.cs | 2 +- .../Designers/KryptonRibbonGroupDesigner.cs | 2 +- .../KryptonRibbonGroupDomainUpDownDesigner.cs | 2 +- .../KryptonRibbonGroupGalleryDesigner.cs | 2 +- .../KryptonRibbonGroupLabelDesigner.cs | 2 +- .../KryptonRibbonGroupLinesDesigner.cs | 2 +- ...KryptonRibbonGroupMaskedTextBoxDesigner.cs | 2 +- ...KryptonRibbonGroupNumericUpDownDesigner.cs | 2 +- .../KryptonRibbonGroupRadioButtonDesigner.cs | 2 +- .../KryptonRibbonGroupRichTextBoxDesigner.cs | 2 +- .../KryptonRibbonGroupSeparatorDesigner.cs | 2 +- .../KryptonRibbonGroupTextBoxDesigner.cs | 2 +- ...KryptonRibbonGroupThemeComboBoxDesigner.cs | 2 +- .../KryptonRibbonGroupTrackBarDesigner.cs | 2 +- .../KryptonRibbonGroupTripleDesigner.cs | 2 +- .../Designers/KryptonRibbonTabDesigner.cs | 2 +- .../General/CalculatedValues.cs | 2 +- .../KryptonRibbonGroupClusterColorButton.cs | 2 +- .../KryptonRibbonGroupTrackBar.cs | 2 - .../Palette/AppButtonToolTipToContent.cs | 2 +- .../Krypton.Ribbon/Palette/ContextTabSet.cs | 6 +- .../Palette/DesignTextToContent.cs | 2 +- .../Palette/PaletteGalleryBackBorder.cs | 4 +- .../Palette/PaletteGalleryRedirect.cs | 2 +- .../Palette/PaletteRibbonAppButton.cs | 2 +- .../Palette/PaletteRibbonContextBack.cs | 2 +- .../Palette/PaletteRibbonContextDouble.cs | 2 +- .../Palette/PaletteRibbonFocus.cs | 2 +- .../Palette/PaletteRibbonImages.cs | 4 +- .../Palette/PaletteRibbonJustGroup.cs | 2 +- .../Palette/PaletteRibbonJustTab.cs | 2 +- .../Palette/PaletteRibbonRedirect.cs | 2 +- .../Palette/PaletteRibbonStyles.cs | 2 +- .../Palette/QATButtonToContent.cs | 2 +- .../Palette/QATButtonToolTipToContent.cs | 2 +- .../Krypton.Ribbon/Palette/RibbonAppButton.cs | 2 +- .../Palette/RibbonGroupLabelTextToContent.cs | 10 +- .../RibbonGroupNormalDisabledTextToContent.cs | 6 +- .../Palette/RibbonGroupTextToContent.cs | 4 +- .../Palette/RibbonRecentDocsEntryToContent.cs | 4 +- .../Palette/RibbonRecentDocsTitleToContent.cs | 4 +- .../Palette/RibbonTabToContent.cs | 4 +- .../Krypton.Ribbon/Palette/RibbonToContent.cs | 2 +- .../View Base/ViewRibbonManager.cs | 10 +- .../View Base/ViewRibbonMinimizedManager.cs | 10 +- .../View Base/ViewRibbonPopupGroupManager.cs | 10 +- .../View Base/ViewRibbonQATOverflowManager.cs | 4 +- .../View Draw/ViewDrawRibbonAppButton.cs | 4 +- .../ViewDrawRibbonAppMenuRecentDoc.cs | 2 +- .../View Draw/ViewDrawRibbonAppTab.cs | 8 +- .../View Draw/ViewDrawRibbonCaptionArea.cs | 10 +- .../ViewDrawRibbonCompoRightBorder.cs | 2 +- .../View Draw/ViewDrawRibbonComposition.cs | 8 +- .../View Draw/ViewDrawRibbonContextTitle.cs | 6 +- .../View Draw/ViewDrawRibbonDesignBase.cs | 6 +- .../View Draw/ViewDrawRibbonDesignCluster.cs | 2 +- .../ViewDrawRibbonDesignGroupContainer.cs | 2 +- .../ViewDrawRibbonDesignGroupLines.cs | 2 +- .../ViewDrawRibbonDesignGroupTriple.cs | 2 +- .../View Draw/ViewDrawRibbonDropArrow.cs | 4 +- .../View Draw/ViewDrawRibbonGalleryButton.cs | 2 +- .../View Draw/ViewDrawRibbonGalleryItem.cs | 2 +- .../View Draw/ViewDrawRibbonGroup.cs | 8 +- .../View Draw/ViewDrawRibbonGroupButton.cs | 8 +- .../ViewDrawRibbonGroupButtonBackBorder.cs | 10 +- .../ViewDrawRibbonGroupButtonImage.cs | 2 +- .../ViewDrawRibbonGroupButtonText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupCheckBox.cs | 10 +- .../ViewDrawRibbonGroupCheckBoxImage.cs | 2 +- .../ViewDrawRibbonGroupCheckBoxText.cs | 8 +- .../ViewDrawRibbonGroupClusterButton.cs | 8 +- .../ViewDrawRibbonGroupClusterButtonImage.cs | 2 +- .../ViewDrawRibbonGroupClusterButtonText.cs | 8 +- .../ViewDrawRibbonGroupClusterColorButton.cs | 8 +- ...wDrawRibbonGroupClusterColorButtonImage.cs | 2 +- ...ewDrawRibbonGroupClusterColorButtonText.cs | 8 +- .../ViewDrawRibbonGroupClusterEdge.cs | 4 +- .../ViewDrawRibbonGroupClusterSeparator.cs | 4 +- .../ViewDrawRibbonGroupColorButton.cs | 8 +- .../ViewDrawRibbonGroupColorButtonImage.cs | 2 +- .../ViewDrawRibbonGroupColorButtonText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupComboBox.cs | 10 +- .../ViewDrawRibbonGroupCustomControl.cs | 10 +- .../ViewDrawRibbonGroupDateTimePicker.cs | 10 +- .../ViewDrawRibbonGroupDialogButton.cs | 6 +- .../ViewDrawRibbonGroupDomainUpDown.cs | 10 +- .../View Draw/ViewDrawRibbonGroupGallery.cs | 10 +- .../ViewDrawRibbonGroupGalleryImage.cs | 2 +- .../ViewDrawRibbonGroupGalleryText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupImage.cs | 6 +- .../View Draw/ViewDrawRibbonGroupImageBase.cs | 2 +- .../View Draw/ViewDrawRibbonGroupLabel.cs | 8 +- .../ViewDrawRibbonGroupLabelImage.cs | 2 +- .../View Draw/ViewDrawRibbonGroupLabelText.cs | 8 +- .../ViewDrawRibbonGroupMaskedTextBox.cs | 10 +- .../ViewDrawRibbonGroupNumericUpDown.cs | 10 +- .../ViewDrawRibbonGroupRadioButton.cs | 8 +- .../ViewDrawRibbonGroupRadioButtonImage.cs | 2 +- .../ViewDrawRibbonGroupRadioButtonText.cs | 8 +- .../ViewDrawRibbonGroupRichTextBox.cs | 10 +- .../View Draw/ViewDrawRibbonGroupSeparator.cs | 8 +- .../View Draw/ViewDrawRibbonGroupText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupTextBox.cs | 10 +- .../View Draw/ViewDrawRibbonGroupTitle.cs | 6 +- .../View Draw/ViewDrawRibbonGroupTrackBar.cs | 10 +- .../View Draw/ViewDrawRibbonGroupsBorder.cs | 6 +- .../View Draw/ViewDrawRibbonMinimizeBar.cs | 2 +- .../View Draw/ViewDrawRibbonQATBorder.cs | 6 +- .../View Draw/ViewDrawRibbonQATButton.cs | 6 +- .../View Draw/ViewDrawRibbonQATExtraButton.cs | 4 +- .../ViewDrawRibbonQATExtraButtonMini.cs | 2 +- .../View Draw/ViewDrawRibbonQATOverflow.cs | 6 +- .../View Draw/ViewDrawRibbonRecentDocs.cs | 4 +- .../View Draw/ViewDrawRibbonRecentShortcut.cs | 2 +- .../View Draw/ViewDrawRibbonScrollButton.cs | 2 +- .../View Draw/ViewDrawRibbonTab.cs | 8 +- .../View Draw/ViewDrawRibbonTabSep.cs | 2 +- .../View Layout/ViewLayoutRibbonAppButton.cs | 2 +- .../View Layout/ViewLayoutRibbonAppTab.cs | 2 +- .../View Layout/ViewLayoutRibbonCenter.cs | 2 +- .../ViewLayoutRibbonCenterPadding.cs | 2 +- .../ViewLayoutRibbonContextTitles.cs | 6 +- .../ViewLayoutRibbonGalleryButtons.cs | 2 +- .../ViewLayoutRibbonGalleryItems.cs | 16 +- .../ViewLayoutRibbonGroupCluster.cs | 8 +- .../ViewLayoutRibbonGroupContent.cs | 8 +- .../View Layout/ViewLayoutRibbonGroupLines.cs | 8 +- .../ViewLayoutRibbonGroupTriple.cs | 8 +- .../View Layout/ViewLayoutRibbonGroups.cs | 8 +- .../View Layout/ViewLayoutRibbonGroupsArea.cs | 8 +- .../ViewLayoutRibbonQATContents.cs | 6 +- .../ViewLayoutRibbonQATFromOverflow.cs | 4 +- .../View Layout/ViewLayoutRibbonQATMini.cs | 4 +- .../View Layout/ViewLayoutRibbonRowCenter.cs | 4 +- .../View Layout/ViewLayoutRibbonScrollPort.cs | 12 +- .../View Layout/ViewLayoutRibbonScroller.cs | 2 +- .../View Layout/ViewLayoutRibbonSeparator.cs | 2 +- .../View Layout/ViewLayoutRibbonTabs.cs | 6 +- .../View Layout/ViewLayoutRibbonTabsArea.cs | 8 +- .../View Layout/ViewLayoutRibbonTabsSpare.cs | 2 +- .../AccurateText/AccurateText.cs | 10 +- .../AccurateText/AccurateTextMemento.cs | 2 +- .../ButtonSpec/ButtonSpecCollection.cs | 16 +- .../ButtonSpec/ButtonSpecFormFixed.cs | 2 +- .../ButtonSpec/ButtonSpecManagerBase.cs | 8 +- .../ButtonSpec/ButtonSpecManagerDraw.cs | 6 +- .../ButtonSpecRemapByContentBase.cs | 2 +- .../ButtonSpecRemapByContentView.cs | 2 +- .../ButtonSpec/ButtonSpecView.cs | 6 +- .../ButtonSpec/ButtonSpecViewControllers.cs | 6 +- .../KryptonContextMenuColorColumns.cs | 2 +- .../ContextMenu/KryptonContextMenuItemBase.cs | 2 +- .../Controller/ButtonController.cs | 8 +- .../Controller/CheckBoxController.cs | 8 +- .../Controller/ContextMenuController.cs | 6 +- .../Controller/ControllerDefinitions.cs | 2 +- .../Controller/LinkLabelController.cs | 6 +- .../Controller/MenuCheckBoxController.cs | 16 +- .../Controller/MenuCheckButtonController.cs | 16 +- .../Controller/MenuColorBlockController.cs | 16 +- .../Controller/MenuImageSelectController.cs | 16 +- .../Controller/MenuItemController.cs | 14 +- .../Controller/MenuLinkLabelController.cs | 16 +- .../Controller/MenuRadioButtonController.cs | 16 +- .../Controller/MonthCalendarController.cs | 6 +- .../Controller/RadioButtonController.cs | 8 +- .../Controller/SeparatorController.cs | 8 +- .../Controller/TooltipController.cs | 4 +- .../Controller/TrackBarController.cs | 6 +- .../Controls Toolkit/KryptonCheckSet.cs | 10 +- .../Controls Toolkit/KryptonContextMenu.cs | 2 +- .../KryptonCustomPaletteBase.cs | 14 +- .../Controls Toolkit/KryptonDataGridView.cs | 4 +- .../Controls Toolkit/KryptonForm.cs | 6 +- .../Controls Toolkit/KryptonGroupBoxPanel.cs | 6 +- .../Controls Toolkit/KryptonGroupPanel.cs | 6 +- .../Controls Toolkit/KryptonListView.cs | 2 +- .../Controls Toolkit/KryptonManager.cs | 2 +- .../Controls Toolkit/KryptonPanel.cs | 6 +- .../Controls Toolkit/KryptonSplitterPanel.cs | 2 +- .../VisualContainerControlBase.cs | 4 +- .../Controls Visuals/VisualControlBase.cs | 4 +- .../Controls Visuals/VisualForm.cs | 2 +- .../Controls Visuals/VisualPanel.cs | 4 +- .../Controls Visuals/VisualPopup.cs | 2 +- .../Controls Visuals/VisualPopupManager.cs | 4 +- .../Controls Visuals/VisualPopupTooltip.cs | 4 +- .../EventArgs/ButtonSpecEventArgs.cs | 2 +- .../Krypton.Toolkit/General/CommonHelper.cs | 4 +- .../General/CorrectContextControl.cs | 2 +- .../General/DesktopWindowManager.cs | 2 +- .../General/KryptonControlCollection.cs | 2 +- .../General/TypedCollection.cs | 14 +- .../PaletteBack/PaletteBackInheritForced.cs | 4 +- .../PaletteBack/PaletteBackInheritOverride.cs | 4 +- .../PaletteBorder/PaletteBorder.cs | 2 +- .../PaletteBorderInheritForced.cs | 2 +- .../PaletteBorderInheritOverride.cs | 4 +- .../PaletteContent/PaletteContent.cs | 2 +- .../PaletteContentInheritForced.cs | 2 +- .../PaletteContentInheritOverride.cs | 4 +- .../PaletteDouble/PaletteDoubleMetric.cs | 2 +- .../PaletteDouble/PaletteDoubleOverride.cs | 4 +- .../PaletteElementColorInheritOverride.cs | 4 +- .../PaletteElementColorInheritRedirect.cs | 2 +- .../PaletteMetric/PaletteMetricRedirect.cs | 2 +- .../PaletteRedirect/PaletteRedirectGrids.cs | 2 +- .../PaletteRibbon/PaletteRibbonBack.cs | 2 +- .../PaletteRibbonBackInheritRedirect.cs | 2 +- .../PaletteRibbonBackRedirect.cs | 2 +- .../PaletteRibbon/PaletteRibbonDouble.cs | 4 +- .../PaletteRibbonDoubleInheritOverride.cs | 8 +- .../PaletteRibbonDoubleInheritRedirect.cs | 2 +- .../PaletteRibbonDoubleRedirect.cs | 2 +- .../PaletteRibbon/PaletteRibbonGeneral.cs | 2 +- .../PaletteRibbonGeneralInheritRedirect.cs | 2 +- .../PaletteRibbonTextInheritRedirect.cs | 2 +- .../PaletteTab/PaletteTabTriple.cs | 2 +- .../PaletteTab/PaletteTabTripleRedirect.cs | 2 +- .../PaletteTriple/PaletteTriple.cs | 2 +- .../PaletteTriple/PaletteTripleJustImage.cs | 2 +- .../PaletteTriple/PaletteTripleMetric.cs | 2 +- .../PaletteTripleMetricRedirect.cs | 2 +- .../PaletteTriple/PaletteTripleOverride.cs | 4 +- .../Bases/PaletteMicrosoft365Base.cs | 8 +- .../PaletteMicrosoft365BlackDarkMode.cs | 10 +- .../PaletteMicrosoft365BlueDarkMode.cs | 10 +- .../PaletteMicrosoft365BlueLightMode.cs | 10 +- .../PaletteMicrosoft365SilverDarkMode.cs | 10 +- .../PaletteMicrosoft365SilverLightMode.cs | 10 +- .../PaletteMicrosoft365Black.cs | 8 +- .../Bases/PaletteOffice2007Base.cs | 8 +- .../PaletteOffice2007BlackDarkMode.cs | 10 +- .../PaletteOffice2007BlueDarkMode.cs | 10 +- .../PaletteOffice2007BlueLightMode.cs | 10 +- .../PaletteOffice2007SilverDarkMode.cs | 10 +- .../PaletteOffice2007SilverLightMode.cs | 10 +- .../Bases/PaletteOffice2010Base.cs | 8 +- .../PaletteOffice2010BlackDarkMode.cs | 10 +- .../PaletteOffice2010BlueDarkMode.cs | 10 +- .../PaletteOffice2010BlueLightMode.cs | 10 +- .../PaletteOffice2010SilverDarkMode.cs | 10 +- .../PaletteOffice2010SilverLightMode.cs | 10 +- .../Bases/PaletteOffice2013Base.cs | 8 +- .../Official Themes/PaletteOffice2013White.cs | 8 +- .../Base/PaletteVisualStudioBase.cs | 8 +- .../PaletteVisualStudio2010With2007Base.cs | 8 +- .../PaletteVisualStudio2010With2010Base.cs | 8 +- .../PaletteVisualStudio2010With2013Base.cs | 8 +- .../365/PaletteVisualStudio2010With365Base.cs | 8 +- .../Palette Component/KryptonInternalKCT.cs | 2 +- .../KryptonPaletteButtonSpecBase.cs | 4 +- .../KryptonPaletteButtonSpecTyped.cs | 2 +- .../KryptonPaletteButtonSpecs.cs | 2 +- .../KryptonPaletteCheckButtons.cs | 2 +- .../Palette Component/KryptonPaletteCommon.cs | 2 +- .../KryptonPaletteControls.cs | 2 +- .../Palette Component/KryptonPaletteFont.cs | 2 +- .../Palette Component/KryptonPaletteForms.cs | 2 +- .../Palette Component/KryptonPaletteGrids.cs | 2 +- .../KryptonPaletteHeaderGroup.cs | 2 +- .../KryptonPaletteHeaderGroupState.cs | 2 +- .../KryptonPaletteHeaders.cs | 2 +- .../Palette Component/KryptonPaletteImages.cs | 2 +- .../KryptonPaletteInputControls.cs | 2 +- .../Palette Component/KryptonPaletteLabels.cs | 2 +- .../KryptonPaletteNavigator.cs | 2 +- .../KryptonPaletteNavigatorState.cs | 2 +- .../KryptonPaletteNavigatorStateBar.cs | 2 +- .../Palette Component/KryptonPalettePanels.cs | 2 +- .../Palette Component/KryptonPaletteRibbon.cs | 2 +- .../KryptonPaletteSeparators.cs | 2 +- .../Palette Component/KryptonPaletteTMS.cs | 2 +- .../KryptonPaletteTMSBase.cs | 2 +- .../KryptonPaletteTabButtons.cs | 2 +- .../Palette Controls/KryptonColorTable2007.cs | 2 +- .../Palette Controls/KryptonColorTable2010.cs | 2 +- .../Palette Controls/KryptonColorTable2013.cs | 2 +- .../Palette Controls/KryptonColorTable365.cs | 2 +- .../KryptonColorTableMicrosoft365.cs | 2 +- .../KryptonColorTableSparkle.cs | 4 +- .../KryptonColorTableVisualStudio.cs | 2 +- .../KryptonDataGridViewStyles.cs | 2 +- .../KryptonProfessionalKCT.cs | 2 +- ...yptonVisualStudio2010With2007ColorTable.cs | 2 +- ...yptonVisualStudio2010With2010ColorTable.cs | 2 +- ...yptonVisualStudio2010With2013ColorTable.cs | 2 +- ...ualStudio2010WithMicrosoft365ColorTable.cs | 2 +- .../LinkLabelBehaviorInherit.cs | 2 +- .../PaletteBackInheritNode.cs | 2 +- .../Palette Controls/PaletteBorderEdge.cs | 2 +- .../PaletteBorderEdgeRedirect.cs | 2 +- .../PaletteComboBoxJustComboStates.cs | 2 +- .../PaletteComboBoxJustItemStates.cs | 2 +- .../PaletteComboBoxRedirect.cs | 2 +- .../Palette Controls/PaletteComboBoxStates.cs | 4 +- .../PaletteContextMenuRedirect.cs | 2 +- .../PaletteDataGridViewAll.cs | 2 +- .../PaletteDataGridViewBackInherit.cs | 4 +- .../PaletteDataGridViewCells.cs | 2 +- .../PaletteDataGridViewContentInherit.cs | 4 +- .../PaletteDataGridViewContentStates.cs | 2 +- .../PaletteDataGridViewHeaders.cs | 2 +- .../PaletteDataGridViewRedirect.cs | 2 +- .../PaletteDataGridViewTripleCommon.cs | 2 +- .../PaletteDataGridViewTripleRedirect.cs | 2 +- .../PaletteDataGridViewTripleStates.cs | 2 +- .../Palette Controls/PaletteForm.cs | 4 +- .../Palette Controls/PaletteFormRedirect.cs | 4 +- .../PaletteGroupBoxRedirect.cs | 4 +- .../PaletteHeaderButtonRedirect.cs | 2 +- .../Palette Controls/PaletteHeaderGroup.cs | 6 +- .../PaletteHeaderGroupRedirect.cs | 6 +- .../PaletteHeaderPaddingRedirect.cs | 2 +- .../Palette Controls/PaletteHeaderRedirect.cs | 2 +- .../PaletteInputControlBackStates.cs | 2 +- .../PaletteInputControlContentStates.cs | 2 +- .../PaletteInputControlTripleRedirect.cs | 2 +- .../PaletteInputControlTripleStates.cs | 2 +- .../Palette Controls/PaletteListItemTriple.cs | 2 +- .../PaletteListItemTripleRedirect.cs | 2 +- .../PaletteListStateRedirect.cs | 2 +- .../Palette Controls/PaletteNodeOverride.cs | 2 +- .../PaletteRedirectCheckBox.cs | 2 +- .../Palette Controls/PaletteRedirectCommon.cs | 4 +- .../PaletteRedirectContextMenu.cs | 2 +- .../PaletteRedirectDropDownButton.cs | 2 +- .../PaletteRedirectRadioButton.cs | 2 +- .../PaletteRedirectTreeView.cs | 2 +- .../PaletteSeparatorPadding.cs | 4 +- .../PaletteSeparatorPaddingRedirect.cs | 2 +- .../PaletteTrackBarPositionStates.cs | 2 +- .../PaletteTrackBarPositionStatesOverride.cs | 4 +- .../PaletteTrackBarRedirect.cs | 2 +- .../Palette Controls/PaletteTrackBarStates.cs | 6 +- .../PaletteTrackBarStatesOverride.cs | 4 +- .../Palette Controls/PaletteTreeNodeTriple.cs | 2 +- .../PaletteTreeNodeTripleRedirect.cs | 2 +- .../PaletteTreeStateRedirect.cs | 2 +- .../Rendering/KryptonProfessionalRenderer.cs | 2 +- .../Krypton.Toolkit/Rendering/RenderBase.cs | 4 +- .../Rendering/RenderMicrosoft365.cs | 6 +- .../Rendering/RenderOffice2007.cs | 6 +- .../Rendering/RenderOffice2010.cs | 6 +- .../Rendering/RenderOffice2013.cs | 6 +- .../Rendering/RenderSparkle.cs | 18 +- .../Rendering/RenderStandard.cs | 170 +++++++++--------- .../Rendering/RenderVisualStudio.cs | 6 +- .../RenderVisualStudio2010With2007.cs | 6 +- .../RenderVisualStudio2010With2010.cs | 6 +- .../RenderVisualStudio2010With2013.cs | 6 +- .../RenderVisualStudio2010WithMicrosoft365.cs | 6 +- .../Krypton.Toolkit/View Base/ViewBase.cs | 2 +- .../View Base/ViewComposite.cs | 8 +- .../Krypton.Toolkit/View Base/ViewControl.cs | 4 +- .../View Base/ViewDecorator.cs | 2 +- .../Krypton.Toolkit/View Base/ViewLeaf.cs | 4 +- .../Krypton.Toolkit/View Base/ViewManager.cs | 18 +- .../View Draw/ViewDrawBorderEdge.cs | 6 +- .../View Draw/ViewDrawButton.cs | 22 +-- .../View Draw/ViewDrawCanvas.cs | 18 +- .../View Draw/ViewDrawCheckBox.cs | 6 +- .../View Draw/ViewDrawContent.cs | 16 +- .../View Draw/ViewDrawDateTimeButton.cs | 2 +- .../View Draw/ViewDrawDateTimeText.cs | 2 +- .../View Draw/ViewDrawDebug.cs | 6 +- .../View Draw/ViewDrawDocker.cs | 12 +- .../View Draw/ViewDrawDropDownButton.cs | 4 +- .../View Draw/ViewDrawEmptyContent.cs | 6 +- .../View Draw/ViewDrawGroupBoxDocker.cs | 4 +- .../View Draw/ViewDrawMenuCheckBox.cs | 4 +- .../View Draw/ViewDrawMenuCheckButton.cs | 4 +- .../View Draw/ViewDrawMenuColorBlock.cs | 8 +- .../View Draw/ViewDrawMenuColorColumn.cs | 4 +- .../View Draw/ViewDrawMenuColorColumns.cs | 2 +- .../View Draw/ViewDrawMenuHeading.cs | 2 +- .../View Draw/ViewDrawMenuImageCanvas.cs | 6 +- .../View Draw/ViewDrawMenuImageColumn.cs | 2 +- .../View Draw/ViewDrawMenuImageSelectItem.cs | 2 +- .../View Draw/ViewDrawMenuItem.cs | 4 +- .../View Draw/ViewDrawMenuItemContent.cs | 2 +- .../View Draw/ViewDrawMenuLinkLabel.cs | 4 +- .../View Draw/ViewDrawMenuMonthCalendar.cs | 2 +- .../View Draw/ViewDrawMenuRadioButton.cs | 2 +- .../View Draw/ViewDrawMenuSeparator.cs | 6 +- .../View Draw/ViewDrawMonthDayNames.cs | 6 +- .../View Draw/ViewDrawMonthDays.cs | 6 +- .../View Draw/ViewDrawMonthUpDown.cs | 2 +- .../View Draw/ViewDrawPanel.cs | 10 +- .../View Draw/ViewDrawRadioButton.cs | 6 +- .../View Draw/ViewDrawScrollBar.cs | 4 +- .../View Draw/ViewDrawSeparator.cs | 30 ++-- .../View Draw/ViewDrawSplitCanvas.cs | 16 +- .../View Draw/ViewDrawToday.cs | 2 +- .../View Draw/ViewDrawTrackPosition.cs | 4 +- .../View Draw/ViewDrawTrackTP.cs | 2 +- .../View Draw/ViewDrawTrackTicks.cs | 4 +- .../View Draw/ViewDrawTrackTrack.cs | 4 +- .../View Draw/ViewDrawWeekNumbers.cs | 6 +- .../View Layout/ViewLayoutCenter.cs | 4 +- .../View Layout/ViewLayoutColorStack.cs | 2 +- .../View Layout/ViewLayoutControl.cs | 10 +- .../View Layout/ViewLayoutCrumbs.cs | 4 +- .../View Layout/ViewLayoutDocker.cs | 8 +- .../View Layout/ViewLayoutFill.cs | 2 +- .../View Layout/ViewLayoutFit.cs | 2 +- .../View Layout/ViewLayoutMenuItemSelect.cs | 8 +- .../View Layout/ViewLayoutMenuItemsPile.cs | 4 +- .../View Layout/ViewLayoutMetricSpacer.cs | 6 +- .../View Layout/ViewLayoutMonths.cs | 8 +- .../View Layout/ViewLayoutNull.cs | 4 +- .../View Layout/ViewLayoutPadding.cs | 4 +- .../View Layout/ViewLayoutPile.cs | 2 +- .../View Layout/ViewLayoutScrollViewport.cs | 6 +- .../View Layout/ViewLayoutSeparator.cs | 2 +- .../View Layout/ViewLayoutStack.cs | 4 +- .../View Layout/ViewLayoutStretch.cs | 2 +- .../View Layout/ViewLayoutViewport.cs | 2 +- .../View Layout/ViewLayoutWeekCorner.cs | 6 +- .../Workspace/KryptonWorkspaceDesigner.cs | 2 +- .../KryptonWorkspaceSequenceDesigner.cs | 2 +- 533 files changed, 1393 insertions(+), 1396 deletions(-) diff --git a/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs b/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs index 00d5bc41e..e754ae980 100644 --- a/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs +++ b/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs @@ -26,7 +26,7 @@ public class KryptonStorePage : KryptonPage /// /// UniqueName of the page this is placeholding. /// Storage name associated with this page location. - public KryptonStorePage([DisallowNull] string uniqueName, string storeName) + public KryptonStorePage(string uniqueName, string storeName) { Visible = false; UniqueName = uniqueName; diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs index 8a84f48e1..ee230da2b 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs @@ -40,7 +40,7 @@ public class KryptonDockingControl : DockingElementOpenCollection /// /// Initial name of the element. /// Reference to control derived instance. - public KryptonDockingControl(string name, [DisallowNull] Control control) + public KryptonDockingControl(string name, Control control) : base(name) { if (control == null) @@ -57,7 +57,7 @@ public KryptonDockingControl(string name, [DisallowNull] Control control) /// Initial name of the element. /// Reference to control derived instance. /// Inner space occupied by a KryptonDockingNavigator. - public KryptonDockingControl(string name, [DisallowNull] Control control, [DisallowNull] KryptonDockingNavigator navigator) + public KryptonDockingControl(string name, Control control, KryptonDockingNavigator navigator) : base(name) { if (control == null) @@ -79,7 +79,7 @@ public KryptonDockingControl(string name, [DisallowNull] Control control, [Disal /// Initial name of the element. /// Reference to control derived instance. /// Inner space occupied by a KryptonDockingNavigator. - public KryptonDockingControl(string name, [DisallowNull] Control control, [DisallowNull] KryptonDockingWorkspace workspace) + public KryptonDockingControl(string name, Control control, KryptonDockingWorkspace workspace) : base(name) { if (control == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs index 8acc943a7..25461cb63 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs @@ -36,7 +36,7 @@ public class KryptonDockingFloatingWindow : DockingElementClosedCollection /// Reference to form that owns the floating windows. /// Reference to form that will own all the floating window. /// Allow window to be minimised. - public KryptonDockingFloatingWindow(string? name, [DisallowNull] Form owner, [DisallowNull] KryptonDockingFloatspace floatspace, bool useMinimiseBox) + public KryptonDockingFloatingWindow(string? name, Form owner, KryptonDockingFloatspace floatspace, bool useMinimiseBox) : base(name) { if (owner == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs index 26889edff..c7473ab73 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs @@ -491,7 +491,7 @@ public KryptonDockingNavigator ManageNavigator(string name, string storeName, Kr /// /// Comma separated list of names to resolve. /// IDockingElement reference if path was resolved with success; otherwise null. - public override IDockingElement? ResolvePath([DisallowNull] string path) + public override IDockingElement? ResolvePath(string path) { // Cannot resolve a null reference if (path == null) @@ -513,7 +513,7 @@ public KryptonDockingNavigator ManageNavigator(string name, string storeName, Kr /// Show all display elements of the provided page. /// /// Reference to page that should be shown. - public void ShowPage([DisallowNull] KryptonPage page) + public void ShowPage(KryptonPage page) { // Cannot show a null reference if (page == null) @@ -528,7 +528,7 @@ public void ShowPage([DisallowNull] KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage([DisallowNull] string uniqueName) + public void ShowPage(string uniqueName) { // Cannot show a null reference if (uniqueName == null) @@ -543,7 +543,7 @@ public void ShowPage([DisallowNull] string uniqueName) /// Show all display elements of the provided pages. /// /// Array of references to pages that should be shown. - public void ShowPages([DisallowNull] KryptonPage[] pages) + public void ShowPages(KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -573,7 +573,7 @@ public void ShowPages([DisallowNull] KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages([DisallowNull] string[] uniqueNames) + public void ShowPages(string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) @@ -615,7 +615,7 @@ public void ShowAllPages() /// Hide all display elements of the provided page. /// /// Reference to page that should be hidden. - public void HidePage([DisallowNull] KryptonPage page) + public void HidePage(KryptonPage page) { // Cannot hide a null reference if (page == null) @@ -630,7 +630,7 @@ public void HidePage([DisallowNull] KryptonPage page) /// Hide all display elements of the provided page. /// /// Unique name of the page that should be hidden. - public void HidePage([DisallowNull] string uniqueName) + public void HidePage(string uniqueName) { // Cannot hide a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -648,7 +648,7 @@ public void HidePage([DisallowNull] string uniqueName) /// Hide all display elements of the provided pages. /// /// Array of references to pages that should be hidden. - public void HidePages([DisallowNull] KryptonPage[] pages) + public void HidePages(KryptonPage[] pages) { // Cannot hide a null reference if (pages == null) @@ -679,7 +679,7 @@ public void HidePages([DisallowNull] KryptonPage[] pages) /// Hide all display elements of the provided pages. /// /// Array of unique names of the pages that should be hidden. - public void HidePages([DisallowNull] string[] uniqueNames) + public void HidePages(string[] uniqueNames) { // Cannot hide a null reference if (uniqueNames == null) @@ -722,7 +722,7 @@ public void HideAllPages() /// /// Reference to page. /// True if the page is present and showing; otherwise false. - public bool IsPageShowing([DisallowNull] KryptonPage page) + public bool IsPageShowing(KryptonPage page) { // Cannot search for a null reference if (page == null) @@ -738,7 +738,7 @@ public bool IsPageShowing([DisallowNull] KryptonPage page) /// /// Unique name of page.. /// True if the page is present and showing; otherwise false. - public bool IsPageShowing([DisallowNull] string uniqueName) + public bool IsPageShowing(string uniqueName) { // Cannot search for a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -764,7 +764,7 @@ public bool IsPageShowing([DisallowNull] string uniqueName) /// /// Reference to page that should be removed. /// Should the page be disposed when removed. - public void RemovePage([DisallowNull] KryptonPage page, bool disposePage) + public void RemovePage(KryptonPage page, bool disposePage) { // Cannot remove a null reference if (page == null) @@ -780,7 +780,7 @@ public void RemovePage([DisallowNull] KryptonPage page, bool disposePage) /// /// Unique name of the page that should be removed. /// Should the page be disposed when removed. - public void RemovePage([DisallowNull] string uniqueName, bool disposePage) + public void RemovePage(string uniqueName, bool disposePage) { // Cannot remove a null reference if (uniqueName == null) @@ -802,7 +802,7 @@ public void RemovePage([DisallowNull] string uniqueName, bool disposePage) /// /// Array of references to pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) + public void RemovePages(KryptonPage[] pages, bool disposePage) { // Cannot remove a null reference if (pages == null) @@ -834,7 +834,7 @@ public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) /// /// Array of unique names of the pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages([DisallowNull] string[] uniqueNames, bool disposePage) + public void RemovePages(string[] uniqueNames, bool disposePage) { // Cannot remove a null reference if (uniqueNames == null) @@ -880,7 +880,7 @@ public void RemoveAllPages(bool disposePage) /// /// Reference to page that should be found. /// True if the page is present; otherwise false. - public bool ContainsPage([DisallowNull] KryptonPage page) + public bool ContainsPage(KryptonPage page) { // Cannot find a null reference if (page == null) @@ -896,7 +896,7 @@ public bool ContainsPage([DisallowNull] KryptonPage page) /// /// Unique name of page that should be found. /// True if the page is present; otherwise false. - public bool ContainsPage([DisallowNull] string uniqueName) + public bool ContainsPage(string uniqueName) { // Cannot find a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -922,7 +922,7 @@ public bool ContainsPage([DisallowNull] string uniqueName) /// /// Unique name of page that should be found. /// Reference to page if the named page exists in the docking hierarchy; otherwise false. - public KryptonPage? PageForUniqueName([DisallowNull] string uniqueName) + public KryptonPage? PageForUniqueName(string uniqueName) { // Cannot find a null reference if (uniqueName == null) @@ -944,7 +944,7 @@ public bool ContainsPage([DisallowNull] string uniqueName) /// Replace named page with a store placeholder so it can be restored at a later time. /// /// Reference to page that should be replaced. - public void StorePage([DisallowNull] KryptonPage page) + public void StorePage(KryptonPage page) { // Cannot replace a null reference if (page == null) @@ -959,7 +959,7 @@ public void StorePage([DisallowNull] KryptonPage page) /// Replace page with a store placeholder so it can be restored at a later time. /// /// Unique name of the page that should be replaced. - public void StorePage([DisallowNull] string uniqueName) + public void StorePage(string uniqueName) { // Cannot replace a null reference if (uniqueName == null) @@ -980,7 +980,7 @@ public void StorePage([DisallowNull] string uniqueName) /// Replace named pages with store placeholders so they can be restored at a later time. /// /// Array of references to pages that should be replaced. - public void StorePages([DisallowNull] KryptonPage[] pages) + public void StorePages(KryptonPage[] pages) { // Cannot replace a null reference if (pages == null) @@ -1011,7 +1011,7 @@ public void StorePages([DisallowNull] KryptonPage[] pages) /// Replace pages with store placeholders so they can be restored at a later time. /// /// Array of unique names of the pages that should be replaced. - public void StorePages([DisallowNull] string[] uniqueNames) + public void StorePages(string[] uniqueNames) { // Cannot replace a null reference if (uniqueNames == null) @@ -1053,7 +1053,7 @@ public void StoreAllPages() /// Clear away any store pages for the provided pages. /// /// Array of references to pages that should be shown. - public void ClearStoredPages([DisallowNull] KryptonPage[] pages) + public void ClearStoredPages(KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -1083,7 +1083,7 @@ public void ClearStoredPages([DisallowNull] KryptonPage[] pages) /// Clear away any store pages for the provided unique named pages. /// /// Array of unique names of the pages that should have store pages removed. - public void ClearStoredPages([DisallowNull] string[] uniqueNames) + public void ClearStoredPages(string[] uniqueNames) { // Cannot clear a null reference if (uniqueNames == null) @@ -1129,7 +1129,7 @@ public void ClearAllStoredPages() /// /// Reference to page. /// Enumeration value indicating docking location. - public DockingLocation FindPageLocation([DisallowNull] KryptonPage? page) + public DockingLocation FindPageLocation(KryptonPage? page) { // Cannot find a null reference if (page == null) @@ -1145,7 +1145,7 @@ public DockingLocation FindPageLocation([DisallowNull] KryptonPage? page) /// /// Unique name of the page. /// Enumeration value indicating docking location. - public override DockingLocation FindPageLocation([DisallowNull] string uniqueName) + public override DockingLocation FindPageLocation(string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1168,7 +1168,7 @@ public override DockingLocation FindPageLocation([DisallowNull] string uniqueNam /// /// Reference to page. /// IDockingElement reference if page is found; otherwise null. - public IDockingElement? FindPageElement([DisallowNull] KryptonPage page) + public IDockingElement? FindPageElement(KryptonPage page) { // Cannot find a null reference if (page == null) @@ -1184,7 +1184,7 @@ public override DockingLocation FindPageLocation([DisallowNull] string uniqueNam /// /// Unique name of the page. /// IDockingElement reference if page is found; otherwise null. - public override IDockingElement? FindPageElement([DisallowNull] string uniqueName) + public override IDockingElement? FindPageElement(string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1208,7 +1208,7 @@ public override DockingLocation FindPageLocation([DisallowNull] string uniqueNam /// Location to be searched. /// Reference to page. /// IDockingElement reference if store page is found; otherwise null. - public IDockingElement? FindStorePageElement(DockingLocation location, [DisallowNull] KryptonPage page) + public IDockingElement? FindStorePageElement(DockingLocation location, KryptonPage page) { // Cannot find a null reference if (page == null) @@ -1225,7 +1225,7 @@ public override DockingLocation FindPageLocation([DisallowNull] string uniqueNam /// Location to be searched. /// Unique name of the page to be found. /// IDockingElement reference if store page is found; otherwise null. - public override IDockingElement? FindStorePageElement(DockingLocation location, [DisallowNull] string uniqueName) + public override IDockingElement? FindStorePageElement(DockingLocation location, string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1406,7 +1406,7 @@ public override DockingLocation FindPageLocation([DisallowNull] string uniqueNam /// Perform the close request for a set of named pages. /// /// Array of unique names that need action performed. - public virtual void CloseRequest([DisallowNull] IReadOnlyList uniqueNames) + public virtual void CloseRequest(IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -1466,7 +1466,7 @@ public virtual void CloseRequest([DisallowNull] IReadOnlyList uniqueName /// Make the named page auto hidden. /// /// Unique name of page to become auto hidden. - public virtual void MakeAutoHiddenRequest([DisallowNull] string uniqueName) + public virtual void MakeAutoHiddenRequest(string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1531,7 +1531,7 @@ public virtual void MakeAutoHiddenRequest([DisallowNull] string uniqueName) /// Make the named page docked. /// /// Unique name of page to become docked. - public virtual void MakeDockedRequest([DisallowNull] string uniqueName) + public virtual void MakeDockedRequest(string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1604,7 +1604,7 @@ public virtual void MakeDockedRequest([DisallowNull] string uniqueName) /// Make the named page floating. /// /// Unique name of page to become floating. - public virtual void MakeFloatingRequest([DisallowNull] string uniqueName) + public virtual void MakeFloatingRequest(string uniqueName) { // Cannot process a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1679,7 +1679,7 @@ public virtual void MakeFloatingRequest([DisallowNull] string uniqueName) /// Make the named page workspace tabbed. /// /// Unique name of page to become workspace tabbed. - public virtual void MakeWorkspaceRequest([DisallowNull] string uniqueName) + public virtual void MakeWorkspaceRequest(string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1748,7 +1748,7 @@ public virtual void MakeWorkspaceRequest([DisallowNull] string uniqueName) /// Make the named page navigator tabbed. /// /// Unique name of page to become navigator tabbed. - public virtual void MakeNavigatorRequest([DisallowNull] string uniqueName) + public virtual void MakeNavigatorRequest(string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1823,7 +1823,7 @@ public virtual void MakeNavigatorRequest([DisallowNull] string uniqueName) /// Reference to page. /// Reference to context menu. /// True if the context menu should be displayed; otherwise false. - public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, [DisallowNull] KryptonContextMenu kcm) + public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContextMenu kcm) { // Cannot action a null reference if (page == null) @@ -1945,7 +1945,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// /// Unique name of page inside docked cell that needs switching. /// KryptonDockingAutoHiddenGroup reference on success; otherwise null. - public virtual KryptonDockingAutoHiddenGroup? SwitchDockedCellToAutoHiddenGroupRequest([DisallowNull] string uniqueName) + public virtual KryptonDockingAutoHiddenGroup? SwitchDockedCellToAutoHiddenGroupRequest(string uniqueName) { // Cannot switch a null reference if (uniqueName == null) @@ -2036,7 +2036,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// /// Unique name of pages inside a docked cell that needs switching. /// KryptonDockingFloatingWindow reference on success; otherwise null. - public virtual KryptonDockingFloatingWindow? SwitchDockedToFloatingWindowRequest([DisallowNull] IReadOnlyList uniqueNames) + public virtual KryptonDockingFloatingWindow? SwitchDockedToFloatingWindowRequest(IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2163,7 +2163,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// /// Unique name of floating pages that need switching. /// KryptonDockingDockspace reference if a new dockspace needed to be created; otherwise false. - public virtual KryptonDockingDockspace? SwitchFloatingToDockedRequest([DisallowNull] string[] uniqueNames) + public virtual KryptonDockingDockspace? SwitchFloatingToDockedRequest(string[] uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2305,7 +2305,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// /// Unique name of floating pages that need switching. /// KryptonDockingFloatingWindow reference on success; otherwise false. - public virtual KryptonDockingFloatingWindow? SwitchFloatingToFloatingWindowRequest([DisallowNull] IReadOnlyList uniqueNames) + public virtual KryptonDockingFloatingWindow? SwitchFloatingToFloatingWindowRequest(IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2409,7 +2409,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// /// Unique name of page inside auto hidden group that needs switching. /// KryptonDockingDockspace reference if a new dockspace needed to be created; otherwise false. - public virtual KryptonDockingDockspace? SwitchAutoHiddenGroupToDockedCellRequest([DisallowNull] string uniqueName) + public virtual KryptonDockingDockspace? SwitchAutoHiddenGroupToDockedCellRequest(string uniqueName) { // Cannot switch a null reference if (uniqueName == null) @@ -2532,7 +2532,7 @@ public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, /// KryptonDockingDockspace reference. public virtual KryptonDockingDockspace AddDockspace(string path, DockingEdge edge, - [DisallowNull] KryptonPage[] pages, + KryptonPage[] pages, params KryptonPage[][] stackPages) { // Cannot add a null array @@ -2640,7 +2640,7 @@ public virtual KryptonDockingDockspace AddDockspace(string path, /// KryptonDockingAutoHiddenGroup reference. public virtual KryptonDockingAutoHiddenGroup AddAutoHiddenGroup(string path, DockingEdge edge, - [DisallowNull] KryptonPage[] pages, + KryptonPage[] pages, params KryptonPage[][] extraPages) { // Cannot add a null array @@ -2743,7 +2743,7 @@ public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, /// Initial client size of the floating window. /// KryptonDockingFloatingWindow reference. public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, - [DisallowNull] KryptonPage[] pages, + KryptonPage[] pages, Point location, Size clientSize) { @@ -2802,7 +2802,7 @@ public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, /// Path for finding the target KryptonDockingWorkspace. /// Array of pages to be added. /// KryptonDockingWorkspace reference. - public virtual KryptonDockingWorkspace AddToWorkspace(string path, [DisallowNull] KryptonPage[] pages) + public virtual KryptonDockingWorkspace AddToWorkspace(string path, KryptonPage[] pages) { // Cannot add a null array if (pages == null) @@ -2839,7 +2839,7 @@ public virtual KryptonDockingWorkspace AddToWorkspace(string path, [DisallowNull /// Path for finding the target KryptonDockingNavigator. /// Array of pages to be added. /// KryptonDockingNavigator reference. - public virtual KryptonDockingNavigator AddToNavigator(string path, [DisallowNull] KryptonPage[] pages) + public virtual KryptonDockingNavigator AddToNavigator(string path, KryptonPage[] pages) { // Cannot add a null array if (pages == null) @@ -2882,7 +2882,7 @@ public virtual KryptonDockingNavigator AddToNavigator(string path, [DisallowNull public virtual KryptonDockingDockspace InsertDockspace(string path, DockingEdge edge, int index, - [DisallowNull] KryptonPage[] pages, + KryptonPage[] pages, params KryptonPage[][] stackPages) { // Cannot add a null array @@ -2972,7 +2972,7 @@ public virtual KryptonDockingDockspace InsertDockspace(string path, public virtual KryptonDockingAutoHiddenGroup InsertAutoHiddenGroup(string path, DockingEdge edge, int index, - [DisallowNull] KryptonPage[] pages, + KryptonPage[] pages, params KryptonPage[][] extraPages) { // Cannot add a null array @@ -3042,7 +3042,7 @@ public virtual KryptonDockingAutoHiddenGroup InsertAutoHiddenGroup(string path, /// Control that started the drag operation. /// Set of pages requested to be dragged. public virtual void DoDragDrop(Point screenPoint, Point elementOffset, Control c, - [DisallowNull] KryptonPageCollection pages) + KryptonPageCollection pages) { // Cannot drag a null reference if (pages == null) @@ -3186,7 +3186,7 @@ page is not KryptonStorePage /// Control that started the drag operation. /// Reference to floating window element that should be dragged. public virtual void DoDragDrop(Point screenPoint, Point elementOffset, Control? c, - [DisallowNull] KryptonDockingFloatingWindow window) + KryptonDockingFloatingWindow window) { // Cannot drag a null reference if (window == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs index f6693c68a..e76d04a31 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs @@ -153,7 +153,7 @@ public void ShowPage(KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage([DisallowNull] string uniqueName) + public void ShowPage(string uniqueName) { // Cannot show a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -198,7 +198,7 @@ public void ShowPages(KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages([DisallowNull] string[] uniqueNames) + public void ShowPages(string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs index 29597df51..e9f8e255c 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs @@ -171,7 +171,7 @@ public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage page) = /// Reference to existing workspace cell. /// Index for inserting new pages. /// Array of KryptonPage instances to be added. - public void CellInsert([DisallowNull] KryptonWorkspaceCell cell, int index, KryptonPage[]? pages) + public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage[]? pages) { // Demand that pages are not already present DemandPagesNotBePresent(pages); diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs index eca36952a..3c60ea638 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs @@ -41,7 +41,7 @@ public KryptonDockingWorkspace(string name) /// Reference to workspace to manage. public KryptonDockingWorkspace(string name, string storeName, - [DisallowNull] KryptonDockableWorkspace workspace) + KryptonDockableWorkspace workspace) : base(name, storeName) { SpaceControl = workspace ?? throw new ArgumentNullException(nameof(workspace)); @@ -84,7 +84,7 @@ public override IDockingElement? Parent /// Show all display elements of the provided page. /// /// Reference to page that should be shown. - public void ShowPage([DisallowNull] KryptonPage page) + public void ShowPage(KryptonPage page) { // Cannot show a null reference if (page == null) @@ -99,7 +99,7 @@ public void ShowPage([DisallowNull] KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage([DisallowNull] string uniqueName) + public void ShowPage(string uniqueName) { // Cannot show a null reference if (uniqueName == null) @@ -114,7 +114,7 @@ public void ShowPage([DisallowNull] string uniqueName) /// Show all display elements of the provided pages. /// /// Array of references to pages that should be shown. - public void ShowPages([DisallowNull] KryptonPage[] pages) + public void ShowPages(KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -144,7 +144,7 @@ public void ShowPages([DisallowNull] KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages([DisallowNull] string[] uniqueNames) + public void ShowPages(string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) @@ -186,7 +186,7 @@ public void ShowAllPages() /// Hide all display elements of the provided page. /// /// Reference to page that should be hidden. - public void HidePage([DisallowNull] KryptonPage page) + public void HidePage(KryptonPage page) { // Cannot hide a null reference if (page == null) @@ -201,7 +201,7 @@ public void HidePage([DisallowNull] KryptonPage page) /// Hide all display elements of the provided page. /// /// Unique name of the page that should be hidden. - public void HidePage([DisallowNull] string uniqueName) + public void HidePage(string uniqueName) { // Cannot hide a null reference if (uniqueName == null) @@ -219,7 +219,7 @@ public void HidePage([DisallowNull] string uniqueName) /// Hide all display elements of the provided pages. /// /// Array of references to pages that should be hidden. - public void HidePages([DisallowNull] KryptonPage[] pages) + public void HidePages(KryptonPage[] pages) { // Cannot hide a null reference if (pages == null) @@ -250,7 +250,7 @@ public void HidePages([DisallowNull] KryptonPage[] pages) /// Hide all display elements of the provided pages. /// /// Array of unique names of the pages that should be hidden. - public void HidePages([DisallowNull] string[] uniqueNames) + public void HidePages(string[] uniqueNames) { // Cannot hide a null reference if (uniqueNames == null) @@ -293,7 +293,7 @@ public void HideAllPages() /// /// Unique name of the page that should be removed. /// Should the page be disposed when removed. - public void RemovePage([DisallowNull] string uniqueName, bool disposePage) + public void RemovePage(string uniqueName, bool disposePage) { // Cannot remove a null reference if (uniqueName == null) @@ -315,7 +315,7 @@ public void RemovePage([DisallowNull] string uniqueName, bool disposePage) /// /// Array of references to pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) + public void RemovePages(KryptonPage[] pages, bool disposePage) { // Cannot remove a null reference if (pages == null) @@ -347,7 +347,7 @@ public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) /// /// Array of unique names of the pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages([DisallowNull] string[] uniqueNames, bool disposePage) + public void RemovePages(string[] uniqueNames, bool disposePage) { // Cannot remove a null reference if (uniqueNames == null) diff --git a/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs b/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs index 445206b7c..e9e2e9e18 100644 --- a/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs +++ b/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs @@ -23,7 +23,7 @@ public class CancelUniqueNameEventArgs : UniqueNameEventArgs /// /// Unique name of page. /// Initial value for the cancel property. - public CancelUniqueNameEventArgs([DisallowNull] string uniqueName, bool cancel) + public CancelUniqueNameEventArgs(string uniqueName, bool cancel) : base(uniqueName) => Cancel = cancel; diff --git a/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs b/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs index d1101ce35..530b958b5 100644 --- a/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs +++ b/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs @@ -30,7 +30,7 @@ internal class ViewDrawAutoHiddenTab : ViewDrawButton, /// /// Reference to the page this tab represents. /// Visual orientation used for drawing the tab. - public ViewDrawAutoHiddenTab([DisallowNull] KryptonPage page, + public ViewDrawAutoHiddenTab(KryptonPage page, VisualOrientation orientation) : base(page.StateDisabled!.CheckButton, page.StateNormal!.CheckButton, diff --git a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs index 7a4d81dda..ed61e0269 100644 --- a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs +++ b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs @@ -29,7 +29,7 @@ public abstract class ButtonSpecNavFixed : ButtonSpec /// /// Reference to owning navigator instance. /// Fixed style to use. - protected ButtonSpecNavFixed([DisallowNull] KryptonNavigator navigator, + protected ButtonSpecNavFixed(KryptonNavigator navigator, PaletteButtonSpecStyle fixedStyle) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs index b6d4e796f..962864193 100644 --- a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs +++ b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs @@ -128,7 +128,7 @@ public enum ButtonSpecRemapTarget /// Reference to button specification. /// Target for remapping the color onto. public ButtonSpecNavRemap(PaletteBase? target, - [DisallowNull] ButtonSpec buttonSpec, + ButtonSpec buttonSpec, ButtonSpecRemapTarget remapTarget) : base(target) { diff --git a/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs b/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs index 8fc06a740..63cafaf0b 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs @@ -70,7 +70,7 @@ public class DragViewController : GlobalId, /// Initialize a new instance of the DragViewController class. /// /// Target for state changes. - public DragViewController([DisallowNull] ViewBase target) + public DragViewController(ViewBase target) { Debug.Assert(target != null); @@ -268,7 +268,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -322,7 +322,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs b/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs index 73ee78421..b04ceac01 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs @@ -41,7 +41,7 @@ internal class OutlookMiniController : GlobalId, /// Target for state changes. /// Delegate for notifying paint requests. public OutlookMiniController(ViewBase target, - [DisallowNull] NeedPaintHandler needPaint) + NeedPaintHandler needPaint) { Debug.Assert(needPaint != null); @@ -208,7 +208,7 @@ public virtual void DoubleClick(Point pt) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -252,7 +252,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs index 06dafe189..7a5ca5a16 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs @@ -1904,7 +1904,7 @@ internal bool NextActionValid return null; } - internal KryptonPage? PreviousActionPage([DisallowNull] KryptonPage page) + internal KryptonPage? PreviousActionPage(KryptonPage page) { Debug.Assert(page != null); @@ -1924,7 +1924,7 @@ internal bool NextActionValid return null; } - internal KryptonPage? NextActionPage([DisallowNull] KryptonPage page) + internal KryptonPage? NextActionPage(KryptonPage page) { Debug.Assert(page != null); @@ -1956,8 +1956,8 @@ internal bool NextActionValid return position; } - internal void ShowPopupPage([DisallowNull] KryptonPage? page, - [DisallowNull] ViewBase? relative, + internal void ShowPopupPage(KryptonPage? page, + ViewBase? relative, EventHandler? finishDelegate) { Debug.Assert(page != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs index 2b5133b3e..c689a5679 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs @@ -23,7 +23,7 @@ public class KryptonNavigatorControlCollection : KryptonControlCollection /// Initialize a new instance of the KryptonNavigatorControlCollection class. /// /// Control containing this collection. - public KryptonNavigatorControlCollection([DisallowNull] KryptonNavigator owner) + public KryptonNavigatorControlCollection(KryptonNavigator owner) : base(owner) { Debug.Assert(owner != null); @@ -35,7 +35,7 @@ public KryptonNavigatorControlCollection([DisallowNull] KryptonNavigator owner) /// Adds the specified control to the control collection. /// /// The KryptonPage to add to the control collection. - public override void Add([DisallowNull] Control value) + public override void Add(Control value) { Debug.Assert(value != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs b/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs index 5d6a605df..8bc57a8e4 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs @@ -37,8 +37,8 @@ static VisualPopupPage() => /// Reference to owning navigator control. /// Reference to page for display. /// Drawing renderer. - public VisualPopupPage([DisallowNull] KryptonNavigator navigator, - [DisallowNull] KryptonPage page, + public VisualPopupPage(KryptonNavigator navigator, + KryptonPage page, IRenderer? renderer) : base(renderer, true) { diff --git a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs index 1aed9b7b6..f0ab19429 100644 --- a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs +++ b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs @@ -77,10 +77,10 @@ protected virtual void Dispose(bool disposing) /// Drawing renderer. /// Drag data associated with drag operation. /// List of all drag targets. - public virtual void Start([DisallowNull] IPaletteDragDrop paletteDragDrop, - [DisallowNull] IRenderer renderer, - [DisallowNull] PageDragEndData pageDragEndData, - [DisallowNull] DragTargetList dragTargets) + public virtual void Start(IPaletteDragDrop paletteDragDrop, + IRenderer renderer, + PageDragEndData pageDragEndData, + DragTargetList dragTargets) { Debug.Assert(paletteDragDrop != null); Debug.Assert(renderer != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs index 573dbb024..f82cf43f7 100644 --- a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs +++ b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs @@ -48,7 +48,7 @@ protected override void Dispose(bool disposing) /// List of all drag targets. public override void Start(IPaletteDragDrop paletteDragDrop, IRenderer renderer, - [DisallowNull] PageDragEndData? pageDragEndData, + PageDragEndData? pageDragEndData, DragTargetList dragTargets) { base.Start(paletteDragDrop, renderer, pageDragEndData, dragTargets); diff --git a/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs b/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs index cba50d6bd..f2be0f2e8 100644 --- a/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs +++ b/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs @@ -32,7 +32,7 @@ internal class PageToToolTipMapping : IContentValues /// How to map the image from the page to the tooltip. /// How to map the text from the page to the tooltip. /// How to map the extra text from the page to the tooltip. - public PageToToolTipMapping([DisallowNull] KryptonPage page, + public PageToToolTipMapping(KryptonPage page, MapKryptonPageImage mapImage, MapKryptonPageText mapText, MapKryptonPageText mapExtraText) diff --git a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs index dc95e0d06..f6af155c7 100644 --- a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs +++ b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs @@ -34,7 +34,7 @@ public class KryptonNavigatorDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs index dac246126..a73ebf228 100644 --- a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs +++ b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs @@ -28,7 +28,7 @@ internal class KryptonPageDesigner : ScrollableControlDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Perform common base class initializating base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs b/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs index 7940e42b1..41efa8d43 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs @@ -31,7 +31,7 @@ public abstract class HeaderGroupMappingBase : HeaderValuesBase /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - protected HeaderGroupMappingBase([DisallowNull] KryptonNavigator navigator, + protected HeaderGroupMappingBase(KryptonNavigator navigator, NeedPaintHandler needPaint) : base(needPaint) { diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs index 66f83a93b..17399115f 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs @@ -53,7 +53,7 @@ public class NavigatorBar : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorBar([DisallowNull] KryptonNavigator navigator, + public NavigatorBar(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs index 525d89279..78168c8b9 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs @@ -46,7 +46,7 @@ public class NavigatorButton : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorButton([DisallowNull] KryptonNavigator navigator, + public NavigatorButton(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs index 90c7a7f6f..382f34f0a 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs @@ -30,7 +30,7 @@ public class NavigatorGroup : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorGroup([DisallowNull] KryptonNavigator navigator, + public NavigatorGroup(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs index af996f18f..cd57a189a 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs @@ -38,7 +38,7 @@ public class NavigatorHeader : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorHeader([DisallowNull] KryptonNavigator navigator, + public NavigatorHeader(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs index a8aa7c696..328671050 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs @@ -43,7 +43,7 @@ public class NavigatorOutlook : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlook([DisallowNull] KryptonNavigator navigator, + public NavigatorOutlook(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs index ee27640f0..1d59df998 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs @@ -34,7 +34,7 @@ public class NavigatorOutlookFull : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlookFull([DisallowNull] KryptonNavigator navigator, + public NavigatorOutlookFull(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs index 482beb263..2e3266268 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs @@ -35,7 +35,7 @@ public class NavigatorOutlookMini : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlookMini([DisallowNull] KryptonNavigator navigator, + public NavigatorOutlookMini(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs index 7b59f9d89..51da38599 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs @@ -29,7 +29,7 @@ public class NavigatorPanel : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorPanel([DisallowNull] KryptonNavigator navigator, + public NavigatorPanel(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs index f130b0983..bc300d202 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs @@ -37,8 +37,8 @@ public class NavigatorPopupPages : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorPopupPages([DisallowNull] KryptonNavigator navigator, - [DisallowNull] NeedPaintHandler needPaint) + public NavigatorPopupPages(KryptonNavigator navigator, + NeedPaintHandler needPaint) { Debug.Assert(navigator != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs index 4b784d138..e5e8fed03 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs @@ -36,7 +36,7 @@ public class NavigatorStack : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorStack([DisallowNull] KryptonNavigator navigator, + public NavigatorStack(KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs index 90d7b1808..9c7c44508 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs @@ -28,8 +28,8 @@ public class NavigatorToolTips : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorToolTips([DisallowNull] KryptonNavigator navigator, - [DisallowNull] NeedPaintHandler needPaint) + public NavigatorToolTips(KryptonNavigator navigator, + NeedPaintHandler needPaint) { Debug.Assert(navigator != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs index fadd85e68..2809fe084 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs @@ -36,7 +36,7 @@ public class PaletteBarRedirect : PaletteMetricRedirect /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteBarRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteBarRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs index 6c9ead960..020a5a25b 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs @@ -60,7 +60,7 @@ public InternalStorage() /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteNavContent([DisallowNull] IPaletteContent inherit, + public PaletteNavContent(IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs index cfc967200..868006076 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs @@ -30,7 +30,7 @@ public class PaletteNavigatorHeaderGroup : PaletteHeaderGroup public PaletteNavigatorHeaderGroup(PaletteHeaderGroupRedirect? inheritHeaderGroup, PaletteHeaderPaddingRedirect inheritHeaderPrimary, PaletteHeaderPaddingRedirect inheritHeaderSecondary, - [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderBar, + PaletteHeaderPaddingRedirect inheritHeaderBar, PaletteHeaderPaddingRedirect inheritHeaderOverflow, NeedPaintHandler needPaint) : base(inheritHeaderGroup!, inheritHeaderPrimary, diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs index 9038b3a60..eae62396c 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs @@ -41,8 +41,8 @@ public PaletteNavigatorHeaderGroupRedirect(PaletteRedirect? redirect, public PaletteNavigatorHeaderGroupRedirect(PaletteRedirect? redirectHeaderGroup, PaletteRedirect? redirectHeaderPrimary, PaletteRedirect? redirectHeaderSecondary, - [DisallowNull] PaletteRedirect? redirectHeaderBar, - [DisallowNull] PaletteRedirect? redirectHeaderOverflow, + PaletteRedirect? redirectHeaderBar, + PaletteRedirect? redirectHeaderOverflow, NeedPaintHandler needPaint) : base(redirectHeaderGroup!, redirectHeaderPrimary!, redirectHeaderSecondary!, needPaint) diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs index 3c93b4d67..9d5add887 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs @@ -30,7 +30,7 @@ public class PaletteRibbonGeneralNavRedirect : Storage, /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteRibbonGeneralNavRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteRibbonGeneralNavRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs index 1dea7c452..a263291c8 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs @@ -30,9 +30,9 @@ public class PaletteRibbonTabContent : Storage /// Source for inheriting palette ribbon text. /// Source for inheriting palette content. /// Delegate for notifying paint requests. - public PaletteRibbonTabContent([DisallowNull] IPaletteRibbonBack paletteBack, - [DisallowNull] IPaletteRibbonText paletteText, - [DisallowNull] IPaletteContent paletteContent, + public PaletteRibbonTabContent(IPaletteRibbonBack paletteBack, + IPaletteRibbonText paletteText, + IPaletteContent paletteContent, NeedPaintHandler needPaint) { Debug.Assert(paletteBack != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs index deca736fa..5453e3aa2 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs @@ -39,12 +39,12 @@ public class PaletteRibbonTabContentInheritOverride : PaletteRibbonDoubleInherit /// Backup inheritance text. /// Backup inheritance content. /// Palette state to override. - public PaletteRibbonTabContentInheritOverride([DisallowNull] IPaletteRibbonBack primaryBack, - [DisallowNull] IPaletteRibbonText primaryText, - [DisallowNull] IPaletteContent primaryContent, - [DisallowNull] IPaletteRibbonBack backupBack, - [DisallowNull] IPaletteRibbonText backupText, - [DisallowNull] IPaletteContent backupContent, + public PaletteRibbonTabContentInheritOverride(IPaletteRibbonBack primaryBack, + IPaletteRibbonText primaryText, + IPaletteContent primaryContent, + IPaletteRibbonBack backupBack, + IPaletteRibbonText backupText, + IPaletteContent backupContent, PaletteState state) { Debug.Assert(primaryBack != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs index 483576fbe..8e193d9a2 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs @@ -29,7 +29,7 @@ public class PaletteRibbonTabContentRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteRibbonTabContentRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteRibbonTabContentRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs index 31e7575fe..1cacd2d6c 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs @@ -26,9 +26,9 @@ internal class RibbonTabToContent : IPaletteContent /// Source for general ribbon settings. /// Source for ribbon tab settings. /// Source for content settings. - public RibbonTabToContent([DisallowNull] IPaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonTabText, - [DisallowNull] IPaletteContent content) + public RibbonTabToContent(IPaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonTabText, + IPaletteContent content) { Debug.Assert(ribbonGeneral != null); Debug.Assert(ribbonTabText != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs index 484df4ac0..068a8fa25 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs @@ -79,8 +79,8 @@ public PaletteRedirect? Redirector /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public virtual void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public virtual void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { Debug.Assert(navigator != null, $"{nameof(navigator)} != null"); @@ -151,7 +151,7 @@ public virtual void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public virtual void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) + public virtual void PageAppearanceChanged(KryptonPage page, string property) { } diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs index 89dde0c71..d570dbd9a 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs @@ -30,7 +30,7 @@ internal class ViewBuilderGroup : ViewBuilderBase /// Reference to current manager. /// Palette redirector. public override void Construct(KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs index d8289ace5..86fe6e293 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs @@ -580,7 +580,7 @@ private void SetHeaderPosition(ViewDrawCanvas canvas, } } - private void SetPalettes([DisallowNull] PaletteHeaderGroup? palette) + private void SetPalettes(PaletteHeaderGroup? palette) { _viewHeadingPrimary.SetPalettes(palette.HeaderPrimary.Back, palette.HeaderPrimary.Border, palette.HeaderPrimary); _viewHeadingSecondary.SetPalettes(palette.HeaderSecondary.Back, palette.HeaderSecondary.Border, palette.HeaderSecondary); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs index 2ca652db7..9ce63a3b9 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs @@ -29,8 +29,8 @@ internal class ViewBuilderHeaderGroup : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public override void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -161,7 +161,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) + public override void PageAppearanceChanged(KryptonPage page, string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs index 9a0bf12e2..83d86cdd4 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs @@ -38,8 +38,8 @@ internal abstract class ViewBuilderItemBase : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public override void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -231,7 +231,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) + public override void PageAppearanceChanged(KryptonPage page, string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs index ba6f0b4a5..b6ce2fb2b 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs @@ -280,8 +280,8 @@ public void SeparatorNotMoved() /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public override void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -470,7 +470,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) + public override void PageAppearanceChanged(KryptonPage page, string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs index 18c83ec37..4b13e2ed1 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs @@ -29,8 +29,8 @@ internal class ViewBuilderPanel : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public override void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs index d414e8920..9091b256e 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs @@ -38,8 +38,8 @@ protected class PageToButtonEdge : Dictionary { /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct([DisallowNull] KryptonNavigator navigator, - [DisallowNull] ViewManager manager, + public override void Construct(KryptonNavigator navigator, + ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -185,7 +185,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) + public override void PageAppearanceChanged(KryptonPage page, string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs index 087243f51..b22abf8eb 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs @@ -35,9 +35,9 @@ internal class ViewletHeaderGroup /// Reference to navigator instance. /// Palette redirector. /// Delegate for notifying paint requests. - public ViewletHeaderGroup([DisallowNull] KryptonNavigator navigator, + public ViewletHeaderGroup(KryptonNavigator navigator, PaletteRedirect? redirector, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) { Debug.Assert(navigator != null); Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs index 4607ab4e3..e6447d4f1 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs @@ -102,7 +102,7 @@ public ViewDrawNavCheckButtonBase(KryptonNavigator navigator, /// Source for pressed state values. /// Source for selected state values. /// Source for focused state values. - public ViewDrawNavCheckButtonBase([DisallowNull] KryptonNavigator navigator, + public ViewDrawNavCheckButtonBase(KryptonNavigator navigator, KryptonPage? page, VisualOrientation orientation, IPaletteTriple stateDisabled, diff --git a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs index 4cd69c1f5..e473102d8 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs @@ -65,8 +65,8 @@ internal class ViewDrawNavRibbonTab : ViewComposite, /// /// Owning navigator instance. /// Page this ribbon tab represents. - public ViewDrawNavRibbonTab([DisallowNull] KryptonNavigator navigator, - [DisallowNull] KryptonPage page) + public ViewDrawNavRibbonTab(KryptonNavigator navigator, + KryptonPage page) { Debug.Assert(navigator != null); Debug.Assert(page != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs index 5bbcbbb52..a619ff0b8 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs @@ -296,7 +296,7 @@ public void SetMetrics(IPaletteMetric paletteMetric, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -814,7 +814,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs index 3fe7dc5e9..cbe04a800 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs @@ -30,9 +30,9 @@ internal class ViewLayoutDockerOverlap : ViewLayoutDocker /// Canvas used to recover border width/rounding for overlapping. /// Overlapping element. /// Tab item container element. - public ViewLayoutDockerOverlap([DisallowNull] ViewDrawCanvas drawCanvas, - [DisallowNull] ViewLayoutInsetOverlap layoutOverlap, - [DisallowNull] ViewLayoutBarForTabs layoutTabs) + public ViewLayoutDockerOverlap(ViewDrawCanvas drawCanvas, + ViewLayoutInsetOverlap layoutOverlap, + ViewLayoutBarForTabs layoutTabs) { Debug.Assert(drawCanvas != null); Debug.Assert(layoutOverlap != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs index 86d167d09..401034263 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs @@ -27,7 +27,7 @@ internal class ViewLayoutInsetOverlap : ViewComposite /// /// Initialize a new instance of the ViewLayoutInsetOverlap class. /// - public ViewLayoutInsetOverlap([DisallowNull] ViewDrawCanvas drawCanvas) + public ViewLayoutInsetOverlap(ViewDrawCanvas drawCanvas) { Debug.Assert(drawCanvas != null); @@ -92,7 +92,7 @@ public float Rounding /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -118,7 +118,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs index b811003ec..979ccb865 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs @@ -33,7 +33,7 @@ internal class ViewLayoutOutlookFull : ViewLayoutScrollViewport /// Animate changes in the viewport. /// Is the viewport vertical. /// Delegate for notifying paint requests. - public ViewLayoutOutlookFull([DisallowNull] ViewBuilderOutlookBase viewBuilder, + public ViewLayoutOutlookFull(ViewBuilderOutlookBase viewBuilder, VisualControl rootControl, ViewBase viewportFiller, PaletteBorderEdge paletteBorderEdge, diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs index de71b1b9f..80fba7876 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs @@ -22,7 +22,7 @@ internal class ViewLayoutOutlookMini : ViewLayoutDocker /// Initialize a new instance of the ViewLayoutOutlookMini class. /// /// View builder reference. - public ViewLayoutOutlookMini([DisallowNull] ViewBuilderOutlookBase viewBuilder) + public ViewLayoutOutlookMini(ViewBuilderOutlookBase viewBuilder) { Debug.Assert(viewBuilder != null); ViewBuilder = viewBuilder!; diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs index 736380f96..07c511c91 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs @@ -31,7 +31,7 @@ internal class ViewLayoutPageHide : ViewLayoutNull /// /// Initialize a new instance of the ViewLayoutPageHide class. /// - public ViewLayoutPageHide([DisallowNull] KryptonNavigator navigator) + public ViewLayoutPageHide(KryptonNavigator navigator) { Debug.Assert(navigator != null); @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return Size.Empty; @@ -64,7 +64,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs index ba55ba1e9..3b53e8471 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs @@ -26,7 +26,7 @@ internal class ViewLayoutPageShow : ViewLayoutNull /// /// Initialize a new instance of the ViewLayoutPageShow class. /// - public ViewLayoutPageShow([DisallowNull] KryptonNavigator navigator) + public ViewLayoutPageShow(KryptonNavigator navigator) { Debug.Assert(navigator != null); @@ -60,7 +60,7 @@ public void SetMinimumAsPreferred(bool minimum) => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -91,7 +91,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs index b027ebcc3..eb57ab1ba 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs @@ -28,8 +28,8 @@ internal class ViewLayoutPopupPage : ViewLayoutNull /// /// Reference to owning navigator control. /// Page to the positioned. - public ViewLayoutPopupPage([DisallowNull] KryptonNavigator navigator, - [DisallowNull] KryptonPage page) + public ViewLayoutPopupPage(KryptonNavigator navigator, + KryptonPage page) { Debug.Assert(navigator != null); Debug.Assert(page != null); @@ -53,7 +53,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _page.GetPreferredSize(context!.DisplayRectangle.Size); @@ -63,7 +63,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs index d62c09572..cdf5e7cc1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs @@ -28,7 +28,7 @@ public class ButtonSpecExpandRibbon : ButtonSpec /// Initialize a new instance of the ButtonSpecExpandRibbon class. /// /// Reference to owning ribbon control. - public ButtonSpecExpandRibbon([DisallowNull] KryptonRibbon ribbon) + public ButtonSpecExpandRibbon(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs index 9cdfc8354..22c346e51 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs @@ -36,7 +36,7 @@ public class ButtonSpecManagerLayoutAppButton : ButtonSpecManagerLayout /// Delegate for notifying paint requests. public ButtonSpecManagerLayoutAppButton(ViewContextMenuManager viewManager, Control control, - [DisallowNull] PaletteRedirect? redirector, + PaletteRedirect? redirector, ButtonSpecCollectionBase variableSpecs, ButtonSpecCollectionBase? fixedSpecs, ViewLayoutDocker[] viewDockers, diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs index 76359bc62..8514b49a0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildClose : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildClose class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildClose([DisallowNull] KryptonRibbon ribbon) + public ButtonSpecMdiChildClose(KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantClose) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs index aeaa8fa23..da08df8a3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildMin : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildMin class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildMin([DisallowNull] KryptonRibbon ribbon) + public ButtonSpecMdiChildMin(KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantMin) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs index e13cb2652..9854a7657 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildRestore : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildRestore class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildRestore([DisallowNull] KryptonRibbon ribbon) + public ButtonSpecMdiChildRestore(KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantRestore) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs index c0f9e29c1..3b7dc4df7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs @@ -28,7 +28,7 @@ public class ButtonSpecMinimizeRibbon : ButtonSpec /// Initialize a new instance of the ButtonSpecMinimizeRibbon class. /// /// Reference to owning ribbon control. - public ButtonSpecMinimizeRibbon([DisallowNull] KryptonRibbon ribbon) + public ButtonSpecMinimizeRibbon(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs index ea8f4bd67..265fe2f6c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs @@ -231,7 +231,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs index b3dc78573..4fe1574d7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs @@ -226,7 +226,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs index 4a2f0f733..34e40e1b6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs @@ -48,7 +48,7 @@ public ButtonSpecAppButtonController(ViewContextMenuManager viewManager, /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public override void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public override void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -97,7 +97,7 @@ public override void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventAr /// /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. - public override void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public override void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs index 5832865d9..eeb2b5038 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs @@ -248,7 +248,7 @@ public override void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public override void LostFocus([DisallowNull] Control c) + public override void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs index 11ad1b52f..88a1b0b0c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs @@ -44,9 +44,9 @@ internal class CollapsedGroupController : GlobalId, /// Reference to owning control instance. /// View element that owns this controller. /// Paint delegate for notifying visual changes. - public CollapsedGroupController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewLayoutDocker target, - [DisallowNull] NeedPaintHandler needPaint) + public CollapsedGroupController(KryptonRibbon ribbon, + ViewLayoutDocker target, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); @@ -195,7 +195,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { HasFocus = false; OnNeedPaint(false, _target.ClientRectangle); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs index 3e39b81f2..be1072988 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs @@ -35,9 +35,9 @@ internal class ComboBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public ComboBoxController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupComboBox comboBox, - [DisallowNull] ViewDrawRibbonGroupComboBox target) + public ComboBoxController(KryptonRibbon ribbon, + KryptonRibbonGroupComboBox comboBox, + ViewDrawRibbonGroupComboBox target) { Debug.Assert(ribbon != null); Debug.Assert(comboBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs index b7e4ccfa5..d8fe57e3d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs @@ -30,7 +30,7 @@ internal class ContextTitleController : GlobalId, /// Initialize a new instance of the ContextTitleController class. /// /// Reference to owning ribbon instance. - public ContextTitleController([DisallowNull] KryptonRibbon ribbon) + public ContextTitleController(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs index 1abd4f2b6..72f3cae72 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs @@ -35,9 +35,9 @@ internal class CustomControlController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public CustomControlController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCustomControl customControl, - [DisallowNull] ViewDrawRibbonGroupCustomControl target) + public CustomControlController(KryptonRibbon ribbon, + KryptonRibbonGroupCustomControl customControl, + ViewDrawRibbonGroupCustomControl target) { Debug.Assert(ribbon != null); Debug.Assert(customControl != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs index 4ee32dbaf..2d56be16b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs @@ -35,9 +35,9 @@ internal class DateTimePickerController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public DateTimePickerController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupDateTimePicker dateTimePicker, - [DisallowNull] ViewDrawRibbonGroupDateTimePicker target) + public DateTimePickerController(KryptonRibbon ribbon, + KryptonRibbonGroupDateTimePicker dateTimePicker, + ViewDrawRibbonGroupDateTimePicker target) { Debug.Assert(ribbon != null); Debug.Assert(dateTimePicker != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs index a76e7a7da..aec565c4c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs @@ -59,7 +59,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs index 10229db51..7a00a00fd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs @@ -35,9 +35,9 @@ internal class DomainUpDownController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public DomainUpDownController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupDomainUpDown domainUpDown, - [DisallowNull] ViewDrawRibbonGroupDomainUpDown target) + public DomainUpDownController(KryptonRibbon ribbon, + KryptonRibbonGroupDomainUpDown domainUpDown, + ViewDrawRibbonGroupDomainUpDown target) { Debug.Assert(ribbon != null); Debug.Assert(domainUpDown != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs index 18381fa89..4774c5da4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs @@ -42,7 +42,7 @@ internal class GalleryButtonController : GlobalId, /// Target for state changes. /// Delegate for notifying paint requests. /// Does the button repeat when pressed. - public GalleryButtonController([DisallowNull] ViewBase target, + public GalleryButtonController(ViewBase target, NeedPaintHandler needPaint, bool repeatTimer) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs index 7ad3c8b22..914c2e158 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs @@ -35,9 +35,9 @@ internal class GalleryController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public GalleryController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupGallery gallery, - [DisallowNull] ViewDrawRibbonGroupGallery target) + public GalleryController(KryptonRibbon ribbon, + KryptonRibbonGroupGallery gallery, + ViewDrawRibbonGroupGallery target) { Debug.Assert(ribbon != null); Debug.Assert(gallery != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs index 208db2809..1f2622765 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs @@ -43,8 +43,8 @@ internal class GalleryItemController : GlobalId, /// Target for state changes. /// Reference to layout of the image items. /// Delegate for notifying paint requests. - public GalleryItemController([DisallowNull] ViewDrawRibbonGalleryItem target, - [DisallowNull] ViewLayoutRibbonGalleryItems layout, + public GalleryItemController(ViewDrawRibbonGalleryItem target, + ViewLayoutRibbonGalleryItems layout, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -230,7 +230,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion @@ -241,7 +241,7 @@ public void LostFocus([DisallowNull] Control c) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -309,7 +309,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs index ddef15d99..a7d7b5675 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs @@ -59,9 +59,9 @@ internal class GroupButtonController : GlobalId, /// Source control instance. /// Target for state changes. /// Delegate for notifying paint requests. - public GroupButtonController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewDrawRibbonGroupButtonBackBorder target, - [DisallowNull] NeedPaintHandler needPaint) + public GroupButtonController(KryptonRibbon ribbon, + ViewDrawRibbonGroupButtonBackBorder target, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); @@ -374,7 +374,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs index 1f724524c..4417bbfd1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs @@ -53,10 +53,10 @@ internal class GroupCheckBoxController : GlobalId, /// Target for main element changes. /// Target for image state changes. /// Delegate for notifying paint requests. - public GroupCheckBoxController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewBase targetMain, - [DisallowNull] ViewDrawRibbonGroupCheckBoxImage targetImage, - [DisallowNull] NeedPaintHandler needPaint) + public GroupCheckBoxController(KryptonRibbon ribbon, + ViewBase targetMain, + ViewDrawRibbonGroupCheckBoxImage targetImage, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(targetMain != null); @@ -253,7 +253,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs index 5a9a457bc..95d21564c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs @@ -53,10 +53,10 @@ internal class GroupRadioButtonController : GlobalId, /// Target for main element changes. /// Target for image state changes. /// Delegate for notifying paint requests. - public GroupRadioButtonController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewBase targetMain, - [DisallowNull] ViewDrawRibbonGroupRadioButtonImage targetImage, - [DisallowNull] NeedPaintHandler needPaint) + public GroupRadioButtonController(KryptonRibbon ribbon, + ViewBase targetMain, + ViewDrawRibbonGroupRadioButtonImage targetImage, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(targetMain != null); @@ -253,7 +253,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs index b0c68c3b9..de33a5fe4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs @@ -43,9 +43,9 @@ internal class LeftDownButtonController : GlobalId, /// Reference to owning ribbon instance. /// Target for state changes. /// Delegate for notifying changes in display. - public LeftDownButtonController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewBase target, - [DisallowNull] NeedPaintHandler needPaint) + public LeftDownButtonController(KryptonRibbon ribbon, + ViewBase target, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs index 0550dba3e..a14a9bb22 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs @@ -41,8 +41,8 @@ internal class LeftUpButtonController : GlobalId, /// Reference to owning ribbon instance. /// Target for state changes. /// Delegate for notifying paint requests. - public LeftUpButtonController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewBase target, + public LeftUpButtonController(KryptonRibbon ribbon, + ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs index 4ae8b8ff2..bf8a857dc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs @@ -35,9 +35,9 @@ internal class MaskedTextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public MaskedTextBoxController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupMaskedTextBox maskedTextBox, - [DisallowNull] ViewDrawRibbonGroupMaskedTextBox target) + public MaskedTextBoxController(KryptonRibbon ribbon, + KryptonRibbonGroupMaskedTextBox maskedTextBox, + ViewDrawRibbonGroupMaskedTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(maskedTextBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs index b5a385c16..d614aaa2e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs @@ -35,9 +35,9 @@ internal class NumericUpDownController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public NumericUpDownController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupNumericUpDown numericUpDown, - [DisallowNull] ViewDrawRibbonGroupNumericUpDown target) + public NumericUpDownController(KryptonRibbon ribbon, + KryptonRibbonGroupNumericUpDown numericUpDown, + ViewDrawRibbonGroupNumericUpDown target) { Debug.Assert(ribbon != null); Debug.Assert(numericUpDown != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs index 03905c9c9..2179afb8e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs @@ -69,7 +69,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs index eee65ce63..28f564d50 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs @@ -81,7 +81,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs index d48aceaf0..a396970f6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs @@ -37,9 +37,9 @@ internal class RecentDocController : GlobalId, /// Owning view manager instance. /// Target menu item view element. /// Delegate for notifying paint requests. - public RecentDocController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewDrawRibbonAppMenuRecentDec menuItem, - [DisallowNull] NeedPaintHandler needPaint) + public RecentDocController(ViewContextMenuManager viewManager, + ViewDrawRibbonAppMenuRecentDec menuItem, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(menuItem != null); @@ -189,7 +189,7 @@ public virtual void DoubleClick(Point pt) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -239,7 +239,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -263,7 +263,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -295,7 +295,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs index 819e9f134..24b2352b2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs @@ -43,8 +43,8 @@ internal class RepeatButtonController : GlobalId, /// Reference to owning control. /// Delegate for notifying paint requests. /// Target for state changes. - public RepeatButtonController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewBase target, + public RepeatButtonController(KryptonRibbon ribbon, + ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs index 03eacbaaf..11629e381 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs @@ -50,8 +50,8 @@ internal class RibbonTabController : GlobalId, /// Reference to owning control. /// Target for state changes. /// Delegate for notifying paint requests. - public RibbonTabController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewDrawRibbonTab target, + public RibbonTabController(KryptonRibbon ribbon, + ViewDrawRibbonTab target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -207,7 +207,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { _target.HasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs index 18d63f143..cd0c357fc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs @@ -37,7 +37,7 @@ internal class RibbonTabsController : GlobalId, /// Initialize a new instance of the RibbonTabsController class. /// /// Reference to owning control. - public RibbonTabsController([DisallowNull] KryptonRibbon ribbon) + public RibbonTabsController(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs index 49c316117..0d102624a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs @@ -35,9 +35,9 @@ internal class RichTextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public RichTextBoxController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupRichTextBox richTextBox, - [DisallowNull] ViewDrawRibbonGroupRichTextBox target) + public RichTextBoxController(KryptonRibbon ribbon, + KryptonRibbonGroupRichTextBox richTextBox, + ViewDrawRibbonGroupRichTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(richTextBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs index 667f30741..9e224a8f7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs @@ -35,9 +35,9 @@ internal class TextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public TextBoxController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTextBox textBox, - [DisallowNull] ViewDrawRibbonGroupTextBox target) + public TextBoxController(KryptonRibbon ribbon, + KryptonRibbonGroupTextBox textBox, + ViewDrawRibbonGroupTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(textBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs index 462d5924d..f044a3817 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs @@ -35,9 +35,9 @@ internal class TrackBarController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public TrackBarController([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTrackBar trackBar, - [DisallowNull] ViewDrawRibbonGroupTrackBar target) + public TrackBarController(KryptonRibbon ribbon, + KryptonRibbonGroupTrackBar trackBar, + ViewDrawRibbonGroupTrackBar target) { Debug.Assert(ribbon != null); Debug.Assert(trackBar != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs index 6afcfc1e4..3d5bbfc51 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs @@ -44,8 +44,8 @@ internal class ViewHightlightController : GlobalId, /// /// Target for state changes. /// Delegate for notifying paint requests. - public ViewHightlightController([DisallowNull] ViewBase target, - [DisallowNull] NeedPaintHandler needPaint) + public ViewHightlightController(ViewBase target, + NeedPaintHandler needPaint) { Debug.Assert(target != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs index 33c491870..f1abb7f23 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs @@ -114,7 +114,6 @@ public string ContextTitle [Category(@"Appearance")] [Description(@"Display color for associated contextual tabs.")] [DefaultValue(typeof(Color), "Red")] - [DisallowNull] public Color ContextColor { get => _contextColor; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs index 5de860076..f18478ed1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs @@ -36,8 +36,8 @@ internal class VisualPopupGroup : VisualPopup /// Reference to owning ribbon control. /// Reference to ribbon group for display. /// Drawing renderer. - public VisualPopupGroup([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, + public VisualPopupGroup(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, IRenderer renderer) : base(renderer, true) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs index bd4a42eb4..5ba2c2d94 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs @@ -36,9 +36,9 @@ internal class VisualPopupMinimized : VisualPopup /// View manager instance for managing view display. /// View element that manages the custom chrome injection. /// Drawing renderer. - public VisualPopupMinimized([DisallowNull] KryptonRibbon ribbon, + public VisualPopupMinimized(KryptonRibbon ribbon, ViewManager viewManager, - [DisallowNull] ViewDrawRibbonCaptionArea captionArea, + ViewDrawRibbonCaptionArea captionArea, IRenderer renderer) : base(viewManager, renderer, true) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs index 3ecd98367..d6e6eabeb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs @@ -29,7 +29,7 @@ internal class VisualPopupQATOverflow : VisualPopup /// Reference to owning ribbon control. /// Reference to original contents which has overflow items. /// Drawing renderer. - public VisualPopupQATOverflow([DisallowNull] KryptonRibbon ribbon, + public VisualPopupQATOverflow(KryptonRibbon ribbon, ViewLayoutRibbonQATContents contents, IRenderer? renderer) : base(renderer, true) diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs index 9c68d0bc4..e4cb19bad 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs @@ -38,7 +38,7 @@ public KryptonGalleryDesigner() => /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs index 1eb561a92..286856b9e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs @@ -45,7 +45,7 @@ public KryptonRibbonDesigner() => /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs index c2e54b789..5ef334a66 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs index 56165cbf5..cc96870f1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs @@ -55,7 +55,7 @@ public KryptonRibbonGroupCheckBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs index 86491fe02..92aea8b5a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupClusterButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs index 7a70be76b..7e828dd8a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupClusterColorButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs index 98960eecf..3c8dd6041 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs @@ -57,7 +57,7 @@ public KryptonRibbonGroupClusterDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs index 0fd914238..e2a07d227 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupColorButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs index 5cfe7d6ed..aa4eed4c5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupComboBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs index a6e4333b4..838902a1d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupCustomControlDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs index 355249fb0..f9535fb99 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupDateTimePickerDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs index 17214c77b..c2c9120d9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs @@ -62,7 +62,7 @@ public KryptonRibbonGroupDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs index e0666491b..937c3b40e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupDomainUpDownDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs index b378a7bdb..7991ff236 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs @@ -61,7 +61,7 @@ public KryptonRibbonGroupGalleryDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs index eb3ab2954..188f98e46 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupLabelDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs index 9321a6c2e..531bb5824 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs @@ -92,7 +92,7 @@ public KryptonRibbonGroupLinesDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs index 1cad721f7..3db266bc2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupMaskedTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs index 14a2168a6..b4b49e5ba 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupNumericUpDownDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs index f8c1b345e..39d493f4f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs @@ -53,7 +53,7 @@ public KryptonRibbonGroupRadioButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs index 9db5b0bc4..78404f843 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupRichTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs index 01c8a810a..5f5df6f46 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs @@ -51,7 +51,7 @@ public KryptonRibbonGroupSeparatorDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs index a9d96ed22..39ddf27d6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs index c9b662f9b..83695598d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs @@ -47,7 +47,7 @@ public KryptonRibbonGroupThemeComboBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs index b24e4710d..18e7d3d94 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupTrackBarDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs index 20a8d699c..13a736ae9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs @@ -90,7 +90,7 @@ public KryptonRibbonGroupTripleDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs index 93f942751..51cce38ee 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs @@ -53,7 +53,7 @@ public KryptonRibbonTabDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs b/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs index 19658eef1..b24dc383b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs +++ b/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs @@ -49,7 +49,7 @@ internal class CalculatedValues /// Initialize a new instance of the CalculatedValues class. /// /// Source control instance. - public CalculatedValues([DisallowNull] KryptonRibbon ribbon) + public CalculatedValues(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs index 05a4474dc..d188a2ce8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs @@ -1059,7 +1059,7 @@ private void HookContextMenuEvents(KryptonContextMenuCollection collection, bool } } - private void UpdateRecentColors([DisallowNull] Color color) + private void UpdateRecentColors(Color color) { // Do we need to update the recent colors collection? if (AutoRecentColors) diff --git a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs index 3e8dd55ad..f69da9736 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs @@ -428,7 +428,6 @@ public int Value [Category(@"Behavior")] [Description(@"Change to apply when a small change occurs.")] [DefaultValue(1)] - [DisallowNull] public int SmallChange { get => TrackBar.SmallChange; @@ -441,7 +440,6 @@ public int SmallChange [Category(@"Behavior")] [Description(@"Change to apply when a large change occurs.")] [DefaultValue(5)] - [DisallowNull] public int LargeChange { get => TrackBar.LargeChange; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs index 55c57a18b..5b20d3964 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs @@ -28,7 +28,7 @@ internal class AppButtonToolTipToContent : IContentValues /// Initialize a new instance of the AppButtonToolTipToContent class. /// /// Reference to owning ribbon instance. - public AppButtonToolTipToContent([DisallowNull] KryptonRibbon ribbon) + public AppButtonToolTipToContent(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs index 72e5f9c54..c4232ff63 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs @@ -31,8 +31,8 @@ internal class ContextTabSet /// /// Reference to first tab of the set. /// Reference to owning context details. - public ContextTabSet([DisallowNull] ViewDrawRibbonTab tab, - [DisallowNull] KryptonRibbonContext context) + public ContextTabSet(ViewDrawRibbonTab tab, + KryptonRibbonContext context) { Debug.Assert(tab != null); Debug.Assert(context != null); @@ -74,7 +74,7 @@ public ContextTabSet([DisallowNull] ViewDrawRibbonTab tab, /// Update the last tab in the set with new refernece. /// /// Reference to new last tab. - public void UpdateLastTab([DisallowNull] ViewDrawRibbonTab tab) + public void UpdateLastTab(ViewDrawRibbonTab tab) { Debug.Assert(tab != null); _lastTab = tab; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs index 0f17a075c..65467988f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs @@ -25,7 +25,7 @@ internal class DesignTextToContent : RibbonToContent /// Initialize a new instance of the DesignTextToContent class. /// /// Reference to the owning ribbon control. - public DesignTextToContent([DisallowNull] KryptonRibbon ribbon) + public DesignTextToContent(KryptonRibbon ribbon) : base(ribbon.StateCommon.RibbonGeneral) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs index a0d77e360..e955e69f9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs @@ -26,7 +26,7 @@ internal class PaletteGalleryBackBorder : IPaletteBack, /// Initialize a new instance of the PaletteGalleryBackBorder class. /// /// Initial state for background/border. - public PaletteGalleryBackBorder([DisallowNull] PaletteGalleryState state) + public PaletteGalleryBackBorder(PaletteGalleryState state) { Debug.Assert(state != null); _state = state; @@ -38,7 +38,7 @@ public PaletteGalleryBackBorder([DisallowNull] PaletteGalleryState state) /// Define the new state to use for sourcing values. /// /// New state for background/border. - public void SetState([DisallowNull] PaletteGalleryState state) + public void SetState(PaletteGalleryState state) { Debug.Assert(state != null); _state = state; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs index 50e2489ab..a04dc95d8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs @@ -35,7 +35,7 @@ public class PaletteGalleryRedirect : PaletteMetricRedirect /// /// inheritance redirection instance. /// Paint delegate. - public PaletteGalleryRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteGalleryRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs index f99370bd0..12d766780 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs @@ -34,7 +34,7 @@ public class PaletteRibbonAppButton : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonAppButton([DisallowNull] PaletteRibbonRedirect inherit, + public PaletteRibbonAppButton(PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs index d5430e036..b705a05b8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs @@ -29,7 +29,7 @@ public class PaletteRibbonContextBack : IPaletteRibbonBack /// Initialize a new instance of the PaletteRibbonContextBack class. /// /// Reference to ribbon control. - public PaletteRibbonContextBack([DisallowNull] KryptonRibbon ribbon) + public PaletteRibbonContextBack(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs index e06c87558..dd7a16afe 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs @@ -31,7 +31,7 @@ public class PaletteRibbonContextDouble : IPaletteRibbonBack, /// Initialize a new instance of the PaletteRibbonContextDouble class. /// /// Reference to ribbon control. - public PaletteRibbonContextDouble([DisallowNull] KryptonRibbon ribbon) + public PaletteRibbonContextDouble(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs index be29cb597..f6eae5f10 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs @@ -30,7 +30,7 @@ public class PaletteRibbonFocus : PaletteMetricRedirect /// /// Inheritence redirection instance. /// Paint delegate. - public PaletteRibbonFocus([DisallowNull] PaletteRedirect redirect, + public PaletteRibbonFocus(PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs index 2932383c4..b83e375a3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs @@ -25,8 +25,8 @@ public class PaletteRibbonImages : Storage /// /// inheritance redirection instance. /// Paint delegate. - public PaletteRibbonImages([DisallowNull] PaletteRedirect redirect, - [DisallowNull] NeedPaintHandler needPaint) + public PaletteRibbonImages(PaletteRedirect redirect, + NeedPaintHandler needPaint) { Debug.Assert(redirect != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs index d16e33fd0..0d5ec0b32 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs @@ -36,7 +36,7 @@ public class PaletteRibbonJustGroup : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonJustGroup([DisallowNull] PaletteRibbonRedirect inherit, + public PaletteRibbonJustGroup(PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs index 7eb47c947..2a727f351 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs @@ -29,7 +29,7 @@ public class PaletteRibbonJustTab : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonJustTab([DisallowNull] PaletteRibbonRedirect inherit, + public PaletteRibbonJustTab(PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs index 378a5976c..e2f2f40f2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs @@ -83,7 +83,7 @@ public class PaletteRibbonRedirect : PaletteMetricRedirect /// inheritance redirection instance. /// Initial background style. /// Paint delegate. - public PaletteRibbonRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteRibbonRedirect(PaletteRedirect redirect, PaletteBackStyle panelBackStyle, NeedPaintHandler needPaint) : base(redirect) diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs index 0fda5538b..85fff2177 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs @@ -29,7 +29,7 @@ public class PaletteRibbonStyles : Storage /// /// Source ribbon control instance. /// Delegate for notifying paint requests. - public PaletteRibbonStyles([DisallowNull] KryptonRibbon ribbon, + public PaletteRibbonStyles(KryptonRibbon ribbon, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs index 6efc8d7a2..0611b8885 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs @@ -25,7 +25,7 @@ internal class QATButtonToContent : IPaletteContent /// Initialize a new instance of the RibbonTabToContent class. /// /// Source for button values. - public QATButtonToContent([DisallowNull] IQuickAccessToolbarButton qatButton) + public QATButtonToContent(IQuickAccessToolbarButton qatButton) { Debug.Assert(qatButton != null); _qatButton = qatButton; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs index 2d017e8d0..77f13d25c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs @@ -28,7 +28,7 @@ internal class QATButtonToolTipToContent : IContentValues /// Initialize a new instance of the QATButtonToolTipToContent class. /// /// Source quick access toolbar button. - public QATButtonToolTipToContent([DisallowNull] IQuickAccessToolbarButton qatButton) + public QATButtonToolTipToContent(IQuickAccessToolbarButton qatButton) { Debug.Assert(qatButton != null); _qatButton = qatButton; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs index 7fa518bb7..3c4395108 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs @@ -59,7 +59,7 @@ public AppMenuButtonSpecCollection(KryptonRibbon owner) /// Initialize a new instance of the RibbonAppButton class. /// /// Reference to owning ribbon instance. - public RibbonAppButton([DisallowNull] KryptonRibbon ribbon) + public RibbonAppButton(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs index b6650ed0f..99d883830 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs @@ -32,11 +32,11 @@ internal class RibbonGroupLabelTextToContent : RibbonToContent /// Source for ribbon group button disabled settings. /// Source for ribbon group label normal settings. /// Source for ribbon group label disabled settings. - public RibbonGroupLabelTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonGroupTextNormal, - [DisallowNull] IPaletteRibbonText ribbonGroupTextDisabled, - [DisallowNull] IPaletteRibbonText ribbonLabelTextNormal, - [DisallowNull] IPaletteRibbonText ribbonLabelTextDisabled) + public RibbonGroupLabelTextToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonGroupTextNormal, + IPaletteRibbonText ribbonGroupTextDisabled, + IPaletteRibbonText ribbonLabelTextNormal, + IPaletteRibbonText ribbonLabelTextDisabled) : base(ribbonGeneral) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs index d276e2cac..76c37ceab 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs @@ -28,9 +28,9 @@ internal class RibbonGroupNormalDisabledTextToContent : RibbonToContent /// Source for general ribbon settings. /// Source for ribbon group button normal settings. /// Source for ribbon group button disabled settings. - public RibbonGroupNormalDisabledTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonGroupTextNormal, - [DisallowNull] IPaletteRibbonText ribbonGroupTextDisabled) + public RibbonGroupNormalDisabledTextToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonGroupTextNormal, + IPaletteRibbonText ribbonGroupTextDisabled) : base(ribbonGeneral) { Debug.Assert(ribbonGroupTextNormal != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs index 15fe1fdfe..0e3785a26 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs @@ -22,8 +22,8 @@ internal class RibbonGroupTextToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon group settings. - public RibbonGroupTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonGroupText) + public RibbonGroupTextToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonGroupText) : base(ribbonGeneral) { Debug.Assert(ribbonGroupText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs index 7a8e367fb..8d6f16ac2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs @@ -26,8 +26,8 @@ internal class RibbonRecentDocsEntryToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon recent document entry settings. - public RibbonRecentDocsEntryToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonRecentDocEntryText) + public RibbonRecentDocsEntryToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonRecentDocEntryText) : base(ribbonGeneral) { Debug.Assert(ribbonRecentDocEntryText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs index a1032bb62..07f83aa4a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs @@ -31,8 +31,8 @@ internal class RibbonRecentDocsTitleToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon recent document title settings. - public RibbonRecentDocsTitleToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonRecentTitleText) + public RibbonRecentDocsTitleToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonRecentTitleText) : base(ribbonGeneral) { Debug.Assert(ribbonRecentTitleText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs index b19a792a8..0f9da5a3b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs @@ -22,8 +22,8 @@ internal class RibbonTabToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon tab settings. - public RibbonTabToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, - [DisallowNull] IPaletteRibbonText ribbonTabText) + public RibbonTabToContent(PaletteRibbonGeneral ribbonGeneral, + IPaletteRibbonText ribbonTabText) : base(ribbonGeneral) { Debug.Assert(ribbonTabText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs index b02f7d979..d2fe9db62 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs @@ -21,7 +21,7 @@ internal class RibbonToContent : IPaletteContent /// Initialize a new instance of the RibbonToContent class. /// /// Source for general ribbon settings. - public RibbonToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral) + public RibbonToContent(PaletteRibbonGeneral ribbonGeneral) { Debug.Assert(ribbonGeneral != null); RibbonGeneral = ribbonGeneral; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs index 2070a0107..312900c20 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs @@ -36,10 +36,10 @@ internal class ViewRibbonManager : ViewManager /// Is this manager for handling the minimized mode popup. /// Delegate for requesting paint changes. public ViewRibbonManager(KryptonRibbon control, - [DisallowNull] ViewDrawRibbonGroupsBorderSynch viewGroups, - [DisallowNull] ViewBase root, + ViewDrawRibbonGroupsBorderSynch viewGroups, + ViewBase root, bool minimizedMode, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(viewGroups != null); @@ -132,7 +132,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) + public override void MouseMove(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -182,7 +182,7 @@ public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave([DisallowNull] EventArgs e) + public override void MouseLeave(EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs index 521c3d447..b0b213e34 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs @@ -37,10 +37,10 @@ internal class ViewRibbonMinimizedManager : ViewManager /// Is this manager for handling the minimized mode popup. /// Delegate for requesting paint changes. public ViewRibbonMinimizedManager(KryptonRibbon control, - [DisallowNull] ViewDrawRibbonGroupsBorderSynch viewGroups, - [DisallowNull] ViewBase root, + ViewDrawRibbonGroupsBorderSynch viewGroups, + ViewBase root, bool minimizedMode, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(viewGroups != null); @@ -144,7 +144,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) + public override void MouseMove(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -191,7 +191,7 @@ public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave([DisallowNull] EventArgs e) + public override void MouseLeave(EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs index 8b8e23fe2..94f3f570e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs @@ -34,10 +34,10 @@ internal class ViewRibbonPopupGroupManager : ViewManager /// Group to track. /// Delegate for performing painting. public ViewRibbonPopupGroupManager(Control control, - [DisallowNull] KryptonRibbon ribbon, + KryptonRibbon ribbon, ViewBase root, - [DisallowNull] ViewDrawRibbonGroup viewGroup, - [DisallowNull] NeedPaintHandler needPaintDelegate) + ViewDrawRibbonGroup viewGroup, + NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(ribbon != null); @@ -107,7 +107,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) + public override void MouseMove(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -135,7 +135,7 @@ public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave([DisallowNull] EventArgs e) + public override void MouseLeave(EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs index 230e8eb74..5de2906fd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs @@ -30,9 +30,9 @@ internal class ViewRibbonQATOverflowManager : ViewManager /// Owning control. /// View that will handle focus requests. /// View for group we are tracking. - public ViewRibbonQATOverflowManager([DisallowNull] KryptonRibbon ribbon, + public ViewRibbonQATOverflowManager(KryptonRibbon ribbon, Control control, - [DisallowNull] ViewLayoutRibbonQATContents qatContents, + ViewLayoutRibbonQATContents qatContents, ViewBase root) : base(control, root) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs index 711cd5b2e..7fa4a1694 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs @@ -37,7 +37,7 @@ internal class ViewDrawRibbonAppButton : ViewLeaf /// /// Owning control instance. /// Scroller orientation. - public ViewDrawRibbonAppButton([DisallowNull] KryptonRibbon ribbon, bool bottomHalf) + public ViewDrawRibbonAppButton(KryptonRibbon ribbon, bool bottomHalf) { Debug.Assert(ribbon != null); @@ -104,7 +104,7 @@ public override bool Visible /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs index e94b512ff..b517c1dda 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs @@ -103,7 +103,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs index cc0aaf212..7732a9808 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs @@ -33,7 +33,7 @@ internal class ViewDrawRibbonAppTab : ViewComposite, /// Initialize a new instance of the ViewDrawRibbonAppTab class. /// /// Owning control instance. - public ViewDrawRibbonAppTab([DisallowNull] KryptonRibbon ribbon) + public ViewDrawRibbonAppTab(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); @@ -85,7 +85,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -103,7 +103,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -118,7 +118,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { var memento = State switch { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs index 6ae48668c..2a14c0a72 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs @@ -717,10 +717,10 @@ internal class ViewDrawRibbonCaptionArea : ViewDrawDocker /// Reference to redirector for palette settings. /// Reference to the composition element. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonCaptionArea([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] PaletteRedirect redirect, - [DisallowNull] ViewDrawRibbonComposition compositionArea, - [DisallowNull] NeedPaintHandler needPaintDelegate) + public ViewDrawRibbonCaptionArea(KryptonRibbon ribbon, + PaletteRedirect redirect, + ViewDrawRibbonComposition compositionArea, + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); @@ -1057,7 +1057,7 @@ public bool DoesCurrentMouseDownEndAllTracking(Point pt) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs index 92214b836..c5e0d9e03 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs @@ -123,7 +123,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs index c85ae2cbd..177f561b7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs @@ -34,8 +34,8 @@ internal class ViewDrawRibbonComposition : ViewLeaf, /// /// Owning control instance. /// Delegate for requested a paint. - public ViewDrawRibbonComposition([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonComposition(KryptonRibbon ribbon, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -146,7 +146,7 @@ public void CompNeedPaint(bool needLayout) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -179,7 +179,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(_ownerForm != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs index bda94fcbc..74a63b507 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs @@ -43,8 +43,8 @@ internal class ViewDrawRibbonContextTitle : ViewLeaf, /// /// Source ribbon control. /// Source for inheriting the ribbon bacgkground colors. - public ViewDrawRibbonContextTitle([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] IPaletteRibbonBack inherit) + public ViewDrawRibbonContextTitle(KryptonRibbon ribbon, + IPaletteRibbonBack inherit) { Debug.Assert(ribbon != null); Debug.Assert(inherit != null); @@ -148,7 +148,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs index 9045e35e4..063ace243 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs @@ -32,8 +32,8 @@ internal class ViewDrawRibbonDesignBase : ViewComposite, /// /// Reference to owning ribbon control. /// Delegate for notifying paint requests. - public ViewDrawRibbonDesignBase([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonDesignBase(KryptonRibbon ribbon, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -89,7 +89,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs index e8d2b2fb9..2f605f368 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs @@ -51,7 +51,7 @@ static ViewDrawRibbonDesignCluster() /// Reference to cluster definition. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignCluster(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCluster ribbonCluster, + KryptonRibbonGroupCluster ribbonCluster, NeedPaintHandler needPaint) : base(ribbon, needPaint) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs index af5f43633..05124efcb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs @@ -53,7 +53,7 @@ static ViewDrawRibbonDesignGroupContainer() /// Associated ribbon group. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupContainer(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, + KryptonRibbonGroup ribbonGroup, NeedPaintHandler needPaint) : base(ribbon, needPaint) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs index 98a3e7581..37d6108cb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs @@ -65,7 +65,7 @@ static ViewDrawRibbonDesignGroupLines() /// Size the view should use. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupLines(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupLines ribbonLines, + KryptonRibbonGroupLines ribbonLines, GroupItemSize currentSize, NeedPaintHandler needPaint) : base(ribbon, needPaint) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs index 7d3a597f7..154f08e4d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs @@ -67,7 +67,7 @@ static ViewDrawRibbonDesignGroupTriple() /// Size the view should use. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupTriple(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTriple ribbonTriple, + KryptonRibbonGroupTriple ribbonTriple, GroupItemSize currentSize, NeedPaintHandler needPaint) : base(ribbon, needPaint) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs index abb1ff580..b02adf9b8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs @@ -29,7 +29,7 @@ internal class ViewDrawRibbonDropArrow : ViewLeaf /// Initialize a new instance of the ViewDrawRibbonDropArrow class. /// /// Reference to owning control instance. - public ViewDrawRibbonDropArrow([DisallowNull] KryptonRibbon ribbon) + public ViewDrawRibbonDropArrow(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -57,7 +57,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs index ac7c56ca2..601af3ad3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs @@ -116,7 +116,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs index 73de4c304..ea5d80f23 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs @@ -158,7 +158,7 @@ public int ImageIndex /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs index 73e96c499..d46f10693 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs @@ -70,9 +70,9 @@ internal class ViewDrawRibbonGroup : ViewComposite, /// Reference to owning ribbon control. /// Reference to ribbon group this represents. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroup([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroup(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -491,7 +491,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs index 2ba80ea71..452ec1887 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs @@ -51,9 +51,9 @@ internal class ViewDrawRibbonGroupButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupButton ribbonButton, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupButton(KryptonRibbon ribbon, + KryptonRibbonGroupButton ribbonButton, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -270,7 +270,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs index ac3c6b403..ce34fbba4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs @@ -58,10 +58,10 @@ internal class ViewDrawRibbonGroupButtonBackBorder : ViewComposite /// Palette to use for the border. /// Should the border be a constant normal state. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupButtonBackBorder([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupItem groupItem, - [DisallowNull] IPaletteBack paletteBack, - [DisallowNull] IPaletteBorder paletteBorder, + public ViewDrawRibbonGroupButtonBackBorder(KryptonRibbon ribbon, + KryptonRibbonGroupItem groupItem, + IPaletteBack paletteBack, + IPaletteBorder paletteBorder, bool constantBorder, NeedPaintHandler needPaint) { @@ -212,7 +212,7 @@ public GroupButtonType ButtonType /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs index 67e2794c4..9bd4c213f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs @@ -34,7 +34,7 @@ internal class ViewDrawRibbonGroupButtonImage : ViewDrawRibbonGroupImageBase /// Reference to ribbon group button definition. /// Show the large image. public ViewDrawRibbonGroupButtonImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupButton ribbonButton, + KryptonRibbonGroupButton ribbonButton, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs index 6e1f6d585..177c2e8e0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupButtonText : ViewLeaf, /// Source ribbon control. /// Group button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupButtonText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupButton ribbonButton, + public ViewDrawRibbonGroupButtonText(KryptonRibbon ribbon, + KryptonRibbonGroupButton ribbonButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -150,7 +150,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs index fc298c46b..4b3a4c5f1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs @@ -49,9 +49,9 @@ internal class ViewDrawRibbonGroupCheckBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source check box definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupCheckBox([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupCheckBox(KryptonRibbon ribbon, + KryptonRibbonGroupCheckBox ribbonCheckBox, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCheckBox != null); @@ -261,7 +261,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -380,7 +380,7 @@ private void CreateMediumSmallCheckBoxView() _viewMediumSmall, _viewMediumSmall.MouseController); } - private void DefineRootView([DisallowNull] ViewBase view) + private void DefineRootView(ViewBase view) { // Remove any existing view Clear(); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs index 3843dc413..7917bf8c6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupCheckBoxImage : ViewComposite /// Reference to ribbon group check box definition. /// Show the large image. public ViewDrawRibbonGroupCheckBoxImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, + KryptonRibbonGroupCheckBox ribbonCheckBox, bool large) { Debug.Assert(ribbonCheckBox != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs index 5062f1866..ca4b761aa 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupCheckBoxText : ViewLeaf, /// Source ribbon control. /// Group check box to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupCheckBoxText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, + public ViewDrawRibbonGroupCheckBoxText(KryptonRibbon ribbon, + KryptonRibbonGroupCheckBox ribbonCheckBox, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs index 45c1f17c9..cba1dd9b8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupClusterButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupClusterButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupClusterButton(KryptonRibbon ribbon, + KryptonRibbonGroupClusterButton ribbonButton, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -281,7 +281,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs index 7de7671f4..908c63ffd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonGroupClusterButtonImage : ViewDrawRibbonGroupImageB /// Reference to owning ribbon control. /// Reference to ribbon group button definition. public ViewDrawRibbonGroupClusterButtonImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton) + KryptonRibbonGroupClusterButton ribbonButton) : base(ribbon) { Debug.Assert(ribbonButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs index 80ecc3907..abc25bf24 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs @@ -39,8 +39,8 @@ internal class ViewDrawRibbonGroupClusterButtonText : ViewLeaf, /// /// Source ribbon control. /// Group cluster button to display title for. - public ViewDrawRibbonGroupClusterButtonText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton) + public ViewDrawRibbonGroupClusterButtonText(KryptonRibbon ribbon, + KryptonRibbonGroupClusterButton ribbonButton) { Debug.Assert(ribbon != null); @@ -98,7 +98,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -144,7 +144,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs index fe0dde65b..c7daf400c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupClusterColorButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupClusterColorButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonButton, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupClusterColorButton(KryptonRibbon ribbon, + KryptonRibbonGroupClusterColorButton ribbonButton, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -281,7 +281,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs index ca86116ac..64d661f95 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs @@ -36,7 +36,7 @@ internal class ViewDrawRibbonGroupClusterColorButtonImage : ViewDrawRibbonGroupI /// Reference to owning ribbon control. /// Reference to ribbon group color button definition. public ViewDrawRibbonGroupClusterColorButtonImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonColorButton) + KryptonRibbonGroupClusterColorButton ribbonColorButton) : base(ribbon) { Debug.Assert(ribbonColorButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs index b71b1c14a..7cdf5783e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs @@ -39,8 +39,8 @@ internal class ViewDrawRibbonGroupClusterColorButtonText : ViewLeaf, /// /// Source ribbon control. /// Group cluster color button to display title for. - public ViewDrawRibbonGroupClusterColorButtonText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonColorButton) + public ViewDrawRibbonGroupClusterColorButtonText(KryptonRibbon ribbon, + KryptonRibbonGroupClusterColorButton ribbonColorButton) { Debug.Assert(ribbon != null); @@ -98,7 +98,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -144,7 +144,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs index bba6da71e..020514512 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs @@ -30,8 +30,8 @@ internal class ViewDrawRibbonGroupClusterEdge : ViewDrawBorderEdge /// /// Reference to owning ribbon.. /// Palette source for drawing details. - public ViewDrawRibbonGroupClusterEdge([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] PaletteBorderEdge palette) + public ViewDrawRibbonGroupClusterEdge(KryptonRibbon ribbon, + PaletteBorderEdge palette) : base(palette, Orientation.Vertical) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs index 77fad61ed..77eb2c7a5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs @@ -31,7 +31,7 @@ internal class ViewDrawRibbonGroupClusterSeparator : ViewLeaf /// /// Reference to owning ribbon control. /// Is this is cluster start separator. - public ViewDrawRibbonGroupClusterSeparator([DisallowNull] KryptonRibbon ribbon, bool start) + public ViewDrawRibbonGroupClusterSeparator(KryptonRibbon ribbon, bool start) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -60,7 +60,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs index b943d7ff3..f143afce7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs @@ -51,9 +51,9 @@ internal class ViewDrawRibbonGroupColorButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source color button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupColorButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupColorButton(KryptonRibbon ribbon, + KryptonRibbonGroupColorButton ribbonColorButton, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonColorButton != null); @@ -268,7 +268,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs index 04bb30ec7..d974fdb60 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs @@ -40,7 +40,7 @@ internal class ViewDrawRibbonGroupColorButtonImage : ViewDrawRibbonGroupImageBas /// Reference to ribbon group color button definition. /// Show the large image. public ViewDrawRibbonGroupColorButtonImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, + KryptonRibbonGroupColorButton ribbonColorButton, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs index 0721bd5fd..074c73ca2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupColorButtonText : ViewLeaf, /// Source ribbon control. /// Group color button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupColorButtonText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, + public ViewDrawRibbonGroupColorButtonText(KryptonRibbon ribbon, + KryptonRibbonGroupColorButton ribbonColorButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs index 11877372f..f9bcd3037 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupComboBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source combobox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupComboBox([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupComboBox ribbonComboBox, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupComboBox(KryptonRibbon ribbon, + KryptonRibbonGroupComboBox ribbonComboBox, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonComboBox != null); @@ -297,7 +297,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -324,7 +324,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs index 6361a29d0..6c37b6161 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupCustomControl : ViewComposite, /// Reference to owning ribbon control. /// Reference to source custom definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupCustomControl([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCustomControl ribbonCustom, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupCustomControl(KryptonRibbon ribbon, + KryptonRibbonGroupCustomControl ribbonCustom, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCustom != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs index ff670285a..85f9f6b8b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupDateTimePicker : ViewComposite, /// Reference to owning ribbon control. /// Reference to source date time picker. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDateTimePicker([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupDateTimePicker ribbonDateTimePicker, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupDateTimePicker(KryptonRibbon ribbon, + KryptonRibbonGroupDateTimePicker ribbonDateTimePicker, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonDateTimePicker != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs index 25a1a3dcc..30593f3a9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonGroupDialogButton : ViewLeaf /// Reference to owning ribbon control. /// Reference to ribbon group this represents. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDialogButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, + public ViewDrawRibbonGroupDialogButton(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -105,7 +105,7 @@ protected override void Dispose(bool disposing) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs index cf74ad162..7e10db462 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupDomainUpDown : ViewComposite, /// Reference to owning ribbon control. /// Reference to source domain up-down. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDomainUpDown([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupDomainUpDown ribbonDomainUpDown, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupDomainUpDown(KryptonRibbon ribbon, + KryptonRibbonGroupDomainUpDown ribbonDomainUpDown, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonDomainUpDown != null); @@ -288,7 +288,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -315,7 +315,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs index 3c2c3ed1b..3b70afc1b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs @@ -46,9 +46,9 @@ internal class ViewDrawRibbonGroupGallery : ViewComposite, /// Reference to owning ribbon control. /// Reference to source gallery. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupGallery([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupGallery ribbonGallery, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupGallery(KryptonRibbon ribbon, + KryptonRibbonGroupGallery ribbonGallery, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGallery != null); @@ -457,7 +457,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -484,7 +484,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs index ff9f9af05..4c1ed8308 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonGroupGalleryImage : ViewDrawRibbonGroupImageBase /// Reference to owning ribbon control. /// Reference to ribbon group gallery definition. public ViewDrawRibbonGroupGalleryImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupGallery ribbonGallery) + KryptonRibbonGroupGallery ribbonGallery) : base(ribbon) { Debug.Assert(ribbonGallery != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs index b314d0917..77f502c78 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupGalleryText : ViewLeaf, /// Source ribbon control. /// Group gallery button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupGalleryText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupGallery ribbonGallery, + public ViewDrawRibbonGroupGalleryText(KryptonRibbon ribbon, + KryptonRibbonGroupGallery ribbonGallery, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs index 92c7ab2d0..faa8fc399 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupImage : ViewLeaf /// Reference to owning ribbon control. /// Reference to ribbon group definition. /// Reference to top level group element. - public ViewDrawRibbonGroupImage([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, - [DisallowNull] ViewDrawRibbonGroup viewGroup) + public ViewDrawRibbonGroupImage(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, + ViewDrawRibbonGroup viewGroup) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs index 85ec39019..0a5aa33a8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs @@ -25,7 +25,7 @@ internal abstract class ViewDrawRibbonGroupImageBase : ViewLeaf /// Initialize a new instance of the ViewDrawRibbonGroupImageBase class. /// /// Reference to owning ribbon control. - public ViewDrawRibbonGroupImageBase([DisallowNull] KryptonRibbon ribbon) + public ViewDrawRibbonGroupImageBase(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); Ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs index 0882855a0..fa991b6e7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs @@ -46,9 +46,9 @@ internal class ViewDrawRibbonGroupLabel : ViewComposite, /// Reference to owning ribbon control. /// Reference to source label definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupLabel([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupLabel(KryptonRibbon ribbon, + KryptonRibbonGroupLabel ribbonLabel, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonLabel != null); @@ -214,7 +214,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs index bcc3c94e5..75d281afd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupLabelImage : ViewDrawRibbonGroupImageBase /// Reference to ribbon group label definition. /// Show the large image. public ViewDrawRibbonGroupLabelImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, + KryptonRibbonGroupLabel ribbonLabel, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs index bafaba12c..e2564b50f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupLabelText : ViewLeaf, /// Source ribbon control. /// Group label to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupLabelText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, + public ViewDrawRibbonGroupLabelText(KryptonRibbon ribbon, + KryptonRibbonGroupLabel ribbonLabel, bool firstText) { Debug.Assert(ribbon != null); @@ -103,7 +103,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -149,7 +149,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs index 52b441da4..853f0df8c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupMaskedTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source masked textbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupMaskedTextBox([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupMaskedTextBox ribbonMaskedTextBox, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupMaskedTextBox(KryptonRibbon ribbon, + KryptonRibbonGroupMaskedTextBox ribbonMaskedTextBox, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonMaskedTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs index 3f9873b68..cec644122 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupNumericUpDown : ViewComposite, /// Reference to owning ribbon control. /// Reference to source numeric up-down. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupNumericUpDown([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupNumericUpDown ribbonNumericUpDown, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupNumericUpDown(KryptonRibbon ribbon, + KryptonRibbonGroupNumericUpDown ribbonNumericUpDown, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonNumericUpDown != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs index 670ed9c1f..3bb848c9f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs @@ -49,9 +49,9 @@ internal class ViewDrawRibbonGroupRadioButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source radio button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupRadioButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupRadioButton(KryptonRibbon ribbon, + KryptonRibbonGroupRadioButton ribbonRadioButton, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonRadioButton != null); @@ -261,7 +261,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs index 16af7f422..990d191b2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupRadioButtonImage : ViewComposite /// Reference to ribbon group radio button definition. /// Show the large image. public ViewDrawRibbonGroupRadioButtonImage(KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, + KryptonRibbonGroupRadioButton ribbonRadioButton, bool large) { Debug.Assert(ribbonRadioButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs index 5eb97a75c..bcc44eb6d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupRadioButtonText : ViewLeaf, /// Source ribbon control. /// Group radio button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupRadioButtonText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, + public ViewDrawRibbonGroupRadioButtonText(KryptonRibbon ribbon, + KryptonRibbonGroupRadioButton ribbonRadioButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -148,7 +148,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs index cae0ce6f7..e73a9a6a2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupRichTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source richtextbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupRichTextBox([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupRichTextBox ribbonRichTextBox, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupRichTextBox(KryptonRibbon ribbon, + KryptonRibbonGroupRichTextBox ribbonRichTextBox, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonRichTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs index 046bf9bb1..0b6490fa3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs @@ -37,9 +37,9 @@ internal class ViewDrawRibbonGroupSeparator : ViewLeaf, /// Reference to owning ribbon control. /// Reference to group separator definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupSeparator([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupSeparator ribbonSeparator, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupSeparator(KryptonRibbon ribbon, + KryptonRibbonGroupSeparator ribbonSeparator, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonSeparator != null); @@ -214,7 +214,7 @@ public void ResetSolutionSize() /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs index 78d31ce58..0096cb366 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupText : ViewLeaf, /// Source ribbon control. /// Ribbon group to display title for. /// Should show the first group text. - public ViewDrawRibbonGroupText([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, + public ViewDrawRibbonGroupText(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, bool firstText) { Debug.Assert(ribbon != null); @@ -100,7 +100,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs index 46efa4ccc..bcfbeb2b5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source textbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupTextBox([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTextBox ribbonTextBox, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupTextBox(KryptonRibbon ribbon, + KryptonRibbonGroupTextBox ribbonTextBox, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs index df16f84ad..428824ca9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonGroupTitle : ViewLeaf, /// /// Source ribbon control. /// Ribbon group to display title for. - public ViewDrawRibbonGroupTitle([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup) + public ViewDrawRibbonGroupTitle(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -114,7 +114,7 @@ public IPaletteRibbonText PaletteRibbonGroup /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs index f8ff9148b..2c5a6a794 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupTrackBar : ViewComposite, /// Reference to owning ribbon control. /// Reference to source track bar. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupTrackBar([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTrackBar ribbonTrackBar, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonGroupTrackBar(KryptonRibbon ribbon, + KryptonRibbonGroupTrackBar ribbonTrackBar, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTrackBar != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs index 55beae98f..e6b5a724a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs @@ -39,9 +39,9 @@ internal class ViewDrawRibbonGroupsBorder : ViewComposite, /// Reference to owning ribbon control. /// Should border be placed outside the contents. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonGroupsBorder([DisallowNull] KryptonRibbon ribbon, + public ViewDrawRibbonGroupsBorder(KryptonRibbon ribbon, bool borderOutside, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(needPaintDelegate != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs index 01ffe7071..2e2b59419 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonMinimizeBar : ViewLayoutRibbonSeparator /// Initialize a new instance of the ViewDrawRibbonMinimizeBar class. /// /// Source for palette values. - public ViewDrawRibbonMinimizeBar([DisallowNull] IPaletteRibbonGeneral palette) + public ViewDrawRibbonMinimizeBar(IPaletteRibbonGeneral palette) : base(SEP_WIDTH, true) { Debug.Assert(palette != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs index d3c170366..b65630589 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs @@ -43,8 +43,8 @@ internal class ViewDrawRibbonQATBorder : ViewComposite /// Reference to owning ribbon control. /// Delegate for notifying paint/layout changes. /// Minibar or full bar drawing. - public ViewDrawRibbonQATBorder([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaintDelegate, + public ViewDrawRibbonQATBorder(KryptonRibbon ribbon, + NeedPaintHandler needPaintDelegate, bool minibar) { Debug.Assert(ribbon != null); @@ -154,7 +154,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs index 043d9dfa0..c34b4187b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonQATButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonQATButton([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] IQuickAccessToolbarButton qatButton, + public ViewDrawRibbonQATButton(KryptonRibbon ribbon, + IQuickAccessToolbarButton qatButton, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -148,7 +148,7 @@ public override bool Enabled /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs index d1275f1e1..dfcaf57e6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs @@ -43,7 +43,7 @@ internal class ViewDrawRibbonQATExtraButton : ViewLeaf /// /// Reference to owning ribbon control. /// Delegate for notifying paint requests. - public ViewDrawRibbonQATExtraButton([DisallowNull] KryptonRibbon ribbon, + public ViewDrawRibbonQATExtraButton(KryptonRibbon ribbon, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -128,7 +128,7 @@ public override bool Visible /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs index 9259b9ccf..f27a86c16 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs @@ -50,7 +50,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs index 27abfa427..c8596eb77 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs @@ -33,8 +33,8 @@ internal class ViewDrawRibbonQATOverflow : ViewComposite /// /// Reference to owning ribbon control. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonQATOverflow([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaintDelegate) + public ViewDrawRibbonQATOverflow(KryptonRibbon ribbon, + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(needPaintDelegate != null); @@ -94,7 +94,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs index 72146070d..798f7749a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs @@ -31,7 +31,7 @@ internal class ViewDrawRibbonRecentDocs : ViewLeaf, /// Initialize a new instance of the ViewDrawRibbonRecentDocs class. /// /// Source ribbon control. - public ViewDrawRibbonRecentDocs([DisallowNull] KryptonRibbon ribbon) + public ViewDrawRibbonRecentDocs(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -84,7 +84,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs index 30c33f3d0..74def1a74 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs @@ -46,7 +46,7 @@ public override string ToString() => /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs index c070ec80e..6072ef122 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs @@ -83,7 +83,7 @@ protected override void Dispose(bool disposing) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs index 58f48673b..d79baf1d8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs @@ -74,9 +74,9 @@ static ViewDrawRibbonTab() /// Reference to owning ribbon control. /// Reference to view used for layout out tabs. /// Delegate for notifying paint requests. - public ViewDrawRibbonTab([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewLayoutRibbonTabs layoutTabs, - [DisallowNull] NeedPaintHandler needPaint) + public ViewDrawRibbonTab(KryptonRibbon ribbon, + ViewLayoutRibbonTabs layoutTabs, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(layoutTabs != null); @@ -349,7 +349,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs index 65b9c78d6..bd41c49df 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs @@ -45,7 +45,7 @@ static ViewDrawRibbonTabSep() /// Initialize a new instance of the ViewDrawRibbonTabSep class. /// /// Source for palette values. - public ViewDrawRibbonTabSep([DisallowNull] IPaletteRibbonGeneral palette) + public ViewDrawRibbonTabSep(IPaletteRibbonGeneral palette) : base(SEP_WIDTH, true) { Debug.Assert(palette != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs index c6911fd87..e4b73de8e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs @@ -38,7 +38,7 @@ internal class ViewLayoutRibbonAppButton : ViewLayoutDocker /// /// Owning control instance. /// Scroller orientation. - public ViewLayoutRibbonAppButton([DisallowNull] KryptonRibbon ribbon, + public ViewLayoutRibbonAppButton(KryptonRibbon ribbon, bool bottomHalf) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs index a7ce453ab..1c8f8ae45 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs @@ -29,7 +29,7 @@ internal class ViewLayoutRibbonAppTab : ViewLayoutDocker /// Initialize a new instance of the ViewLayoutRibbonAppTab class. /// /// Owning control instance. - public ViewLayoutRibbonAppTab([DisallowNull] KryptonRibbon ribbon) + public ViewLayoutRibbonAppTab(KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs index e6b8fe42e..3f058eb04 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs @@ -42,7 +42,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs index fe1628c31..cc30ed521 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs @@ -63,7 +63,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs index 98c59aa5e..ec92ed1d5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs @@ -39,8 +39,8 @@ private class ViewDrawRibbonContextTitleList : List /// /// Reference to source ribbon control. /// Reference to view element that tracks the top level form. - public ViewLayoutRibbonContextTitles([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] ViewDrawRibbonCaptionArea captionArea) + public ViewLayoutRibbonContextTitles(KryptonRibbon ribbon, + ViewDrawRibbonCaptionArea captionArea) { Debug.Assert(captionArea != null); Debug.Assert(ribbon != null); @@ -94,7 +94,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs index ea028a52d..a1d5f766f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs @@ -66,7 +66,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs index 79862cb3a..46cbb47d0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs @@ -56,12 +56,12 @@ internal class ViewLayoutRibbonGalleryItems : ViewComposite /// Reference to the up button. /// Reference to the down button. /// Reference to the context button. - public ViewLayoutRibbonGalleryItems([DisallowNull] PaletteBase palette, - [DisallowNull] KryptonGallery gallery, - [DisallowNull] NeedPaintHandler needPaint, - [DisallowNull] ViewDrawRibbonGalleryButton buttonUp, - [DisallowNull] ViewDrawRibbonGalleryButton buttonDown, - [DisallowNull] ViewDrawRibbonGalleryButton buttonContext) + public ViewLayoutRibbonGalleryItems(PaletteBase palette, + KryptonGallery gallery, + NeedPaintHandler needPaint, + ViewDrawRibbonGalleryButton buttonUp, + ViewDrawRibbonGalleryButton buttonDown, + ViewDrawRibbonGalleryButton buttonContext) { Debug.Assert(palette != null); Debug.Assert(gallery != null); @@ -358,7 +358,7 @@ public void BringIntoView(int index) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -389,7 +389,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs index 93e15bdba..1e3b9799d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs @@ -52,9 +52,9 @@ private class ViewToSize : Dictionary { } /// Owning ribbon control instance. /// Reference to cluster definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupCluster([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupCluster ribbonCluster, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupCluster(KryptonRibbon ribbon, + KryptonRibbonGroupCluster ribbonCluster, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCluster != null); @@ -392,7 +392,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs index 57cb42fcb..3b823e4a8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs @@ -47,9 +47,9 @@ private class ContainerToView : Dictionary { } /// Owning ribbon control instance. /// The ribbon group this layout is used to display. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupContent([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroup ribbonGroup, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupContent(KryptonRibbon ribbon, + KryptonRibbonGroup ribbonGroup, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -623,7 +623,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs index 4298e5085..92ebed294 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs @@ -67,9 +67,9 @@ private class ViewList : List { } /// Owning ribbon control instance. /// Reference to lines definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupLines([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupLines ribbonLines, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupLines(KryptonRibbon ribbon, + KryptonRibbonGroupLines ribbonLines, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonLines != null); @@ -597,7 +597,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs index 7954cff61..6ddbfb73b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs @@ -46,9 +46,9 @@ private class ViewToSize : Dictionary { } /// Owning ribbon control instance. /// Reference to triple definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupTriple([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonGroupTriple ribbonTriple, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupTriple(KryptonRibbon ribbon, + KryptonRibbonGroupTriple ribbonTriple, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTriple != null); @@ -463,7 +463,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs index 694d63106..8d040b18e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs @@ -48,9 +48,9 @@ private class ViewDrawRibbonGroupSepList : List { } /// Owning ribbon control instance. /// RibbonTab to organize groups. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroups([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] KryptonRibbonTab ribbonTab, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonGroups(KryptonRibbon ribbon, + KryptonRibbonTab ribbonTab, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTab != null); @@ -303,7 +303,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs index 00ffe8ca5..058392232 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs @@ -38,9 +38,9 @@ internal class ViewLayoutRibbonGroupsArea : ViewDrawPanel /// Reference to owning ribbon control. /// Reference to redirector for palette settings. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonGroupsArea([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] PaletteRedirect redirect, - [DisallowNull] NeedPaintHandler needPaintDelegate) + public ViewLayoutRibbonGroupsArea(KryptonRibbon ribbon, + PaletteRedirect redirect, + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); @@ -114,7 +114,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs index b66bd82fd..83db09147 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs @@ -38,8 +38,8 @@ private class QATButtonToView : DictionaryOwning ribbon control instance. /// Delegate for notifying paint requests. /// Should the extra button be shown. - public ViewLayoutRibbonQATContents([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaint, + public ViewLayoutRibbonQATContents(KryptonRibbon ribbon, + NeedPaintHandler needPaint, bool showExtraButton) { Debug.Assert(ribbon != null); @@ -253,7 +253,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs index 8cf1de472..bdd3cc5b4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs @@ -33,11 +33,11 @@ internal class ViewLayoutRibbonQATFromOverflow : ViewLayoutRibbonQATContents /// Delegate for notifying paint requests. /// Should the extra button be shown. /// Source for finding buttons that are overflowing. - public ViewLayoutRibbonQATFromOverflow([DisallowNull] Control parentControl, + public ViewLayoutRibbonQATFromOverflow(Control parentControl, KryptonRibbon ribbon, NeedPaintHandler needPaint, bool showExtraButton, - [DisallowNull] ViewLayoutRibbonQATContents contents) + ViewLayoutRibbonQATContents contents) : base(ribbon, needPaint, showExtraButton) { Debug.Assert(parentControl != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs index 62e725b6d..fb28c7c03 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs @@ -36,7 +36,7 @@ internal class ViewLayoutRibbonQATMini : ViewLayoutDocker /// /// Owning control instance. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonQATMini([DisallowNull] KryptonRibbon ribbon, + public ViewLayoutRibbonQATMini(KryptonRibbon ribbon, NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); @@ -226,7 +226,7 @@ public KeyTipInfo[] GetQATKeyTips() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs index 3769f2cf3..823fe2c1d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs @@ -69,7 +69,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -143,7 +143,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs index c81279275..badc66dc0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs @@ -32,7 +32,7 @@ public class RibbonViewControl : ViewControl /// Initialize a new instance of the ViewControl class. /// /// Top level ribbon control. - public RibbonViewControl([DisallowNull] KryptonRibbon ribbon) + public RibbonViewControl(KryptonRibbon ribbon) : base(ribbon) { Debug.Assert(ribbon != null); @@ -148,12 +148,12 @@ protected override bool ProcessDialogKey(Keys keyData) /// Should scoller be inset for use in tabs area. /// Scrolling speed. /// Delegate for notifying paint/layout requests. - public ViewLayoutRibbonScrollPort([DisallowNull] KryptonRibbon ribbon, + public ViewLayoutRibbonScrollPort(KryptonRibbon ribbon, Orientation orientation, - [DisallowNull] ViewBase viewFiller, + ViewBase viewFiller, bool insetForTabs, int scrollSpeed, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(viewFiller != null); @@ -451,7 +451,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -629,7 +629,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs index 37792602f..cd8c56504 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs @@ -110,7 +110,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs index 986cd782c..6290442ec 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs @@ -93,7 +93,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs index 8f902cabf..ebc1c4cff 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs @@ -55,8 +55,8 @@ private class ContextNameList : List { } /// /// Owning ribbon control instance. /// Delegate for notifying paint requests. - public ViewLayoutRibbonTabs([DisallowNull] KryptonRibbon ribbon, - [DisallowNull] NeedPaintHandler needPaint) + public ViewLayoutRibbonTabs(KryptonRibbon ribbon, + NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -435,7 +435,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs index 963dffebb..63d140131 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs @@ -93,11 +93,11 @@ public RibbonButtonSpecFixedCollection(KryptonRibbon owner) /// Reference to the caption area. /// Reference to layout of the context area. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonTabsArea([DisallowNull] KryptonRibbon ribbon, + public ViewLayoutRibbonTabsArea(KryptonRibbon ribbon, [DisallowNull] PaletteRedirect? redirect, - [DisallowNull] ViewDrawRibbonCaptionArea captionArea, - [DisallowNull] ViewLayoutRibbonContextTitles layoutContexts, - [DisallowNull] NeedPaintHandler needPaintDelegate) + ViewDrawRibbonCaptionArea captionArea, + ViewLayoutRibbonContextTitles layoutContexts, + NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs index ab4bd2148..5076d373c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs @@ -50,7 +50,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs index d32341e7c..84b25d448 100644 --- a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs +++ b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs @@ -47,10 +47,10 @@ public class AccurateText : GlobalId /// Dispose of font when finished with it. /// /// A memento used to draw the text. - public static AccurateTextMemento MeasureString([DisallowNull] Graphics g, + public static AccurateTextMemento MeasureString(Graphics g, RightToLeft rtl, - [DisallowNull] string text, - [DisallowNull] Font font, + string text, + Font font, PaletteTextTrim trim, PaletteRelativeAlign align, PaletteTextHotkeyPrefix prefix, @@ -206,7 +206,7 @@ public static AccurateTextMemento MeasureString([DisallowNull] Graphics g, /// When on composition draw with glowing. /// /// True if draw succeeded; False is draw produced an error. - public static bool DrawString([DisallowNull] Graphics g, + public static bool DrawString(Graphics g, Brush brush, Rectangle rect, RightToLeft rtl, @@ -214,7 +214,7 @@ public static bool DrawString([DisallowNull] Graphics g, bool composition, bool glowing, PaletteState state, - [DisallowNull] AccurateTextMemento memento) + AccurateTextMemento memento) { Debug.Assert(g != null); Debug.Assert(memento != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs index ae8e28fa9..9d60e1241 100644 --- a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs +++ b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs @@ -37,7 +37,7 @@ public class AccurateTextMemento : GlobalId, /// Drawing hint. /// Should the font be disposed. internal AccurateTextMemento(string text, - [DisallowNull] Font font, + Font font, SizeF sizeF, StringFormat format, TextRenderingHint hint, // TODO: What was this supposed to be used for ? diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs index 109ef8e82..67c1a3bc5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs @@ -46,7 +46,7 @@ public abstract class ButtonSpecCollectionBase : GlobalId /// Initialize a new instance of the ButtonSpecCollectionBase class. /// /// Reference to owning object instance. - protected ButtonSpecCollectionBase([DisallowNull] object owner) + protected ButtonSpecCollectionBase(object owner) { Debug.Assert(owner != null); Owner = owner!; @@ -224,7 +224,7 @@ public void Remove(object? value) => /// /// T reference. /// -1 if not found; otherwise index position. - public int IndexOf([DisallowNull] T item) + public int IndexOf(T item) { Debug.Assert(item != null); return _specs.IndexOf(item!); @@ -236,7 +236,7 @@ public int IndexOf([DisallowNull] T item) /// Insert index. /// T reference. /// - public void Insert(int index, [DisallowNull] T item) + public void Insert(int index, T item) { Debug.Assert(item != null); @@ -323,7 +323,7 @@ public T? this[string uniqueName] /// /// T reference. /// - public void Add([DisallowNull] T item) + public void Add(T item) { Debug.Assert(item != null); @@ -354,7 +354,7 @@ public void Add([DisallowNull] T item) /// /// T reference. /// True if spec found; otherwise false. - public bool Contains([DisallowNull] T item) + public bool Contains(T item) { Debug.Assert(item != null); return _specs.Contains(item!); @@ -365,7 +365,7 @@ public bool Contains([DisallowNull] T item) /// /// Target array. /// Starting array index. - public void CopyTo([DisallowNull] T[] array, int arrayIndex) + public void CopyTo(T[] array, int arrayIndex) { Debug.Assert(array != null); _specs.CopyTo(array, arrayIndex); @@ -386,7 +386,7 @@ public void CopyTo([DisallowNull] T[] array, int arrayIndex) /// /// T reference. /// True if removed; otherwise false. - public bool Remove([DisallowNull] T item) + public bool Remove(T item) { Debug.Assert(item != null, nameof(item) + " != null"); @@ -414,7 +414,7 @@ public bool Remove([DisallowNull] T item) /// The Array that is the destination of the elements copied from the collection. /// The index in array at which copying begins. /// - public void CopyTo([DisallowNull] Array array, int index) + public void CopyTo(Array array, int index) { Debug.Assert(array != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs index 5034c6c65..4150013f6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs @@ -24,7 +24,7 @@ public abstract class ButtonSpecFormFixed : ButtonSpec /// /// Reference to owning krypton form. /// Fixed style to use. - protected ButtonSpecFormFixed([DisallowNull] KryptonForm form, + protected ButtonSpecFormFixed(KryptonForm form, PaletteButtonSpecStyle fixedStyle) { Debug.Assert(form != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs index 62734cd71..be44747f0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs @@ -52,7 +52,7 @@ internal class ListSpacers : List { } /// Array of target metrics for button padding. /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. - protected ButtonSpecManagerBase([DisallowNull] Control control, + protected ButtonSpecManagerBase(Control control, PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, @@ -60,7 +60,7 @@ protected ButtonSpecManagerBase([DisallowNull] Control control, PaletteMetricInt[] viewMetricIntOutside, PaletteMetricInt[] viewMetricIntInside, PaletteMetricPadding[] viewMetricPaddings, - [DisallowNull] GetToolStripRenderer getRenderer, + GetToolStripRenderer getRenderer, NeedPaintHandler needPaint) { Debug.Assert(control != null); @@ -562,7 +562,7 @@ select specView.ButtonSpec /// ButtonSpec instance. /// Palette redirector for the button spec instance. public virtual PaletteRedirect CreateButtonSpecRemap(PaletteRedirect? redirector, - [DisallowNull] ButtonSpec buttonSpec) => + ButtonSpec buttonSpec) => new ButtonSpecRemapByContentView(redirector, buttonSpec); #endregion @@ -651,7 +651,7 @@ protected virtual void ButtonSpecCreated(ButtonSpec buttonSpec, /// Target metric padding. /// ButtonSpec instance. /// ButtonSpecView derived class. - protected virtual ButtonSpecView CreateButtonSpecView([DisallowNull] PaletteRedirect redirector, + protected virtual ButtonSpecView CreateButtonSpecView(PaletteRedirect redirector, IPaletteMetric? viewPaletteMetric, PaletteMetricPadding viewMetricPadding, ButtonSpec buttonSpec) => diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs index da661ad52..77e7b245c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs @@ -36,7 +36,7 @@ public class ButtonSpecManagerDraw : ButtonSpecManagerBase /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. public ButtonSpecManagerDraw(Control control, - [DisallowNull] PaletteRedirect? redirector, + PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, ViewDrawDocker[] viewDockers, @@ -66,10 +66,10 @@ public ButtonSpecManagerDraw(Control control, /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. public ButtonSpecManagerDraw(Control control, - [DisallowNull] PaletteRedirect? redirector, + PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, - [DisallowNull] ViewDrawDocker[] viewDockers, + ViewDrawDocker[] viewDockers, IPaletteMetric[] viewMetrics, PaletteMetricInt[] viewMetricIntOutside, PaletteMetricInt[] viewMetricIntInside, diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs index 3c5cd8728..a1ceaa751 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs @@ -28,7 +28,7 @@ public abstract class ButtonSpecRemapByContentBase : PaletteRedirect /// Initial palette target for redirection. /// Reference to button specification. protected ButtonSpecRemapByContentBase(PaletteBase? target, - [DisallowNull] ButtonSpec buttonSpec) + ButtonSpec buttonSpec) : base(target) { Debug.Assert(buttonSpec != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs index 7b64966dd..3ebf14787 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs @@ -24,7 +24,7 @@ public class ButtonSpecRemapByContentView : ButtonSpecRemapByContentBase /// Initial palette target for redirection. /// Reference to button specification. public ButtonSpecRemapByContentView(PaletteBase? target, - [DisallowNull] ButtonSpec buttonSpec) + ButtonSpec buttonSpec) : base(target, buttonSpec) { } diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs index 30e7aeb86..d54c5c3b8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs @@ -34,11 +34,11 @@ public class ButtonSpecView : GlobalId, /// Padding metric for border padding. /// Reference to owning manager. /// Access - public ButtonSpecView([DisallowNull] PaletteRedirect redirector, + public ButtonSpecView(PaletteRedirect redirector, IPaletteMetric? paletteMetric, PaletteMetricPadding metricPadding, - [DisallowNull] ButtonSpecManagerBase manager, - [DisallowNull] ButtonSpec buttonSpec) + ButtonSpecManagerBase manager, + ButtonSpec buttonSpec) { Debug.Assert(redirector != null); Debug.Assert(manager != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs index 173e36e11..527316004 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs @@ -24,9 +24,9 @@ public class ButtonSpecViewControllers /// Mouse controller. /// Source controller. /// Key controller. - public ButtonSpecViewControllers([DisallowNull] IMouseController mouseController, - [DisallowNull] ISourceController sourceController, - [DisallowNull] IKeyController keyController) + public ButtonSpecViewControllers(IMouseController mouseController, + ISourceController sourceController, + IKeyController keyController) { Debug.Assert(mouseController != null); Debug.Assert(sourceController != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs index c0cdad971..35a5b9d8f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs @@ -320,7 +320,7 @@ public void SetCustomColors(Color[]?[]? colors) /// /// Color to find. /// True if found; otherwise false. - public bool ContainsColor([DisallowNull] Color color) + public bool ContainsColor(Color color) { if ((Colors != null) && (color != null)) { diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs index 2f3d92610..965d8e69f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs @@ -95,7 +95,7 @@ public abstract ViewBase GenerateView(IContextMenuProvider provider, bool standardStyle, bool imageColumn); - internal void SetProvider([DisallowNull] IContextMenuProvider provider) + internal void SetProvider(IContextMenuProvider provider) { Debug.Assert(provider.ProviderRedirector != null); _provider = provider; diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs index 845172d34..6e70daf99 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs @@ -87,7 +87,7 @@ public class ButtonController : GlobalId, /// /// Target for state changes. /// Delegate for notifying paint requests. - public ButtonController([DisallowNull] ViewBase target, + public ButtonController(ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -499,7 +499,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -551,7 +551,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -619,7 +619,7 @@ public virtual void GotFocus(Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs index d44202e6c..47db7a93d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs @@ -40,8 +40,8 @@ public class CheckBoxController : GlobalId, /// Target for state changes. /// Top element for the check box control. /// Delegate for notifying paint requests. - public CheckBoxController([DisallowNull] ViewDrawCheckBox target, - [DisallowNull] ViewBase top, + public CheckBoxController(ViewDrawCheckBox target, + ViewBase top, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -207,7 +207,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -251,7 +251,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs index 9e296bd6d..fe08e9feb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs @@ -39,7 +39,7 @@ public class ContextMenuController : GlobalId, /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -87,7 +87,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -113,7 +113,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs index 933b8dbce..55a23d02c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs @@ -114,7 +114,7 @@ public interface ISourceController /// Source control has lost the focus. /// /// Reference to the source control instance. - void LostFocus([DisallowNull] Control c); + void LostFocus(Control c); } #endregion } diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs index a2ce6f464..83f5e98fd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs @@ -51,7 +51,7 @@ public class LinkLabelController : GlobalId, /// Palette to use in the pressed state. /// Override to update with the pressed state. /// Delegate for notifying paint requests. - public LinkLabelController([DisallowNull] ViewDrawContent target, + public LinkLabelController(ViewDrawContent target, IPaletteContent paletteDisabled, IPaletteContent paletteNormal, IPaletteContent paletteTracking, @@ -247,7 +247,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -304,7 +304,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { // If we are capturing mouse input if (Captured) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs index fd3e84ab4..4dcebd69e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs @@ -44,10 +44,10 @@ internal class MenuCheckBoxController : GlobalId, /// Target for state changes. /// Drawing element that owns check box display. /// Delegate for notifying paint requests. - public MenuCheckBoxController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewBase target, - [DisallowNull] ViewDrawMenuCheckBox checkBox, - [DisallowNull] NeedPaintHandler needPaint) + public MenuCheckBoxController(ViewContextMenuManager viewManager, + ViewBase target, + ViewDrawMenuCheckBox checkBox, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -237,7 +237,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -294,7 +294,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -320,7 +320,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -348,7 +348,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs index 4b3ae4906..3657c2368 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs @@ -44,10 +44,10 @@ internal class MenuCheckButtonController : GlobalId, /// Target for state changes. /// Drawing element that owns check button display. /// Delegate for notifying paint requests. - public MenuCheckButtonController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewBase target, - [DisallowNull] ViewDrawMenuCheckButton checkButton, - [DisallowNull] NeedPaintHandler needPaint) + public MenuCheckButtonController(ViewContextMenuManager viewManager, + ViewBase target, + ViewDrawMenuCheckButton checkButton, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -240,7 +240,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -297,7 +297,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -323,7 +323,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -351,7 +351,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs index 812c6b430..d3e009e2d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs @@ -43,10 +43,10 @@ internal class MenuColorBlockController : GlobalId, /// Target for state changes. /// Drawing element that owns color block display. /// Delegate for notifying paint requests. - public MenuColorBlockController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewBase target, - [DisallowNull] ViewDrawMenuColorBlock colorBlock, - [DisallowNull] NeedPaintHandler needPaint) + public MenuColorBlockController(ViewContextMenuManager viewManager, + ViewBase target, + ViewDrawMenuColorBlock colorBlock, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -229,7 +229,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -286,7 +286,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -312,7 +312,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -340,7 +340,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs index 6844ab882..5a2c4190c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs @@ -45,10 +45,10 @@ internal class MenuImageSelectController : GlobalId, /// Target for state changes. /// Reference to layout of the image items. /// Delegate for notifying paint requests. - public MenuImageSelectController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewDrawMenuImageSelectItem target, - [DisallowNull] ViewLayoutMenuItemSelect layout, - [DisallowNull] NeedPaintHandler needPaint) + public MenuImageSelectController(ViewContextMenuManager viewManager, + ViewDrawMenuImageSelectItem target, + ViewLayoutMenuItemSelect layout, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -298,7 +298,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus([DisallowNull] Control c) + public void LostFocus(Control c) { } #endregion @@ -311,7 +311,7 @@ public void LostFocus([DisallowNull] Control c) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -368,7 +368,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -394,7 +394,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs index 050844799..142d2ca1a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs @@ -32,9 +32,9 @@ internal class MenuItemController : GlobalId, /// Owning view manager instance. /// Target menu item view element. /// Delegate for notifying paint requests. - public MenuItemController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewDrawMenuItem menuItem, - [DisallowNull] NeedPaintHandler needPaint) + public MenuItemController(ViewContextMenuManager viewManager, + ViewDrawMenuItem menuItem, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(menuItem != null); @@ -233,7 +233,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -312,7 +312,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -338,7 +338,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -366,7 +366,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs index c181e4b28..6de330e16 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs @@ -44,10 +44,10 @@ internal class MenuLinkLabelController : GlobalId, /// Target for state changes. /// Drawing element that owns link label display. /// Delegate for notifying paint requests. - public MenuLinkLabelController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewDrawContent target, - [DisallowNull] ViewDrawMenuLinkLabel linkLabel, - [DisallowNull] NeedPaintHandler needPaint) + public MenuLinkLabelController(ViewContextMenuManager viewManager, + ViewDrawContent target, + ViewDrawMenuLinkLabel linkLabel, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -234,7 +234,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -291,7 +291,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -317,7 +317,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -345,7 +345,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs index 037f825e2..0c538abbf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs @@ -44,10 +44,10 @@ internal class MenuRadioButtonController : GlobalId, /// Target for state changes. /// Drawing element that owns radio button display. /// Delegate for notifying paint requests. - public MenuRadioButtonController([DisallowNull] ViewContextMenuManager viewManager, - [DisallowNull] ViewBase target, - [DisallowNull] ViewDrawMenuRadioButton radioButton, - [DisallowNull] NeedPaintHandler needPaint) + public MenuRadioButtonController(ViewContextMenuManager viewManager, + ViewBase target, + ViewDrawMenuRadioButton radioButton, + NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -237,7 +237,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -294,7 +294,7 @@ public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArg /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) + public virtual void KeyPress(Control c, KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -320,7 +320,7 @@ public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEv /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -348,7 +348,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs index 887545766..d861a435d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs @@ -314,7 +314,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -494,7 +494,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// /// Reference to the source control instance. /// - public virtual void GotFocus([DisallowNull] Control c) + public virtual void GotFocus(Control c) { Debug.Assert(c != null); @@ -510,7 +510,7 @@ public virtual void GotFocus([DisallowNull] Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs index 6dcee7ed0..639e32b58 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs @@ -37,8 +37,8 @@ internal class RadioButtonController : GlobalId, /// Target for state changes. /// Top element for the radio button control. /// Delegate for notifying paint requests. - public RadioButtonController([DisallowNull] ViewDrawRadioButton target, - [DisallowNull] ViewBase top, + public RadioButtonController(ViewDrawRadioButton target, + ViewBase top, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -204,7 +204,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -248,7 +248,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs index 5be46b834..a609eb682 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs @@ -194,7 +194,7 @@ protected override void WndProc(ref Message m) /// Show as split or movement cursors. /// Draw a separator indicator. /// Delegate for notifying paint requests. - public SeparatorController([DisallowNull] ISeparatorSource source, + public SeparatorController(ISeparatorSource source, ViewBase target, bool splitCursors, bool drawIndicator, @@ -394,7 +394,7 @@ public override void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public override bool KeyUp(Control c, [DisallowNull] KeyEventArgs e) + public override bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(e != null); @@ -423,7 +423,7 @@ public override bool KeyUp(Control c, [DisallowNull] KeyEventArgs e) /// Source control has lost the focus. /// /// Reference to the source control instance. - public override void LostFocus([DisallowNull] Control c) + public override void LostFocus(Control c) { // If we are capturing mouse input if (_moving) @@ -678,7 +678,7 @@ internal class SeparatorMessageFilter : IMessageFilter /// Initialize a new instance of the SeparatorMessageFilter class. /// /// Owning class instance. - public SeparatorMessageFilter([DisallowNull] SeparatorController controller) + public SeparatorMessageFilter(SeparatorController controller) { Debug.Assert(controller != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs index 5c6737849..849a4c58a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs @@ -31,8 +31,8 @@ public class ToolTipController : GlobalId, /// Reference to manager of all tooltip functionality. /// Target element that controller is for. /// Target controller that we are snooping. - public ToolTipController([DisallowNull] ToolTipManager manager, - [DisallowNull] ViewBase targetElement, + public ToolTipController(ToolTipManager manager, + ViewBase targetElement, IMouseController? targetController) { Debug.Assert(manager != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs index 05964f1f8..031961069 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs @@ -163,7 +163,7 @@ public virtual void MouseLeave(Control c, ViewBase? next) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual void KeyDown(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -252,7 +252,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) + public virtual bool KeyUp(Control c, KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -281,7 +281,7 @@ public virtual void GotFocus(Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs index 237653108..560068772 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs @@ -40,7 +40,7 @@ public class KryptonCheckButtonCollection : CollectionBase /// Initialize a new instance of the KryptonCheckButtonCollection class. /// /// Owning component - public KryptonCheckButtonCollection([DisallowNull] KryptonCheckSet owner) + public KryptonCheckButtonCollection(KryptonCheckSet owner) { Debug.Assert(owner != null); _owner = owner!; @@ -55,7 +55,7 @@ public KryptonCheckButtonCollection([DisallowNull] KryptonCheckSet owner) /// The KryptonCheckButton object to add to the collection. /// /// The index of the new entry. - public int Add([DisallowNull] KryptonCheckButton checkButton) + public int Add(KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -103,7 +103,7 @@ public int IndexOf(KryptonCheckButton checkButton) => /// The KryptonCheckButton reference to insert. /// /// - public void Insert(int index, [DisallowNull] KryptonCheckButton checkButton) + public void Insert(int index, KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -133,7 +133,7 @@ public void Insert(int index, [DisallowNull] KryptonCheckButton checkButton) /// The KryptonCheckButton to remove. /// /// - public void Remove([DisallowNull] KryptonCheckButton checkButton) + public void Remove(KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -255,7 +255,7 @@ protected override void OnSetComplete(int index, object? oldValue, object? newVa /// /// Container that owns the component. /// - public KryptonCheckSet([DisallowNull] IContainer container) + public KryptonCheckSet(IContainer container) : this() { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs index 11d983960..df482a390 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs @@ -468,7 +468,7 @@ protected virtual VisualContextMenu CreateContextMenu(KryptonContextMenu kcm, #region Implementation private void PerformNeedPaint(bool needLayout) => OnNeedPaint(this, new NeedLayoutEventArgs(needLayout)); - private void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + private void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs index fd1b566fe..47a44dc27 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs @@ -3120,7 +3120,7 @@ internal bool HasCircularReference() return null; } - private object? ImportFromFile([DisallowNull] object? parameter) + private object? ImportFromFile(object? parameter) { // Cast to correct type if (parameter is not string filename) @@ -3146,7 +3146,7 @@ internal bool HasCircularReference() return filename; } - private object? ImportFromStream([DisallowNull] object? parameter) + private object? ImportFromStream(object? parameter) { // Cast to correct type if (parameter is not Stream stream) @@ -3166,7 +3166,7 @@ internal bool HasCircularReference() return stream; } - private object? ImportFromByteArray([DisallowNull] object? parameter) + private object? ImportFromByteArray(object? parameter) { // Cast to an array of parameters if (parameter is not byte[] byteArray) @@ -3186,7 +3186,7 @@ internal bool HasCircularReference() return null; } - private void ImportFromXmlDocument([DisallowNull] XmlDocument doc) + private void ImportFromXmlDocument(XmlDocument doc) { // Remember the current culture setting CultureInfo culture = Thread.CurrentThread.CurrentCulture; @@ -3258,7 +3258,7 @@ private void ImportFromXmlDocument([DisallowNull] XmlDocument doc) } } - private object? ExportToFile([DisallowNull] object? parameter) + private object? ExportToFile(object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) @@ -3287,7 +3287,7 @@ private void ImportFromXmlDocument([DisallowNull] XmlDocument doc) return filename; } - private object? ExportToStream([DisallowNull] object? parameter) + private object? ExportToStream(object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) @@ -3312,7 +3312,7 @@ private void ImportFromXmlDocument([DisallowNull] XmlDocument doc) return stream; } - private object? ExportToByteArray([DisallowNull] object? parameter) + private object? ExportToByteArray(object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs index 88f2b436a..0c9e372bc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs @@ -885,7 +885,7 @@ protected void OnNeedResyncPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); @@ -989,7 +989,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs index bcca89211..a20845213 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs @@ -499,7 +499,7 @@ public bool IsInAdministratorMode /// Reference to view element. /// Docking style of the element. [EditorBrowsable(EditorBrowsableState.Never)] - public void InjectViewElement([DisallowNull] ViewBase element, ViewDockStyle style) + public void InjectViewElement(ViewBase element, ViewDockStyle style) { Debug.Assert(element != null); Debug.Assert(_drawHeading != null); @@ -535,7 +535,7 @@ public void InjectViewElement([DisallowNull] ViewBase element, ViewDockStyle sty /// Reference to view element. /// Docking style of the element. [EditorBrowsable(EditorBrowsableState.Never)] - public void RevokeViewElement([DisallowNull] ViewBase element, ViewDockStyle style) + public void RevokeViewElement(ViewBase element, ViewDockStyle style) { Debug.Assert(element != null); @@ -935,7 +935,7 @@ protected override void OnTextChanged(EventArgs e) /// Source of notification. /// An EventArgs containing event data. /// - protected override void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) + protected override void OnButtonSpecChanged(object sender, EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs index 23e574458..63aa1ecdd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs @@ -27,9 +27,9 @@ public class KryptonGroupBoxPanel : KryptonGroupPanel /// Normal appearance state. /// Callback delegate for layout processing. public KryptonGroupBoxPanel(Control alignControl, - [DisallowNull] PaletteDoubleRedirect? stateCommon, - [DisallowNull] PaletteDouble stateDisabled, - [DisallowNull] PaletteDouble stateNormal, + PaletteDoubleRedirect? stateCommon, + PaletteDouble stateDisabled, + PaletteDouble stateNormal, NeedPaintHandler layoutHandler) : base(alignControl, stateCommon, stateDisabled, stateNormal, layoutHandler) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs index 439723ad6..b9ddc2fcf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs @@ -89,9 +89,9 @@ public class KryptonGroupPanel : KryptonPanel /// Normal appearance state. /// Callback delegate for layout processing. public KryptonGroupPanel(Control alignControl, - [DisallowNull] PaletteDoubleRedirect stateCommon, - [DisallowNull] PaletteDouble stateDisabled, - [DisallowNull] PaletteDouble stateNormal, + PaletteDoubleRedirect stateCommon, + PaletteDouble stateDisabled, + PaletteDouble stateNormal, NeedPaintHandler? layoutHandler) : base(stateCommon, stateDisabled, stateNormal) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs index 9dab7e8b5..06f245311 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs @@ -1120,7 +1120,7 @@ private void CacheNewPalette(PaletteBase? palette) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs index 5b9a2175f..eb4679613 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs @@ -171,7 +171,7 @@ public KryptonManager() => /// /// Container that owns the component. /// - public KryptonManager([DisallowNull] IContainer container) + public KryptonManager(IContainer container) : this() { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs index dbb2f3385..2880ca60f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs @@ -54,9 +54,9 @@ public KryptonPanel() /// Common appearance state to inherit from. /// Disabled appearance state. /// Normal appearance state. - public KryptonPanel([DisallowNull] PaletteDoubleRedirect? stateCommon, - [DisallowNull] PaletteDouble stateDisabled, - [DisallowNull] PaletteDouble stateNormal) + public KryptonPanel(PaletteDoubleRedirect? stateCommon, + PaletteDouble stateDisabled, + PaletteDouble stateNormal) { SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.OptimizedDoubleBuffer, true); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs index f7a6ac001..9af65b320 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs @@ -78,7 +78,7 @@ public sealed class KryptonSplitterPanel : KryptonPanel /// Initialize a new instance of the KryptonSplitterPanel class. /// /// Reference to owning container. - public KryptonSplitterPanel([DisallowNull] KryptonSplitContainer container) + public KryptonSplitterPanel(KryptonSplitContainer container) { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs index bf3e2449a..df42fa42f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs @@ -609,7 +609,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, EventArgs e) { Debug.Assert(e != null); @@ -659,7 +659,7 @@ protected virtual void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs index b4797cf58..516b9b3c3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs @@ -663,7 +663,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, EventArgs e) { Debug.Assert(e != null); @@ -710,7 +710,7 @@ protected virtual void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs index ce2e72b7b..dc2dd735c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs @@ -1053,7 +1053,7 @@ protected virtual void OnAllowFormChromeChanged(object sender, EventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs index 5d08cf95b..5c5a6723a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs @@ -636,7 +636,7 @@ protected NeedPaintHandler NeedPaintDelegate /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); @@ -755,7 +755,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs index 3c78f9c0c..0af57a9c8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs @@ -372,7 +372,7 @@ protected NeedPaintHandler NeedPaintDelegate /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs index 98012bcae..712a3122e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs @@ -129,7 +129,7 @@ public VisualPopup? CurrentPopup /// Start tracking the provided popup. /// /// Popup instance to track. - public void StartTracking([DisallowNull] VisualPopup popup) + public void StartTracking(VisualPopup popup) { Debug.Assert(popup != null); Debug.Assert(!popup!.IsDisposed); @@ -289,7 +289,7 @@ public void ShowContextMenuStrip(ContextMenuStrip cms, /// Reference to ContextMenuStrip. /// Screen position for showing the context menu strip. /// Delegate to call when strip dismissed. - public void ShowContextMenuStrip([DisallowNull] ContextMenuStrip cms, + public void ShowContextMenuStrip(ContextMenuStrip cms, Point screenPt, EventHandler? cmsFinishDelegate) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs index 2fdaece41..6dd2520dd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs @@ -54,8 +54,8 @@ public VisualPopupToolTip(PaletteRedirect? redirector, /// Style for the tooltip border. /// Style for the tooltip content. /// Does the Tooltip need a shadow effect. - public VisualPopupToolTip([DisallowNull] PaletteRedirect? redirector, - [DisallowNull] IContentValues contentValues, + public VisualPopupToolTip(PaletteRedirect? redirector, + IContentValues contentValues, IRenderer? renderer, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs b/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs index 2f3e98897..985abd3dd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs @@ -23,7 +23,7 @@ public class ButtonSpecEventArgs : EventArgs /// /// Button spec effected by event. /// Index of page in the owning collection. - public ButtonSpecEventArgs([DisallowNull] ButtonSpec spec, int index) + public ButtonSpecEventArgs(ButtonSpec spec, int index) { Debug.Assert(spec != null); Debug.Assert(index >= 0); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs index 73fa444e1..e7e597eb3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs @@ -1116,7 +1116,7 @@ select GetControlWithFocus(child) /// /// Parent control. /// Control to be added. - public static void AddControlToParent([DisallowNull] Control parent, [DisallowNull] Control c) + public static void AddControlToParent(Control parent, Control c) { Debug.Assert(parent != null); Debug.Assert(c != null); @@ -1144,7 +1144,7 @@ public static void AddControlToParent([DisallowNull] Control parent, [DisallowNu /// Remove the provided control from its parent collection. /// /// Control to be removed. - public static void RemoveControlFromParent([DisallowNull] Control c) + public static void RemoveControlFromParent(Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs b/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs index 968866802..cf6985f6e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs @@ -28,7 +28,7 @@ public class CorrectContextControl : IDisposable /// /// Context to update. /// Actual parent control instance. - public CorrectContextControl([DisallowNull] ViewLayoutContext context, + public CorrectContextControl(ViewLayoutContext context, Control control) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs b/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs index 73f1693cb..843942db4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs @@ -45,7 +45,7 @@ public static bool IsCompositionEnabled /// /// Window handle of form. /// Distance for each form edge. - public static void ExtendFrameIntoClientArea([DisallowNull] IntPtr hWnd, Padding padding) + public static void ExtendFrameIntoClientArea(IntPtr hWnd, Padding padding) { // We can't use 'null', since the type of the object is 'IntPtr'. So we need to use 'IntPtr.Zero'. Debug.Assert(hWnd != IntPtr.Zero); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs b/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs index 32827a672..138bf4f61 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs @@ -35,7 +35,7 @@ public KryptonControlCollection(Control owner) /// Control to be added. [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] - public void AddInternal([DisallowNull] Control control) => + public void AddInternal(Control control) => // ReSharper disable RedundantBaseQualifier // Do not remove base, as the KryptonReadOnlyControls is a mess ! base.Add(control); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs b/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs index aca758c16..2fef306ef 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs @@ -98,7 +98,7 @@ public virtual void AddRange(T[] itemArray) /// /// Object reference. /// The position into which the new item was inserted. - public virtual int Add([DisallowNull] object value) + public virtual int Add(object value) { // Use strongly typed implementation Add((value as T)!); @@ -166,7 +166,7 @@ object IList.this[int index] /// /// Item reference. /// -1 if not found; otherwise index position. - public int IndexOf([DisallowNull] T item) + public int IndexOf(T item) { Debug.Assert(item != null); return _list.IndexOf(item); @@ -179,7 +179,7 @@ public int IndexOf([DisallowNull] T item) /// Item reference. /// /// - public virtual void Insert(int index, [DisallowNull] T item) + public virtual void Insert(int index, T item) { Debug.Assert(item != null); @@ -280,7 +280,7 @@ public void MoveBefore(T source, T target) /// Item reference. /// /// - public virtual void Add([DisallowNull] T item) + public virtual void Add(T item) { Debug.Assert(item != null); @@ -333,7 +333,7 @@ public void Clear() /// /// Target array. /// Starting array index. - public void CopyTo([DisallowNull] T[] array, int arrayIndex) + public void CopyTo(T[] array, int arrayIndex) { Debug.Assert(array != null); _list.CopyTo(array, arrayIndex); @@ -354,7 +354,7 @@ public void CopyTo([DisallowNull] T[] array, int arrayIndex) /// /// Item reference. /// True if removed; otherwise false. - public virtual bool Remove([DisallowNull] T item) + public virtual bool Remove(T item) { Debug.Assert(item != null); @@ -382,7 +382,7 @@ public virtual bool Remove([DisallowNull] T item) /// The Array that is the destination of the elements copied from the collection. /// The index in array at which copying begins. /// - public void CopyTo([DisallowNull] Array array, int index) + public void CopyTo(Array array, int index) { Debug.Assert(array != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs index 58b56b32e..b7baffa3f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs @@ -27,7 +27,7 @@ public class PaletteBackInheritForced : PaletteBackInherit /// Initialize a new instance of the PaletteBackInheritForced class. /// /// Background palette to inherit from. - public PaletteBackInheritForced([DisallowNull] IPaletteBack inherit) + public PaletteBackInheritForced(IPaletteBack inherit) { Debug.Assert(inherit != null); @@ -44,7 +44,7 @@ public PaletteBackInheritForced([DisallowNull] IPaletteBack inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit([DisallowNull] IPaletteBack paletteBack) + public void SetInherit(IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); _inherit = paletteBack; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs index 74f32ea6b..91564d7a9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteBackInheritOverride : PaletteBackInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteBackInheritOverride([DisallowNull] IPaletteBack primary, - [DisallowNull] IPaletteBack backup) + public PaletteBackInheritOverride(IPaletteBack primary, + IPaletteBack backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs index b53379b94..6cb930b3b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs @@ -94,7 +94,7 @@ public InternalStorage() /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteBorder([DisallowNull] IPaletteBorder inherit, + public PaletteBorder(IPaletteBorder inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs index 1e6195a97..9fa66c2cf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs @@ -45,7 +45,7 @@ public PaletteBorderInheritForced(IPaletteBorder? inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit([DisallowNull] IPaletteBorder paletteBorder) + public void SetInherit(IPaletteBorder paletteBorder) { Debug.Assert(paletteBorder != null); _inherit = paletteBorder; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs index 08b834ef5..840656b8e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteBorderInheritOverride : PaletteBorderInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteBorderInheritOverride([DisallowNull] IPaletteBorder primary, - [DisallowNull] IPaletteBorder backup) + public PaletteBorderInheritOverride(IPaletteBorder primary, + IPaletteBorder backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs index bbf6d31f1..fd7d20931 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs @@ -80,7 +80,7 @@ public PaletteContent(IPaletteContent inherit) /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteContent([DisallowNull] IPaletteContent inherit, + public PaletteContent(IPaletteContent inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs index 2d170b798..85d40b99e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs @@ -41,7 +41,7 @@ public PaletteContentInheritForced(IPaletteContent inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit([DisallowNull] IPaletteContent paletteContent) + public void SetInherit(IPaletteContent paletteContent) { Debug.Assert(paletteContent != null); _inherit = paletteContent; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs index 32409843a..55b04cc5c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs @@ -42,8 +42,8 @@ public PaletteContentInheritOverride(IPaletteContent primary, /// Backup inheritance. /// State used by the override. /// Should the override we used. - public PaletteContentInheritOverride([DisallowNull] IPaletteContent primary, - [DisallowNull] IPaletteContent backup, + public PaletteContentInheritOverride(IPaletteContent primary, + IPaletteContent backup, PaletteState overrideState, bool apply) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs index 6af50e684..3c546b61e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs @@ -37,7 +37,7 @@ public PaletteDoubleMetric(PaletteDoubleMetricRedirect? inherit) /// /// Source for palette defaulted values. /// Delegate for notifying paint requests. - public PaletteDoubleMetric([DisallowNull] PaletteDoubleMetricRedirect inherit, + public PaletteDoubleMetric(PaletteDoubleMetricRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs index 6018c18c5..08e862c06 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs @@ -32,8 +32,8 @@ public class PaletteDoubleOverride : GlobalId, /// Override palette to use. /// State used by the override. /// - public PaletteDoubleOverride([DisallowNull] IPaletteDouble normalTriple, - [DisallowNull] IPaletteDouble overrideTriple, + public PaletteDoubleOverride(IPaletteDouble normalTriple, + IPaletteDouble overrideTriple, PaletteState overrideState) { Debug.Assert(normalTriple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs index 135bd9865..96e9d325a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteElementColorInheritOverride : PaletteElementColorInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteElementColorInheritOverride([DisallowNull] IPaletteElementColor primary, - [DisallowNull] IPaletteElementColor backup) + public PaletteElementColorInheritOverride(IPaletteElementColor primary, + IPaletteElementColor backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs index bc23403fb..5e3101a74 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteElementColorInheritRedirect : PaletteElementColorInherit /// /// Source for inherit requests. /// Element value.. - public PaletteElementColorInheritRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteElementColorInheritRedirect(PaletteRedirect redirect, PaletteElement element) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs index b529d2f71..f817184cc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs @@ -27,7 +27,7 @@ public class PaletteMetricRedirect : Storage, /// Initialize a new instance of the PaletteMetricRedirect class. /// /// inheritance redirection instance. - public PaletteMetricRedirect([DisallowNull] PaletteRedirect? redirect) + public PaletteMetricRedirect(PaletteRedirect? redirect) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs index 980e8b447..cff8654df 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs @@ -27,7 +27,7 @@ public class PaletteRedirectGrids : PaletteRedirect /// /// Initial palette target for redirection. /// Grid reference for directing palette requests. - public PaletteRedirectGrids(PaletteBase? target, [DisallowNull] KryptonPaletteGrid grid) + public PaletteRedirectGrids(PaletteBase? target, KryptonPaletteGrid grid) : base(target) { Debug.Assert(grid != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs index 7bba741d4..d81fb34f3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs @@ -34,7 +34,7 @@ public class PaletteRibbonBack : Storage, /// /// Source for inheriting background values. /// Delegate for notifying changes in value. - public PaletteRibbonBack([DisallowNull] IPaletteRibbonBack inheritBack, + public PaletteRibbonBack(IPaletteRibbonBack inheritBack, NeedPaintHandler needPaint) { Debug.Assert(inheritBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs index d6915f02d..5924964de 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteRibbonBackInheritRedirect : PaletteRibbonBackInherit /// /// Source for inherit requests. /// Ribbon item background style. - public PaletteRibbonBackInheritRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteRibbonBackInheritRedirect(PaletteRedirect? redirect, PaletteRibbonBackStyle styleBack) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs index 80f8c38ed..4e1951126 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs @@ -34,7 +34,7 @@ public class PaletteRibbonBackRedirect : Storage, /// inheritance redirection instance. /// inheritance ribbon back style. /// Delegate for notifying paint requests. - public PaletteRibbonBackRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteRibbonBackRedirect(PaletteRedirect? redirect, PaletteRibbonBackStyle backStyle, NeedPaintHandler needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs index 44b9225aa..37eede392 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs @@ -37,8 +37,8 @@ public class PaletteRibbonDouble : Storage, /// Source for inheriting background values. /// Source for inheriting text values. /// Delegate for notifying paint requests. - public PaletteRibbonDouble([DisallowNull] IPaletteRibbonBack inheritBack, - [DisallowNull] IPaletteRibbonText inheritText, + public PaletteRibbonDouble(IPaletteRibbonBack inheritBack, + IPaletteRibbonText inheritText, NeedPaintHandler needPaint) { Debug.Assert(inheritBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs index e4ffba41f..e28e22bcf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs @@ -34,10 +34,10 @@ public class PaletteRibbonDoubleInheritOverride : PaletteRibbonDoubleInherit /// Backup inheritance background. /// Backup inheritance text. /// Palette state to override. - public PaletteRibbonDoubleInheritOverride([DisallowNull] IPaletteRibbonBack primaryBack, - [DisallowNull] IPaletteRibbonText primaryText, - [DisallowNull] IPaletteRibbonBack backupBack, - [DisallowNull] IPaletteRibbonText backupText, + public PaletteRibbonDoubleInheritOverride(IPaletteRibbonBack primaryBack, + IPaletteRibbonText primaryText, + IPaletteRibbonBack backupBack, + IPaletteRibbonText backupText, PaletteState state) { Debug.Assert(primaryBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs index 6e9d47a3c..032557f37 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs @@ -29,7 +29,7 @@ public class PaletteRibbonDoubleInheritRedirect : PaletteRibbonDoubleInherit /// Source for inherit requests. /// Ribbon item background style. /// Ribbon item text style. - public PaletteRibbonDoubleInheritRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteRibbonDoubleInheritRedirect(PaletteRedirect? redirect, PaletteRibbonBackStyle styleBack, PaletteRibbonTextStyle styleText) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs index 2db9f97c0..070db603c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs @@ -38,7 +38,7 @@ public class PaletteRibbonDoubleRedirect : Storage, /// inheritance ribbon back style. /// inheritance ribbon text style. /// Delegate for notifying paint requests. - public PaletteRibbonDoubleRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteRibbonDoubleRedirect(PaletteRedirect? redirect, PaletteRibbonBackStyle backStyle, PaletteRibbonTextStyle textStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs index a80eee3f6..d0e3cdb27 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs @@ -50,7 +50,7 @@ public class PaletteRibbonGeneral : Storage, /// /// Source for inheriting general values. /// Delegate for notifying paint requests. - public PaletteRibbonGeneral([DisallowNull] IPaletteRibbonGeneral inherit, + public PaletteRibbonGeneral(IPaletteRibbonGeneral inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs index 8009c817a..ac3fca952 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs @@ -26,7 +26,7 @@ public class PaletteRibbonGeneralInheritRedirect : PaletteRibbonGeneralInherit /// Initialize a new instance of the PaletteRibbonGeneralInheritRedirect class. /// /// Source for inherit requests. - public PaletteRibbonGeneralInheritRedirect([DisallowNull] PaletteRedirect? redirect) + public PaletteRibbonGeneralInheritRedirect(PaletteRedirect? redirect) { Debug.Assert(redirect != null); _redirect = redirect; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs index e41672406..eb882721b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteRibbonTextInheritRedirect : PaletteRibbonTextInherit /// /// Source for inherit requests. /// Ribbon item text style. - public PaletteRibbonTextInheritRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteRibbonTextInheritRedirect(PaletteRedirect? redirect, PaletteRibbonTextStyle styleText) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs index bfedd07d6..15c344240 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs @@ -24,7 +24,7 @@ public class PaletteTabTriple : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTabTriple([DisallowNull] IPaletteTriple inherit, + public PaletteTabTriple(IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs index cabe34c86..4d06ed598 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs @@ -34,7 +34,7 @@ public class PaletteTabTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteTabTripleRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteTabTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs index ed160ee25..0d6a079ae 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs @@ -33,7 +33,7 @@ public PaletteTriple(IPaletteTriple inherit) /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTriple([DisallowNull] IPaletteTriple inherit, + public PaletteTriple(IPaletteTriple inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs index ffcfadfd3..7b69cba1a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs @@ -33,7 +33,7 @@ public PaletteTripleJustImage(IPaletteTriple inherit) /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTripleJustImage([DisallowNull] IPaletteTriple inherit, + public PaletteTripleJustImage(IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs index d5fbce03c..0d0d736e1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs @@ -28,7 +28,7 @@ public class PaletteTripleMetric : PaletteTriple, /// /// Source for palette defaulted values. /// Delegate for notifying paint requests. - public PaletteTripleMetric([DisallowNull] PaletteTripleMetricRedirect inherit, + public PaletteTripleMetric(PaletteTripleMetricRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs index ccf540ca0..794eb966b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs @@ -31,7 +31,7 @@ public class PaletteTripleMetricRedirect : PaletteTripleRedirect, /// Style for the border. /// Style for the content. /// Delegate for notifying paint requests. - public PaletteTripleMetricRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteTripleMetricRedirect(PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs index 3e87e96e5..56610ad7c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs @@ -31,8 +31,8 @@ public class PaletteTripleOverride : GlobalId, /// Normal palette to use. /// Override palette to use. /// State used by the override. - public PaletteTripleOverride([DisallowNull] IPaletteTriple normalTriple, - [DisallowNull] IPaletteTriple overrideTriple, + public PaletteTripleOverride(IPaletteTriple normalTriple, + IPaletteTriple overrideTriple, PaletteState overrideState) { Debug.Assert(normalTriple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs index 4cb900f7b..ed86e33bc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs @@ -261,10 +261,10 @@ public abstract class PaletteMicrosoft365Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365Base([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365Base(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs index e94853e97..cc3f91876 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs @@ -778,10 +778,10 @@ public abstract class PaletteMicrosoft365BlackDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlackDarkModeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlackDarkModeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4880,7 +4880,7 @@ static KryptonColorTable365BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlackDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable365BlackDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs index 921a37766..2371269a5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs @@ -778,10 +778,10 @@ public abstract class PaletteMicrosoft365BlueDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlueDarkModeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlueDarkModeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4863,7 +4863,7 @@ static KryptonColorTable365BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlueDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable365BlueDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs index 5ed6ef953..009fe6c64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs @@ -777,10 +777,10 @@ public abstract class PaletteMicrosoft365BlueLightModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlueLightModeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[]? trackBarColours) + protected PaletteMicrosoft365BlueLightModeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[]? trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4861,7 +4861,7 @@ static KryptonColorTable365BlueLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlueLightMode([DisallowNull] Color[] colors, + public KryptonColorTable365BlueLightMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs index 577b1beef..28852b41c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs @@ -783,10 +783,10 @@ public abstract class PaletteMicrosoft365SilverDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365SilverDarkModeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365SilverDarkModeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4868,7 +4868,7 @@ static KryptonColorTable365SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365SilverDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable365SilverDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs index 732549734..c4d88dfaa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs @@ -781,10 +781,10 @@ public abstract class PaletteMicrosoft365SilverLightModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365SilverLightModeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365SilverLightModeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4867,7 +4867,7 @@ static KryptonColorTable365SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365SilverLightMode([DisallowNull] Color[] colors, + public KryptonColorTable365SilverLightMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs index 923d7e97c..aa32b42df 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs @@ -767,10 +767,10 @@ public abstract class PaletteMicrosoft365BlackThemeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlackThemeBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlackThemeBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs index a7a1cea4a..813851a86 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs @@ -205,10 +205,10 @@ public abstract class PaletteOffice2007Base : PaletteBase /// Array of images for radio button. /// Array of track bar specific colors. protected PaletteOffice2007Base(string themeName, - [DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs index ce6514819..86a098e67 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs @@ -828,10 +828,10 @@ public abstract class PaletteOffice2007BlackDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlackDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2007BlackDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5798,7 +5798,7 @@ static KryptonColorTable2007BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlackDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2007BlackDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs index 85af603cf..e64c17094 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs @@ -674,10 +674,10 @@ public abstract class PaletteOffice2007BlueDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlueDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2007BlueDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5067,7 +5067,7 @@ static KryptonColorTable2007BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlueDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2007BlueDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs index 80193f2bc..441491e6d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs @@ -625,10 +625,10 @@ public abstract class PaletteOffice2007BlueLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlueLightModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2007BlueLightModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5534,7 +5534,7 @@ static KryptonColorTable2007BlueLightMode() /// Source of colours /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlueLightMode([DisallowNull] Color[] colours, + public KryptonColorTable2007BlueLightMode(Color[] colours, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs index 584447a87..f97ba184b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs @@ -614,10 +614,10 @@ public abstract class PaletteOffice2007SilverDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007SilverDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2007SilverDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5524,7 +5524,7 @@ static KryptonColorTable2007SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007SilverDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2007SilverDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs index 1b4dd13a3..29279a760 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs @@ -663,10 +663,10 @@ public abstract class PaletteOffice2007SilverLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007SilverLightModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2007SilverLightModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5574,7 +5574,7 @@ static KryptonColorTable2007SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007SilverLightMode([DisallowNull] Color[] colors, + public KryptonColorTable2007SilverLightMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs index 48a38039f..044f47f49 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs @@ -238,10 +238,10 @@ public abstract class PaletteOffice2010Base : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010Base([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010Base(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs index b57e9c968..1a37d5006 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs @@ -977,10 +977,10 @@ public abstract class PaletteOffice2010BlackDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlackDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010BlackDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5128,7 +5128,7 @@ static KryptonColorTable2010BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlackDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2010BlackDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs index 580498278..557b1d422 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs @@ -624,10 +624,10 @@ public abstract class PaletteOffice2010BlueDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlueDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010BlueDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4751,7 +4751,7 @@ static KryptonColorTable2010BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlueDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2010BlueDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs index 2fa79255e..9affd8396 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs @@ -603,10 +603,10 @@ public abstract class PaletteOffice2010BlueLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlueLightModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010BlueLightModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4730,7 +4730,7 @@ static KryptonColorTable2010BlueLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlueLightMode([DisallowNull] Color[] colors, + public KryptonColorTable2010BlueLightMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs index b745b99f7..90416fdc1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs @@ -609,10 +609,10 @@ public abstract class PaletteOffice2010SilverDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010SilverDarkModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010SilverDarkModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4737,7 +4737,7 @@ static KryptonColorTable2010SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010SilverDarkMode([DisallowNull] Color[] colors, + public KryptonColorTable2010SilverDarkMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs index 4461808b3..40da1c745 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs @@ -638,10 +638,10 @@ public abstract class PaletteOffice2010SilverLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010SilverLightModeBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2010SilverLightModeBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4768,7 +4768,7 @@ static KryptonColorTable2010SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010SilverLightMode([DisallowNull] Color[] colors, + public KryptonColorTable2010SilverLightMode(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs index ae960745f..c0b17a34c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs @@ -250,10 +250,10 @@ public abstract class PaletteOffice2013Base : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2013Base([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2013Base(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs index 283206a6c..b7ef2b763 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs @@ -644,10 +644,10 @@ public abstract class PaletteOffice2013WhiteBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2013WhiteBase([DisallowNull] Color[] schemeColors, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, + protected PaletteOffice2013WhiteBase(Color[] schemeColors, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs index 77ed857fd..2117cf0b5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs @@ -237,10 +237,10 @@ public abstract class PaletteVisualStudioBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudioBase([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudioBase(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs index 0d6c4df69..fe728327f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs @@ -235,10 +235,10 @@ public abstract class PaletteVisualStudio2010With2007Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2007Base([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2007Base(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs index afc9466b3..af02c87a5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs @@ -236,10 +236,10 @@ public abstract class PaletteVisualStudio2010With2010Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2010Base([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2010Base(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs index be72934e4..2b8fbfe3e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs @@ -234,10 +234,10 @@ public abstract class PaletteVisualStudio2010With2013Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2013Base([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2013Base(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs index 051a21a2d..cb5211812 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs @@ -235,10 +235,10 @@ public abstract class PaletteVisualStudio2010With365Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With365Base([DisallowNull] Color[] schemeColours, - [DisallowNull] ImageList checkBoxList, - [DisallowNull] ImageList galleryButtonList, - [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With365Base(Color[] schemeColours, + ImageList checkBoxList, + ImageList galleryButtonList, + Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs index 8641d8c82..15b46a825 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs @@ -26,7 +26,7 @@ public class KryptonInternalKCT : KryptonColorTable /// /// Initial base KCT to inherit values from. /// Reference to associated palette. - public KryptonInternalKCT([DisallowNull] KryptonColorTable baseKCT, + public KryptonInternalKCT(KryptonColorTable baseKCT, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs index f33b22719..d03ae7290 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs @@ -37,7 +37,7 @@ public class KryptonPaletteButtonSpecBase : Storage, /// Initialize a new instance of the KryptonPaletteButtonSpecBase class. /// /// Palette redirector for sourcing inherited values. - internal KryptonPaletteButtonSpecBase([DisallowNull] PaletteRedirect redirector) + internal KryptonPaletteButtonSpecBase(PaletteRedirect redirector) { Debug.Assert(redirector != null); @@ -76,7 +76,7 @@ internal KryptonPaletteButtonSpecBase([DisallowNull] PaletteRedirect redirector) /// Update the redirector with new reference. /// /// Target redirector. - public void SetRedirector([DisallowNull] PaletteRedirect redirect) => Redirector = redirect; + public void SetRedirector(PaletteRedirect redirect) => Redirector = redirect; #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs index db00ef138..25afb533e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs @@ -35,7 +35,7 @@ public class KryptonPaletteButtonSpecTyped : KryptonPaletteButtonSpecBase /// Initialize a new instance of the KryptonPaletteButtonSpecCommon class. /// /// Palette redirector for sourcing inherited values. - internal KryptonPaletteButtonSpecTyped([DisallowNull] PaletteRedirect redirector) + internal KryptonPaletteButtonSpecTyped(PaletteRedirect redirector) : base(redirector) { _image = null; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs index 932c99f85..4f28b27e6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs @@ -29,7 +29,7 @@ public class KryptonPaletteButtonSpecs : Storage /// Initialize a new instance of the KryptonPaletteButtonSpecs class. /// /// Palette redirector for sourcing inherited values. - public KryptonPaletteButtonSpecs([DisallowNull] PaletteRedirect redirector) + public KryptonPaletteButtonSpecs(PaletteRedirect redirector) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs index bf269c884..c893865d9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs @@ -23,7 +23,7 @@ public class KryptonPaletteCheckButtons : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteCheckButtons([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteCheckButtons(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs index 67d105e9b..3009e1408 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs @@ -23,7 +23,7 @@ public class KryptonPaletteCommon : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteCommon([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteCommon(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs index b369ae1af..789a7ed50 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs @@ -23,7 +23,7 @@ public class KryptonPaletteControls : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteControls([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteControls(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs index 37ce544b3..42d40c0f3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs @@ -26,7 +26,7 @@ public class KryptonPaletteFont : Storage /// Initializes a new instance of the class. /// Palette redirector for sourcing inherited values /// Delegate for notifying paint requests. - public KryptonPaletteFont([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) + public KryptonPaletteFont(PaletteRedirect redirector, NeedPaintHandler needPaint) { NeedPaint = needPaint; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs index e83242245..63cdcf66d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs @@ -23,7 +23,7 @@ public class KryptonPaletteForms : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteForms([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteForms(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs index 9f93b5643..90a9855e7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs @@ -23,7 +23,7 @@ public class KryptonPaletteGrids : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteGrids([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteGrids(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs index f5ec039a0..652134d8f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs @@ -23,7 +23,7 @@ public class KryptonPaletteHeaderGroup : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteHeaderGroup([DisallowNull] PaletteRedirect redirect, + public KryptonPaletteHeaderGroup(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs index 2e8d332e0..df96271cb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs @@ -33,7 +33,7 @@ public class KryptonPaletteHeaderGroupState : Storage, /// /// Redirection for inheriting values. /// Delegate for notifying paint requests. - public KryptonPaletteHeaderGroupState([DisallowNull] PaletteRedirect redirect, + public KryptonPaletteHeaderGroupState(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs index fa4442eac..16a36cc9c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs @@ -23,7 +23,7 @@ public class KryptonPaletteHeaders : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteHeaders([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteHeaders(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs index 8add036de..a69569b48 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs @@ -24,7 +24,7 @@ public class KryptonPaletteImages : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteImages([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteImages(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs index 1ff66a875..a7d3bd711 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs @@ -23,7 +23,7 @@ public class KryptonPaletteInputControls : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteInputControls([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteInputControls(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs index b04cb6c5b..14ceaf344 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs @@ -23,7 +23,7 @@ public class KryptonPaletteLabels : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteLabels([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteLabels(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs index 35ccb2864..d28018076 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs @@ -23,7 +23,7 @@ public class KryptonPaletteNavigator : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteNavigator([DisallowNull] PaletteRedirect redirect, + public KryptonPaletteNavigator(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs index 500554c11..7041bdeb2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs @@ -23,7 +23,7 @@ public class KryptonPaletteNavigatorState : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteNavigatorState([DisallowNull] PaletteRedirect redirect, + public KryptonPaletteNavigatorState(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs index e0534f5ea..64add8d28 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs @@ -37,7 +37,7 @@ public class KryptonPaletteNavigatorStateBar : Storage, /// /// Redirection for inheriting values. /// Delegate for notifying paint requests. - public KryptonPaletteNavigatorStateBar([DisallowNull] PaletteRedirect redirect, + public KryptonPaletteNavigatorStateBar(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs index fb2b89f8e..620bce07a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs @@ -23,7 +23,7 @@ public class KryptonPalettePanels : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPalettePanels([DisallowNull] PaletteRedirect redirector, + public KryptonPalettePanels(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs index 14aa6ecbe..48fc5d2dc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs @@ -45,7 +45,7 @@ public class KryptonPaletteRibbon : Storage /// /// Redirector to inherit values from. /// Delegate for notifying paint requests. - public KryptonPaletteRibbon([DisallowNull] PaletteRedirect? redirect, + public KryptonPaletteRibbon(PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs index 4f88064e7..373b29452 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs @@ -23,7 +23,7 @@ public class KryptonPaletteSeparators : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteSeparators([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteSeparators(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs index 676fbb541..50ab17d12 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs @@ -25,7 +25,7 @@ public class KryptonPaletteTMS : Storage /// Initial base KCT to inherit values from. /// Delegate for notifying paint requests. public KryptonPaletteTMS(PaletteBase palette, - [DisallowNull] KryptonColorTable baseKCT, + KryptonColorTable baseKCT, NeedPaintHandler needPaint) { Debug.Assert(baseKCT != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs index 0ed6d9fb6..be78b0eee 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs @@ -23,7 +23,7 @@ public abstract class KryptonPaletteTMSBase : Storage /// /// Reference to inherited values. /// Delegate for notifying paint requests. - internal KryptonPaletteTMSBase([DisallowNull] KryptonInternalKCT internalKCT, + internal KryptonPaletteTMSBase(KryptonInternalKCT internalKCT, NeedPaintHandler needPaint) { Debug.Assert(internalKCT != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs index 293c2d15a..7e9e84a1d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs @@ -23,7 +23,7 @@ public class KryptonPaletteTabButtons : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteTabButtons([DisallowNull] PaletteRedirect redirector, + public KryptonPaletteTabButtons(PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs index 9976b7f17..30d1c6a77 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs @@ -49,7 +49,7 @@ static KryptonColorTable2007() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007([DisallowNull] Color[] colors, + public KryptonColorTable2007(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs index 428bf6e98..673d6f6b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs @@ -49,7 +49,7 @@ static KryptonColorTable2010() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010([DisallowNull] Color[] colors, + public KryptonColorTable2010(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs index 9030d76b7..59960a11d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs @@ -55,7 +55,7 @@ static KryptonColorTable2013() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2013([DisallowNull] Color[] colors, + public KryptonColorTable2013(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs index 4adbb7822..6e1c9291a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs @@ -55,7 +55,7 @@ static KryptonColorTable365() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365([DisallowNull] Color[] colors, + public KryptonColorTable365(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs index 6e31c31af..6f9897422 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs @@ -56,7 +56,7 @@ static KryptonColorTableMicrosoft365() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableMicrosoft365([DisallowNull] Color[] colors, + public KryptonColorTableMicrosoft365(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs index 283f56199..40720c38f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs @@ -50,8 +50,8 @@ static KryptonColorTableSparkle() /// Source of sparkle colors. /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableSparkle([DisallowNull] Color[] colors, - [DisallowNull] Color[] sparkleColors, + public KryptonColorTableSparkle(Color[] colors, + Color[] sparkleColors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs index 1120461a8..e22a7cad6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs @@ -55,7 +55,7 @@ static KryptonColorTableVisualStudio() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableVisualStudio([DisallowNull] Color[] colors, + public KryptonColorTableVisualStudio(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs index 2b226ae1d..c18810ca8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs @@ -31,7 +31,7 @@ public class DataGridViewStyles : Storage /// Initialize a new instance of the DataGridViewStyles class. /// /// Reference to owning control. - public DataGridViewStyles([DisallowNull] KryptonDataGridView dataGridView) + public DataGridViewStyles(KryptonDataGridView dataGridView) { Debug.Assert(dataGridView != null); _dataGridView = dataGridView; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs index ad59ab101..a178b7982 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs @@ -25,7 +25,7 @@ internal class KryptonProfessionalKCT : KryptonColorTable /// Set of colors to customize with. /// Should be forced to use system colors. /// Reference to associated palette. - public KryptonProfessionalKCT([DisallowNull] Color[] colors, + public KryptonProfessionalKCT(Color[] colors, bool useSystemColors, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs index 9c2b07953..a54e145f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs @@ -46,7 +46,7 @@ static KryptonVisualStudio2010With2007ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2007ColorTable([DisallowNull] Color[] colors, + public KryptonVisualStudio2010With2007ColorTable(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs index ecf8f4ad0..8ad8a37c1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs @@ -46,7 +46,7 @@ static KryptonVisualStudio2010With2010ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2010ColorTable([DisallowNull] Color[] colors, + public KryptonVisualStudio2010With2010ColorTable(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs index 318adf379..b661ef211 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs @@ -52,7 +52,7 @@ static KryptonVisualStudio2010With2013ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2013ColorTable([DisallowNull] Color[] colors, + public KryptonVisualStudio2010With2013ColorTable(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs index 5e25d258c..63c1b68ed 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs @@ -53,7 +53,7 @@ static KryptonVisualStudio2010WithMicrosoft365ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010WithMicrosoft365ColorTable([DisallowNull] Color[] colors, + public KryptonVisualStudio2010WithMicrosoft365ColorTable(Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs index b3dab974a..ed94cb82c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs @@ -25,7 +25,7 @@ internal class LinkLabelBehaviorInherit : PaletteContentInherit /// /// Palette to inherit from. /// Link behavior to use. - public LinkLabelBehaviorInherit([DisallowNull] IPaletteContent inherit, + public LinkLabelBehaviorInherit(IPaletteContent inherit, KryptonLinkBehavior linkBehavior) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs index 0180b1561..eef5c69eb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs @@ -27,7 +27,7 @@ public class PaletteBackInheritNode : PaletteBackInherit /// Initialize a new instance of the PaletteBackInheritNode class. /// /// Background palette to inherit from. - public PaletteBackInheritNode([DisallowNull] IPaletteBack inherit) + public PaletteBackInheritNode(IPaletteBack inherit) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs index 70b62e935..d819e2b31 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs @@ -28,7 +28,7 @@ public class PaletteBorderEdge : PaletteBack /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteBorderEdge([DisallowNull] PaletteBorderEdgeRedirect inherit, + public PaletteBorderEdge(PaletteBorderEdgeRedirect inherit, NeedPaintHandler? needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs index 9af3443c0..2a4386200 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs @@ -30,7 +30,7 @@ internal class BackToBorder : IPaletteBack /// Initialize a new instance of the BackToBorder class. /// /// Parent to get border values from. - public BackToBorder([DisallowNull] IPaletteBorder parent) + public BackToBorder(IPaletteBorder parent) { Debug.Assert(parent != null); _parent = parent!; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs index 89f8e3dec..a27230a11 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs @@ -23,7 +23,7 @@ public class PaletteComboBoxJustComboStates : Storage /// /// Source for inheriting combo box values. /// Delegate for notifying paint requests. - public PaletteComboBoxJustComboStates([DisallowNull] IPaletteTriple inheritComboBox, + public PaletteComboBoxJustComboStates(IPaletteTriple inheritComboBox, NeedPaintHandler needPaint) { Debug.Assert(inheritComboBox != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs index 9f8daef2d..81605ef6a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs @@ -23,7 +23,7 @@ public class PaletteComboBoxJustItemStates : Storage /// /// Source for inheriting item values. /// Delegate for notifying paint requests. - public PaletteComboBoxJustItemStates([DisallowNull] IPaletteTriple inheritItem, + public PaletteComboBoxJustItemStates(IPaletteTriple inheritItem, NeedPaintHandler needPaint) { Debug.Assert(inheritItem != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs index fe23d267c..3216b3166 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs @@ -28,7 +28,7 @@ public class PaletteComboBoxRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteComboBoxRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteComboBoxRedirect(PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs index 46cd903e1..6aee767f5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs @@ -24,8 +24,8 @@ public class PaletteComboBoxStates : Storage /// Source for inheriting combo box values. /// Source for inheriting item values. /// Delegate for notifying paint requests. - public PaletteComboBoxStates([DisallowNull] IPaletteTriple inheritComboBox, - [DisallowNull] IPaletteTriple inheritItem, + public PaletteComboBoxStates(IPaletteTriple inheritComboBox, + IPaletteTriple inheritItem, NeedPaintHandler needPaint) { Debug.Assert(inheritComboBox != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs index 3bd2d879e..1b22a6c60 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs @@ -23,7 +23,7 @@ public class PaletteContextMenuRedirect : Storage /// /// inheritance redirection. /// Delegate for notifying paint requests. - public PaletteContextMenuRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteContextMenuRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs index 8139ba78f..320cd9b8d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs @@ -27,7 +27,7 @@ public class PaletteDataGridViewAll : PaletteDataGridViewCells /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewAll([DisallowNull] PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewAll(PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs index 75bdd3f98..abb5ab1a2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs @@ -28,8 +28,8 @@ internal class PaletteDataGridViewBackInherit : PaletteBackInherit /// /// Palette to inherit values from. /// Cell style to recover values from. - public void SetInherit([DisallowNull] IPaletteBack inherit, - [DisallowNull] DataGridViewCellStyle cellStyle) + public void SetInherit(IPaletteBack inherit, + DataGridViewCellStyle cellStyle) { Debug.Assert(inherit != null); Debug.Assert(cellStyle != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs index aafb9aab7..23be156f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs @@ -29,7 +29,7 @@ public class PaletteDataGridViewCells : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewCells([DisallowNull] PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewCells(PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs index e41aed353..1e01b19fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs @@ -28,8 +28,8 @@ internal class PaletteDataGridViewContentInherit : PaletteContentInherit /// /// Palette to inherit values from. /// Cell style to recover values from. - public void SetInherit([DisallowNull] IPaletteContent inherit, - [DisallowNull] DataGridViewCellStyle cellStyle) + public void SetInherit(IPaletteContent inherit, + DataGridViewCellStyle cellStyle) { Debug.Assert(inherit != null); Debug.Assert(cellStyle != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs index 3ba128df8..353e41c0d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs @@ -41,7 +41,7 @@ public class PaletteDataGridViewContentStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteDataGridViewContentStates([DisallowNull] IPaletteContent inherit, + public PaletteDataGridViewContentStates(IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs index dff629a64..3672181d4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs @@ -28,7 +28,7 @@ public class PaletteDataGridViewHeaders : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewHeaders([DisallowNull] PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewHeaders(PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs index 857919dba..dad8191c7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs @@ -30,7 +30,7 @@ public class PaletteDataGridViewRedirect : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteDataGridViewRedirect(PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs index 4ec86ca53..5613c9129 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs @@ -24,7 +24,7 @@ public class PaletteDataGridViewTripleCommon : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleCommon([DisallowNull] IPaletteTriple inherit, + public PaletteDataGridViewTripleCommon(IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs index 38003d83e..c7ef5203c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs @@ -34,7 +34,7 @@ public class PaletteDataGridViewTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteDataGridViewTripleRedirect(PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs index 399ada854..f34e1c6f4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs @@ -24,7 +24,7 @@ public class PaletteDataGridViewTripleStates : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleStates([DisallowNull] IPaletteTriple inherit, + public PaletteDataGridViewTripleStates(IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs index 0dc8e4024..d38d5a1e0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs @@ -30,8 +30,8 @@ public class PaletteForm : PaletteDouble, /// Source for inheriting palette defaulted values. /// Source for inheriting header defaulted values. /// Delegate for notifying paint requests. - public PaletteForm([DisallowNull] PaletteFormRedirect inheritForm, - [DisallowNull] PaletteTripleMetricRedirect inheritHeader, + public PaletteForm(PaletteFormRedirect inheritForm, + PaletteTripleMetricRedirect inheritHeader, NeedPaintHandler needPaint) : base(inheritForm, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs index 2352431a5..628a8c0dc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs @@ -42,8 +42,8 @@ public PaletteFormRedirect(PaletteRedirect? redirect, /// inheritance redirection for form group. /// inheritance redirection for header. /// Delegate for notifying paint requests. - public PaletteFormRedirect([DisallowNull] PaletteRedirect redirectForm, - [DisallowNull] PaletteRedirect? redirectHeader, + public PaletteFormRedirect(PaletteRedirect redirectForm, + PaletteRedirect? redirectHeader, NeedPaintHandler needPaint) : base(redirectForm, PaletteBackStyle.FormMain, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs index b6120f1cc..fde62fcdc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs @@ -40,8 +40,8 @@ public PaletteGroupBoxRedirect(PaletteRedirect? redirect, /// inheritance redirection for group border/background. /// inheritance redirection for group header. /// Delegate for notifying paint requests. - public PaletteGroupBoxRedirect([DisallowNull] PaletteRedirect redirectDouble, - [DisallowNull] PaletteRedirect redirectContent, + public PaletteGroupBoxRedirect(PaletteRedirect redirectDouble, + PaletteRedirect redirectContent, NeedPaintHandler needPaint) : base(redirectDouble, PaletteBackStyle.ControlGroupBox, PaletteBorderStyle.ControlGroupBox, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs index 30550a64c..17d5fde7d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs @@ -32,7 +32,7 @@ public class PaletteHeaderButtonRedirect : PaletteTripleMetricRedirect /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteHeaderButtonRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteHeaderButtonRedirect(PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs index 4f66a7d41..24d319c06 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs @@ -31,9 +31,9 @@ public class PaletteHeaderGroup : PaletteDouble, /// Source for inheriting primary header defaulted values. /// Source for inheriting secondary header defaulted values. /// Delegate for notifying paint requests. - public PaletteHeaderGroup([DisallowNull] PaletteHeaderGroupRedirect? inheritHeaderGroup, - [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderPrimary, - [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderSecondary, + public PaletteHeaderGroup(PaletteHeaderGroupRedirect? inheritHeaderGroup, + PaletteHeaderPaddingRedirect inheritHeaderPrimary, + PaletteHeaderPaddingRedirect inheritHeaderSecondary, NeedPaintHandler needPaint) : base(inheritHeaderGroup, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs index b4941d0b9..33ecaa5d7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs @@ -43,9 +43,9 @@ public PaletteHeaderGroupRedirect(PaletteRedirect? redirect, /// inheritance redirection for primary header. /// inheritance redirection for secondary header. /// Delegate for notifying paint requests. - public PaletteHeaderGroupRedirect([DisallowNull] PaletteRedirect redirectHeaderGroup, - [DisallowNull] PaletteRedirect? redirectHeaderPrimary, - [DisallowNull] PaletteRedirect? redirectHeaderSecondary, + public PaletteHeaderGroupRedirect(PaletteRedirect redirectHeaderGroup, + PaletteRedirect? redirectHeaderPrimary, + PaletteRedirect? redirectHeaderSecondary, NeedPaintHandler needPaint) : base(redirectHeaderGroup, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs index 0c06b9922..518593568 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs @@ -31,7 +31,7 @@ public class PaletteHeaderPaddingRedirect : PaletteHeaderButtonRedirect /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteHeaderPaddingRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteHeaderPaddingRedirect(PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs index 136632f80..75e91ee64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs @@ -32,7 +32,7 @@ public class PaletteHeaderRedirect : PaletteTripleMetricRedirect /// Style for the border. /// Style for the content. /// Delegate for notifying paint requests. - public PaletteHeaderRedirect([DisallowNull] PaletteRedirect? redirect, + public PaletteHeaderRedirect(PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs index b09c5ae8e..5c3951f8e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs @@ -29,7 +29,7 @@ public class PaletteInputControlBackStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteInputControlBackStates([DisallowNull] IPaletteBack inherit, + public PaletteInputControlBackStates(IPaletteBack inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs index 9f57f0da5..63d23e3fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs @@ -33,7 +33,7 @@ public class PaletteInputControlContentStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteInputControlContentStates([DisallowNull] IPaletteContent inherit, + public PaletteInputControlContentStates(IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs index 673fbc2c3..9ffdc486b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs @@ -36,7 +36,7 @@ public class PaletteInputControlTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteInputControlTripleRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteInputControlTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs index c9c55d7e3..58b31c637 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs @@ -24,7 +24,7 @@ public class PaletteInputControlTripleStates : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteInputControlTripleStates([DisallowNull] IPaletteTriple inherit, + public PaletteInputControlTripleStates(IPaletteTriple inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs index 31d326650..a275fe5ef 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs @@ -27,7 +27,7 @@ public class PaletteListItemTriple : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteListItemTriple([DisallowNull] PaletteTripleRedirect inherit, + public PaletteListItemTriple(PaletteTripleRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs index 74a926bbc..19c12af76 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs @@ -26,7 +26,7 @@ public class PaletteListItemTripleRedirect : Storage /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteListItemTripleRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteListItemTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs index fd5d9f7f9..5657d6d7d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs @@ -31,7 +31,7 @@ public class PaletteListStateRedirect : PaletteDoubleRedirect /// Initial background style. /// Initial border style. /// Delegate for notifying paint requests. - public PaletteListStateRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteListStateRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs index 001039ac4..fc2620733 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs @@ -31,7 +31,7 @@ public class PaletteNodeOverride : GlobalId, /// /// Palette to use. /// - public PaletteNodeOverride([DisallowNull] IPaletteTriple triple) + public PaletteNodeOverride(IPaletteTriple triple) { Debug.Assert(triple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs index a4944d68a..39b5d41cf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs @@ -37,7 +37,7 @@ public PaletteRedirectCheckBox(CheckBoxImages images) /// Initial palette target for redirection. /// Reference to source of check box images. public PaletteRedirectCheckBox(PaletteBase? target, - [DisallowNull] CheckBoxImages images) + CheckBoxImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs index f46dbce5e..e83118c64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs @@ -30,8 +30,8 @@ public class PaletteRedirectCommon : PaletteRedirect /// Redirection for disabled state requests. /// Redirection for all other state requests. public PaletteRedirectCommon(PaletteBase? target, - [DisallowNull] IPaletteTriple disabled, - [DisallowNull] IPaletteTriple others) + IPaletteTriple disabled, + IPaletteTriple others) : base(target) { Debug.Assert(disabled != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs index 77b4f2797..c425b3b61 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs @@ -28,7 +28,7 @@ public class PaletteRedirectContextMenu : PaletteRedirect /// Initial palette target for redirection. /// Reference to source of context menu images. public PaletteRedirectContextMenu(PaletteBase? target, - [DisallowNull] ContextMenuImages images) + ContextMenuImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs index 604489f3f..869991be5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs @@ -37,7 +37,7 @@ public PaletteRedirectDropDownButton(DropDownButtonImages images) /// Initial palette target for redirection. /// Reference to source of drop down button images. public PaletteRedirectDropDownButton(PaletteBase? target, - [DisallowNull] DropDownButtonImages images) + DropDownButtonImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs index 463965342..a282ecaed 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs @@ -37,7 +37,7 @@ public PaletteRedirectRadioButton(RadioButtonImages images) /// Initial palette target for redirection. /// Reference to source of radio button images. public PaletteRedirectRadioButton(PaletteBase? target, - [DisallowNull] RadioButtonImages images) + RadioButtonImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs index 854b10d9c..042594a9f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs @@ -41,7 +41,7 @@ public PaletteRedirectTreeView(TreeViewImages plusMinusImages, /// Reference to source of tree view images. /// Reference to source of check box images. public PaletteRedirectTreeView(PaletteBase? target, - [DisallowNull] TreeViewImages plusMinusImages, + TreeViewImages plusMinusImages, CheckBoxImages checkboxImages) : base(target) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs index e04b1d701..f063ba12e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs @@ -31,8 +31,8 @@ public class PaletteSeparatorPadding : PaletteDouble, /// Source for inheriting border and background values. /// Source for inheriting metric values. /// Delegate for notifying paint requests. - public PaletteSeparatorPadding([DisallowNull] IPaletteDouble inheritDouble, - [DisallowNull] IPaletteMetric inheritMetric, + public PaletteSeparatorPadding(IPaletteDouble inheritDouble, + IPaletteMetric inheritMetric, NeedPaintHandler needPaint) : base(inheritDouble, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs index ec8780e30..efe176010 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs @@ -31,7 +31,7 @@ public class PaletteSeparatorPaddingRedirect : PaletteDoubleMetricRedirect /// Initial background style. /// Initial border style. /// Delegate for notifying paint requests. - public PaletteSeparatorPaddingRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteSeparatorPaddingRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs index 619200ed7..2e887ed41 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs @@ -34,7 +34,7 @@ public PaletteTrackBarPositionStates(PaletteTrackBarRedirect redirect, /// /// Source for inheriting position values. /// Delegate for notifying paint requests. - public PaletteTrackBarPositionStates([DisallowNull] IPaletteElementColor inheritPosition, + public PaletteTrackBarPositionStates(IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritPosition != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs index ea4ec38cd..eabc77aa9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs @@ -26,8 +26,8 @@ public class PaletteTrackBarPositionStatesOverride : GlobalId /// Override state values. /// State to override. /// - public PaletteTrackBarPositionStatesOverride([DisallowNull] PaletteTrackBarRedirect normalStates, - [DisallowNull] PaletteTrackBarPositionStates overrideStates, + public PaletteTrackBarPositionStatesOverride(PaletteTrackBarRedirect normalStates, + PaletteTrackBarPositionStates overrideStates, PaletteState overrideState) { Debug.Assert(normalStates != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs index 3f3b88e9a..d60a65253 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs @@ -28,7 +28,7 @@ public class PaletteTrackBarRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteTrackBarRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteTrackBarRedirect(PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs index 886474763..cedf6edae 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs @@ -36,9 +36,9 @@ public PaletteTrackBarStates(PaletteTrackBarRedirect redirect, /// Source for inheriting track values. /// Source for inheriting position values. /// Delegate for notifying paint requests. - public PaletteTrackBarStates([DisallowNull] IPaletteElementColor inheritTick, - [DisallowNull] IPaletteElementColor inheritTrack, - [DisallowNull] IPaletteElementColor inheritPosition, + public PaletteTrackBarStates(IPaletteElementColor inheritTick, + IPaletteElementColor inheritTrack, + IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritTick != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs index 972be5188..9ed051b5f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs @@ -26,8 +26,8 @@ public class PaletteTrackBarStatesOverride : GlobalId /// Override state values. /// State to override. /// - public PaletteTrackBarStatesOverride([DisallowNull] PaletteTrackBarRedirect normalStates, - [DisallowNull] PaletteTrackBarStates overrideStates, + public PaletteTrackBarStatesOverride(PaletteTrackBarRedirect normalStates, + PaletteTrackBarStates overrideStates, PaletteState overrideState) { Debug.Assert(normalStates != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs index f8752a698..323282ddf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs @@ -27,7 +27,7 @@ public class PaletteTreeNodeTriple : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTreeNodeTriple([DisallowNull] PaletteTripleRedirect inherit, + public PaletteTreeNodeTriple(PaletteTripleRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs index fcfa02a23..a6cf93fd0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs @@ -26,7 +26,7 @@ public class PaletteTreeNodeTripleRedirect : Storage /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteTreeNodeTripleRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteTreeNodeTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs index 441ddc954..997d05bff 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs @@ -33,7 +33,7 @@ public class PaletteTreeStateRedirect : PaletteDoubleRedirect /// Storage for border values. /// inheritance for border values. /// Delegate for notifying paint requests. - public PaletteTreeStateRedirect([DisallowNull] PaletteRedirect redirect, + public PaletteTreeStateRedirect(PaletteRedirect redirect, PaletteBack back, PaletteBackInheritRedirect backInherit, PaletteBorder border, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs index e7d7ed4fd..bf0b2bbd7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs @@ -22,7 +22,7 @@ public class KryptonProfessionalRenderer : ToolStripProfessionalRenderer /// Initialise a new instance of the KryptonProfessionalRenderer class. /// /// Source for text colors. - public KryptonProfessionalRenderer([DisallowNull] KryptonColorTable kct) + public KryptonProfessionalRenderer(KryptonColorTable kct) : base(kct) { Debug.Assert(kct != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs index 2b2ca3b2c..a2db2c83c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs @@ -902,7 +902,7 @@ public abstract bool EvalTransparentPaint(IPaletteBack paletteBack, /// Destination rectangle. /// Visual orientation. /// - protected static void DrawIconHelper([DisallowNull] ViewContext context, + protected static void DrawIconHelper(ViewContext context, Icon icon, Rectangle iconRect, VisualOrientation orientation) @@ -934,7 +934,7 @@ protected static void DrawIconHelper([DisallowNull] ViewContext context, /// Image color to remap. /// New color for remap. /// - protected static void DrawImageHelper([DisallowNull] ViewContext context, + protected static void DrawImageHelper(ViewContext context, Image image, Color remapTransparent, Rectangle imageRect, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs index 6487909f1..fef521ab7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs @@ -41,9 +41,9 @@ static RenderMicrosoft365() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, PaletteState state) + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -64,7 +64,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs index bf984d038..31752bb25 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs @@ -59,9 +59,9 @@ static RenderOffice2007() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs index 9bc520efd..1979f2b44 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs @@ -59,9 +59,9 @@ static RenderOffice2010() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs index 2fd4a4573..3044de307 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs @@ -52,9 +52,9 @@ static RenderOffice2013() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -81,7 +81,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs index aef7edc6a..1be8d8687 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs @@ -127,9 +127,9 @@ public override IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape /// State associated with rendering. /// public override void DrawRibbonDropArrow(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -173,9 +173,9 @@ public override void DrawRibbonDropArrow(PaletteRibbonShape shape, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlDropDownGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent paletteContent, + IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -212,9 +212,9 @@ public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlNumericUpGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent paletteContent, + IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -251,9 +251,9 @@ public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlNumericDownGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent paletteContent, + IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -290,7 +290,7 @@ public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderConte /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs index 5d69d4a67..24cdbb4eb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs @@ -375,7 +375,7 @@ static RenderStandard() /// Gets a renderer for drawing the toolstrips. /// /// Color palette to use when rendering toolstrip. - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase? colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase? colorPalette) { Debug.Assert(colorPalette != null); @@ -407,7 +407,7 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase? co /// Visual orientation of the border. /// /// Padding structure detailing all four edges. - public override Padding GetBorderRawPadding([DisallowNull] IPaletteBorder palette, + public override Padding GetBorderRawPadding(IPaletteBorder palette, PaletteState state, VisualOrientation orientation) { @@ -478,7 +478,7 @@ public override Padding GetBorderRawPadding([DisallowNull] IPaletteBorder palett /// Visual orientation of the border. /// /// Padding structure detailing all four edges. - public override Padding GetBorderDisplayPadding([DisallowNull] IPaletteBorder palette, + public override Padding GetBorderDisplayPadding(IPaletteBorder palette, PaletteState state, VisualOrientation orientation) { @@ -572,9 +572,9 @@ public override Padding GetBorderDisplayPadding([DisallowNull] IPaletteBorder pa /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetOutsideBorderPath([DisallowNull] RenderContext context, + public override GraphicsPath GetOutsideBorderPath(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -614,9 +614,9 @@ public override GraphicsPath GetOutsideBorderPath([DisallowNull] RenderContext c /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetBorderPath([DisallowNull] RenderContext context, + public override GraphicsPath GetBorderPath(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -658,9 +658,9 @@ public override GraphicsPath GetBorderPath([DisallowNull] RenderContext context, /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetBackPath([DisallowNull] RenderContext context, + public override GraphicsPath GetBackPath(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -701,9 +701,9 @@ public override GraphicsPath GetBackPath([DisallowNull] RenderContext context, /// Visual orientation of the border. /// State associated with rendering. /// - public override void DrawBorder([DisallowNull] RenderContext context, + public override void DrawBorder(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -827,10 +827,10 @@ public override void DrawBorder([DisallowNull] RenderContext context, /// State associated with rendering. /// Cache used for drawing. /// - public override IDisposable? DrawBack([DisallowNull] RenderContext context, + public override IDisposable? DrawBack(RenderContext context, Rectangle rect, - [DisallowNull] GraphicsPath path, - [DisallowNull] IPaletteBack palette, + GraphicsPath path, + IPaletteBack palette, VisualOrientation orientation, PaletteState state, IDisposable? memento) @@ -1039,9 +1039,9 @@ public override void DrawBorder([DisallowNull] RenderContext context, /// If composition, should glowing be drawn. /// /// Preferred size. - public override Size GetContentPreferredSize([DisallowNull] ViewLayoutContext context, - [DisallowNull] IPaletteContent palette, - [DisallowNull] IContentValues values, + public override Size GetContentPreferredSize(ViewLayoutContext context, + IPaletteContent palette, + IContentValues values, VisualOrientation orientation, PaletteState state, bool composition, @@ -1138,10 +1138,10 @@ public override Size GetContentPreferredSize([DisallowNull] ViewLayoutContext co /// If composition, should glowing be drawn. /// /// Memento with cached information. - public override IDisposable LayoutContent([DisallowNull] ViewLayoutContext context, + public override IDisposable LayoutContent(ViewLayoutContext context, Rectangle availableRect, - [DisallowNull] IPaletteContent palette, - [DisallowNull] IContentValues values, + IPaletteContent palette, + IContentValues values, VisualOrientation orientation, PaletteState state, bool composition, @@ -1296,10 +1296,10 @@ public override IDisposable LayoutContent([DisallowNull] ViewLayoutContext conte /// If composition should glowing be drawn. /// Allow drawing of focus rectangle. /// - public override void DrawContent([DisallowNull] RenderContext context, + public override void DrawContent(RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteContent palette, - [DisallowNull] IDisposable memento, + IPaletteContent palette, + IDisposable memento, VisualOrientation orientation, PaletteState state, bool composition, @@ -1693,7 +1693,7 @@ public override int GetTabBorderSpacingGap(TabBorderStyle tabBorderStyle) /// /// Padding structure detailing all four edges. public override Padding GetTabBorderDisplayPadding(ViewLayoutContext context, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, PaletteState state, VisualOrientation orientation, TabBorderStyle tabBorderStyle) @@ -1865,9 +1865,9 @@ public override Padding GetTabBorderDisplayPadding(ViewLayoutContext context, /// Style of tab border. /// /// GraphicsPath instance. - public override GraphicsPath GetTabBorderPath([DisallowNull] RenderContext context, + public override GraphicsPath GetTabBorderPath(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -1906,9 +1906,9 @@ public override GraphicsPath GetTabBorderPath([DisallowNull] RenderContext conte /// Style of tab border. /// /// GraphicsPath instance. - public override GraphicsPath GetTabBackPath([DisallowNull] RenderContext context, + public override GraphicsPath GetTabBackPath(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -1946,9 +1946,9 @@ public override GraphicsPath GetTabBackPath([DisallowNull] RenderContext context /// State associated with rendering. /// Style of tab border. /// - public override void DrawTabBorder([DisallowNull] RenderContext context, + public override void DrawTabBorder(RenderContext context, Rectangle rect, - [DisallowNull] IPaletteBorder palette, + IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -2223,9 +2223,9 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -2250,10 +2250,10 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// State associated with rendering. /// Can the separator be moved. /// - public override void DrawSeparator([DisallowNull] RenderContext context, + public override void DrawSeparator(RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, - [DisallowNull] IPaletteBorder paletteBorder, + IPaletteBack paletteBack, + IPaletteBorder paletteBorder, Orientation orientation, PaletteState state, bool canMove) @@ -2324,8 +2324,8 @@ public override void DrawSeparator([DisallowNull] RenderContext context, /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. /// - public override Size GetCheckBoxPreferredSize([DisallowNull] ViewLayoutContext context, - [DisallowNull] PaletteBase? palette, + public override Size GetCheckBoxPreferredSize(ViewLayoutContext context, + PaletteBase? palette, bool enabled, CheckState checkState, bool tracking, @@ -2374,9 +2374,9 @@ public override Size GetCheckBoxPreferredSize([DisallowNull] ViewLayoutContext c /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. /// - public override void DrawCheckBox([DisallowNull] RenderContext context, + public override void DrawCheckBox(RenderContext context, Rectangle displayRect, - [DisallowNull] PaletteBase? palette, + PaletteBase? palette, bool enabled, CheckState checkState, bool tracking, @@ -2431,7 +2431,7 @@ public override void DrawCheckBox([DisallowNull] RenderContext context, /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. public override Size GetRadioButtonPreferredSize(ViewLayoutContext context, - [DisallowNull] PaletteBase palette, + PaletteBase palette, bool enabled, bool checkState, bool tracking, @@ -2465,9 +2465,9 @@ public override Size GetRadioButtonPreferredSize(ViewLayoutContext context, /// Should radio button be Displayed as hot tracking. /// Should radio button be Displayed as pressed. /// - public override void DrawRadioButton([DisallowNull] RenderContext context, + public override void DrawRadioButton(RenderContext context, Rectangle displayRect, - [DisallowNull] PaletteBase palette, + PaletteBase palette, bool enabled, bool checkState, bool tracking, @@ -2520,7 +2520,7 @@ public override void DrawRadioButton([DisallowNull] RenderContext context, /// State for which image size is needed. /// How to orientate the image. public override Size GetDropDownButtonPreferredSize(ViewLayoutContext context, - [DisallowNull] PaletteBase? palette, + PaletteBase? palette, PaletteState state, VisualOrientation orientation) { @@ -2553,9 +2553,9 @@ public override Size GetDropDownButtonPreferredSize(ViewLayoutContext context, /// State for which image size is needed. /// How to orientate the image. /// - public override void DrawDropDownButton([DisallowNull] RenderContext context, + public override void DrawDropDownButton(RenderContext context, Rectangle displayRect, - [DisallowNull] PaletteBase? palette, + PaletteBase? palette, PaletteState state, VisualOrientation orientation) { @@ -2591,9 +2591,9 @@ public override void DrawDropDownButton([DisallowNull] RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlNumericUpGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2634,9 +2634,9 @@ public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlNumericDownGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2677,9 +2677,9 @@ public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderConte /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext context, + public override void DrawInputControlDropDownGlyph(RenderContext context, Rectangle cellRect, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2722,9 +2722,9 @@ public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext /// State associated with rendering. /// public override void DrawRibbonDialogBoxLauncher(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2815,9 +2815,9 @@ public override void DrawRibbonDialogBoxLauncher(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonDropArrow(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2889,9 +2889,9 @@ public override void DrawRibbonDropArrow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonContextArrow(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2949,9 +2949,9 @@ public override void DrawRibbonContextArrow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonOverflow(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -3008,9 +3008,9 @@ public override void DrawRibbonOverflow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonGroupSeparator(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteRibbonGeneral paletteGeneral, + IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -3079,10 +3079,10 @@ public override void DrawRibbonGroupSeparator(PaletteRibbonShape shape, /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridSortGlyph([DisallowNull] RenderContext context, + public override Rectangle DrawGridSortGlyph(RenderContext context, SortOrder sortOrder, Rectangle cellRect, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, PaletteState state, bool rtl) { @@ -3141,10 +3141,10 @@ public override Rectangle DrawGridSortGlyph([DisallowNull] RenderContext context /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridRowGlyph([DisallowNull] RenderContext context, + public override Rectangle DrawGridRowGlyph(RenderContext context, GridRowGlyph rowGlyph, Rectangle cellRect, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, PaletteState state, bool rtl) { @@ -3219,7 +3219,7 @@ public override Rectangle DrawGridRowGlyph([DisallowNull] RenderContext context, /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridErrorGlyph([DisallowNull] RenderContext context, + public override Rectangle DrawGridErrorGlyph(RenderContext context, Rectangle cellRect, PaletteState state, bool rtl) @@ -3264,9 +3264,9 @@ public override Rectangle DrawGridErrorGlyph([DisallowNull] RenderContext contex /// Render context. /// Drawing rectangle space. /// Palette source of drawing values. - public override void DrawDragDropSolidGlyph([DisallowNull] RenderContext context, + public override void DrawDragDropSolidGlyph(RenderContext context, Rectangle drawRect, - [DisallowNull] IPaletteDragDrop dragDropPalette) + IPaletteDragDrop dragDropPalette) { Debug.Assert(context != null); Debug.Assert(dragDropPalette != null); @@ -3288,8 +3288,8 @@ public override void DrawDragDropSolidGlyph([DisallowNull] RenderContext context /// Set of drag docking data. /// Palette source of drawing values. /// Feedback requested. - public override void MeasureDragDropDockingGlyph([DisallowNull] RenderDragDockingData dragData, - [DisallowNull] IPaletteDragDrop dragDropPalette, + public override void MeasureDragDropDockingGlyph(RenderDragDockingData dragData, + IPaletteDragDrop dragDropPalette, PaletteDragFeedback feedback) { Debug.Assert(dragData != null); @@ -3312,9 +3312,9 @@ public override void MeasureDragDropDockingGlyph([DisallowNull] RenderDragDockin /// Set of drag docking data. /// Palette source of drawing values. /// Feedback requested. - public override void DrawDragDropDockingGlyph([DisallowNull] RenderContext context, - [DisallowNull] RenderDragDockingData dragData, - [DisallowNull] IPaletteDragDrop dragDropPalette, + public override void DrawDragDropDockingGlyph(RenderContext context, + RenderDragDockingData dragData, + IPaletteDragDrop dragDropPalette, PaletteDragFeedback feedback) { Debug.Assert(context != null); @@ -3380,7 +3380,7 @@ public override bool EvalTransparentPaint(IPaletteBack paletteBack, /// Element state associated with palette. /// True if transparent painting required. public override bool EvalTransparentPaint(IPaletteBack paletteBack, - [DisallowNull] IPaletteBorder? paletteBorder, + IPaletteBorder? paletteBorder, PaletteState state) { // If the border takes up some visual space @@ -5247,7 +5247,7 @@ private static Brush CreateColorBrush(Rectangle rect, } private static Brush CreateImageBrush(Rectangle rect, - [DisallowNull] Image image, + Image image, PaletteImageStyle imageStyle) { // Create brush based on the provided image @@ -5709,11 +5709,11 @@ private static Font ContentFontForButtonForm(ViewLayoutContext context, return c as KryptonForm; } - private static void AllocateImageSpace([DisallowNull] StandardContentMemento memento, - [DisallowNull] IPaletteContent? paletteContent, - [DisallowNull] IContentValues contentValues, + private static void AllocateImageSpace(StandardContentMemento memento, + IPaletteContent? paletteContent, + IContentValues contentValues, PaletteState state, - [DisallowNull] Rectangle displayRect, + Rectangle displayRect, RightToLeft rtl, ref Size[,] allocation) { @@ -5765,9 +5765,9 @@ private static void AllocateImageSpace([DisallowNull] StandardContentMemento mem } private static void AllocateShortTextSpace(ViewLayoutContext context, - [DisallowNull] Graphics g, + Graphics g, StandardContentMemento memento, - [DisallowNull] IPaletteContent? paletteContent, + IPaletteContent? paletteContent, IContentValues contentValues, PaletteState state, Rectangle displayRect, @@ -5853,8 +5853,8 @@ private static void AllocateShortTextSpace(ViewLayoutContext context, private static void AllocateLongTextSpace(ViewLayoutContext context, Graphics? g, - [DisallowNull] StandardContentMemento memento, - [DisallowNull] IPaletteContent? paletteContent, + StandardContentMemento memento, + IPaletteContent? paletteContent, IContentValues contentValues, PaletteState state, Rectangle displayRect, @@ -6171,8 +6171,8 @@ private static void ApplyExcessSpace(int excess, ref int[] cells) } } - private static void PositionAlignContent([DisallowNull] StandardContentMemento memento, - [DisallowNull] IPaletteContent paletteContent, + private static void PositionAlignContent(StandardContentMemento memento, + IPaletteContent paletteContent, PaletteState state, RightToLeft rtl, PaletteRelativeAlign alignH, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs index e30a2fb2b..a2ef05de3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs @@ -34,9 +34,9 @@ static RenderVisualStudio() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, PaletteState state) + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -57,7 +57,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs index 184c7d7b7..4e37c0c73 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs @@ -53,9 +53,9 @@ static RenderVisualStudio2010With2007() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -82,7 +82,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs index 67fab72ba..8f3a63ee4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs @@ -55,9 +55,9 @@ static RenderVisualStudio2010With2010() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -84,7 +84,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs index 17a4be4c4..6c26f8c1c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs @@ -48,9 +48,9 @@ static RenderVisualStudio2010With2013() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -77,7 +77,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs index 4b142c41a..ae6301f70 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs @@ -37,9 +37,9 @@ static RenderVisualStudio2010WithMicrosoft365() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - [DisallowNull] RenderContext context, + RenderContext context, Rectangle displayRect, - [DisallowNull] IPaletteBack paletteBack, PaletteState state) + IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -60,7 +60,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs index a94b549f2..9f51e9198 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs @@ -685,7 +685,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus([DisallowNull] Control c) + public virtual void LostFocus(Control c) { // Use source controller as first preference if (SourceController != null) diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs index 4afbd4e5a..fc4d89152 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs @@ -76,7 +76,7 @@ public override string ToString() => /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -104,7 +104,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -139,7 +139,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -156,7 +156,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs index de2e6e5a9..19fde85f1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs @@ -45,7 +45,7 @@ public class ViewControl : Control /// Initialize a new instance of the ViewControl class. /// /// Top level visual control. - public ViewControl([DisallowNull] VisualControl rootControl) + public ViewControl(VisualControl rootControl) { Debug.Assert(rootControl != null); @@ -357,7 +357,7 @@ protected override void OnKeyUp(KeyEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs index 1e449be35..942dba22b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs @@ -25,7 +25,7 @@ public abstract class ViewDecorator : ViewBase /// /// Initialize a new instance of the ViewBase class. /// - protected ViewDecorator([DisallowNull] ViewBase child) + protected ViewDecorator(ViewBase child) { Debug.Assert(child != null); _child = child; diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs index 124451cb8..7d39d30fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs @@ -41,7 +41,7 @@ public override string ToString() => /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); return false; @@ -53,7 +53,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs index df9faee69..241d3b724 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs @@ -202,7 +202,7 @@ public virtual Size GetPreferredSize(IRenderer? renderer, /// Renderer provider. /// /// True if it contains transparent painting. - public bool EvalTransparentPaint([DisallowNull] IRenderer renderer) + public bool EvalTransparentPaint(IRenderer renderer) { Debug.Assert(renderer != null); Debug.Assert(Root != null); @@ -284,7 +284,7 @@ public ViewBase? ActiveView /// Perform a layout of the view. /// /// Renderer provider. - public virtual void Layout([DisallowNull] IRenderer renderer) + public virtual void Layout(IRenderer renderer) { Debug.Assert(renderer != null); Debug.Assert(Root != null); @@ -303,7 +303,7 @@ public virtual void Layout([DisallowNull] IRenderer renderer) /// /// View context for layout operation. /// - public virtual void Layout([DisallowNull] ViewLayoutContext context) + public virtual void Layout(ViewLayoutContext context) { Debug.Assert(context != null); Debug.Assert(context!.Renderer != null); @@ -360,7 +360,7 @@ public virtual void Layout([DisallowNull] ViewLayoutContext context) /// Renderer provider. /// A PaintEventArgs that contains the event data. /// - public virtual void Paint([DisallowNull] IRenderer renderer, PaintEventArgs? e) + public virtual void Paint(IRenderer renderer, PaintEventArgs? e) { Debug.Assert(renderer != null); Debug.Assert(e != null); @@ -391,7 +391,7 @@ public virtual void Paint([DisallowNull] IRenderer renderer, PaintEventArgs? e) /// /// Renderer context. /// - public virtual void Paint([DisallowNull] RenderContext context) + public virtual void Paint(RenderContext context) { Debug.Assert(context != null); Debug.Assert(Root != null); @@ -439,7 +439,7 @@ public virtual void Paint([DisallowNull] RenderContext context) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) + public virtual void MouseMove(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -464,7 +464,7 @@ public virtual void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseDown([DisallowNull] MouseEventArgs e, Point rawPt) + public virtual void MouseDown(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -495,7 +495,7 @@ public virtual void MouseDown([DisallowNull] MouseEventArgs e, Point rawPt) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseUp([DisallowNull] MouseEventArgs e, Point rawPt) + public virtual void MouseUp(MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -526,7 +526,7 @@ public virtual void MouseUp([DisallowNull] MouseEventArgs e, Point rawPt) /// /// An EventArgs that contains the event data. /// - public virtual void MouseLeave([DisallowNull] EventArgs e) + public virtual void MouseLeave(EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs index 88a960add..4d354ea41 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs @@ -29,7 +29,7 @@ public class ViewDrawBorderEdge : ViewDrawPanel /// /// Palette source for drawing details. /// Initial orientation of the border. - public ViewDrawBorderEdge([DisallowNull] PaletteBorderEdge palette, + public ViewDrawBorderEdge(PaletteBorderEdge palette, Orientation orientation) : base(palette) { @@ -70,7 +70,7 @@ public override string ToString() => /// Update the source palette for drawing. /// /// Palette source for drawing details. - public void SetPalettes([DisallowNull] PaletteBorderEdge palette) + public void SetPalettes(PaletteBorderEdge palette) { Debug.Assert(palette != null); @@ -88,7 +88,7 @@ public void SetPalettes([DisallowNull] PaletteBorderEdge palette) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs index 7811d8d43..f397cecb4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs @@ -416,10 +416,10 @@ public bool TestForFocusCues /// Palette source for the normal state. /// Palette source for the tracking state. /// Palette source for the pressed state. - public void SetPalettes([DisallowNull] IPaletteTriple paletteDisabled, - [DisallowNull] IPaletteTriple paletteNormal, - [DisallowNull] IPaletteTriple paletteTracking, - [DisallowNull] IPaletteTriple palettePressed) + public void SetPalettes(IPaletteTriple paletteDisabled, + IPaletteTriple paletteNormal, + IPaletteTriple paletteTracking, + IPaletteTriple palettePressed) { Debug.Assert(paletteDisabled != null); Debug.Assert(paletteNormal != null); @@ -442,9 +442,9 @@ public void SetPalettes([DisallowNull] IPaletteTriple paletteDisabled, /// Palette source for the normal checked state. /// Palette source for the tracking checked state. /// Palette source for the pressed checked state. - public void SetCheckedPalettes([DisallowNull] IPaletteTriple paletteCheckedNormal, - [DisallowNull] IPaletteTriple paletteCheckedTracking, - [DisallowNull] IPaletteTriple paletteCheckedPressed) + public void SetCheckedPalettes(IPaletteTriple paletteCheckedNormal, + IPaletteTriple paletteCheckedTracking, + IPaletteTriple paletteCheckedPressed) { Debug.Assert(paletteCheckedNormal != null); Debug.Assert(paletteCheckedTracking != null); @@ -466,7 +466,7 @@ public void SetCheckedPalettes([DisallowNull] IPaletteTriple paletteCheckedNorma /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -483,7 +483,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); Debug.Assert(_drawCanvas != null); @@ -500,7 +500,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -576,7 +576,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs index 5346cbe12..48df5d76a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs @@ -138,8 +138,8 @@ public IPaletteMetric? PaletteMetric /// /// Palette source for the background. /// Palette source for the border. - public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, - [DisallowNull] IPaletteBorder paletteBorder) => + public virtual void SetPalettes(IPaletteBack paletteBack, + IPaletteBorder paletteBorder) => SetPalettes(paletteBack, paletteBorder, null); /// @@ -148,7 +148,7 @@ public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, /// Palette source for the background. /// Palette source for the border. /// Palette source for the metric. - public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, + public virtual void SetPalettes(IPaletteBack paletteBack, [DisallowNull]IPaletteBorder paletteBorder, IPaletteMetric? paletteMetric) { @@ -337,7 +337,7 @@ public PaletteGraphicsHint ForceGraphicsHint /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -354,7 +354,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -399,7 +399,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -460,7 +460,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); @@ -537,7 +537,7 @@ public override void RenderBefore([DisallowNull] RenderContext context) /// /// Rendering context. /// - public override void RenderAfter([DisallowNull] RenderContext context) + public override void RenderAfter(RenderContext context) { Debug.Assert(context != null); @@ -570,7 +570,7 @@ public override void RenderAfter([DisallowNull] RenderContext context) /// Draw the canvas border. /// /// - public virtual void RenderBorder([DisallowNull] RenderContext context) + public virtual void RenderBorder(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs index 84af62aee..5da76902f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs @@ -28,7 +28,7 @@ public class ViewDrawCheckBox : ViewLeaf /// Initialize a new instance of the ViewDrawCheckBox class. /// /// Palette for source of drawing values. - public ViewDrawCheckBox([DisallowNull] PaletteBase palette) + public ViewDrawCheckBox(PaletteBase palette) { Debug.Assert(palette != null); _palette = palette; @@ -84,7 +84,7 @@ public bool Tracking /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -99,7 +99,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs index a17280045..2d93c8e46 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs @@ -165,7 +165,7 @@ public bool UseMnemonic /// Update the source palette for drawing. /// /// Palette source for the content. - public void SetPalette([DisallowNull] IPaletteContent paletteContent) + public void SetPalette(IPaletteContent paletteContent) { Debug.Assert(paletteContent != null); @@ -190,7 +190,7 @@ public void SetPalette([DisallowNull] IPaletteContent paletteContent) /// /// ViewLayoutContext context. /// - public bool IsImageDisplayed([DisallowNull] ViewContext context) + public bool IsImageDisplayed(ViewContext context) { Debug.Assert(context != null); @@ -219,7 +219,7 @@ public bool IsImageDisplayed([DisallowNull] ViewContext context) /// /// ViewLayoutContext context. /// - public Rectangle ImageRectangle([DisallowNull] ViewContext context) + public Rectangle ImageRectangle(ViewContext context) { Debug.Assert(context != null); @@ -248,7 +248,7 @@ public Rectangle ImageRectangle([DisallowNull] ViewContext context) /// /// /// Rectangle of short text drawing. - public Rectangle ShortTextRect([DisallowNull] ViewContext context) + public Rectangle ShortTextRect(ViewContext context) { Debug.Assert(context != null); @@ -277,7 +277,7 @@ public Rectangle ShortTextRect([DisallowNull] ViewContext context) /// /// /// Rectangle of short text drawing. - public Rectangle LongTextRect([DisallowNull] ViewContext context) + public Rectangle LongTextRect(ViewContext context) { Debug.Assert(context != null); @@ -306,7 +306,7 @@ public Rectangle LongTextRect([DisallowNull] ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -340,7 +340,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -382,7 +382,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs index b62656899..d0bdc5a68 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs @@ -126,7 +126,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs index 94f1a7682..e6b5a9c05 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs @@ -1591,7 +1591,7 @@ public void PerformKeyPress(KeyPressEventArgs e) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs index ed0515a7b..432b60a3d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs @@ -50,7 +50,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _preferredSize; @@ -60,7 +60,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -78,7 +78,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs index aba4af8b2..3f838b937 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs @@ -193,7 +193,7 @@ public override bool DrawBorderLast /// /// Child view element. /// Docking setting. - public ViewDockStyle GetDock([DisallowNull] ViewBase child) + public ViewDockStyle GetDock(ViewBase child) { Debug.Assert(child != null); @@ -212,7 +212,7 @@ public ViewDockStyle GetDock([DisallowNull] ViewBase child) /// /// Child view element. /// DockStyle setting. - public void SetDock([DisallowNull] ViewBase child, ViewDockStyle dock) + public void SetDock(ViewBase child, ViewDockStyle dock) { Debug.Assert(child != null); @@ -252,7 +252,7 @@ public void Add(ViewBase item, ViewDockStyle dock) /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -297,7 +297,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// Gets the size required for all except the contents. /// /// Layout context. - public Size GetNonChildSize([DisallowNull] ViewLayoutContext context) + public Size GetNonChildSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -356,7 +356,7 @@ public Size GetNonChildSize([DisallowNull] ViewLayoutContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -508,7 +508,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs index 60e0d1ffd..a9d03d31f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -67,7 +67,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs index 39bd95d4a..48b6c907e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs @@ -53,7 +53,7 @@ public ViewDrawEmptyContent(IPaletteContent? paletteContentDisabled, /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -75,7 +75,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -100,7 +100,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs index 9a38e33fa..0dd5a53eb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs @@ -76,7 +76,7 @@ public override string ToString() => /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); @@ -137,7 +137,7 @@ public override void RenderBefore([DisallowNull] RenderContext context) /// /// Rendering context. /// - public override void RenderAfter([DisallowNull] RenderContext context) + public override void RenderAfter(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs index c24f8d3fb..aeacf3f97 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs @@ -257,7 +257,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -286,7 +286,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs index 58deb29ff..05852365f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs @@ -246,7 +246,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -273,7 +273,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs index a9b9209b6..157ef742d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs @@ -127,7 +127,7 @@ public override string ToString() => /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -162,7 +162,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); @@ -202,7 +202,7 @@ public override void RenderBefore([DisallowNull] RenderContext context) /// /// Rendering context. /// - public override void RenderAfter([DisallowNull] RenderContext context) + public override void RenderAfter(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs index a53e2d923..de0adf846 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs @@ -60,7 +60,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -82,7 +82,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs index 1e7661c0e..48e8e7f94 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs @@ -117,7 +117,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs index 9a11e0480..f5d1bf831 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs @@ -68,7 +68,7 @@ public override string ToString() => /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs index e08093808..ba8df6046 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -105,7 +105,7 @@ public int OverridePreferredWidth /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -126,7 +126,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs index 997ee5a68..d512be376 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs @@ -60,7 +60,7 @@ public int ColumnWidth /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs index 6a0b0864e..400d05cb6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs @@ -126,7 +126,7 @@ public int ImageIndex /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs index e5c7e6cfe..c8537d9eb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs @@ -448,7 +448,7 @@ public void ClearSubMenu() /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -567,7 +567,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); ClientRectangle = context.DisplayRectangle; diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs index 113e9d2c7..3d8be58c6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs @@ -51,7 +51,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs index 4f7c84045..3511eb156 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs @@ -217,7 +217,7 @@ public bool Pressed /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -241,7 +241,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs index 8982f5e64..2e68a3d37 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs @@ -89,7 +89,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs index 58bd5fe24..d62974eab 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs @@ -202,7 +202,7 @@ protected override void Dispose(bool disposing) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs index dc7bbd291..5bb8da532 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs @@ -23,7 +23,7 @@ public class ViewDrawMenuSeparator : ViewDrawDocker /// /// Reference to owning separator entry. /// Palette for obtaining drawing values. - public ViewDrawMenuSeparator([DisallowNull] KryptonContextMenuSeparator separator, + public ViewDrawMenuSeparator(KryptonContextMenuSeparator separator, PaletteDoubleRedirect? palette) : base(separator.StateNormal.Back, separator.StateNormal.Border) { @@ -43,7 +43,7 @@ public ViewDrawMenuSeparator([DisallowNull] KryptonContextMenuSeparator separato /// Initialize a new instance of the ViewDrawMenuSeparator class. /// /// State specific source of palette values. - public ViewDrawMenuSeparator([DisallowNull] PaletteDouble state) + public ViewDrawMenuSeparator(PaletteDouble state) : base(state.Back, state.Border) { // We need to be big enough to contain 1 pixel square spacer @@ -74,7 +74,7 @@ public override string ToString() => /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs index 59e60c889..e5dde9dce 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs @@ -73,7 +73,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -92,7 +92,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -128,7 +128,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs index 1e2b415b3..db36c2559 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs @@ -211,7 +211,7 @@ public DateTime DayNearPoint(Point pt) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return new Size(_months.SizeDays.Width * WEEKDAYS, _months.SizeDays.Height * WEEKS); @@ -221,7 +221,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -359,7 +359,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs index d56ef8726..ba1044b53 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs @@ -109,7 +109,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs index 255c7dcd4..711397dc8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs @@ -37,7 +37,7 @@ public ViewDrawPanel() /// Initialize a new instance of the ViewDrawPanel class. /// /// Palette source for the background. - public ViewDrawPanel([DisallowNull] IPaletteBack paletteBack) + public ViewDrawPanel(IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); _paletteBack = paletteBack; @@ -92,7 +92,7 @@ protected override void Dispose(bool disposing) /// Update the source palettes for drawing. /// /// Palette source for the background. - public void SetPalettes([DisallowNull] IPaletteBack paletteBack) + public void SetPalettes(IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); @@ -114,7 +114,7 @@ public void SetPalettes([DisallowNull] IPaletteBack paletteBack) /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -130,7 +130,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -155,7 +155,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs index 83380c539..fe4730ea0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs @@ -27,7 +27,7 @@ public class ViewDrawRadioButton : ViewLeaf /// Initialize a new instance of the ViewDrawRadioButton class. /// /// Palette for source of drawing values. - public ViewDrawRadioButton([DisallowNull] PaletteBase palette) + public ViewDrawRadioButton(PaletteBase palette) { Debug.Assert(palette != null); _palette = palette; @@ -72,7 +72,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -87,7 +87,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs index 81aeb3796..ec640f956 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs @@ -169,7 +169,7 @@ public void SetScrollValues(int min, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -182,7 +182,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs index 47c8eb3d3..e9509e620 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs @@ -45,10 +45,10 @@ public class ViewDrawSeparator : ViewLeaf /// Palette source for pressed metric values. /// Metric used to get padding values. /// Visual orientation of the content. - public ViewDrawSeparator([DisallowNull] IPaletteDouble paletteDisabled, [DisallowNull] IPaletteDouble paletteNormal, - [DisallowNull] IPaletteDouble paletteTracking, [DisallowNull] IPaletteDouble palettePressed, - [DisallowNull] IPaletteMetric metricDisabled, [DisallowNull] IPaletteMetric metricNormal, - [DisallowNull] IPaletteMetric metricTracking, [DisallowNull] IPaletteMetric metricPressed, + public ViewDrawSeparator(IPaletteDouble paletteDisabled, IPaletteDouble paletteNormal, + IPaletteDouble paletteTracking, IPaletteDouble palettePressed, + IPaletteMetric metricDisabled, IPaletteMetric metricNormal, + IPaletteMetric metricTracking, IPaletteMetric metricPressed, PaletteMetricPadding metricPadding, Orientation orientation) { @@ -131,14 +131,14 @@ public override string ToString() => /// Palette source for normal metric values. /// Palette source for tracking metric values. /// Palette source for pressed metric values. - public void SetPalettes([DisallowNull] IPaletteDouble paletteDisabled, - [DisallowNull] IPaletteDouble paletteNormal, - [DisallowNull] IPaletteDouble paletteTracking, - [DisallowNull] IPaletteDouble palettePressed, - [DisallowNull] IPaletteMetric metricDisabled, - [DisallowNull] IPaletteMetric metricNormal, - [DisallowNull] IPaletteMetric metricTracking, - [DisallowNull] IPaletteMetric metricPressed) + public void SetPalettes(IPaletteDouble paletteDisabled, + IPaletteDouble paletteNormal, + IPaletteDouble paletteTracking, + IPaletteDouble palettePressed, + IPaletteMetric metricDisabled, + IPaletteMetric metricNormal, + IPaletteMetric metricTracking, + IPaletteMetric metricPressed) { Debug.Assert(paletteDisabled != null); Debug.Assert(paletteNormal != null); @@ -166,7 +166,7 @@ public void SetPalettes([DisallowNull] IPaletteDouble paletteDisabled, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return new Size(Length, Length); @@ -176,7 +176,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); ClientRectangle = context.DisplayRectangle; @@ -190,7 +190,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs index b9af7e9c2..2c18c3d0b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs @@ -199,8 +199,8 @@ public virtual void SetPalettes(IPaletteBack paletteBack, /// Palette source for the background. /// Palette source for the border. /// Palette source for the metric. - public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, - [DisallowNull] IPaletteBorder paletteBorder, + public virtual void SetPalettes(IPaletteBack paletteBack, + IPaletteBorder paletteBorder, IPaletteMetric? paletteMetric) { Debug.Assert(paletteBorder != null); @@ -355,7 +355,7 @@ public PaletteGraphicsHint ForceGraphicsHint /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint([DisallowNull] ViewContext context) + public override bool EvalTransparentPaint(ViewContext context) { Debug.Assert(context != null); @@ -372,7 +372,7 @@ public override bool EvalTransparentPaint([DisallowNull] ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -417,7 +417,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -478,7 +478,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); @@ -530,7 +530,7 @@ public override void RenderBefore([DisallowNull] RenderContext context) /// /// Rendering context. /// - public override void RenderAfter([DisallowNull] RenderContext context) + public override void RenderAfter(RenderContext context) { Debug.Assert(context != null); @@ -644,7 +644,7 @@ private void RenderBackground(RenderContext context, Rectangle rect) } } - private void RenderBorder([DisallowNull] RenderContext context, Rectangle rect) + private void RenderBorder(RenderContext context, Rectangle rect) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs index 65c248511..33cd76335 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs @@ -111,7 +111,7 @@ public string GetShortText() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); base.Layout(context); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs index 112b7236c..1bb0d4ff2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.PositionSize; @@ -54,7 +54,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// /// Layout context. /// - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs index c24934c56..4a26b336e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs @@ -189,7 +189,7 @@ public int NearestValueFromPoint(Point pt) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs index c137c6edb..5973cbc5c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs @@ -49,7 +49,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.TickSize; @@ -59,7 +59,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs index 41c949432..e1ce3ce6e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.TrackSize; @@ -53,7 +53,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs index a7bf147b8..c10945e27 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs @@ -134,7 +134,7 @@ public DateTime Month /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); return _months.SizeDay with { Height = _months.SizeDays.Height * WEEKS }; @@ -144,7 +144,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -198,7 +198,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) + public override void RenderBefore(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs index 7b642231e..0cd645ac7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs @@ -116,7 +116,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -177,7 +177,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs index e019b1699..04f75c864 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs @@ -38,7 +38,7 @@ public override string ToString() => /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs index 13d70e7b8..ec47a510e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs @@ -35,9 +35,9 @@ public ViewLayoutControl(VisualControl rootControl, /// View control to use as child. /// Top level visual control. /// View used to size and position the child control. - public ViewLayoutControl([DisallowNull] ViewControl viewControl, - [DisallowNull] VisualControl rootControl, - [DisallowNull] ViewBase viewChild) + public ViewLayoutControl(ViewControl viewControl, + VisualControl rootControl, + ViewBase viewChild) { Debug.Assert(viewControl != null); Debug.Assert(rootControl != null); @@ -207,7 +207,7 @@ public void MakeParent(Control c) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -239,7 +239,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs index cd8fff31f..4dfa27d04 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs @@ -122,7 +122,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -247,7 +247,7 @@ public override void RenderBefore(RenderContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render([DisallowNull] RenderContext context) + public override void Render(RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs index 629ce5614..cfdb32008 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs @@ -114,7 +114,7 @@ public override string ToString() => /// /// Child view element. /// Docking setting. - public ViewDockStyle GetDock([DisallowNull] ViewBase child) + public ViewDockStyle GetDock(ViewBase child) { Debug.Assert(child != null); @@ -133,7 +133,7 @@ public ViewDockStyle GetDock([DisallowNull] ViewBase child) /// /// Child view element. /// ViewDockStyle setting. - public void SetDock([DisallowNull] ViewBase child, ViewDockStyle dock) + public void SetDock(ViewBase child, ViewDockStyle dock) { Debug.Assert(child != null); @@ -180,7 +180,7 @@ public void Add(ViewBase item, ViewDockStyle dock) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -329,7 +329,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs index d9f161f26..490b60eaa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs @@ -81,7 +81,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs index f9b1b3a84..63534d6d0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs index a8cbb96a8..be9dbe4e5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs @@ -40,8 +40,8 @@ internal class ViewLayoutMenuItemSelect : ViewComposite /// /// Reference to owning instance. /// Provider of context menu information. - public ViewLayoutMenuItemSelect([DisallowNull] KryptonContextMenuImageSelect itemSelect, - [DisallowNull] IContextMenuProvider provider) + public ViewLayoutMenuItemSelect(KryptonContextMenuImageSelect itemSelect, + IContextMenuProvider provider) { Debug.Assert(itemSelect != null); Debug.Assert(provider != null); @@ -129,7 +129,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -161,7 +161,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs index 5593693c6..bb4ca10b1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs @@ -102,7 +102,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -130,7 +130,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); base.Layout(context); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs index abca27b2a..f356994bf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs @@ -28,7 +28,7 @@ public class ViewLayoutMetricSpacer : ViewLeaf /// /// Palette source for metric values. /// Metric used to get spacer size. - public ViewLayoutMetricSpacer([DisallowNull] IPaletteMetric paletteMetric, + public ViewLayoutMetricSpacer(IPaletteMetric paletteMetric, PaletteMetricInt metricInt) { Debug.Assert(paletteMetric != null); @@ -73,7 +73,7 @@ public void SetMetrics(IPaletteMetric paletteMetric, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs index bc5ce73e6..75ac8e3e0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs @@ -469,7 +469,7 @@ public void PrevMonth() /// Gets the size required to draw a single month. /// /// Layout context. - public Size GetSingleMonthSize([DisallowNull] ViewLayoutContext context) + public Size GetSingleMonthSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -483,7 +483,7 @@ public Size GetSingleMonthSize([DisallowNull] ViewLayoutContext context) /// Gets the size required to draw extra elements such as headers. /// /// Layout context. - public Size GetExtraSize([DisallowNull] ViewLayoutContext context) + public Size GetExtraSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -504,7 +504,7 @@ public Size GetExtraSize([DisallowNull] ViewLayoutContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -541,7 +541,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs index be2c48d27..cc135ed55 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs @@ -40,7 +40,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -52,7 +52,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs index 3ad2765fb..cc61c10cf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs @@ -65,7 +65,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -83,7 +83,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs index 8147e1d70..445e6a370 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs @@ -40,7 +40,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs index d37bbeead..78eeb37c6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs @@ -45,8 +45,8 @@ public class ViewLayoutScrollViewport : ViewLayoutDocker /// Animate changes in the viewport. /// Is the viewport vertical. /// Delegate for notifying paint requests. - public ViewLayoutScrollViewport([DisallowNull] VisualControl rootControl, - [DisallowNull] ViewBase viewportFiller, + public ViewLayoutScrollViewport(VisualControl rootControl, + ViewBase viewportFiller, PaletteBorderEdge paletteBorderEdge, IPaletteMetric? paletteMetrics, PaletteMetricPadding metricPadding, @@ -55,7 +55,7 @@ public ViewLayoutScrollViewport([DisallowNull] VisualControl rootControl, RelativePositionAlign alignment, bool animateChange, bool vertical, - [DisallowNull] NeedPaintHandler needPaintDelegate) + NeedPaintHandler needPaintDelegate) { Debug.Assert(rootControl != null); Debug.Assert(viewportFiller != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs index 29e89131e..2dfd05152 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs @@ -83,7 +83,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs index eceabf9e6..54d246f93 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs @@ -61,7 +61,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -96,7 +96,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs index 9c599a0df..8b4e88cd8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs index c99cb2155..050ba439d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs @@ -463,7 +463,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs index 7044a3e82..e39cac35d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) + public override Size GetPreferredSize(ViewLayoutContext context) { Debug.Assert(context != null); @@ -71,7 +71,7 @@ public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout([DisallowNull] ViewLayoutContext context) + public override void Layout(ViewLayoutContext context) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore([DisallowNull] RenderContext context) => Debug.Assert(context != null); + public override void RenderBefore(RenderContext context) => Debug.Assert(context != null); #endregion } diff --git a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs index 2322b7c96..f1ef54702 100644 --- a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs +++ b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonWorkspaceDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs index 336e9cc0b..3d5fbdba6 100644 --- a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs +++ b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs @@ -33,7 +33,7 @@ public KryptonWorkspaceSequenceDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize([DisallowNull] IComponent component) + public override void Initialize(IComponent component) { // Let base class do standard stuff base.Initialize(component); From 314658b6f266e292a6fee46aab983a01f62de947 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Wed, 6 Dec 2023 15:59:10 +0000 Subject: [PATCH 07/14] Update ViewDrawRibbonRecentDocs.cs --- .../Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs index 798f7749a..23b99faa2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs @@ -39,7 +39,7 @@ public ViewDrawRibbonRecentDocs(KryptonRibbon ribbon) // Use a class to convert from ribbon recent docs to content interface _contentProvider = new RibbonRecentDocsTitleToContent(ribbon.StateCommon.RibbonGeneral, ribbon.StateCommon.RibbonAppMenuDocsTitle); - } + } /// /// Obtains the String representation of this instance. @@ -99,9 +99,9 @@ public override void Layout(ViewLayoutContext context) } // Use the renderer to layout the text - _memento = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle, + _memento = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle, _contentProvider, this, - VisualOrientation.Top, + VisualOrientation.Top, PaletteState.Normal, false, false); } #endregion @@ -111,7 +111,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore(RenderContext context) { // Use renderer to draw the text content if (_memento != null) From e3e9519177d17401895e51ecc71c61e8d6435a23 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 08:36:29 +0000 Subject: [PATCH 08/14] Revert "Update ViewDrawRibbonRecentDocs.cs" This reverts commit 314658b6f266e292a6fee46aab983a01f62de947. --- .../Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs index 23b99faa2..798f7749a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs @@ -39,7 +39,7 @@ public ViewDrawRibbonRecentDocs(KryptonRibbon ribbon) // Use a class to convert from ribbon recent docs to content interface _contentProvider = new RibbonRecentDocsTitleToContent(ribbon.StateCommon.RibbonGeneral, ribbon.StateCommon.RibbonAppMenuDocsTitle); - } + } /// /// Obtains the String representation of this instance. @@ -99,9 +99,9 @@ public override void Layout(ViewLayoutContext context) } // Use the renderer to layout the text - _memento = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle, + _memento = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle, _contentProvider, this, - VisualOrientation.Top, + VisualOrientation.Top, PaletteState.Normal, false, false); } #endregion @@ -111,7 +111,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore(RenderContext context) { // Use renderer to draw the text content if (_memento != null) From bcb65dfc60898c968b976f0511432b76d27327d5 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 08:36:45 +0000 Subject: [PATCH 09/14] Revert "* Removal of redundant `[DisallowNull]`" This reverts commit b183b75e92a8f7148ce001447ff4ef345799e885. --- .../Control Docking/KryptonStorePage.cs | 2 +- .../Elements Impl/KryptonDockingControl.cs | 6 +- .../KryptonDockingFloatingWindow.cs | 2 +- .../Elements Impl/KryptonDockingManager.cs | 102 +++++------ .../Elements Impl/KryptonDockingNavigator.cs | 4 +- .../Elements Impl/KryptonDockingSpace.cs | 2 +- .../Elements Impl/KryptonDockingWorkspace.cs | 24 +-- .../Event Args/CancelUniqueNameEventArgs.cs | 2 +- .../ViewDraw/ViewDrawAutoHiddenTab.cs | 2 +- .../ButtonSpecs/ButtonSpecNavFixed.cs | 2 +- .../ButtonSpecs/ButtonSpecNavRemap.cs | 2 +- .../Controller/DragViewController.cs | 6 +- .../Controller/OutlookMiniController.cs | 6 +- .../Controls Navigator/KryptonNavigator.cs | 8 +- .../KryptonNavigatorControlCollection.cs | 4 +- .../Controls Visuals/VisualPopupPage.cs | 4 +- .../Dragging/DragFeedback.cs | 8 +- .../Dragging/DragFeedbackSolid.cs | 2 +- .../General/PageToToolTipMapping.cs | 2 +- .../Navigator/KryptonNavigatorDesigner.cs | 2 +- .../Navigator/KryptonPageDesigner.cs | 2 +- .../Palette/HeaderGroupMappingBase.cs | 2 +- .../Krypton.Navigator/Palette/NavigatorBar.cs | 2 +- .../Palette/NavigatorButton.cs | 2 +- .../Palette/NavigatorGroup.cs | 2 +- .../Palette/NavigatorHeader.cs | 2 +- .../Palette/NavigatorOutlook.cs | 2 +- .../Palette/NavigatorOutlookFull.cs | 2 +- .../Palette/NavigatorOutlookMini.cs | 2 +- .../Palette/NavigatorPanel.cs | 2 +- .../Palette/NavigatorPopupPages.cs | 4 +- .../Palette/NavigatorStack.cs | 2 +- .../Palette/NavigatorToolTips.cs | 4 +- .../Palette/PaletteBarRedirect.cs | 2 +- .../Palette/PaletteNavContent.cs | 2 +- .../Palette/PaletteNavigatorHeaderGroup.cs | 2 +- .../PaletteNavigatorHeaderGroupRedirect.cs | 4 +- .../Palette/PaletteRibbonGeneralRedirect.cs | 2 +- .../Palette/PaletteRibbonTabContent.cs | 6 +- .../PaletteRibbonTabContentInheritOverride.cs | 12 +- .../PaletteRibbonTabContentRedirect.cs | 2 +- .../Palette/RibbonTabToContent.cs | 6 +- .../View Builder/ViewBuilderBase.cs | 6 +- .../View Builder/ViewBuilderGroup.cs | 2 +- .../ViewBuilderHeaderBarTabGroup.cs | 2 +- .../View Builder/ViewBuilderHeaderGroup.cs | 6 +- .../View Builder/ViewBuilderItemBase.cs | 6 +- .../View Builder/ViewBuilderOutlookBase.cs | 6 +- .../View Builder/ViewBuilderPanel.cs | 4 +- .../ViewBuilderStackCheckButtonBase.cs | 6 +- .../View Builder/ViewletHeaderGroup.cs | 4 +- .../View Draw/ViewDrawNavCheckButtonBase.cs | 2 +- .../View Draw/ViewDrawNavRibbonTab.cs | 4 +- .../View Layout/ViewLayoutBar.cs | 4 +- .../View Layout/ViewLayoutDockerOverlap.cs | 6 +- .../View Layout/ViewLayoutInsetOverlap.cs | 6 +- .../View Layout/ViewLayoutOutlookFull.cs | 2 +- .../View Layout/ViewLayoutOutlookMini.cs | 2 +- .../View Layout/ViewLayoutPageHide.cs | 6 +- .../View Layout/ViewLayoutPageShow.cs | 6 +- .../View Layout/ViewLayoutPopupPage.cs | 8 +- .../ButtonSpec/ButtonSpecExpandRibbon.cs | 2 +- .../ButtonSpecManagerLayoutAppButton.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildClose.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildMin.cs | 2 +- .../ButtonSpec/ButtonSpecMdiChildRestore.cs | 2 +- .../ButtonSpec/ButtonSpecMinimizeRibbon.cs | 2 +- .../Controller/AppButtonController.cs | 2 +- .../Controller/AppTabController.cs | 2 +- .../ButtonSpecAppButtonController.cs | 4 +- .../Controller/ButtonSpecRibbonController.cs | 2 +- .../Controller/CollapsedGroupController.cs | 8 +- .../Controller/ComboBoxController.cs | 8 +- .../Controller/ContextTitleController.cs | 2 +- .../Controller/CustomControlController.cs | 8 +- .../Controller/DateTimePickerController.cs | 8 +- .../DialogLauncherButtonController.cs | 2 +- .../Controller/DomainUpDownController.cs | 8 +- .../Controller/GalleryButtonController.cs | 2 +- .../Controller/GalleryController.cs | 8 +- .../Controller/GalleryItemController.cs | 10 +- .../Controller/GroupButtonController.cs | 8 +- .../Controller/GroupCheckBoxController.cs | 10 +- .../Controller/GroupRadioButtonController.cs | 10 +- .../Controller/LeftDownButtonController.cs | 6 +- .../Controller/LeftUpButtonController.cs | 4 +- .../Controller/MaskedTextBoxController.cs | 8 +- .../Controller/NumericUpDownController.cs | 8 +- .../Controller/QATButtonController.cs | 2 +- .../Controller/QATExtraButtonController.cs | 2 +- .../Controller/RecentDocController.cs | 14 +- .../Controller/RepeatButtonController.cs | 4 +- .../Controller/RibbonTabController.cs | 6 +- .../Controller/RibbonTabsController.cs | 2 +- .../Controller/RichTextBoxController.cs | 8 +- .../Controller/TextBoxController.cs | 8 +- .../Controller/TrackBarController.cs | 8 +- .../Controller/ViewHighlightController.cs | 4 +- .../Controls Ribbon/KryptonRibbonContext.cs | 1 + .../Controls Visuals/VisualPopupGroup.cs | 4 +- .../Controls Visuals/VisualPopupMinimized.cs | 4 +- .../VisualPopupQATOverflow.cs | 2 +- .../Designers/KryptonGalleryDesigner.cs | 2 +- .../Designers/KryptonRibbonDesigner.cs | 2 +- .../KryptonRibbonGroupButtonDesigner.cs | 2 +- .../KryptonRibbonGroupCheckBoxDesigner.cs | 2 +- ...KryptonRibbonGroupClusterButtonDesigner.cs | 2 +- ...onRibbonGroupClusterColorButtonDesigner.cs | 2 +- .../KryptonRibbonGroupClusterDesigner.cs | 2 +- .../KryptonRibbonGroupColorButtonDesigner.cs | 2 +- .../KryptonRibbonGroupComboBoxDesigner.cs | 2 +- ...KryptonRibbonGroupCustomControlDesigner.cs | 2 +- ...ryptonRibbonGroupDateTimePickerDesigner.cs | 2 +- .../Designers/KryptonRibbonGroupDesigner.cs | 2 +- .../KryptonRibbonGroupDomainUpDownDesigner.cs | 2 +- .../KryptonRibbonGroupGalleryDesigner.cs | 2 +- .../KryptonRibbonGroupLabelDesigner.cs | 2 +- .../KryptonRibbonGroupLinesDesigner.cs | 2 +- ...KryptonRibbonGroupMaskedTextBoxDesigner.cs | 2 +- ...KryptonRibbonGroupNumericUpDownDesigner.cs | 2 +- .../KryptonRibbonGroupRadioButtonDesigner.cs | 2 +- .../KryptonRibbonGroupRichTextBoxDesigner.cs | 2 +- .../KryptonRibbonGroupSeparatorDesigner.cs | 2 +- .../KryptonRibbonGroupTextBoxDesigner.cs | 2 +- ...KryptonRibbonGroupThemeComboBoxDesigner.cs | 2 +- .../KryptonRibbonGroupTrackBarDesigner.cs | 2 +- .../KryptonRibbonGroupTripleDesigner.cs | 2 +- .../Designers/KryptonRibbonTabDesigner.cs | 2 +- .../General/CalculatedValues.cs | 2 +- .../KryptonRibbonGroupClusterColorButton.cs | 2 +- .../KryptonRibbonGroupTrackBar.cs | 2 + .../Palette/AppButtonToolTipToContent.cs | 2 +- .../Krypton.Ribbon/Palette/ContextTabSet.cs | 6 +- .../Palette/DesignTextToContent.cs | 2 +- .../Palette/PaletteGalleryBackBorder.cs | 4 +- .../Palette/PaletteGalleryRedirect.cs | 2 +- .../Palette/PaletteRibbonAppButton.cs | 2 +- .../Palette/PaletteRibbonContextBack.cs | 2 +- .../Palette/PaletteRibbonContextDouble.cs | 2 +- .../Palette/PaletteRibbonFocus.cs | 2 +- .../Palette/PaletteRibbonImages.cs | 4 +- .../Palette/PaletteRibbonJustGroup.cs | 2 +- .../Palette/PaletteRibbonJustTab.cs | 2 +- .../Palette/PaletteRibbonRedirect.cs | 2 +- .../Palette/PaletteRibbonStyles.cs | 2 +- .../Palette/QATButtonToContent.cs | 2 +- .../Palette/QATButtonToolTipToContent.cs | 2 +- .../Krypton.Ribbon/Palette/RibbonAppButton.cs | 2 +- .../Palette/RibbonGroupLabelTextToContent.cs | 10 +- .../RibbonGroupNormalDisabledTextToContent.cs | 6 +- .../Palette/RibbonGroupTextToContent.cs | 4 +- .../Palette/RibbonRecentDocsEntryToContent.cs | 4 +- .../Palette/RibbonRecentDocsTitleToContent.cs | 4 +- .../Palette/RibbonTabToContent.cs | 4 +- .../Krypton.Ribbon/Palette/RibbonToContent.cs | 2 +- .../View Base/ViewRibbonManager.cs | 10 +- .../View Base/ViewRibbonMinimizedManager.cs | 10 +- .../View Base/ViewRibbonPopupGroupManager.cs | 10 +- .../View Base/ViewRibbonQATOverflowManager.cs | 4 +- .../View Draw/ViewDrawRibbonAppButton.cs | 4 +- .../ViewDrawRibbonAppMenuRecentDoc.cs | 2 +- .../View Draw/ViewDrawRibbonAppTab.cs | 8 +- .../View Draw/ViewDrawRibbonCaptionArea.cs | 10 +- .../ViewDrawRibbonCompoRightBorder.cs | 2 +- .../View Draw/ViewDrawRibbonComposition.cs | 8 +- .../View Draw/ViewDrawRibbonContextTitle.cs | 6 +- .../View Draw/ViewDrawRibbonDesignBase.cs | 6 +- .../View Draw/ViewDrawRibbonDesignCluster.cs | 2 +- .../ViewDrawRibbonDesignGroupContainer.cs | 2 +- .../ViewDrawRibbonDesignGroupLines.cs | 2 +- .../ViewDrawRibbonDesignGroupTriple.cs | 2 +- .../View Draw/ViewDrawRibbonDropArrow.cs | 4 +- .../View Draw/ViewDrawRibbonGalleryButton.cs | 2 +- .../View Draw/ViewDrawRibbonGalleryItem.cs | 2 +- .../View Draw/ViewDrawRibbonGroup.cs | 8 +- .../View Draw/ViewDrawRibbonGroupButton.cs | 8 +- .../ViewDrawRibbonGroupButtonBackBorder.cs | 10 +- .../ViewDrawRibbonGroupButtonImage.cs | 2 +- .../ViewDrawRibbonGroupButtonText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupCheckBox.cs | 10 +- .../ViewDrawRibbonGroupCheckBoxImage.cs | 2 +- .../ViewDrawRibbonGroupCheckBoxText.cs | 8 +- .../ViewDrawRibbonGroupClusterButton.cs | 8 +- .../ViewDrawRibbonGroupClusterButtonImage.cs | 2 +- .../ViewDrawRibbonGroupClusterButtonText.cs | 8 +- .../ViewDrawRibbonGroupClusterColorButton.cs | 8 +- ...wDrawRibbonGroupClusterColorButtonImage.cs | 2 +- ...ewDrawRibbonGroupClusterColorButtonText.cs | 8 +- .../ViewDrawRibbonGroupClusterEdge.cs | 4 +- .../ViewDrawRibbonGroupClusterSeparator.cs | 4 +- .../ViewDrawRibbonGroupColorButton.cs | 8 +- .../ViewDrawRibbonGroupColorButtonImage.cs | 2 +- .../ViewDrawRibbonGroupColorButtonText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupComboBox.cs | 10 +- .../ViewDrawRibbonGroupCustomControl.cs | 10 +- .../ViewDrawRibbonGroupDateTimePicker.cs | 10 +- .../ViewDrawRibbonGroupDialogButton.cs | 6 +- .../ViewDrawRibbonGroupDomainUpDown.cs | 10 +- .../View Draw/ViewDrawRibbonGroupGallery.cs | 10 +- .../ViewDrawRibbonGroupGalleryImage.cs | 2 +- .../ViewDrawRibbonGroupGalleryText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupImage.cs | 6 +- .../View Draw/ViewDrawRibbonGroupImageBase.cs | 2 +- .../View Draw/ViewDrawRibbonGroupLabel.cs | 8 +- .../ViewDrawRibbonGroupLabelImage.cs | 2 +- .../View Draw/ViewDrawRibbonGroupLabelText.cs | 8 +- .../ViewDrawRibbonGroupMaskedTextBox.cs | 10 +- .../ViewDrawRibbonGroupNumericUpDown.cs | 10 +- .../ViewDrawRibbonGroupRadioButton.cs | 8 +- .../ViewDrawRibbonGroupRadioButtonImage.cs | 2 +- .../ViewDrawRibbonGroupRadioButtonText.cs | 8 +- .../ViewDrawRibbonGroupRichTextBox.cs | 10 +- .../View Draw/ViewDrawRibbonGroupSeparator.cs | 8 +- .../View Draw/ViewDrawRibbonGroupText.cs | 8 +- .../View Draw/ViewDrawRibbonGroupTextBox.cs | 10 +- .../View Draw/ViewDrawRibbonGroupTitle.cs | 6 +- .../View Draw/ViewDrawRibbonGroupTrackBar.cs | 10 +- .../View Draw/ViewDrawRibbonGroupsBorder.cs | 6 +- .../View Draw/ViewDrawRibbonMinimizeBar.cs | 2 +- .../View Draw/ViewDrawRibbonQATBorder.cs | 6 +- .../View Draw/ViewDrawRibbonQATButton.cs | 6 +- .../View Draw/ViewDrawRibbonQATExtraButton.cs | 4 +- .../ViewDrawRibbonQATExtraButtonMini.cs | 2 +- .../View Draw/ViewDrawRibbonQATOverflow.cs | 6 +- .../View Draw/ViewDrawRibbonRecentDocs.cs | 4 +- .../View Draw/ViewDrawRibbonRecentShortcut.cs | 2 +- .../View Draw/ViewDrawRibbonScrollButton.cs | 2 +- .../View Draw/ViewDrawRibbonTab.cs | 8 +- .../View Draw/ViewDrawRibbonTabSep.cs | 2 +- .../View Layout/ViewLayoutRibbonAppButton.cs | 2 +- .../View Layout/ViewLayoutRibbonAppTab.cs | 2 +- .../View Layout/ViewLayoutRibbonCenter.cs | 2 +- .../ViewLayoutRibbonCenterPadding.cs | 2 +- .../ViewLayoutRibbonContextTitles.cs | 6 +- .../ViewLayoutRibbonGalleryButtons.cs | 2 +- .../ViewLayoutRibbonGalleryItems.cs | 16 +- .../ViewLayoutRibbonGroupCluster.cs | 8 +- .../ViewLayoutRibbonGroupContent.cs | 8 +- .../View Layout/ViewLayoutRibbonGroupLines.cs | 8 +- .../ViewLayoutRibbonGroupTriple.cs | 8 +- .../View Layout/ViewLayoutRibbonGroups.cs | 8 +- .../View Layout/ViewLayoutRibbonGroupsArea.cs | 8 +- .../ViewLayoutRibbonQATContents.cs | 6 +- .../ViewLayoutRibbonQATFromOverflow.cs | 4 +- .../View Layout/ViewLayoutRibbonQATMini.cs | 4 +- .../View Layout/ViewLayoutRibbonRowCenter.cs | 4 +- .../View Layout/ViewLayoutRibbonScrollPort.cs | 12 +- .../View Layout/ViewLayoutRibbonScroller.cs | 2 +- .../View Layout/ViewLayoutRibbonSeparator.cs | 2 +- .../View Layout/ViewLayoutRibbonTabs.cs | 6 +- .../View Layout/ViewLayoutRibbonTabsArea.cs | 8 +- .../View Layout/ViewLayoutRibbonTabsSpare.cs | 2 +- .../AccurateText/AccurateText.cs | 10 +- .../AccurateText/AccurateTextMemento.cs | 2 +- .../ButtonSpec/ButtonSpecCollection.cs | 16 +- .../ButtonSpec/ButtonSpecFormFixed.cs | 2 +- .../ButtonSpec/ButtonSpecManagerBase.cs | 8 +- .../ButtonSpec/ButtonSpecManagerDraw.cs | 6 +- .../ButtonSpecRemapByContentBase.cs | 2 +- .../ButtonSpecRemapByContentView.cs | 2 +- .../ButtonSpec/ButtonSpecView.cs | 6 +- .../ButtonSpec/ButtonSpecViewControllers.cs | 6 +- .../KryptonContextMenuColorColumns.cs | 2 +- .../ContextMenu/KryptonContextMenuItemBase.cs | 2 +- .../Controller/ButtonController.cs | 8 +- .../Controller/CheckBoxController.cs | 8 +- .../Controller/ContextMenuController.cs | 6 +- .../Controller/ControllerDefinitions.cs | 2 +- .../Controller/LinkLabelController.cs | 6 +- .../Controller/MenuCheckBoxController.cs | 16 +- .../Controller/MenuCheckButtonController.cs | 16 +- .../Controller/MenuColorBlockController.cs | 16 +- .../Controller/MenuImageSelectController.cs | 16 +- .../Controller/MenuItemController.cs | 14 +- .../Controller/MenuLinkLabelController.cs | 16 +- .../Controller/MenuRadioButtonController.cs | 16 +- .../Controller/MonthCalendarController.cs | 6 +- .../Controller/RadioButtonController.cs | 8 +- .../Controller/SeparatorController.cs | 8 +- .../Controller/TooltipController.cs | 4 +- .../Controller/TrackBarController.cs | 6 +- .../Controls Toolkit/KryptonCheckSet.cs | 10 +- .../Controls Toolkit/KryptonContextMenu.cs | 2 +- .../KryptonCustomPaletteBase.cs | 14 +- .../Controls Toolkit/KryptonDataGridView.cs | 4 +- .../Controls Toolkit/KryptonForm.cs | 6 +- .../Controls Toolkit/KryptonGroupBoxPanel.cs | 6 +- .../Controls Toolkit/KryptonGroupPanel.cs | 6 +- .../Controls Toolkit/KryptonListView.cs | 2 +- .../Controls Toolkit/KryptonManager.cs | 2 +- .../Controls Toolkit/KryptonPanel.cs | 6 +- .../Controls Toolkit/KryptonSplitterPanel.cs | 2 +- .../VisualContainerControlBase.cs | 4 +- .../Controls Visuals/VisualControlBase.cs | 4 +- .../Controls Visuals/VisualForm.cs | 2 +- .../Controls Visuals/VisualPanel.cs | 4 +- .../Controls Visuals/VisualPopup.cs | 2 +- .../Controls Visuals/VisualPopupManager.cs | 4 +- .../Controls Visuals/VisualPopupTooltip.cs | 4 +- .../EventArgs/ButtonSpecEventArgs.cs | 2 +- .../Krypton.Toolkit/General/CommonHelper.cs | 4 +- .../General/CorrectContextControl.cs | 2 +- .../General/DesktopWindowManager.cs | 2 +- .../General/KryptonControlCollection.cs | 2 +- .../General/TypedCollection.cs | 14 +- .../PaletteBack/PaletteBackInheritForced.cs | 4 +- .../PaletteBack/PaletteBackInheritOverride.cs | 4 +- .../PaletteBorder/PaletteBorder.cs | 2 +- .../PaletteBorderInheritForced.cs | 2 +- .../PaletteBorderInheritOverride.cs | 4 +- .../PaletteContent/PaletteContent.cs | 2 +- .../PaletteContentInheritForced.cs | 2 +- .../PaletteContentInheritOverride.cs | 4 +- .../PaletteDouble/PaletteDoubleMetric.cs | 2 +- .../PaletteDouble/PaletteDoubleOverride.cs | 4 +- .../PaletteElementColorInheritOverride.cs | 4 +- .../PaletteElementColorInheritRedirect.cs | 2 +- .../PaletteMetric/PaletteMetricRedirect.cs | 2 +- .../PaletteRedirect/PaletteRedirectGrids.cs | 2 +- .../PaletteRibbon/PaletteRibbonBack.cs | 2 +- .../PaletteRibbonBackInheritRedirect.cs | 2 +- .../PaletteRibbonBackRedirect.cs | 2 +- .../PaletteRibbon/PaletteRibbonDouble.cs | 4 +- .../PaletteRibbonDoubleInheritOverride.cs | 8 +- .../PaletteRibbonDoubleInheritRedirect.cs | 2 +- .../PaletteRibbonDoubleRedirect.cs | 2 +- .../PaletteRibbon/PaletteRibbonGeneral.cs | 2 +- .../PaletteRibbonGeneralInheritRedirect.cs | 2 +- .../PaletteRibbonTextInheritRedirect.cs | 2 +- .../PaletteTab/PaletteTabTriple.cs | 2 +- .../PaletteTab/PaletteTabTripleRedirect.cs | 2 +- .../PaletteTriple/PaletteTriple.cs | 2 +- .../PaletteTriple/PaletteTripleJustImage.cs | 2 +- .../PaletteTriple/PaletteTripleMetric.cs | 2 +- .../PaletteTripleMetricRedirect.cs | 2 +- .../PaletteTriple/PaletteTripleOverride.cs | 4 +- .../Bases/PaletteMicrosoft365Base.cs | 8 +- .../PaletteMicrosoft365BlackDarkMode.cs | 10 +- .../PaletteMicrosoft365BlueDarkMode.cs | 10 +- .../PaletteMicrosoft365BlueLightMode.cs | 10 +- .../PaletteMicrosoft365SilverDarkMode.cs | 10 +- .../PaletteMicrosoft365SilverLightMode.cs | 10 +- .../PaletteMicrosoft365Black.cs | 8 +- .../Bases/PaletteOffice2007Base.cs | 8 +- .../PaletteOffice2007BlackDarkMode.cs | 10 +- .../PaletteOffice2007BlueDarkMode.cs | 10 +- .../PaletteOffice2007BlueLightMode.cs | 10 +- .../PaletteOffice2007SilverDarkMode.cs | 10 +- .../PaletteOffice2007SilverLightMode.cs | 10 +- .../Bases/PaletteOffice2010Base.cs | 8 +- .../PaletteOffice2010BlackDarkMode.cs | 10 +- .../PaletteOffice2010BlueDarkMode.cs | 10 +- .../PaletteOffice2010BlueLightMode.cs | 10 +- .../PaletteOffice2010SilverDarkMode.cs | 10 +- .../PaletteOffice2010SilverLightMode.cs | 10 +- .../Bases/PaletteOffice2013Base.cs | 8 +- .../Official Themes/PaletteOffice2013White.cs | 8 +- .../Base/PaletteVisualStudioBase.cs | 8 +- .../PaletteVisualStudio2010With2007Base.cs | 8 +- .../PaletteVisualStudio2010With2010Base.cs | 8 +- .../PaletteVisualStudio2010With2013Base.cs | 8 +- .../365/PaletteVisualStudio2010With365Base.cs | 8 +- .../Palette Component/KryptonInternalKCT.cs | 2 +- .../KryptonPaletteButtonSpecBase.cs | 4 +- .../KryptonPaletteButtonSpecTyped.cs | 2 +- .../KryptonPaletteButtonSpecs.cs | 2 +- .../KryptonPaletteCheckButtons.cs | 2 +- .../Palette Component/KryptonPaletteCommon.cs | 2 +- .../KryptonPaletteControls.cs | 2 +- .../Palette Component/KryptonPaletteFont.cs | 2 +- .../Palette Component/KryptonPaletteForms.cs | 2 +- .../Palette Component/KryptonPaletteGrids.cs | 2 +- .../KryptonPaletteHeaderGroup.cs | 2 +- .../KryptonPaletteHeaderGroupState.cs | 2 +- .../KryptonPaletteHeaders.cs | 2 +- .../Palette Component/KryptonPaletteImages.cs | 2 +- .../KryptonPaletteInputControls.cs | 2 +- .../Palette Component/KryptonPaletteLabels.cs | 2 +- .../KryptonPaletteNavigator.cs | 2 +- .../KryptonPaletteNavigatorState.cs | 2 +- .../KryptonPaletteNavigatorStateBar.cs | 2 +- .../Palette Component/KryptonPalettePanels.cs | 2 +- .../Palette Component/KryptonPaletteRibbon.cs | 2 +- .../KryptonPaletteSeparators.cs | 2 +- .../Palette Component/KryptonPaletteTMS.cs | 2 +- .../KryptonPaletteTMSBase.cs | 2 +- .../KryptonPaletteTabButtons.cs | 2 +- .../Palette Controls/KryptonColorTable2007.cs | 2 +- .../Palette Controls/KryptonColorTable2010.cs | 2 +- .../Palette Controls/KryptonColorTable2013.cs | 2 +- .../Palette Controls/KryptonColorTable365.cs | 2 +- .../KryptonColorTableMicrosoft365.cs | 2 +- .../KryptonColorTableSparkle.cs | 4 +- .../KryptonColorTableVisualStudio.cs | 2 +- .../KryptonDataGridViewStyles.cs | 2 +- .../KryptonProfessionalKCT.cs | 2 +- ...yptonVisualStudio2010With2007ColorTable.cs | 2 +- ...yptonVisualStudio2010With2010ColorTable.cs | 2 +- ...yptonVisualStudio2010With2013ColorTable.cs | 2 +- ...ualStudio2010WithMicrosoft365ColorTable.cs | 2 +- .../LinkLabelBehaviorInherit.cs | 2 +- .../PaletteBackInheritNode.cs | 2 +- .../Palette Controls/PaletteBorderEdge.cs | 2 +- .../PaletteBorderEdgeRedirect.cs | 2 +- .../PaletteComboBoxJustComboStates.cs | 2 +- .../PaletteComboBoxJustItemStates.cs | 2 +- .../PaletteComboBoxRedirect.cs | 2 +- .../Palette Controls/PaletteComboBoxStates.cs | 4 +- .../PaletteContextMenuRedirect.cs | 2 +- .../PaletteDataGridViewAll.cs | 2 +- .../PaletteDataGridViewBackInherit.cs | 4 +- .../PaletteDataGridViewCells.cs | 2 +- .../PaletteDataGridViewContentInherit.cs | 4 +- .../PaletteDataGridViewContentStates.cs | 2 +- .../PaletteDataGridViewHeaders.cs | 2 +- .../PaletteDataGridViewRedirect.cs | 2 +- .../PaletteDataGridViewTripleCommon.cs | 2 +- .../PaletteDataGridViewTripleRedirect.cs | 2 +- .../PaletteDataGridViewTripleStates.cs | 2 +- .../Palette Controls/PaletteForm.cs | 4 +- .../Palette Controls/PaletteFormRedirect.cs | 4 +- .../PaletteGroupBoxRedirect.cs | 4 +- .../PaletteHeaderButtonRedirect.cs | 2 +- .../Palette Controls/PaletteHeaderGroup.cs | 6 +- .../PaletteHeaderGroupRedirect.cs | 6 +- .../PaletteHeaderPaddingRedirect.cs | 2 +- .../Palette Controls/PaletteHeaderRedirect.cs | 2 +- .../PaletteInputControlBackStates.cs | 2 +- .../PaletteInputControlContentStates.cs | 2 +- .../PaletteInputControlTripleRedirect.cs | 2 +- .../PaletteInputControlTripleStates.cs | 2 +- .../Palette Controls/PaletteListItemTriple.cs | 2 +- .../PaletteListItemTripleRedirect.cs | 2 +- .../PaletteListStateRedirect.cs | 2 +- .../Palette Controls/PaletteNodeOverride.cs | 2 +- .../PaletteRedirectCheckBox.cs | 2 +- .../Palette Controls/PaletteRedirectCommon.cs | 4 +- .../PaletteRedirectContextMenu.cs | 2 +- .../PaletteRedirectDropDownButton.cs | 2 +- .../PaletteRedirectRadioButton.cs | 2 +- .../PaletteRedirectTreeView.cs | 2 +- .../PaletteSeparatorPadding.cs | 4 +- .../PaletteSeparatorPaddingRedirect.cs | 2 +- .../PaletteTrackBarPositionStates.cs | 2 +- .../PaletteTrackBarPositionStatesOverride.cs | 4 +- .../PaletteTrackBarRedirect.cs | 2 +- .../Palette Controls/PaletteTrackBarStates.cs | 6 +- .../PaletteTrackBarStatesOverride.cs | 4 +- .../Palette Controls/PaletteTreeNodeTriple.cs | 2 +- .../PaletteTreeNodeTripleRedirect.cs | 2 +- .../PaletteTreeStateRedirect.cs | 2 +- .../Rendering/KryptonProfessionalRenderer.cs | 2 +- .../Krypton.Toolkit/Rendering/RenderBase.cs | 4 +- .../Rendering/RenderMicrosoft365.cs | 6 +- .../Rendering/RenderOffice2007.cs | 6 +- .../Rendering/RenderOffice2010.cs | 6 +- .../Rendering/RenderOffice2013.cs | 6 +- .../Rendering/RenderSparkle.cs | 18 +- .../Rendering/RenderStandard.cs | 170 +++++++++--------- .../Rendering/RenderVisualStudio.cs | 6 +- .../RenderVisualStudio2010With2007.cs | 6 +- .../RenderVisualStudio2010With2010.cs | 6 +- .../RenderVisualStudio2010With2013.cs | 6 +- .../RenderVisualStudio2010WithMicrosoft365.cs | 6 +- .../Krypton.Toolkit/View Base/ViewBase.cs | 2 +- .../View Base/ViewComposite.cs | 8 +- .../Krypton.Toolkit/View Base/ViewControl.cs | 4 +- .../View Base/ViewDecorator.cs | 2 +- .../Krypton.Toolkit/View Base/ViewLeaf.cs | 4 +- .../Krypton.Toolkit/View Base/ViewManager.cs | 18 +- .../View Draw/ViewDrawBorderEdge.cs | 6 +- .../View Draw/ViewDrawButton.cs | 22 +-- .../View Draw/ViewDrawCanvas.cs | 18 +- .../View Draw/ViewDrawCheckBox.cs | 6 +- .../View Draw/ViewDrawContent.cs | 16 +- .../View Draw/ViewDrawDateTimeButton.cs | 2 +- .../View Draw/ViewDrawDateTimeText.cs | 2 +- .../View Draw/ViewDrawDebug.cs | 6 +- .../View Draw/ViewDrawDocker.cs | 12 +- .../View Draw/ViewDrawDropDownButton.cs | 4 +- .../View Draw/ViewDrawEmptyContent.cs | 6 +- .../View Draw/ViewDrawGroupBoxDocker.cs | 4 +- .../View Draw/ViewDrawMenuCheckBox.cs | 4 +- .../View Draw/ViewDrawMenuCheckButton.cs | 4 +- .../View Draw/ViewDrawMenuColorBlock.cs | 8 +- .../View Draw/ViewDrawMenuColorColumn.cs | 4 +- .../View Draw/ViewDrawMenuColorColumns.cs | 2 +- .../View Draw/ViewDrawMenuHeading.cs | 2 +- .../View Draw/ViewDrawMenuImageCanvas.cs | 6 +- .../View Draw/ViewDrawMenuImageColumn.cs | 2 +- .../View Draw/ViewDrawMenuImageSelectItem.cs | 2 +- .../View Draw/ViewDrawMenuItem.cs | 4 +- .../View Draw/ViewDrawMenuItemContent.cs | 2 +- .../View Draw/ViewDrawMenuLinkLabel.cs | 4 +- .../View Draw/ViewDrawMenuMonthCalendar.cs | 2 +- .../View Draw/ViewDrawMenuRadioButton.cs | 2 +- .../View Draw/ViewDrawMenuSeparator.cs | 6 +- .../View Draw/ViewDrawMonthDayNames.cs | 6 +- .../View Draw/ViewDrawMonthDays.cs | 6 +- .../View Draw/ViewDrawMonthUpDown.cs | 2 +- .../View Draw/ViewDrawPanel.cs | 10 +- .../View Draw/ViewDrawRadioButton.cs | 6 +- .../View Draw/ViewDrawScrollBar.cs | 4 +- .../View Draw/ViewDrawSeparator.cs | 30 ++-- .../View Draw/ViewDrawSplitCanvas.cs | 16 +- .../View Draw/ViewDrawToday.cs | 2 +- .../View Draw/ViewDrawTrackPosition.cs | 4 +- .../View Draw/ViewDrawTrackTP.cs | 2 +- .../View Draw/ViewDrawTrackTicks.cs | 4 +- .../View Draw/ViewDrawTrackTrack.cs | 4 +- .../View Draw/ViewDrawWeekNumbers.cs | 6 +- .../View Layout/ViewLayoutCenter.cs | 4 +- .../View Layout/ViewLayoutColorStack.cs | 2 +- .../View Layout/ViewLayoutControl.cs | 10 +- .../View Layout/ViewLayoutCrumbs.cs | 4 +- .../View Layout/ViewLayoutDocker.cs | 8 +- .../View Layout/ViewLayoutFill.cs | 2 +- .../View Layout/ViewLayoutFit.cs | 2 +- .../View Layout/ViewLayoutMenuItemSelect.cs | 8 +- .../View Layout/ViewLayoutMenuItemsPile.cs | 4 +- .../View Layout/ViewLayoutMetricSpacer.cs | 6 +- .../View Layout/ViewLayoutMonths.cs | 8 +- .../View Layout/ViewLayoutNull.cs | 4 +- .../View Layout/ViewLayoutPadding.cs | 4 +- .../View Layout/ViewLayoutPile.cs | 2 +- .../View Layout/ViewLayoutScrollViewport.cs | 6 +- .../View Layout/ViewLayoutSeparator.cs | 2 +- .../View Layout/ViewLayoutStack.cs | 4 +- .../View Layout/ViewLayoutStretch.cs | 2 +- .../View Layout/ViewLayoutViewport.cs | 2 +- .../View Layout/ViewLayoutWeekCorner.cs | 6 +- .../Workspace/KryptonWorkspaceDesigner.cs | 2 +- .../KryptonWorkspaceSequenceDesigner.cs | 2 +- 533 files changed, 1396 insertions(+), 1393 deletions(-) diff --git a/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs b/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs index e754ae980..00d5bc41e 100644 --- a/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs +++ b/Source/Krypton Components/Krypton.Docking/Control Docking/KryptonStorePage.cs @@ -26,7 +26,7 @@ public class KryptonStorePage : KryptonPage /// /// UniqueName of the page this is placeholding. /// Storage name associated with this page location. - public KryptonStorePage(string uniqueName, string storeName) + public KryptonStorePage([DisallowNull] string uniqueName, string storeName) { Visible = false; UniqueName = uniqueName; diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs index ee230da2b..8a84f48e1 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingControl.cs @@ -40,7 +40,7 @@ public class KryptonDockingControl : DockingElementOpenCollection /// /// Initial name of the element. /// Reference to control derived instance. - public KryptonDockingControl(string name, Control control) + public KryptonDockingControl(string name, [DisallowNull] Control control) : base(name) { if (control == null) @@ -57,7 +57,7 @@ public KryptonDockingControl(string name, Control control) /// Initial name of the element. /// Reference to control derived instance. /// Inner space occupied by a KryptonDockingNavigator. - public KryptonDockingControl(string name, Control control, KryptonDockingNavigator navigator) + public KryptonDockingControl(string name, [DisallowNull] Control control, [DisallowNull] KryptonDockingNavigator navigator) : base(name) { if (control == null) @@ -79,7 +79,7 @@ public KryptonDockingControl(string name, Control control, KryptonDockingNavigat /// Initial name of the element. /// Reference to control derived instance. /// Inner space occupied by a KryptonDockingNavigator. - public KryptonDockingControl(string name, Control control, KryptonDockingWorkspace workspace) + public KryptonDockingControl(string name, [DisallowNull] Control control, [DisallowNull] KryptonDockingWorkspace workspace) : base(name) { if (control == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs index 25461cb63..8acc943a7 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingFloatingWindow.cs @@ -36,7 +36,7 @@ public class KryptonDockingFloatingWindow : DockingElementClosedCollection /// Reference to form that owns the floating windows. /// Reference to form that will own all the floating window. /// Allow window to be minimised. - public KryptonDockingFloatingWindow(string? name, Form owner, KryptonDockingFloatspace floatspace, bool useMinimiseBox) + public KryptonDockingFloatingWindow(string? name, [DisallowNull] Form owner, [DisallowNull] KryptonDockingFloatspace floatspace, bool useMinimiseBox) : base(name) { if (owner == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs index c7473ab73..26889edff 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingManager.cs @@ -491,7 +491,7 @@ public KryptonDockingNavigator ManageNavigator(string name, string storeName, Kr /// /// Comma separated list of names to resolve. /// IDockingElement reference if path was resolved with success; otherwise null. - public override IDockingElement? ResolvePath(string path) + public override IDockingElement? ResolvePath([DisallowNull] string path) { // Cannot resolve a null reference if (path == null) @@ -513,7 +513,7 @@ public KryptonDockingNavigator ManageNavigator(string name, string storeName, Kr /// Show all display elements of the provided page. /// /// Reference to page that should be shown. - public void ShowPage(KryptonPage page) + public void ShowPage([DisallowNull] KryptonPage page) { // Cannot show a null reference if (page == null) @@ -528,7 +528,7 @@ public void ShowPage(KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage(string uniqueName) + public void ShowPage([DisallowNull] string uniqueName) { // Cannot show a null reference if (uniqueName == null) @@ -543,7 +543,7 @@ public void ShowPage(string uniqueName) /// Show all display elements of the provided pages. /// /// Array of references to pages that should be shown. - public void ShowPages(KryptonPage[] pages) + public void ShowPages([DisallowNull] KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -573,7 +573,7 @@ public void ShowPages(KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages(string[] uniqueNames) + public void ShowPages([DisallowNull] string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) @@ -615,7 +615,7 @@ public void ShowAllPages() /// Hide all display elements of the provided page. /// /// Reference to page that should be hidden. - public void HidePage(KryptonPage page) + public void HidePage([DisallowNull] KryptonPage page) { // Cannot hide a null reference if (page == null) @@ -630,7 +630,7 @@ public void HidePage(KryptonPage page) /// Hide all display elements of the provided page. /// /// Unique name of the page that should be hidden. - public void HidePage(string uniqueName) + public void HidePage([DisallowNull] string uniqueName) { // Cannot hide a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -648,7 +648,7 @@ public void HidePage(string uniqueName) /// Hide all display elements of the provided pages. /// /// Array of references to pages that should be hidden. - public void HidePages(KryptonPage[] pages) + public void HidePages([DisallowNull] KryptonPage[] pages) { // Cannot hide a null reference if (pages == null) @@ -679,7 +679,7 @@ public void HidePages(KryptonPage[] pages) /// Hide all display elements of the provided pages. /// /// Array of unique names of the pages that should be hidden. - public void HidePages(string[] uniqueNames) + public void HidePages([DisallowNull] string[] uniqueNames) { // Cannot hide a null reference if (uniqueNames == null) @@ -722,7 +722,7 @@ public void HideAllPages() /// /// Reference to page. /// True if the page is present and showing; otherwise false. - public bool IsPageShowing(KryptonPage page) + public bool IsPageShowing([DisallowNull] KryptonPage page) { // Cannot search for a null reference if (page == null) @@ -738,7 +738,7 @@ public bool IsPageShowing(KryptonPage page) /// /// Unique name of page.. /// True if the page is present and showing; otherwise false. - public bool IsPageShowing(string uniqueName) + public bool IsPageShowing([DisallowNull] string uniqueName) { // Cannot search for a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -764,7 +764,7 @@ public bool IsPageShowing(string uniqueName) /// /// Reference to page that should be removed. /// Should the page be disposed when removed. - public void RemovePage(KryptonPage page, bool disposePage) + public void RemovePage([DisallowNull] KryptonPage page, bool disposePage) { // Cannot remove a null reference if (page == null) @@ -780,7 +780,7 @@ public void RemovePage(KryptonPage page, bool disposePage) /// /// Unique name of the page that should be removed. /// Should the page be disposed when removed. - public void RemovePage(string uniqueName, bool disposePage) + public void RemovePage([DisallowNull] string uniqueName, bool disposePage) { // Cannot remove a null reference if (uniqueName == null) @@ -802,7 +802,7 @@ public void RemovePage(string uniqueName, bool disposePage) /// /// Array of references to pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages(KryptonPage[] pages, bool disposePage) + public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) { // Cannot remove a null reference if (pages == null) @@ -834,7 +834,7 @@ public void RemovePages(KryptonPage[] pages, bool disposePage) /// /// Array of unique names of the pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages(string[] uniqueNames, bool disposePage) + public void RemovePages([DisallowNull] string[] uniqueNames, bool disposePage) { // Cannot remove a null reference if (uniqueNames == null) @@ -880,7 +880,7 @@ public void RemoveAllPages(bool disposePage) /// /// Reference to page that should be found. /// True if the page is present; otherwise false. - public bool ContainsPage(KryptonPage page) + public bool ContainsPage([DisallowNull] KryptonPage page) { // Cannot find a null reference if (page == null) @@ -896,7 +896,7 @@ public bool ContainsPage(KryptonPage page) /// /// Unique name of page that should be found. /// True if the page is present; otherwise false. - public bool ContainsPage(string uniqueName) + public bool ContainsPage([DisallowNull] string uniqueName) { // Cannot find a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -922,7 +922,7 @@ public bool ContainsPage(string uniqueName) /// /// Unique name of page that should be found. /// Reference to page if the named page exists in the docking hierarchy; otherwise false. - public KryptonPage? PageForUniqueName(string uniqueName) + public KryptonPage? PageForUniqueName([DisallowNull] string uniqueName) { // Cannot find a null reference if (uniqueName == null) @@ -944,7 +944,7 @@ public bool ContainsPage(string uniqueName) /// Replace named page with a store placeholder so it can be restored at a later time. /// /// Reference to page that should be replaced. - public void StorePage(KryptonPage page) + public void StorePage([DisallowNull] KryptonPage page) { // Cannot replace a null reference if (page == null) @@ -959,7 +959,7 @@ public void StorePage(KryptonPage page) /// Replace page with a store placeholder so it can be restored at a later time. /// /// Unique name of the page that should be replaced. - public void StorePage(string uniqueName) + public void StorePage([DisallowNull] string uniqueName) { // Cannot replace a null reference if (uniqueName == null) @@ -980,7 +980,7 @@ public void StorePage(string uniqueName) /// Replace named pages with store placeholders so they can be restored at a later time. /// /// Array of references to pages that should be replaced. - public void StorePages(KryptonPage[] pages) + public void StorePages([DisallowNull] KryptonPage[] pages) { // Cannot replace a null reference if (pages == null) @@ -1011,7 +1011,7 @@ public void StorePages(KryptonPage[] pages) /// Replace pages with store placeholders so they can be restored at a later time. /// /// Array of unique names of the pages that should be replaced. - public void StorePages(string[] uniqueNames) + public void StorePages([DisallowNull] string[] uniqueNames) { // Cannot replace a null reference if (uniqueNames == null) @@ -1053,7 +1053,7 @@ public void StoreAllPages() /// Clear away any store pages for the provided pages. /// /// Array of references to pages that should be shown. - public void ClearStoredPages(KryptonPage[] pages) + public void ClearStoredPages([DisallowNull] KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -1083,7 +1083,7 @@ public void ClearStoredPages(KryptonPage[] pages) /// Clear away any store pages for the provided unique named pages. /// /// Array of unique names of the pages that should have store pages removed. - public void ClearStoredPages(string[] uniqueNames) + public void ClearStoredPages([DisallowNull] string[] uniqueNames) { // Cannot clear a null reference if (uniqueNames == null) @@ -1129,7 +1129,7 @@ public void ClearAllStoredPages() /// /// Reference to page. /// Enumeration value indicating docking location. - public DockingLocation FindPageLocation(KryptonPage? page) + public DockingLocation FindPageLocation([DisallowNull] KryptonPage? page) { // Cannot find a null reference if (page == null) @@ -1145,7 +1145,7 @@ public DockingLocation FindPageLocation(KryptonPage? page) /// /// Unique name of the page. /// Enumeration value indicating docking location. - public override DockingLocation FindPageLocation(string uniqueName) + public override DockingLocation FindPageLocation([DisallowNull] string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1168,7 +1168,7 @@ public override DockingLocation FindPageLocation(string uniqueName) /// /// Reference to page. /// IDockingElement reference if page is found; otherwise null. - public IDockingElement? FindPageElement(KryptonPage page) + public IDockingElement? FindPageElement([DisallowNull] KryptonPage page) { // Cannot find a null reference if (page == null) @@ -1184,7 +1184,7 @@ public override DockingLocation FindPageLocation(string uniqueName) /// /// Unique name of the page. /// IDockingElement reference if page is found; otherwise null. - public override IDockingElement? FindPageElement(string uniqueName) + public override IDockingElement? FindPageElement([DisallowNull] string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1208,7 +1208,7 @@ public override DockingLocation FindPageLocation(string uniqueName) /// Location to be searched. /// Reference to page. /// IDockingElement reference if store page is found; otherwise null. - public IDockingElement? FindStorePageElement(DockingLocation location, KryptonPage page) + public IDockingElement? FindStorePageElement(DockingLocation location, [DisallowNull] KryptonPage page) { // Cannot find a null reference if (page == null) @@ -1225,7 +1225,7 @@ public override DockingLocation FindPageLocation(string uniqueName) /// Location to be searched. /// Unique name of the page to be found. /// IDockingElement reference if store page is found; otherwise null. - public override IDockingElement? FindStorePageElement(DockingLocation location, string uniqueName) + public override IDockingElement? FindStorePageElement(DockingLocation location, [DisallowNull] string uniqueName) { // Cannot replace a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1406,7 +1406,7 @@ public override DockingLocation FindPageLocation(string uniqueName) /// Perform the close request for a set of named pages. /// /// Array of unique names that need action performed. - public virtual void CloseRequest(IReadOnlyList uniqueNames) + public virtual void CloseRequest([DisallowNull] IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -1466,7 +1466,7 @@ public virtual void CloseRequest(IReadOnlyList uniqueNames) /// Make the named page auto hidden. /// /// Unique name of page to become auto hidden. - public virtual void MakeAutoHiddenRequest(string uniqueName) + public virtual void MakeAutoHiddenRequest([DisallowNull] string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1531,7 +1531,7 @@ public virtual void MakeAutoHiddenRequest(string uniqueName) /// Make the named page docked. /// /// Unique name of page to become docked. - public virtual void MakeDockedRequest(string uniqueName) + public virtual void MakeDockedRequest([DisallowNull] string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1604,7 +1604,7 @@ public virtual void MakeDockedRequest(string uniqueName) /// Make the named page floating. /// /// Unique name of page to become floating. - public virtual void MakeFloatingRequest(string uniqueName) + public virtual void MakeFloatingRequest([DisallowNull] string uniqueName) { // Cannot process a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -1679,7 +1679,7 @@ public virtual void MakeFloatingRequest(string uniqueName) /// Make the named page workspace tabbed. /// /// Unique name of page to become workspace tabbed. - public virtual void MakeWorkspaceRequest(string uniqueName) + public virtual void MakeWorkspaceRequest([DisallowNull] string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1748,7 +1748,7 @@ public virtual void MakeWorkspaceRequest(string uniqueName) /// Make the named page navigator tabbed. /// /// Unique name of page to become navigator tabbed. - public virtual void MakeNavigatorRequest(string uniqueName) + public virtual void MakeNavigatorRequest([DisallowNull] string uniqueName) { // Cannot process a null reference if (uniqueName == null) @@ -1823,7 +1823,7 @@ public virtual void MakeNavigatorRequest(string uniqueName) /// Reference to page. /// Reference to context menu. /// True if the context menu should be displayed; otherwise false. - public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContextMenu kcm) + public virtual bool ShowPageContextMenuRequest([DisallowNull] KryptonPage? page, [DisallowNull] KryptonContextMenu kcm) { // Cannot action a null reference if (page == null) @@ -1945,7 +1945,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// /// Unique name of page inside docked cell that needs switching. /// KryptonDockingAutoHiddenGroup reference on success; otherwise null. - public virtual KryptonDockingAutoHiddenGroup? SwitchDockedCellToAutoHiddenGroupRequest(string uniqueName) + public virtual KryptonDockingAutoHiddenGroup? SwitchDockedCellToAutoHiddenGroupRequest([DisallowNull] string uniqueName) { // Cannot switch a null reference if (uniqueName == null) @@ -2036,7 +2036,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// /// Unique name of pages inside a docked cell that needs switching. /// KryptonDockingFloatingWindow reference on success; otherwise null. - public virtual KryptonDockingFloatingWindow? SwitchDockedToFloatingWindowRequest(IReadOnlyList uniqueNames) + public virtual KryptonDockingFloatingWindow? SwitchDockedToFloatingWindowRequest([DisallowNull] IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2163,7 +2163,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// /// Unique name of floating pages that need switching. /// KryptonDockingDockspace reference if a new dockspace needed to be created; otherwise false. - public virtual KryptonDockingDockspace? SwitchFloatingToDockedRequest(string[] uniqueNames) + public virtual KryptonDockingDockspace? SwitchFloatingToDockedRequest([DisallowNull] string[] uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2305,7 +2305,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// /// Unique name of floating pages that need switching. /// KryptonDockingFloatingWindow reference on success; otherwise false. - public virtual KryptonDockingFloatingWindow? SwitchFloatingToFloatingWindowRequest(IReadOnlyList uniqueNames) + public virtual KryptonDockingFloatingWindow? SwitchFloatingToFloatingWindowRequest([DisallowNull] IReadOnlyList uniqueNames) { // Cannot action a null reference if (uniqueNames == null) @@ -2409,7 +2409,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// /// Unique name of page inside auto hidden group that needs switching. /// KryptonDockingDockspace reference if a new dockspace needed to be created; otherwise false. - public virtual KryptonDockingDockspace? SwitchAutoHiddenGroupToDockedCellRequest(string uniqueName) + public virtual KryptonDockingDockspace? SwitchAutoHiddenGroupToDockedCellRequest([DisallowNull] string uniqueName) { // Cannot switch a null reference if (uniqueName == null) @@ -2532,7 +2532,7 @@ public virtual bool ShowPageContextMenuRequest(KryptonPage? page, KryptonContext /// KryptonDockingDockspace reference. public virtual KryptonDockingDockspace AddDockspace(string path, DockingEdge edge, - KryptonPage[] pages, + [DisallowNull] KryptonPage[] pages, params KryptonPage[][] stackPages) { // Cannot add a null array @@ -2640,7 +2640,7 @@ public virtual KryptonDockingDockspace AddDockspace(string path, /// KryptonDockingAutoHiddenGroup reference. public virtual KryptonDockingAutoHiddenGroup AddAutoHiddenGroup(string path, DockingEdge edge, - KryptonPage[] pages, + [DisallowNull] KryptonPage[] pages, params KryptonPage[][] extraPages) { // Cannot add a null array @@ -2743,7 +2743,7 @@ public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, /// Initial client size of the floating window. /// KryptonDockingFloatingWindow reference. public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, - KryptonPage[] pages, + [DisallowNull] KryptonPage[] pages, Point location, Size clientSize) { @@ -2802,7 +2802,7 @@ public virtual KryptonDockingFloatingWindow AddFloatingWindow(string path, /// Path for finding the target KryptonDockingWorkspace. /// Array of pages to be added. /// KryptonDockingWorkspace reference. - public virtual KryptonDockingWorkspace AddToWorkspace(string path, KryptonPage[] pages) + public virtual KryptonDockingWorkspace AddToWorkspace(string path, [DisallowNull] KryptonPage[] pages) { // Cannot add a null array if (pages == null) @@ -2839,7 +2839,7 @@ public virtual KryptonDockingWorkspace AddToWorkspace(string path, KryptonPage[] /// Path for finding the target KryptonDockingNavigator. /// Array of pages to be added. /// KryptonDockingNavigator reference. - public virtual KryptonDockingNavigator AddToNavigator(string path, KryptonPage[] pages) + public virtual KryptonDockingNavigator AddToNavigator(string path, [DisallowNull] KryptonPage[] pages) { // Cannot add a null array if (pages == null) @@ -2882,7 +2882,7 @@ public virtual KryptonDockingNavigator AddToNavigator(string path, KryptonPage[] public virtual KryptonDockingDockspace InsertDockspace(string path, DockingEdge edge, int index, - KryptonPage[] pages, + [DisallowNull] KryptonPage[] pages, params KryptonPage[][] stackPages) { // Cannot add a null array @@ -2972,7 +2972,7 @@ public virtual KryptonDockingDockspace InsertDockspace(string path, public virtual KryptonDockingAutoHiddenGroup InsertAutoHiddenGroup(string path, DockingEdge edge, int index, - KryptonPage[] pages, + [DisallowNull] KryptonPage[] pages, params KryptonPage[][] extraPages) { // Cannot add a null array @@ -3042,7 +3042,7 @@ public virtual KryptonDockingAutoHiddenGroup InsertAutoHiddenGroup(string path, /// Control that started the drag operation. /// Set of pages requested to be dragged. public virtual void DoDragDrop(Point screenPoint, Point elementOffset, Control c, - KryptonPageCollection pages) + [DisallowNull] KryptonPageCollection pages) { // Cannot drag a null reference if (pages == null) @@ -3186,7 +3186,7 @@ page is not KryptonStorePage /// Control that started the drag operation. /// Reference to floating window element that should be dragged. public virtual void DoDragDrop(Point screenPoint, Point elementOffset, Control? c, - KryptonDockingFloatingWindow window) + [DisallowNull] KryptonDockingFloatingWindow window) { // Cannot drag a null reference if (window == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs index e76d04a31..f6693c68a 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingNavigator.cs @@ -153,7 +153,7 @@ public void ShowPage(KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage(string uniqueName) + public void ShowPage([DisallowNull] string uniqueName) { // Cannot show a null reference if (string.IsNullOrWhiteSpace(uniqueName)) @@ -198,7 +198,7 @@ public void ShowPages(KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages(string[] uniqueNames) + public void ShowPages([DisallowNull] string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs index e9f8e255c..29597df51 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingSpace.cs @@ -171,7 +171,7 @@ public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage page) = /// Reference to existing workspace cell. /// Index for inserting new pages. /// Array of KryptonPage instances to be added. - public void CellInsert(KryptonWorkspaceCell cell, int index, KryptonPage[]? pages) + public void CellInsert([DisallowNull] KryptonWorkspaceCell cell, int index, KryptonPage[]? pages) { // Demand that pages are not already present DemandPagesNotBePresent(pages); diff --git a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs index 3c60ea638..eca36952a 100644 --- a/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs +++ b/Source/Krypton Components/Krypton.Docking/Elements Impl/KryptonDockingWorkspace.cs @@ -41,7 +41,7 @@ public KryptonDockingWorkspace(string name) /// Reference to workspace to manage. public KryptonDockingWorkspace(string name, string storeName, - KryptonDockableWorkspace workspace) + [DisallowNull] KryptonDockableWorkspace workspace) : base(name, storeName) { SpaceControl = workspace ?? throw new ArgumentNullException(nameof(workspace)); @@ -84,7 +84,7 @@ public override IDockingElement? Parent /// Show all display elements of the provided page. /// /// Reference to page that should be shown. - public void ShowPage(KryptonPage page) + public void ShowPage([DisallowNull] KryptonPage page) { // Cannot show a null reference if (page == null) @@ -99,7 +99,7 @@ public void ShowPage(KryptonPage page) /// Show all display elements of the provided page. /// /// Unique name of the page that should be shown. - public void ShowPage(string uniqueName) + public void ShowPage([DisallowNull] string uniqueName) { // Cannot show a null reference if (uniqueName == null) @@ -114,7 +114,7 @@ public void ShowPage(string uniqueName) /// Show all display elements of the provided pages. /// /// Array of references to pages that should be shown. - public void ShowPages(KryptonPage[] pages) + public void ShowPages([DisallowNull] KryptonPage[] pages) { // Cannot show a null reference if (pages == null) @@ -144,7 +144,7 @@ public void ShowPages(KryptonPage[] pages) /// Show all display elements of the provided pages. /// /// Array of unique names of the pages that should be shown. - public void ShowPages(string[] uniqueNames) + public void ShowPages([DisallowNull] string[] uniqueNames) { // Cannot show a null reference if (uniqueNames == null) @@ -186,7 +186,7 @@ public void ShowAllPages() /// Hide all display elements of the provided page. /// /// Reference to page that should be hidden. - public void HidePage(KryptonPage page) + public void HidePage([DisallowNull] KryptonPage page) { // Cannot hide a null reference if (page == null) @@ -201,7 +201,7 @@ public void HidePage(KryptonPage page) /// Hide all display elements of the provided page. /// /// Unique name of the page that should be hidden. - public void HidePage(string uniqueName) + public void HidePage([DisallowNull] string uniqueName) { // Cannot hide a null reference if (uniqueName == null) @@ -219,7 +219,7 @@ public void HidePage(string uniqueName) /// Hide all display elements of the provided pages. /// /// Array of references to pages that should be hidden. - public void HidePages(KryptonPage[] pages) + public void HidePages([DisallowNull] KryptonPage[] pages) { // Cannot hide a null reference if (pages == null) @@ -250,7 +250,7 @@ public void HidePages(KryptonPage[] pages) /// Hide all display elements of the provided pages. /// /// Array of unique names of the pages that should be hidden. - public void HidePages(string[] uniqueNames) + public void HidePages([DisallowNull] string[] uniqueNames) { // Cannot hide a null reference if (uniqueNames == null) @@ -293,7 +293,7 @@ public void HideAllPages() /// /// Unique name of the page that should be removed. /// Should the page be disposed when removed. - public void RemovePage(string uniqueName, bool disposePage) + public void RemovePage([DisallowNull] string uniqueName, bool disposePage) { // Cannot remove a null reference if (uniqueName == null) @@ -315,7 +315,7 @@ public void RemovePage(string uniqueName, bool disposePage) /// /// Array of references to pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages(KryptonPage[] pages, bool disposePage) + public void RemovePages([DisallowNull] KryptonPage[] pages, bool disposePage) { // Cannot remove a null reference if (pages == null) @@ -347,7 +347,7 @@ public void RemovePages(KryptonPage[] pages, bool disposePage) /// /// Array of unique names of the pages that should be removed. /// Should the page be disposed when removed. - public void RemovePages(string[] uniqueNames, bool disposePage) + public void RemovePages([DisallowNull] string[] uniqueNames, bool disposePage) { // Cannot remove a null reference if (uniqueNames == null) diff --git a/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs b/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs index e9e2e9e18..445206b7c 100644 --- a/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs +++ b/Source/Krypton Components/Krypton.Docking/Event Args/CancelUniqueNameEventArgs.cs @@ -23,7 +23,7 @@ public class CancelUniqueNameEventArgs : UniqueNameEventArgs /// /// Unique name of page. /// Initial value for the cancel property. - public CancelUniqueNameEventArgs(string uniqueName, bool cancel) + public CancelUniqueNameEventArgs([DisallowNull] string uniqueName, bool cancel) : base(uniqueName) => Cancel = cancel; diff --git a/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs b/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs index 530b958b5..d1101ce35 100644 --- a/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs +++ b/Source/Krypton Components/Krypton.Docking/ViewDraw/ViewDrawAutoHiddenTab.cs @@ -30,7 +30,7 @@ internal class ViewDrawAutoHiddenTab : ViewDrawButton, /// /// Reference to the page this tab represents. /// Visual orientation used for drawing the tab. - public ViewDrawAutoHiddenTab(KryptonPage page, + public ViewDrawAutoHiddenTab([DisallowNull] KryptonPage page, VisualOrientation orientation) : base(page.StateDisabled!.CheckButton, page.StateNormal!.CheckButton, diff --git a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs index ed61e0269..7a4d81dda 100644 --- a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs +++ b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavFixed.cs @@ -29,7 +29,7 @@ public abstract class ButtonSpecNavFixed : ButtonSpec /// /// Reference to owning navigator instance. /// Fixed style to use. - protected ButtonSpecNavFixed(KryptonNavigator navigator, + protected ButtonSpecNavFixed([DisallowNull] KryptonNavigator navigator, PaletteButtonSpecStyle fixedStyle) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs index 962864193..b6d4e796f 100644 --- a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs +++ b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs @@ -128,7 +128,7 @@ public enum ButtonSpecRemapTarget /// Reference to button specification. /// Target for remapping the color onto. public ButtonSpecNavRemap(PaletteBase? target, - ButtonSpec buttonSpec, + [DisallowNull] ButtonSpec buttonSpec, ButtonSpecRemapTarget remapTarget) : base(target) { diff --git a/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs b/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs index 63cafaf0b..8fc06a740 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controller/DragViewController.cs @@ -70,7 +70,7 @@ public class DragViewController : GlobalId, /// Initialize a new instance of the DragViewController class. /// /// Target for state changes. - public DragViewController(ViewBase target) + public DragViewController([DisallowNull] ViewBase target) { Debug.Assert(target != null); @@ -268,7 +268,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -322,7 +322,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs b/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs index b04ceac01..73ee78421 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controller/OutlookMiniController.cs @@ -41,7 +41,7 @@ internal class OutlookMiniController : GlobalId, /// Target for state changes. /// Delegate for notifying paint requests. public OutlookMiniController(ViewBase target, - NeedPaintHandler needPaint) + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(needPaint != null); @@ -208,7 +208,7 @@ public virtual void DoubleClick(Point pt) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -252,7 +252,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs index 7a5ca5a16..06dafe189 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigator.cs @@ -1904,7 +1904,7 @@ internal bool NextActionValid return null; } - internal KryptonPage? PreviousActionPage(KryptonPage page) + internal KryptonPage? PreviousActionPage([DisallowNull] KryptonPage page) { Debug.Assert(page != null); @@ -1924,7 +1924,7 @@ internal bool NextActionValid return null; } - internal KryptonPage? NextActionPage(KryptonPage page) + internal KryptonPage? NextActionPage([DisallowNull] KryptonPage page) { Debug.Assert(page != null); @@ -1956,8 +1956,8 @@ internal bool NextActionValid return position; } - internal void ShowPopupPage(KryptonPage? page, - ViewBase? relative, + internal void ShowPopupPage([DisallowNull] KryptonPage? page, + [DisallowNull] ViewBase? relative, EventHandler? finishDelegate) { Debug.Assert(page != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs index c689a5679..2b5133b3e 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Navigator/KryptonNavigatorControlCollection.cs @@ -23,7 +23,7 @@ public class KryptonNavigatorControlCollection : KryptonControlCollection /// Initialize a new instance of the KryptonNavigatorControlCollection class. /// /// Control containing this collection. - public KryptonNavigatorControlCollection(KryptonNavigator owner) + public KryptonNavigatorControlCollection([DisallowNull] KryptonNavigator owner) : base(owner) { Debug.Assert(owner != null); @@ -35,7 +35,7 @@ public KryptonNavigatorControlCollection(KryptonNavigator owner) /// Adds the specified control to the control collection. /// /// The KryptonPage to add to the control collection. - public override void Add(Control value) + public override void Add([DisallowNull] Control value) { Debug.Assert(value != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs b/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs index 8bc57a8e4..5d6a605df 100644 --- a/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs +++ b/Source/Krypton Components/Krypton.Navigator/Controls Visuals/VisualPopupPage.cs @@ -37,8 +37,8 @@ static VisualPopupPage() => /// Reference to owning navigator control. /// Reference to page for display. /// Drawing renderer. - public VisualPopupPage(KryptonNavigator navigator, - KryptonPage page, + public VisualPopupPage([DisallowNull] KryptonNavigator navigator, + [DisallowNull] KryptonPage page, IRenderer? renderer) : base(renderer, true) { diff --git a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs index f0ab19429..1aed9b7b6 100644 --- a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs +++ b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedback.cs @@ -77,10 +77,10 @@ protected virtual void Dispose(bool disposing) /// Drawing renderer. /// Drag data associated with drag operation. /// List of all drag targets. - public virtual void Start(IPaletteDragDrop paletteDragDrop, - IRenderer renderer, - PageDragEndData pageDragEndData, - DragTargetList dragTargets) + public virtual void Start([DisallowNull] IPaletteDragDrop paletteDragDrop, + [DisallowNull] IRenderer renderer, + [DisallowNull] PageDragEndData pageDragEndData, + [DisallowNull] DragTargetList dragTargets) { Debug.Assert(paletteDragDrop != null); Debug.Assert(renderer != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs index f82cf43f7..573dbb024 100644 --- a/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs +++ b/Source/Krypton Components/Krypton.Navigator/Dragging/DragFeedbackSolid.cs @@ -48,7 +48,7 @@ protected override void Dispose(bool disposing) /// List of all drag targets. public override void Start(IPaletteDragDrop paletteDragDrop, IRenderer renderer, - PageDragEndData? pageDragEndData, + [DisallowNull] PageDragEndData? pageDragEndData, DragTargetList dragTargets) { base.Start(paletteDragDrop, renderer, pageDragEndData, dragTargets); diff --git a/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs b/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs index f2be0f2e8..cba50d6bd 100644 --- a/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs +++ b/Source/Krypton Components/Krypton.Navigator/General/PageToToolTipMapping.cs @@ -32,7 +32,7 @@ internal class PageToToolTipMapping : IContentValues /// How to map the image from the page to the tooltip. /// How to map the text from the page to the tooltip. /// How to map the extra text from the page to the tooltip. - public PageToToolTipMapping(KryptonPage page, + public PageToToolTipMapping([DisallowNull] KryptonPage page, MapKryptonPageImage mapImage, MapKryptonPageText mapText, MapKryptonPageText mapExtraText) diff --git a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs index f6af155c7..dc95e0d06 100644 --- a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs +++ b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonNavigatorDesigner.cs @@ -34,7 +34,7 @@ public class KryptonNavigatorDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs index a73ebf228..dac246126 100644 --- a/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs +++ b/Source/Krypton Components/Krypton.Navigator/Navigator/KryptonPageDesigner.cs @@ -28,7 +28,7 @@ internal class KryptonPageDesigner : ScrollableControlDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Perform common base class initializating base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs b/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs index 41efa8d43..7940e42b1 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/HeaderGroupMappingBase.cs @@ -31,7 +31,7 @@ public abstract class HeaderGroupMappingBase : HeaderValuesBase /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - protected HeaderGroupMappingBase(KryptonNavigator navigator, + protected HeaderGroupMappingBase([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) : base(needPaint) { diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs index 17399115f..66f83a93b 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorBar.cs @@ -53,7 +53,7 @@ public class NavigatorBar : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorBar(KryptonNavigator navigator, + public NavigatorBar([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs index 78168c8b9..525d89279 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorButton.cs @@ -46,7 +46,7 @@ public class NavigatorButton : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorButton(KryptonNavigator navigator, + public NavigatorButton([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs index 382f34f0a..90c7a7f6f 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorGroup.cs @@ -30,7 +30,7 @@ public class NavigatorGroup : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorGroup(KryptonNavigator navigator, + public NavigatorGroup([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs index cd57a189a..af996f18f 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorHeader.cs @@ -38,7 +38,7 @@ public class NavigatorHeader : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorHeader(KryptonNavigator navigator, + public NavigatorHeader([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs index 328671050..a8aa7c696 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlook.cs @@ -43,7 +43,7 @@ public class NavigatorOutlook : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlook(KryptonNavigator navigator, + public NavigatorOutlook([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs index 1d59df998..ee27640f0 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookFull.cs @@ -34,7 +34,7 @@ public class NavigatorOutlookFull : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlookFull(KryptonNavigator navigator, + public NavigatorOutlookFull([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs index 2e3266268..482beb263 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorOutlookMini.cs @@ -35,7 +35,7 @@ public class NavigatorOutlookMini : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorOutlookMini(KryptonNavigator navigator, + public NavigatorOutlookMini([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs index 51da38599..7b59f9d89 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPanel.cs @@ -29,7 +29,7 @@ public class NavigatorPanel : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorPanel(KryptonNavigator navigator, + public NavigatorPanel([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs index bc300d202..f130b0983 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorPopupPages.cs @@ -37,8 +37,8 @@ public class NavigatorPopupPages : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorPopupPages(KryptonNavigator navigator, - NeedPaintHandler needPaint) + public NavigatorPopupPages([DisallowNull] KryptonNavigator navigator, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(navigator != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs index e5e8fed03..4b784d138 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorStack.cs @@ -36,7 +36,7 @@ public class NavigatorStack : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorStack(KryptonNavigator navigator, + public NavigatorStack([DisallowNull] KryptonNavigator navigator, NeedPaintHandler needPaint) { Debug.Assert(navigator != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs index 9c7c44508..90d7b1808 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/NavigatorToolTips.cs @@ -28,8 +28,8 @@ public class NavigatorToolTips : Storage /// /// Reference to owning navigator instance. /// Delegate for notifying paint requests. - public NavigatorToolTips(KryptonNavigator navigator, - NeedPaintHandler needPaint) + public NavigatorToolTips([DisallowNull] KryptonNavigator navigator, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(navigator != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs index 2809fe084..fadd85e68 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteBarRedirect.cs @@ -36,7 +36,7 @@ public class PaletteBarRedirect : PaletteMetricRedirect /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteBarRedirect(PaletteRedirect redirect, + public PaletteBarRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs index 020a5a25b..6c9ead960 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavContent.cs @@ -60,7 +60,7 @@ public InternalStorage() /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteNavContent(IPaletteContent inherit, + public PaletteNavContent([DisallowNull] IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs index 868006076..cfc967200 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroup.cs @@ -30,7 +30,7 @@ public class PaletteNavigatorHeaderGroup : PaletteHeaderGroup public PaletteNavigatorHeaderGroup(PaletteHeaderGroupRedirect? inheritHeaderGroup, PaletteHeaderPaddingRedirect inheritHeaderPrimary, PaletteHeaderPaddingRedirect inheritHeaderSecondary, - PaletteHeaderPaddingRedirect inheritHeaderBar, + [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderBar, PaletteHeaderPaddingRedirect inheritHeaderOverflow, NeedPaintHandler needPaint) : base(inheritHeaderGroup!, inheritHeaderPrimary, diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs index eae62396c..9038b3a60 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteNavigatorHeaderGroupRedirect.cs @@ -41,8 +41,8 @@ public PaletteNavigatorHeaderGroupRedirect(PaletteRedirect? redirect, public PaletteNavigatorHeaderGroupRedirect(PaletteRedirect? redirectHeaderGroup, PaletteRedirect? redirectHeaderPrimary, PaletteRedirect? redirectHeaderSecondary, - PaletteRedirect? redirectHeaderBar, - PaletteRedirect? redirectHeaderOverflow, + [DisallowNull] PaletteRedirect? redirectHeaderBar, + [DisallowNull] PaletteRedirect? redirectHeaderOverflow, NeedPaintHandler needPaint) : base(redirectHeaderGroup!, redirectHeaderPrimary!, redirectHeaderSecondary!, needPaint) diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs index 9d5add887..3c93b4d67 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs @@ -30,7 +30,7 @@ public class PaletteRibbonGeneralNavRedirect : Storage, /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteRibbonGeneralNavRedirect(PaletteRedirect redirect, + public PaletteRibbonGeneralNavRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs index a263291c8..1dea7c452 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContent.cs @@ -30,9 +30,9 @@ public class PaletteRibbonTabContent : Storage /// Source for inheriting palette ribbon text. /// Source for inheriting palette content. /// Delegate for notifying paint requests. - public PaletteRibbonTabContent(IPaletteRibbonBack paletteBack, - IPaletteRibbonText paletteText, - IPaletteContent paletteContent, + public PaletteRibbonTabContent([DisallowNull] IPaletteRibbonBack paletteBack, + [DisallowNull] IPaletteRibbonText paletteText, + [DisallowNull] IPaletteContent paletteContent, NeedPaintHandler needPaint) { Debug.Assert(paletteBack != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs index 5453e3aa2..deca736fa 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentInheritOverride.cs @@ -39,12 +39,12 @@ public class PaletteRibbonTabContentInheritOverride : PaletteRibbonDoubleInherit /// Backup inheritance text. /// Backup inheritance content. /// Palette state to override. - public PaletteRibbonTabContentInheritOverride(IPaletteRibbonBack primaryBack, - IPaletteRibbonText primaryText, - IPaletteContent primaryContent, - IPaletteRibbonBack backupBack, - IPaletteRibbonText backupText, - IPaletteContent backupContent, + public PaletteRibbonTabContentInheritOverride([DisallowNull] IPaletteRibbonBack primaryBack, + [DisallowNull] IPaletteRibbonText primaryText, + [DisallowNull] IPaletteContent primaryContent, + [DisallowNull] IPaletteRibbonBack backupBack, + [DisallowNull] IPaletteRibbonText backupText, + [DisallowNull] IPaletteContent backupContent, PaletteState state) { Debug.Assert(primaryBack != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs index 8e193d9a2..483576fbe 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonTabContentRedirect.cs @@ -29,7 +29,7 @@ public class PaletteRibbonTabContentRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteRibbonTabContentRedirect(PaletteRedirect redirect, + public PaletteRibbonTabContentRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs b/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs index 1cacd2d6c..31e7575fe 100644 --- a/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs +++ b/Source/Krypton Components/Krypton.Navigator/Palette/RibbonTabToContent.cs @@ -26,9 +26,9 @@ internal class RibbonTabToContent : IPaletteContent /// Source for general ribbon settings. /// Source for ribbon tab settings. /// Source for content settings. - public RibbonTabToContent(IPaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonTabText, - IPaletteContent content) + public RibbonTabToContent([DisallowNull] IPaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonTabText, + [DisallowNull] IPaletteContent content) { Debug.Assert(ribbonGeneral != null); Debug.Assert(ribbonTabText != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs index 068a8fa25..484df4ac0 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderBase.cs @@ -79,8 +79,8 @@ public PaletteRedirect? Redirector /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public virtual void Construct(KryptonNavigator navigator, - ViewManager manager, + public virtual void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { Debug.Assert(navigator != null, $"{nameof(navigator)} != null"); @@ -151,7 +151,7 @@ public virtual void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public virtual void PageAppearanceChanged(KryptonPage page, string property) + public virtual void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) { } diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs index d570dbd9a..89dde0c71 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderGroup.cs @@ -30,7 +30,7 @@ internal class ViewBuilderGroup : ViewBuilderBase /// Reference to current manager. /// Palette redirector. public override void Construct(KryptonNavigator navigator, - ViewManager manager, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs index 86fe6e293..d8289ace5 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderBarTabGroup.cs @@ -580,7 +580,7 @@ private void SetHeaderPosition(ViewDrawCanvas canvas, } } - private void SetPalettes(PaletteHeaderGroup? palette) + private void SetPalettes([DisallowNull] PaletteHeaderGroup? palette) { _viewHeadingPrimary.SetPalettes(palette.HeaderPrimary.Back, palette.HeaderPrimary.Border, palette.HeaderPrimary); _viewHeadingSecondary.SetPalettes(palette.HeaderSecondary.Back, palette.HeaderSecondary.Border, palette.HeaderSecondary); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs index 9ce63a3b9..2ca652db7 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderHeaderGroup.cs @@ -29,8 +29,8 @@ internal class ViewBuilderHeaderGroup : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct(KryptonNavigator navigator, - ViewManager manager, + public override void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -161,7 +161,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged(KryptonPage page, string property) + public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs index 83d86cdd4..9a0bf12e2 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderItemBase.cs @@ -38,8 +38,8 @@ internal abstract class ViewBuilderItemBase : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct(KryptonNavigator navigator, - ViewManager manager, + public override void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -231,7 +231,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged(KryptonPage page, string property) + public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs index b6ce2fb2b..ba6f0b4a5 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderOutlookBase.cs @@ -280,8 +280,8 @@ public void SeparatorNotMoved() /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct(KryptonNavigator navigator, - ViewManager manager, + public override void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -470,7 +470,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged(KryptonPage page, string property) + public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs index 4b13e2ed1..18c83ec37 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderPanel.cs @@ -29,8 +29,8 @@ internal class ViewBuilderPanel : ViewBuilderBase /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct(KryptonNavigator navigator, - ViewManager manager, + public override void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs index 9091b256e..d414e8920 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewBuilderStackCheckButtonBase.cs @@ -38,8 +38,8 @@ protected class PageToButtonEdge : Dictionary { /// Reference to navigator instance. /// Reference to current manager. /// Palette redirector. - public override void Construct(KryptonNavigator navigator, - ViewManager manager, + public override void Construct([DisallowNull] KryptonNavigator navigator, + [DisallowNull] ViewManager manager, PaletteRedirect? redirector) { // Let base class perform common operations @@ -185,7 +185,7 @@ public override void PageEnabledStateChanged(KryptonPage? page) /// /// Page that has changed. /// Name of property that has changed. - public override void PageAppearanceChanged(KryptonPage page, string property) + public override void PageAppearanceChanged([DisallowNull] KryptonPage page, [DisallowNull] string property) { Debug.Assert(page != null); Debug.Assert(property != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs index b22abf8eb..087243f51 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Builder/ViewletHeaderGroup.cs @@ -35,9 +35,9 @@ internal class ViewletHeaderGroup /// Reference to navigator instance. /// Palette redirector. /// Delegate for notifying paint requests. - public ViewletHeaderGroup(KryptonNavigator navigator, + public ViewletHeaderGroup([DisallowNull] KryptonNavigator navigator, PaletteRedirect? redirector, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(navigator != null); Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs index e6447d4f1..4607ab4e3 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavCheckButtonBase.cs @@ -102,7 +102,7 @@ public ViewDrawNavCheckButtonBase(KryptonNavigator navigator, /// Source for pressed state values. /// Source for selected state values. /// Source for focused state values. - public ViewDrawNavCheckButtonBase(KryptonNavigator navigator, + public ViewDrawNavCheckButtonBase([DisallowNull] KryptonNavigator navigator, KryptonPage? page, VisualOrientation orientation, IPaletteTriple stateDisabled, diff --git a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs index e473102d8..4cd69c1f5 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Draw/ViewDrawNavRibbonTab.cs @@ -65,8 +65,8 @@ internal class ViewDrawNavRibbonTab : ViewComposite, /// /// Owning navigator instance. /// Page this ribbon tab represents. - public ViewDrawNavRibbonTab(KryptonNavigator navigator, - KryptonPage page) + public ViewDrawNavRibbonTab([DisallowNull] KryptonNavigator navigator, + [DisallowNull] KryptonPage page) { Debug.Assert(navigator != null); Debug.Assert(page != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs index a619ff0b8..5bbcbbb52 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutBar.cs @@ -296,7 +296,7 @@ public void SetMetrics(IPaletteMetric paletteMetric, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -814,7 +814,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs index cbe04a800..3fe7dc5e9 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutDockerOverlap.cs @@ -30,9 +30,9 @@ internal class ViewLayoutDockerOverlap : ViewLayoutDocker /// Canvas used to recover border width/rounding for overlapping. /// Overlapping element. /// Tab item container element. - public ViewLayoutDockerOverlap(ViewDrawCanvas drawCanvas, - ViewLayoutInsetOverlap layoutOverlap, - ViewLayoutBarForTabs layoutTabs) + public ViewLayoutDockerOverlap([DisallowNull] ViewDrawCanvas drawCanvas, + [DisallowNull] ViewLayoutInsetOverlap layoutOverlap, + [DisallowNull] ViewLayoutBarForTabs layoutTabs) { Debug.Assert(drawCanvas != null); Debug.Assert(layoutOverlap != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs index 401034263..86d167d09 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutInsetOverlap.cs @@ -27,7 +27,7 @@ internal class ViewLayoutInsetOverlap : ViewComposite /// /// Initialize a new instance of the ViewLayoutInsetOverlap class. /// - public ViewLayoutInsetOverlap(ViewDrawCanvas drawCanvas) + public ViewLayoutInsetOverlap([DisallowNull] ViewDrawCanvas drawCanvas) { Debug.Assert(drawCanvas != null); @@ -92,7 +92,7 @@ public float Rounding /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -118,7 +118,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs index 979ccb865..b811003ec 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookFull.cs @@ -33,7 +33,7 @@ internal class ViewLayoutOutlookFull : ViewLayoutScrollViewport /// Animate changes in the viewport. /// Is the viewport vertical. /// Delegate for notifying paint requests. - public ViewLayoutOutlookFull(ViewBuilderOutlookBase viewBuilder, + public ViewLayoutOutlookFull([DisallowNull] ViewBuilderOutlookBase viewBuilder, VisualControl rootControl, ViewBase viewportFiller, PaletteBorderEdge paletteBorderEdge, diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs index 80fba7876..de71b1b9f 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutOutlookMini.cs @@ -22,7 +22,7 @@ internal class ViewLayoutOutlookMini : ViewLayoutDocker /// Initialize a new instance of the ViewLayoutOutlookMini class. /// /// View builder reference. - public ViewLayoutOutlookMini(ViewBuilderOutlookBase viewBuilder) + public ViewLayoutOutlookMini([DisallowNull] ViewBuilderOutlookBase viewBuilder) { Debug.Assert(viewBuilder != null); ViewBuilder = viewBuilder!; diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs index 07c511c91..736380f96 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageHide.cs @@ -31,7 +31,7 @@ internal class ViewLayoutPageHide : ViewLayoutNull /// /// Initialize a new instance of the ViewLayoutPageHide class. /// - public ViewLayoutPageHide(KryptonNavigator navigator) + public ViewLayoutPageHide([DisallowNull] KryptonNavigator navigator) { Debug.Assert(navigator != null); @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return Size.Empty; @@ -64,7 +64,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs index 3b53e8471..ba55ba1e9 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPageShow.cs @@ -26,7 +26,7 @@ internal class ViewLayoutPageShow : ViewLayoutNull /// /// Initialize a new instance of the ViewLayoutPageShow class. /// - public ViewLayoutPageShow(KryptonNavigator navigator) + public ViewLayoutPageShow([DisallowNull] KryptonNavigator navigator) { Debug.Assert(navigator != null); @@ -60,7 +60,7 @@ public void SetMinimumAsPreferred(bool minimum) => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -91,7 +91,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs index eb57ab1ba..b027ebcc3 100644 --- a/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs +++ b/Source/Krypton Components/Krypton.Navigator/View Layout/ViewLayoutPopupPage.cs @@ -28,8 +28,8 @@ internal class ViewLayoutPopupPage : ViewLayoutNull /// /// Reference to owning navigator control. /// Page to the positioned. - public ViewLayoutPopupPage(KryptonNavigator navigator, - KryptonPage page) + public ViewLayoutPopupPage([DisallowNull] KryptonNavigator navigator, + [DisallowNull] KryptonPage page) { Debug.Assert(navigator != null); Debug.Assert(page != null); @@ -53,7 +53,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _page.GetPreferredSize(context!.DisplayRectangle.Size); @@ -63,7 +63,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs index cdf5e7cc1..d62c09572 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecExpandRibbon.cs @@ -28,7 +28,7 @@ public class ButtonSpecExpandRibbon : ButtonSpec /// Initialize a new instance of the ButtonSpecExpandRibbon class. /// /// Reference to owning ribbon control. - public ButtonSpecExpandRibbon(KryptonRibbon ribbon) + public ButtonSpecExpandRibbon([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs index 22c346e51..9cdfc8354 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecManagerLayoutAppButton.cs @@ -36,7 +36,7 @@ public class ButtonSpecManagerLayoutAppButton : ButtonSpecManagerLayout /// Delegate for notifying paint requests. public ButtonSpecManagerLayoutAppButton(ViewContextMenuManager viewManager, Control control, - PaletteRedirect? redirector, + [DisallowNull] PaletteRedirect? redirector, ButtonSpecCollectionBase variableSpecs, ButtonSpecCollectionBase? fixedSpecs, ViewLayoutDocker[] viewDockers, diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs index 8514b49a0..76359bc62 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildClose.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildClose : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildClose class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildClose(KryptonRibbon ribbon) + public ButtonSpecMdiChildClose([DisallowNull] KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantClose) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs index da08df8a3..aeaa8fa23 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildMin.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildMin : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildMin class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildMin(KryptonRibbon ribbon) + public ButtonSpecMdiChildMin([DisallowNull] KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantMin) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs index 9854a7657..e13cb2652 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMdiChildRestore.cs @@ -28,7 +28,7 @@ public class ButtonSpecMdiChildRestore : ButtonSpecMdiChildFixed /// Initialize a new instance of the ButtonSpecMdiChildRestore class. /// /// Reference to owning ribbon control. - public ButtonSpecMdiChildRestore(KryptonRibbon ribbon) + public ButtonSpecMdiChildRestore([DisallowNull] KryptonRibbon ribbon) : base(PaletteButtonSpecStyle.PendantRestore) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs index 3b7dc4df7..c0f9e29c1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs +++ b/Source/Krypton Components/Krypton.Ribbon/ButtonSpec/ButtonSpecMinimizeRibbon.cs @@ -28,7 +28,7 @@ public class ButtonSpecMinimizeRibbon : ButtonSpec /// Initialize a new instance of the ButtonSpecMinimizeRibbon class. /// /// Reference to owning ribbon control. - public ButtonSpecMinimizeRibbon(KryptonRibbon ribbon) + public ButtonSpecMinimizeRibbon([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs index 265fe2f6c..ea8f4bd67 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/AppButtonController.cs @@ -231,7 +231,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs index 4fe1574d7..b3dc78573 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/AppTabController.cs @@ -226,7 +226,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs index 34e40e1b6..4a2f0f733 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecAppButtonController.cs @@ -48,7 +48,7 @@ public ButtonSpecAppButtonController(ViewContextMenuManager viewManager, /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public override void KeyDown(Control c, KeyEventArgs e) + public override void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -97,7 +97,7 @@ public override void KeyDown(Control c, KeyEventArgs e) /// /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. - public override void KeyPress(Control c, KeyPressEventArgs e) + public override void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs index eeb2b5038..5832865d9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ButtonSpecRibbonController.cs @@ -248,7 +248,7 @@ public override void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public override void LostFocus(Control c) + public override void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs index 88a1b0b0c..11ad1b52f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/CollapsedGroupController.cs @@ -44,9 +44,9 @@ internal class CollapsedGroupController : GlobalId, /// Reference to owning control instance. /// View element that owns this controller. /// Paint delegate for notifying visual changes. - public CollapsedGroupController(KryptonRibbon ribbon, - ViewLayoutDocker target, - NeedPaintHandler needPaint) + public CollapsedGroupController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewLayoutDocker target, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); @@ -195,7 +195,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { HasFocus = false; OnNeedPaint(false, _target.ClientRectangle); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs index be1072988..3e39b81f2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ComboBoxController.cs @@ -35,9 +35,9 @@ internal class ComboBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public ComboBoxController(KryptonRibbon ribbon, - KryptonRibbonGroupComboBox comboBox, - ViewDrawRibbonGroupComboBox target) + public ComboBoxController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupComboBox comboBox, + [DisallowNull] ViewDrawRibbonGroupComboBox target) { Debug.Assert(ribbon != null); Debug.Assert(comboBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs index d8fe57e3d..b7e4ccfa5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ContextTitleController.cs @@ -30,7 +30,7 @@ internal class ContextTitleController : GlobalId, /// Initialize a new instance of the ContextTitleController class. /// /// Reference to owning ribbon instance. - public ContextTitleController(KryptonRibbon ribbon) + public ContextTitleController([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs index 72f3cae72..1abd4f2b6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/CustomControlController.cs @@ -35,9 +35,9 @@ internal class CustomControlController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public CustomControlController(KryptonRibbon ribbon, - KryptonRibbonGroupCustomControl customControl, - ViewDrawRibbonGroupCustomControl target) + public CustomControlController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupCustomControl customControl, + [DisallowNull] ViewDrawRibbonGroupCustomControl target) { Debug.Assert(ribbon != null); Debug.Assert(customControl != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs index 2d56be16b..4ee32dbaf 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DateTimePickerController.cs @@ -35,9 +35,9 @@ internal class DateTimePickerController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public DateTimePickerController(KryptonRibbon ribbon, - KryptonRibbonGroupDateTimePicker dateTimePicker, - ViewDrawRibbonGroupDateTimePicker target) + public DateTimePickerController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupDateTimePicker dateTimePicker, + [DisallowNull] ViewDrawRibbonGroupDateTimePicker target) { Debug.Assert(ribbon != null); Debug.Assert(dateTimePicker != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs index aec565c4c..a76e7a7da 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DialogLauncherButtonController.cs @@ -59,7 +59,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs index 7a00a00fd..10229db51 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/DomainUpDownController.cs @@ -35,9 +35,9 @@ internal class DomainUpDownController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public DomainUpDownController(KryptonRibbon ribbon, - KryptonRibbonGroupDomainUpDown domainUpDown, - ViewDrawRibbonGroupDomainUpDown target) + public DomainUpDownController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupDomainUpDown domainUpDown, + [DisallowNull] ViewDrawRibbonGroupDomainUpDown target) { Debug.Assert(ribbon != null); Debug.Assert(domainUpDown != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs index 4774c5da4..18381fa89 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryButtonController.cs @@ -42,7 +42,7 @@ internal class GalleryButtonController : GlobalId, /// Target for state changes. /// Delegate for notifying paint requests. /// Does the button repeat when pressed. - public GalleryButtonController(ViewBase target, + public GalleryButtonController([DisallowNull] ViewBase target, NeedPaintHandler needPaint, bool repeatTimer) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs index 914c2e158..7ad3c8b22 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryController.cs @@ -35,9 +35,9 @@ internal class GalleryController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public GalleryController(KryptonRibbon ribbon, - KryptonRibbonGroupGallery gallery, - ViewDrawRibbonGroupGallery target) + public GalleryController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupGallery gallery, + [DisallowNull] ViewDrawRibbonGroupGallery target) { Debug.Assert(ribbon != null); Debug.Assert(gallery != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs index 1f2622765..208db2809 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GalleryItemController.cs @@ -43,8 +43,8 @@ internal class GalleryItemController : GlobalId, /// Target for state changes. /// Reference to layout of the image items. /// Delegate for notifying paint requests. - public GalleryItemController(ViewDrawRibbonGalleryItem target, - ViewLayoutRibbonGalleryItems layout, + public GalleryItemController([DisallowNull] ViewDrawRibbonGalleryItem target, + [DisallowNull] ViewLayoutRibbonGalleryItems layout, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -230,7 +230,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion @@ -241,7 +241,7 @@ public void LostFocus(Control c) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -309,7 +309,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs index a7d7b5675..ddef15d99 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupButtonController.cs @@ -59,9 +59,9 @@ internal class GroupButtonController : GlobalId, /// Source control instance. /// Target for state changes. /// Delegate for notifying paint requests. - public GroupButtonController(KryptonRibbon ribbon, - ViewDrawRibbonGroupButtonBackBorder target, - NeedPaintHandler needPaint) + public GroupButtonController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewDrawRibbonGroupButtonBackBorder target, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); @@ -374,7 +374,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs index 4417bbfd1..1f724524c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupCheckBoxController.cs @@ -53,10 +53,10 @@ internal class GroupCheckBoxController : GlobalId, /// Target for main element changes. /// Target for image state changes. /// Delegate for notifying paint requests. - public GroupCheckBoxController(KryptonRibbon ribbon, - ViewBase targetMain, - ViewDrawRibbonGroupCheckBoxImage targetImage, - NeedPaintHandler needPaint) + public GroupCheckBoxController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewBase targetMain, + [DisallowNull] ViewDrawRibbonGroupCheckBoxImage targetImage, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(targetMain != null); @@ -253,7 +253,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs index 95d21564c..5a9a457bc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/GroupRadioButtonController.cs @@ -53,10 +53,10 @@ internal class GroupRadioButtonController : GlobalId, /// Target for main element changes. /// Target for image state changes. /// Delegate for notifying paint requests. - public GroupRadioButtonController(KryptonRibbon ribbon, - ViewBase targetMain, - ViewDrawRibbonGroupRadioButtonImage targetImage, - NeedPaintHandler needPaint) + public GroupRadioButtonController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewBase targetMain, + [DisallowNull] ViewDrawRibbonGroupRadioButtonImage targetImage, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(targetMain != null); @@ -253,7 +253,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; UpdateTargetState(Point.Empty); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs index de33a5fe4..b0c68c3b9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftDownButtonController.cs @@ -43,9 +43,9 @@ internal class LeftDownButtonController : GlobalId, /// Reference to owning ribbon instance. /// Target for state changes. /// Delegate for notifying changes in display. - public LeftDownButtonController(KryptonRibbon ribbon, - ViewBase target, - NeedPaintHandler needPaint) + public LeftDownButtonController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewBase target, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(target != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs index a14a9bb22..0550dba3e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/LeftUpButtonController.cs @@ -41,8 +41,8 @@ internal class LeftUpButtonController : GlobalId, /// Reference to owning ribbon instance. /// Target for state changes. /// Delegate for notifying paint requests. - public LeftUpButtonController(KryptonRibbon ribbon, - ViewBase target, + public LeftUpButtonController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs index bf8a857dc..4ae8b8ff2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/MaskedTextBoxController.cs @@ -35,9 +35,9 @@ internal class MaskedTextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public MaskedTextBoxController(KryptonRibbon ribbon, - KryptonRibbonGroupMaskedTextBox maskedTextBox, - ViewDrawRibbonGroupMaskedTextBox target) + public MaskedTextBoxController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupMaskedTextBox maskedTextBox, + [DisallowNull] ViewDrawRibbonGroupMaskedTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(maskedTextBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs index d614aaa2e..b5a385c16 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/NumericUpDownController.cs @@ -35,9 +35,9 @@ internal class NumericUpDownController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public NumericUpDownController(KryptonRibbon ribbon, - KryptonRibbonGroupNumericUpDown numericUpDown, - ViewDrawRibbonGroupNumericUpDown target) + public NumericUpDownController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupNumericUpDown numericUpDown, + [DisallowNull] ViewDrawRibbonGroupNumericUpDown target) { Debug.Assert(ribbon != null); Debug.Assert(numericUpDown != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs index 2179afb8e..03905c9c9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/QATButtonController.cs @@ -69,7 +69,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs index 28f564d50..eee65ce63 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/QATExtraButtonController.cs @@ -81,7 +81,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _hasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs index a396970f6..d48aceaf0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RecentDocController.cs @@ -37,9 +37,9 @@ internal class RecentDocController : GlobalId, /// Owning view manager instance. /// Target menu item view element. /// Delegate for notifying paint requests. - public RecentDocController(ViewContextMenuManager viewManager, - ViewDrawRibbonAppMenuRecentDec menuItem, - NeedPaintHandler needPaint) + public RecentDocController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewDrawRibbonAppMenuRecentDec menuItem, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(menuItem != null); @@ -189,7 +189,7 @@ public virtual void DoubleClick(Point pt) /// /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -239,7 +239,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -263,7 +263,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -295,7 +295,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs index 24b2352b2..819e9f134 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RepeatButtonController.cs @@ -43,8 +43,8 @@ internal class RepeatButtonController : GlobalId, /// Reference to owning control. /// Delegate for notifying paint requests. /// Target for state changes. - public RepeatButtonController(KryptonRibbon ribbon, - ViewBase target, + public RepeatButtonController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs index 11629e381..03eacbaaf 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabController.cs @@ -50,8 +50,8 @@ internal class RibbonTabController : GlobalId, /// Reference to owning control. /// Target for state changes. /// Delegate for notifying paint requests. - public RibbonTabController(KryptonRibbon ribbon, - ViewDrawRibbonTab target, + public RibbonTabController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewDrawRibbonTab target, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -207,7 +207,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { _target.HasFocus = false; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs index cd0c357fc..18d63f143 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RibbonTabsController.cs @@ -37,7 +37,7 @@ internal class RibbonTabsController : GlobalId, /// Initialize a new instance of the RibbonTabsController class. /// /// Reference to owning control. - public RibbonTabsController(KryptonRibbon ribbon) + public RibbonTabsController([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs index 0d102624a..49c316117 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/RichTextBoxController.cs @@ -35,9 +35,9 @@ internal class RichTextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public RichTextBoxController(KryptonRibbon ribbon, - KryptonRibbonGroupRichTextBox richTextBox, - ViewDrawRibbonGroupRichTextBox target) + public RichTextBoxController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupRichTextBox richTextBox, + [DisallowNull] ViewDrawRibbonGroupRichTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(richTextBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs index 9e224a8f7..667f30741 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/TextBoxController.cs @@ -35,9 +35,9 @@ internal class TextBoxController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public TextBoxController(KryptonRibbon ribbon, - KryptonRibbonGroupTextBox textBox, - ViewDrawRibbonGroupTextBox target) + public TextBoxController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupTextBox textBox, + [DisallowNull] ViewDrawRibbonGroupTextBox target) { Debug.Assert(ribbon != null); Debug.Assert(textBox != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs index f044a3817..462d5924d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/TrackBarController.cs @@ -35,9 +35,9 @@ internal class TrackBarController : GlobalId, /// Reference to owning ribbon instance. /// Source definition. /// Target view element. - public TrackBarController(KryptonRibbon ribbon, - KryptonRibbonGroupTrackBar trackBar, - ViewDrawRibbonGroupTrackBar target) + public TrackBarController([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupTrackBar trackBar, + [DisallowNull] ViewDrawRibbonGroupTrackBar target) { Debug.Assert(ribbon != null); Debug.Assert(trackBar != null); @@ -67,7 +67,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs b/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs index 3d5bbfc51..6afcfc1e4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controller/ViewHighlightController.cs @@ -44,8 +44,8 @@ internal class ViewHightlightController : GlobalId, /// /// Target for state changes. /// Delegate for notifying paint requests. - public ViewHightlightController(ViewBase target, - NeedPaintHandler needPaint) + public ViewHightlightController([DisallowNull] ViewBase target, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(target != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs index f1abb7f23..33c491870 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonContext.cs @@ -114,6 +114,7 @@ public string ContextTitle [Category(@"Appearance")] [Description(@"Display color for associated contextual tabs.")] [DefaultValue(typeof(Color), "Red")] + [DisallowNull] public Color ContextColor { get => _contextColor; diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs index f18478ed1..5de860076 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupGroup.cs @@ -36,8 +36,8 @@ internal class VisualPopupGroup : VisualPopup /// Reference to owning ribbon control. /// Reference to ribbon group for display. /// Drawing renderer. - public VisualPopupGroup(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, + public VisualPopupGroup([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, IRenderer renderer) : base(renderer, true) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs index 5ba2c2d94..bd4a42eb4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupMinimized.cs @@ -36,9 +36,9 @@ internal class VisualPopupMinimized : VisualPopup /// View manager instance for managing view display. /// View element that manages the custom chrome injection. /// Drawing renderer. - public VisualPopupMinimized(KryptonRibbon ribbon, + public VisualPopupMinimized([DisallowNull] KryptonRibbon ribbon, ViewManager viewManager, - ViewDrawRibbonCaptionArea captionArea, + [DisallowNull] ViewDrawRibbonCaptionArea captionArea, IRenderer renderer) : base(viewManager, renderer, true) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs index d6e6eabeb..3ecd98367 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupQATOverflow.cs @@ -29,7 +29,7 @@ internal class VisualPopupQATOverflow : VisualPopup /// Reference to owning ribbon control. /// Reference to original contents which has overflow items. /// Drawing renderer. - public VisualPopupQATOverflow(KryptonRibbon ribbon, + public VisualPopupQATOverflow([DisallowNull] KryptonRibbon ribbon, ViewLayoutRibbonQATContents contents, IRenderer? renderer) : base(renderer, true) diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs index e4cb19bad..9c68d0bc4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonGalleryDesigner.cs @@ -38,7 +38,7 @@ public KryptonGalleryDesigner() => /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs index 286856b9e..1eb561a92 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs @@ -45,7 +45,7 @@ public KryptonRibbonDesigner() => /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs index 5ef334a66..c2e54b789 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs index cc96870f1..56165cbf5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCheckBoxDesigner.cs @@ -55,7 +55,7 @@ public KryptonRibbonGroupCheckBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs index 92aea8b5a..86491fe02 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupClusterButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs index 7e828dd8a..7a70be76b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterColorButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupClusterColorButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs index 3c8dd6041..98960eecf 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupClusterDesigner.cs @@ -57,7 +57,7 @@ public KryptonRibbonGroupClusterDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs index e2a07d227..0fd914238 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupColorButtonDesigner.cs @@ -58,7 +58,7 @@ public KryptonRibbonGroupColorButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs index aa4eed4c5..5cfe7d6ed 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupComboBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupComboBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs index 838902a1d..a6e4333b4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupCustomControlDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupCustomControlDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs index f9535fb99..355249fb0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDateTimePickerDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupDateTimePickerDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs index c2c9120d9..17214c77b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDesigner.cs @@ -62,7 +62,7 @@ public KryptonRibbonGroupDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs index 937c3b40e..e0666491b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupDomainUpDownDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupDomainUpDownDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs index 7991ff236..b378a7bdb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupGalleryDesigner.cs @@ -61,7 +61,7 @@ public KryptonRibbonGroupGalleryDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs index 188f98e46..eb3ab2954 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLabelDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupLabelDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs index 531bb5824..9321a6c2e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupLinesDesigner.cs @@ -92,7 +92,7 @@ public KryptonRibbonGroupLinesDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs index 3db266bc2..1cad721f7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupMaskedTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupMaskedTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs index b4b49e5ba..14a2168a6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupNumericUpDownDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupNumericUpDownDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs index 39d493f4f..f8c1b345e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRadioButtonDesigner.cs @@ -53,7 +53,7 @@ public KryptonRibbonGroupRadioButtonDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs index 78404f843..9db5b0bc4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupRichTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupRichTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs index 5f5df6f46..01c8a810a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupSeparatorDesigner.cs @@ -51,7 +51,7 @@ public KryptonRibbonGroupSeparatorDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs index 39ddf27d6..a9d96ed22 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTextBoxDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupTextBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs index 83695598d..c9b662f9b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupThemeComboBoxDesigner.cs @@ -47,7 +47,7 @@ public KryptonRibbonGroupThemeComboBoxDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs index 18e7d3d94..b24e4710d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTrackBarDesigner.cs @@ -52,7 +52,7 @@ public KryptonRibbonGroupTrackBarDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs index 13a736ae9..20a8d699c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonGroupTripleDesigner.cs @@ -90,7 +90,7 @@ public KryptonRibbonGroupTripleDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs index 51cce38ee..93f942751 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonTabDesigner.cs @@ -53,7 +53,7 @@ public KryptonRibbonTabDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs b/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs index b24dc383b..19658eef1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs +++ b/Source/Krypton Components/Krypton.Ribbon/General/CalculatedValues.cs @@ -49,7 +49,7 @@ internal class CalculatedValues /// Initialize a new instance of the CalculatedValues class. /// /// Source control instance. - public CalculatedValues(KryptonRibbon ribbon) + public CalculatedValues([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon!; diff --git a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs index d188a2ce8..05a4474dc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupClusterColorButton.cs @@ -1059,7 +1059,7 @@ private void HookContextMenuEvents(KryptonContextMenuCollection collection, bool } } - private void UpdateRecentColors(Color color) + private void UpdateRecentColors([DisallowNull] Color color) { // Do we need to update the recent colors collection? if (AutoRecentColors) diff --git a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs index f69da9736..3e8dd55ad 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Group Contents/KryptonRibbonGroupTrackBar.cs @@ -428,6 +428,7 @@ public int Value [Category(@"Behavior")] [Description(@"Change to apply when a small change occurs.")] [DefaultValue(1)] + [DisallowNull] public int SmallChange { get => TrackBar.SmallChange; @@ -440,6 +441,7 @@ public int SmallChange [Category(@"Behavior")] [Description(@"Change to apply when a large change occurs.")] [DefaultValue(5)] + [DisallowNull] public int LargeChange { get => TrackBar.LargeChange; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs index 5b20d3964..55c57a18b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs @@ -28,7 +28,7 @@ internal class AppButtonToolTipToContent : IContentValues /// Initialize a new instance of the AppButtonToolTipToContent class. /// /// Reference to owning ribbon instance. - public AppButtonToolTipToContent(KryptonRibbon ribbon) + public AppButtonToolTipToContent([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs index c4232ff63..72e5f9c54 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/ContextTabSet.cs @@ -31,8 +31,8 @@ internal class ContextTabSet /// /// Reference to first tab of the set. /// Reference to owning context details. - public ContextTabSet(ViewDrawRibbonTab tab, - KryptonRibbonContext context) + public ContextTabSet([DisallowNull] ViewDrawRibbonTab tab, + [DisallowNull] KryptonRibbonContext context) { Debug.Assert(tab != null); Debug.Assert(context != null); @@ -74,7 +74,7 @@ public ContextTabSet(ViewDrawRibbonTab tab, /// Update the last tab in the set with new refernece. /// /// Reference to new last tab. - public void UpdateLastTab(ViewDrawRibbonTab tab) + public void UpdateLastTab([DisallowNull] ViewDrawRibbonTab tab) { Debug.Assert(tab != null); _lastTab = tab; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs index 65467988f..0f17a075c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/DesignTextToContent.cs @@ -25,7 +25,7 @@ internal class DesignTextToContent : RibbonToContent /// Initialize a new instance of the DesignTextToContent class. /// /// Reference to the owning ribbon control. - public DesignTextToContent(KryptonRibbon ribbon) + public DesignTextToContent([DisallowNull] KryptonRibbon ribbon) : base(ribbon.StateCommon.RibbonGeneral) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs index e955e69f9..a0d77e360 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryBackBorder.cs @@ -26,7 +26,7 @@ internal class PaletteGalleryBackBorder : IPaletteBack, /// Initialize a new instance of the PaletteGalleryBackBorder class. /// /// Initial state for background/border. - public PaletteGalleryBackBorder(PaletteGalleryState state) + public PaletteGalleryBackBorder([DisallowNull] PaletteGalleryState state) { Debug.Assert(state != null); _state = state; @@ -38,7 +38,7 @@ public PaletteGalleryBackBorder(PaletteGalleryState state) /// Define the new state to use for sourcing values. /// /// New state for background/border. - public void SetState(PaletteGalleryState state) + public void SetState([DisallowNull] PaletteGalleryState state) { Debug.Assert(state != null); _state = state; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs index a04dc95d8..50e2489ab 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteGalleryRedirect.cs @@ -35,7 +35,7 @@ public class PaletteGalleryRedirect : PaletteMetricRedirect /// /// inheritance redirection instance. /// Paint delegate. - public PaletteGalleryRedirect(PaletteRedirect redirect, + public PaletteGalleryRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs index 12d766780..f99370bd0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonAppButton.cs @@ -34,7 +34,7 @@ public class PaletteRibbonAppButton : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonAppButton(PaletteRibbonRedirect inherit, + public PaletteRibbonAppButton([DisallowNull] PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs index b705a05b8..d5430e036 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextBack.cs @@ -29,7 +29,7 @@ public class PaletteRibbonContextBack : IPaletteRibbonBack /// Initialize a new instance of the PaletteRibbonContextBack class. /// /// Reference to ribbon control. - public PaletteRibbonContextBack(KryptonRibbon ribbon) + public PaletteRibbonContextBack([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs index dd7a16afe..e06c87558 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonContextDouble.cs @@ -31,7 +31,7 @@ public class PaletteRibbonContextDouble : IPaletteRibbonBack, /// Initialize a new instance of the PaletteRibbonContextDouble class. /// /// Reference to ribbon control. - public PaletteRibbonContextDouble(KryptonRibbon ribbon) + public PaletteRibbonContextDouble([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs index f6eae5f10..be29cb597 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonFocus.cs @@ -30,7 +30,7 @@ public class PaletteRibbonFocus : PaletteMetricRedirect /// /// Inheritence redirection instance. /// Paint delegate. - public PaletteRibbonFocus(PaletteRedirect redirect, + public PaletteRibbonFocus([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) : base(redirect) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs index b83e375a3..2932383c4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonImages.cs @@ -25,8 +25,8 @@ public class PaletteRibbonImages : Storage /// /// inheritance redirection instance. /// Paint delegate. - public PaletteRibbonImages(PaletteRedirect redirect, - NeedPaintHandler needPaint) + public PaletteRibbonImages([DisallowNull] PaletteRedirect redirect, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(redirect != null); Debug.Assert(needPaint != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs index 0d5ec0b32..d16e33fd0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustGroup.cs @@ -36,7 +36,7 @@ public class PaletteRibbonJustGroup : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonJustGroup(PaletteRibbonRedirect inherit, + public PaletteRibbonJustGroup([DisallowNull] PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs index 2a727f351..7eb47c947 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonJustTab.cs @@ -29,7 +29,7 @@ public class PaletteRibbonJustTab : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteRibbonJustTab(PaletteRibbonRedirect inherit, + public PaletteRibbonJustTab([DisallowNull] PaletteRibbonRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs index e2f2f40f2..378a5976c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs @@ -83,7 +83,7 @@ public class PaletteRibbonRedirect : PaletteMetricRedirect /// inheritance redirection instance. /// Initial background style. /// Paint delegate. - public PaletteRibbonRedirect(PaletteRedirect redirect, + public PaletteRibbonRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle panelBackStyle, NeedPaintHandler needPaint) : base(redirect) diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs index 85fff2177..0fda5538b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonStyles.cs @@ -29,7 +29,7 @@ public class PaletteRibbonStyles : Storage /// /// Source ribbon control instance. /// Delegate for notifying paint requests. - public PaletteRibbonStyles(KryptonRibbon ribbon, + public PaletteRibbonStyles([DisallowNull] KryptonRibbon ribbon, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs index 0611b8885..6efc8d7a2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToContent.cs @@ -25,7 +25,7 @@ internal class QATButtonToContent : IPaletteContent /// Initialize a new instance of the RibbonTabToContent class. /// /// Source for button values. - public QATButtonToContent(IQuickAccessToolbarButton qatButton) + public QATButtonToContent([DisallowNull] IQuickAccessToolbarButton qatButton) { Debug.Assert(qatButton != null); _qatButton = qatButton; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs index 77f13d25c..2d017e8d0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/QATButtonToolTipToContent.cs @@ -28,7 +28,7 @@ internal class QATButtonToolTipToContent : IContentValues /// Initialize a new instance of the QATButtonToolTipToContent class. /// /// Source quick access toolbar button. - public QATButtonToolTipToContent(IQuickAccessToolbarButton qatButton) + public QATButtonToolTipToContent([DisallowNull] IQuickAccessToolbarButton qatButton) { Debug.Assert(qatButton != null); _qatButton = qatButton; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs index 3c4395108..7fa518bb7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs @@ -59,7 +59,7 @@ public AppMenuButtonSpecCollection(KryptonRibbon owner) /// Initialize a new instance of the RibbonAppButton class. /// /// Reference to owning ribbon instance. - public RibbonAppButton(KryptonRibbon ribbon) + public RibbonAppButton([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs index 99d883830..b6650ed0f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupLabelTextToContent.cs @@ -32,11 +32,11 @@ internal class RibbonGroupLabelTextToContent : RibbonToContent /// Source for ribbon group button disabled settings. /// Source for ribbon group label normal settings. /// Source for ribbon group label disabled settings. - public RibbonGroupLabelTextToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonGroupTextNormal, - IPaletteRibbonText ribbonGroupTextDisabled, - IPaletteRibbonText ribbonLabelTextNormal, - IPaletteRibbonText ribbonLabelTextDisabled) + public RibbonGroupLabelTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonGroupTextNormal, + [DisallowNull] IPaletteRibbonText ribbonGroupTextDisabled, + [DisallowNull] IPaletteRibbonText ribbonLabelTextNormal, + [DisallowNull] IPaletteRibbonText ribbonLabelTextDisabled) : base(ribbonGeneral) { diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs index 76c37ceab..d276e2cac 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupNormalDisabledTextToContent.cs @@ -28,9 +28,9 @@ internal class RibbonGroupNormalDisabledTextToContent : RibbonToContent /// Source for general ribbon settings. /// Source for ribbon group button normal settings. /// Source for ribbon group button disabled settings. - public RibbonGroupNormalDisabledTextToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonGroupTextNormal, - IPaletteRibbonText ribbonGroupTextDisabled) + public RibbonGroupNormalDisabledTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonGroupTextNormal, + [DisallowNull] IPaletteRibbonText ribbonGroupTextDisabled) : base(ribbonGeneral) { Debug.Assert(ribbonGroupTextNormal != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs index 0e3785a26..15fe1fdfe 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonGroupTextToContent.cs @@ -22,8 +22,8 @@ internal class RibbonGroupTextToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon group settings. - public RibbonGroupTextToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonGroupText) + public RibbonGroupTextToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonGroupText) : base(ribbonGeneral) { Debug.Assert(ribbonGroupText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs index 8d6f16ac2..7a8e367fb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsEntryToContent.cs @@ -26,8 +26,8 @@ internal class RibbonRecentDocsEntryToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon recent document entry settings. - public RibbonRecentDocsEntryToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonRecentDocEntryText) + public RibbonRecentDocsEntryToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonRecentDocEntryText) : base(ribbonGeneral) { Debug.Assert(ribbonRecentDocEntryText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs index 07f83aa4a..a1032bb62 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonRecentDocsTitleToContent.cs @@ -31,8 +31,8 @@ internal class RibbonRecentDocsTitleToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon recent document title settings. - public RibbonRecentDocsTitleToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonRecentTitleText) + public RibbonRecentDocsTitleToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonRecentTitleText) : base(ribbonGeneral) { Debug.Assert(ribbonRecentTitleText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs index 0f9da5a3b..b19a792a8 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonTabToContent.cs @@ -22,8 +22,8 @@ internal class RibbonTabToContent : RibbonToContent /// /// Source for general ribbon settings. /// Source for ribbon tab settings. - public RibbonTabToContent(PaletteRibbonGeneral ribbonGeneral, - IPaletteRibbonText ribbonTabText) + public RibbonTabToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral, + [DisallowNull] IPaletteRibbonText ribbonTabText) : base(ribbonGeneral) { Debug.Assert(ribbonTabText != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs index d2fe9db62..b02f7d979 100644 --- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonToContent.cs @@ -21,7 +21,7 @@ internal class RibbonToContent : IPaletteContent /// Initialize a new instance of the RibbonToContent class. /// /// Source for general ribbon settings. - public RibbonToContent(PaletteRibbonGeneral ribbonGeneral) + public RibbonToContent([DisallowNull] PaletteRibbonGeneral ribbonGeneral) { Debug.Assert(ribbonGeneral != null); RibbonGeneral = ribbonGeneral; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs index 312900c20..2070a0107 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonManager.cs @@ -36,10 +36,10 @@ internal class ViewRibbonManager : ViewManager /// Is this manager for handling the minimized mode popup. /// Delegate for requesting paint changes. public ViewRibbonManager(KryptonRibbon control, - ViewDrawRibbonGroupsBorderSynch viewGroups, - ViewBase root, + [DisallowNull] ViewDrawRibbonGroupsBorderSynch viewGroups, + [DisallowNull] ViewBase root, bool minimizedMode, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(viewGroups != null); @@ -132,7 +132,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove(MouseEventArgs e, Point rawPt) + public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -182,7 +182,7 @@ public override void MouseMove(MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave(EventArgs e) + public override void MouseLeave([DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs index b0b213e34..521c3d447 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonMinimizedManager.cs @@ -37,10 +37,10 @@ internal class ViewRibbonMinimizedManager : ViewManager /// Is this manager for handling the minimized mode popup. /// Delegate for requesting paint changes. public ViewRibbonMinimizedManager(KryptonRibbon control, - ViewDrawRibbonGroupsBorderSynch viewGroups, - ViewBase root, + [DisallowNull] ViewDrawRibbonGroupsBorderSynch viewGroups, + [DisallowNull] ViewBase root, bool minimizedMode, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(viewGroups != null); @@ -144,7 +144,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove(MouseEventArgs e, Point rawPt) + public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -191,7 +191,7 @@ public override void MouseMove(MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave(EventArgs e) + public override void MouseLeave([DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs index 94f3f570e..8b8e23fe2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonPopupGroupManager.cs @@ -34,10 +34,10 @@ internal class ViewRibbonPopupGroupManager : ViewManager /// Group to track. /// Delegate for performing painting. public ViewRibbonPopupGroupManager(Control control, - KryptonRibbon ribbon, + [DisallowNull] KryptonRibbon ribbon, ViewBase root, - ViewDrawRibbonGroup viewGroup, - NeedPaintHandler needPaintDelegate) + [DisallowNull] ViewDrawRibbonGroup viewGroup, + [DisallowNull] NeedPaintHandler needPaintDelegate) : base(control, root) { Debug.Assert(ribbon != null); @@ -107,7 +107,7 @@ public override void Layout(ViewLayoutContext context) /// /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. - public override void MouseMove(MouseEventArgs e, Point rawPt) + public override void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -135,7 +135,7 @@ public override void MouseMove(MouseEventArgs e, Point rawPt) /// Perform mouse leave processing. /// /// An EventArgs that contains the event data. - public override void MouseLeave(EventArgs e) + public override void MouseLeave([DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs index 5de2906fd..230e8eb74 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Base/ViewRibbonQATOverflowManager.cs @@ -30,9 +30,9 @@ internal class ViewRibbonQATOverflowManager : ViewManager /// Owning control. /// View that will handle focus requests. /// View for group we are tracking. - public ViewRibbonQATOverflowManager(KryptonRibbon ribbon, + public ViewRibbonQATOverflowManager([DisallowNull] KryptonRibbon ribbon, Control control, - ViewLayoutRibbonQATContents qatContents, + [DisallowNull] ViewLayoutRibbonQATContents qatContents, ViewBase root) : base(control, root) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs index 7fa4a1694..711cd5b2e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs @@ -37,7 +37,7 @@ internal class ViewDrawRibbonAppButton : ViewLeaf /// /// Owning control instance. /// Scroller orientation. - public ViewDrawRibbonAppButton(KryptonRibbon ribbon, bool bottomHalf) + public ViewDrawRibbonAppButton([DisallowNull] KryptonRibbon ribbon, bool bottomHalf) { Debug.Assert(ribbon != null); @@ -104,7 +104,7 @@ public override bool Visible /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs index b517c1dda..e94b512ff 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppMenuRecentDoc.cs @@ -103,7 +103,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs index 7732a9808..cc0aaf212 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs @@ -33,7 +33,7 @@ internal class ViewDrawRibbonAppTab : ViewComposite, /// Initialize a new instance of the ViewDrawRibbonAppTab class. /// /// Owning control instance. - public ViewDrawRibbonAppTab(KryptonRibbon ribbon) + public ViewDrawRibbonAppTab([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); @@ -85,7 +85,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -103,7 +103,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -118,7 +118,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { var memento = State switch { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs index 2a14c0a72..6ae48668c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs @@ -717,10 +717,10 @@ internal class ViewDrawRibbonCaptionArea : ViewDrawDocker /// Reference to redirector for palette settings. /// Reference to the composition element. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonCaptionArea(KryptonRibbon ribbon, - PaletteRedirect redirect, - ViewDrawRibbonComposition compositionArea, - NeedPaintHandler needPaintDelegate) + public ViewDrawRibbonCaptionArea([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] PaletteRedirect redirect, + [DisallowNull] ViewDrawRibbonComposition compositionArea, + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); @@ -1057,7 +1057,7 @@ public bool DoesCurrentMouseDownEndAllTracking(Point pt) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs index c5e0d9e03..92214b836 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCompoRightBorder.cs @@ -123,7 +123,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs index 177f561b7..c85ae2cbd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonComposition.cs @@ -34,8 +34,8 @@ internal class ViewDrawRibbonComposition : ViewLeaf, /// /// Owning control instance. /// Delegate for requested a paint. - public ViewDrawRibbonComposition(KryptonRibbon ribbon, - NeedPaintHandler needPaint) + public ViewDrawRibbonComposition([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -146,7 +146,7 @@ public void CompNeedPaint(bool needLayout) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -179,7 +179,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(_ownerForm != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs index 74a63b507..bda94fcbc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonContextTitle.cs @@ -43,8 +43,8 @@ internal class ViewDrawRibbonContextTitle : ViewLeaf, /// /// Source ribbon control. /// Source for inheriting the ribbon bacgkground colors. - public ViewDrawRibbonContextTitle(KryptonRibbon ribbon, - IPaletteRibbonBack inherit) + public ViewDrawRibbonContextTitle([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] IPaletteRibbonBack inherit) { Debug.Assert(ribbon != null); Debug.Assert(inherit != null); @@ -148,7 +148,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs index 063ace243..9045e35e4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignBase.cs @@ -32,8 +32,8 @@ internal class ViewDrawRibbonDesignBase : ViewComposite, /// /// Reference to owning ribbon control. /// Delegate for notifying paint requests. - public ViewDrawRibbonDesignBase(KryptonRibbon ribbon, - NeedPaintHandler needPaint) + public ViewDrawRibbonDesignBase([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -89,7 +89,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs index 2f605f368..e8d2b2fb9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignCluster.cs @@ -51,7 +51,7 @@ static ViewDrawRibbonDesignCluster() /// Reference to cluster definition. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignCluster(KryptonRibbon ribbon, - KryptonRibbonGroupCluster ribbonCluster, + [DisallowNull] KryptonRibbonGroupCluster ribbonCluster, NeedPaintHandler needPaint) : base(ribbon, needPaint) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs index 05124efcb..af5f43633 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupContainer.cs @@ -53,7 +53,7 @@ static ViewDrawRibbonDesignGroupContainer() /// Associated ribbon group. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupContainer(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, + [DisallowNull] KryptonRibbonGroup ribbonGroup, NeedPaintHandler needPaint) : base(ribbon, needPaint) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs index 37d6108cb..98a3e7581 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupLines.cs @@ -65,7 +65,7 @@ static ViewDrawRibbonDesignGroupLines() /// Size the view should use. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupLines(KryptonRibbon ribbon, - KryptonRibbonGroupLines ribbonLines, + [DisallowNull] KryptonRibbonGroupLines ribbonLines, GroupItemSize currentSize, NeedPaintHandler needPaint) : base(ribbon, needPaint) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs index 154f08e4d..7d3a597f7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDesignGroupTriple.cs @@ -67,7 +67,7 @@ static ViewDrawRibbonDesignGroupTriple() /// Size the view should use. /// Delegate for notifying paint requests. public ViewDrawRibbonDesignGroupTriple(KryptonRibbon ribbon, - KryptonRibbonGroupTriple ribbonTriple, + [DisallowNull] KryptonRibbonGroupTriple ribbonTriple, GroupItemSize currentSize, NeedPaintHandler needPaint) : base(ribbon, needPaint) diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs index b02adf9b8..abb1ff580 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonDropArrow.cs @@ -29,7 +29,7 @@ internal class ViewDrawRibbonDropArrow : ViewLeaf /// Initialize a new instance of the ViewDrawRibbonDropArrow class. /// /// Reference to owning control instance. - public ViewDrawRibbonDropArrow(KryptonRibbon ribbon) + public ViewDrawRibbonDropArrow([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -57,7 +57,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs index 601af3ad3..ac7c56ca2 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryButton.cs @@ -116,7 +116,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs index ea5d80f23..73de4c304 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGalleryItem.cs @@ -158,7 +158,7 @@ public int ImageIndex /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs index d46f10693..73e96c499 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroup.cs @@ -70,9 +70,9 @@ internal class ViewDrawRibbonGroup : ViewComposite, /// Reference to owning ribbon control. /// Reference to ribbon group this represents. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroup(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroup([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -491,7 +491,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs index 452ec1887..2ba80ea71 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButton.cs @@ -51,9 +51,9 @@ internal class ViewDrawRibbonGroupButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupButton(KryptonRibbon ribbon, - KryptonRibbonGroupButton ribbonButton, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupButton ribbonButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -270,7 +270,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs index ce34fbba4..ac3c6b403 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonBackBorder.cs @@ -58,10 +58,10 @@ internal class ViewDrawRibbonGroupButtonBackBorder : ViewComposite /// Palette to use for the border. /// Should the border be a constant normal state. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupButtonBackBorder(KryptonRibbon ribbon, - KryptonRibbonGroupItem groupItem, - IPaletteBack paletteBack, - IPaletteBorder paletteBorder, + public ViewDrawRibbonGroupButtonBackBorder([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupItem groupItem, + [DisallowNull] IPaletteBack paletteBack, + [DisallowNull] IPaletteBorder paletteBorder, bool constantBorder, NeedPaintHandler needPaint) { @@ -212,7 +212,7 @@ public GroupButtonType ButtonType /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs index 9bd4c213f..67e2794c4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonImage.cs @@ -34,7 +34,7 @@ internal class ViewDrawRibbonGroupButtonImage : ViewDrawRibbonGroupImageBase /// Reference to ribbon group button definition. /// Show the large image. public ViewDrawRibbonGroupButtonImage(KryptonRibbon ribbon, - KryptonRibbonGroupButton ribbonButton, + [DisallowNull] KryptonRibbonGroupButton ribbonButton, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs index 177c2e8e0..6e1f6d585 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupButtonText : ViewLeaf, /// Source ribbon control. /// Group button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupButtonText(KryptonRibbon ribbon, - KryptonRibbonGroupButton ribbonButton, + public ViewDrawRibbonGroupButtonText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupButton ribbonButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -150,7 +150,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs index 4b3a4c5f1..fc298c46b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBox.cs @@ -49,9 +49,9 @@ internal class ViewDrawRibbonGroupCheckBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source check box definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupCheckBox(KryptonRibbon ribbon, - KryptonRibbonGroupCheckBox ribbonCheckBox, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupCheckBox([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCheckBox != null); @@ -261,7 +261,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -380,7 +380,7 @@ private void CreateMediumSmallCheckBoxView() _viewMediumSmall, _viewMediumSmall.MouseController); } - private void DefineRootView(ViewBase view) + private void DefineRootView([DisallowNull] ViewBase view) { // Remove any existing view Clear(); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs index 7917bf8c6..3843dc413 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupCheckBoxImage : ViewComposite /// Reference to ribbon group check box definition. /// Show the large image. public ViewDrawRibbonGroupCheckBoxImage(KryptonRibbon ribbon, - KryptonRibbonGroupCheckBox ribbonCheckBox, + [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, bool large) { Debug.Assert(ribbonCheckBox != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs index ca4b761aa..5062f1866 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCheckBoxText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupCheckBoxText : ViewLeaf, /// Source ribbon control. /// Group check box to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupCheckBoxText(KryptonRibbon ribbon, - KryptonRibbonGroupCheckBox ribbonCheckBox, + public ViewDrawRibbonGroupCheckBoxText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupCheckBox ribbonCheckBox, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs index cba1dd9b8..45c1f17c9 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButton.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupClusterButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupClusterButton(KryptonRibbon ribbon, - KryptonRibbonGroupClusterButton ribbonButton, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupClusterButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -281,7 +281,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs index 908c63ffd..7de7671f4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonImage.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonGroupClusterButtonImage : ViewDrawRibbonGroupImageB /// Reference to owning ribbon control. /// Reference to ribbon group button definition. public ViewDrawRibbonGroupClusterButtonImage(KryptonRibbon ribbon, - KryptonRibbonGroupClusterButton ribbonButton) + [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton) : base(ribbon) { Debug.Assert(ribbonButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs index abc25bf24..80ecc3907 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterButtonText.cs @@ -39,8 +39,8 @@ internal class ViewDrawRibbonGroupClusterButtonText : ViewLeaf, /// /// Source ribbon control. /// Group cluster button to display title for. - public ViewDrawRibbonGroupClusterButtonText(KryptonRibbon ribbon, - KryptonRibbonGroupClusterButton ribbonButton) + public ViewDrawRibbonGroupClusterButtonText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupClusterButton ribbonButton) { Debug.Assert(ribbon != null); @@ -98,7 +98,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -144,7 +144,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs index c7daf400c..fe0dde65b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButton.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupClusterColorButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupClusterColorButton(KryptonRibbon ribbon, - KryptonRibbonGroupClusterColorButton ribbonButton, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupClusterColorButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonButton != null); @@ -281,7 +281,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs index 64d661f95..ca86116ac 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonImage.cs @@ -36,7 +36,7 @@ internal class ViewDrawRibbonGroupClusterColorButtonImage : ViewDrawRibbonGroupI /// Reference to owning ribbon control. /// Reference to ribbon group color button definition. public ViewDrawRibbonGroupClusterColorButtonImage(KryptonRibbon ribbon, - KryptonRibbonGroupClusterColorButton ribbonColorButton) + [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonColorButton) : base(ribbon) { Debug.Assert(ribbonColorButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs index 7cdf5783e..b71b1c14a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterColorButtonText.cs @@ -39,8 +39,8 @@ internal class ViewDrawRibbonGroupClusterColorButtonText : ViewLeaf, /// /// Source ribbon control. /// Group cluster color button to display title for. - public ViewDrawRibbonGroupClusterColorButtonText(KryptonRibbon ribbon, - KryptonRibbonGroupClusterColorButton ribbonColorButton) + public ViewDrawRibbonGroupClusterColorButtonText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupClusterColorButton ribbonColorButton) { Debug.Assert(ribbon != null); @@ -98,7 +98,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -144,7 +144,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs index 020514512..bba6da71e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterEdge.cs @@ -30,8 +30,8 @@ internal class ViewDrawRibbonGroupClusterEdge : ViewDrawBorderEdge /// /// Reference to owning ribbon.. /// Palette source for drawing details. - public ViewDrawRibbonGroupClusterEdge(KryptonRibbon ribbon, - PaletteBorderEdge palette) + public ViewDrawRibbonGroupClusterEdge([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] PaletteBorderEdge palette) : base(palette, Orientation.Vertical) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs index 77eb2c7a5..77fad61ed 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupClusterSeparator.cs @@ -31,7 +31,7 @@ internal class ViewDrawRibbonGroupClusterSeparator : ViewLeaf /// /// Reference to owning ribbon control. /// Is this is cluster start separator. - public ViewDrawRibbonGroupClusterSeparator(KryptonRibbon ribbon, bool start) + public ViewDrawRibbonGroupClusterSeparator([DisallowNull] KryptonRibbon ribbon, bool start) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -60,7 +60,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs index f143afce7..b943d7ff3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButton.cs @@ -51,9 +51,9 @@ internal class ViewDrawRibbonGroupColorButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source color button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupColorButton(KryptonRibbon ribbon, - KryptonRibbonGroupColorButton ribbonColorButton, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupColorButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonColorButton != null); @@ -268,7 +268,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs index d974fdb60..04bb30ec7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonImage.cs @@ -40,7 +40,7 @@ internal class ViewDrawRibbonGroupColorButtonImage : ViewDrawRibbonGroupImageBas /// Reference to ribbon group color button definition. /// Show the large image. public ViewDrawRibbonGroupColorButtonImage(KryptonRibbon ribbon, - KryptonRibbonGroupColorButton ribbonColorButton, + [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs index 074c73ca2..0721bd5fd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupColorButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupColorButtonText : ViewLeaf, /// Source ribbon control. /// Group color button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupColorButtonText(KryptonRibbon ribbon, - KryptonRibbonGroupColorButton ribbonColorButton, + public ViewDrawRibbonGroupColorButtonText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupColorButton ribbonColorButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs index f9bcd3037..11877372f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupComboBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source combobox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupComboBox(KryptonRibbon ribbon, - KryptonRibbonGroupComboBox ribbonComboBox, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupComboBox([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupComboBox ribbonComboBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonComboBox != null); @@ -297,7 +297,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -324,7 +324,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs index 6c37b6161..6361a29d0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupCustomControl : ViewComposite, /// Reference to owning ribbon control. /// Reference to source custom definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupCustomControl(KryptonRibbon ribbon, - KryptonRibbonGroupCustomControl ribbonCustom, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupCustomControl([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupCustomControl ribbonCustom, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCustom != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs index 85f9f6b8b..ff670285a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupDateTimePicker : ViewComposite, /// Reference to owning ribbon control. /// Reference to source date time picker. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDateTimePicker(KryptonRibbon ribbon, - KryptonRibbonGroupDateTimePicker ribbonDateTimePicker, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupDateTimePicker([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupDateTimePicker ribbonDateTimePicker, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonDateTimePicker != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs index 30593f3a9..25a1a3dcc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDialogButton.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonGroupDialogButton : ViewLeaf /// Reference to owning ribbon control. /// Reference to ribbon group this represents. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDialogButton(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, + public ViewDrawRibbonGroupDialogButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -105,7 +105,7 @@ protected override void Dispose(bool disposing) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs index 7e10db462..cf74ad162 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupDomainUpDown : ViewComposite, /// Reference to owning ribbon control. /// Reference to source domain up-down. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupDomainUpDown(KryptonRibbon ribbon, - KryptonRibbonGroupDomainUpDown ribbonDomainUpDown, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupDomainUpDown([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupDomainUpDown ribbonDomainUpDown, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonDomainUpDown != null); @@ -288,7 +288,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -315,7 +315,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs index 3b70afc1b..3c2c3ed1b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs @@ -46,9 +46,9 @@ internal class ViewDrawRibbonGroupGallery : ViewComposite, /// Reference to owning ribbon control. /// Reference to source gallery. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupGallery(KryptonRibbon ribbon, - KryptonRibbonGroupGallery ribbonGallery, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupGallery([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupGallery ribbonGallery, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGallery != null); @@ -457,7 +457,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -484,7 +484,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs index 4c1ed8308..ff9f9af05 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryImage.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonGroupGalleryImage : ViewDrawRibbonGroupImageBase /// Reference to owning ribbon control. /// Reference to ribbon group gallery definition. public ViewDrawRibbonGroupGalleryImage(KryptonRibbon ribbon, - KryptonRibbonGroupGallery ribbonGallery) + [DisallowNull] KryptonRibbonGroupGallery ribbonGallery) : base(ribbon) { Debug.Assert(ribbonGallery != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs index 77f502c78..b314d0917 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGalleryText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupGalleryText : ViewLeaf, /// Source ribbon control. /// Group gallery button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupGalleryText(KryptonRibbon ribbon, - KryptonRibbonGroupGallery ribbonGallery, + public ViewDrawRibbonGroupGalleryText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupGallery ribbonGallery, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -147,7 +147,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs index faa8fc399..92c7ab2d0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImage.cs @@ -43,9 +43,9 @@ internal class ViewDrawRibbonGroupImage : ViewLeaf /// Reference to owning ribbon control. /// Reference to ribbon group definition. /// Reference to top level group element. - public ViewDrawRibbonGroupImage(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, - ViewDrawRibbonGroup viewGroup) + public ViewDrawRibbonGroupImage([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, + [DisallowNull] ViewDrawRibbonGroup viewGroup) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs index 0a5aa33a8..85ec39019 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupImageBase.cs @@ -25,7 +25,7 @@ internal abstract class ViewDrawRibbonGroupImageBase : ViewLeaf /// Initialize a new instance of the ViewDrawRibbonGroupImageBase class. /// /// Reference to owning ribbon control. - public ViewDrawRibbonGroupImageBase(KryptonRibbon ribbon) + public ViewDrawRibbonGroupImageBase([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); Ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs index fa991b6e7..0882855a0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabel.cs @@ -46,9 +46,9 @@ internal class ViewDrawRibbonGroupLabel : ViewComposite, /// Reference to owning ribbon control. /// Reference to source label definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupLabel(KryptonRibbon ribbon, - KryptonRibbonGroupLabel ribbonLabel, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupLabel([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonLabel != null); @@ -214,7 +214,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs index 75d281afd..bcc3c94e5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupLabelImage : ViewDrawRibbonGroupImageBase /// Reference to ribbon group label definition. /// Show the large image. public ViewDrawRibbonGroupLabelImage(KryptonRibbon ribbon, - KryptonRibbonGroupLabel ribbonLabel, + [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, bool large) : base(ribbon) { diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs index e2564b50f..bafaba12c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupLabelText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupLabelText : ViewLeaf, /// Source ribbon control. /// Group label to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupLabelText(KryptonRibbon ribbon, - KryptonRibbonGroupLabel ribbonLabel, + public ViewDrawRibbonGroupLabelText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupLabel ribbonLabel, bool firstText) { Debug.Assert(ribbon != null); @@ -103,7 +103,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -149,7 +149,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs index 853f0df8c..52b441da4 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupMaskedTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source masked textbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupMaskedTextBox(KryptonRibbon ribbon, - KryptonRibbonGroupMaskedTextBox ribbonMaskedTextBox, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupMaskedTextBox([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupMaskedTextBox ribbonMaskedTextBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonMaskedTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs index cec644122..3f9873b68 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupNumericUpDown : ViewComposite, /// Reference to owning ribbon control. /// Reference to source numeric up-down. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupNumericUpDown(KryptonRibbon ribbon, - KryptonRibbonGroupNumericUpDown ribbonNumericUpDown, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupNumericUpDown([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupNumericUpDown ribbonNumericUpDown, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonNumericUpDown != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs index 3bb848c9f..670ed9c1f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButton.cs @@ -49,9 +49,9 @@ internal class ViewDrawRibbonGroupRadioButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to source radio button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupRadioButton(KryptonRibbon ribbon, - KryptonRibbonGroupRadioButton ribbonRadioButton, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupRadioButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonRadioButton != null); @@ -261,7 +261,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs index 990d191b2..16af7f422 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonImage.cs @@ -35,7 +35,7 @@ internal class ViewDrawRibbonGroupRadioButtonImage : ViewComposite /// Reference to ribbon group radio button definition. /// Show the large image. public ViewDrawRibbonGroupRadioButtonImage(KryptonRibbon ribbon, - KryptonRibbonGroupRadioButton ribbonRadioButton, + [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, bool large) { Debug.Assert(ribbonRadioButton != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs index bcc44eb6d..5eb97a75c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRadioButtonText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupRadioButtonText : ViewLeaf, /// Source ribbon control. /// Group radio button to display title for. /// Should show the first button text. - public ViewDrawRibbonGroupRadioButtonText(KryptonRibbon ribbon, - KryptonRibbonGroupRadioButton ribbonRadioButton, + public ViewDrawRibbonGroupRadioButtonText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupRadioButton ribbonRadioButton, bool firstText) { Debug.Assert(ribbon != null); @@ -101,7 +101,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -148,7 +148,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs index e73a9a6a2..cae0ce6f7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupRichTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source richtextbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupRichTextBox(KryptonRibbon ribbon, - KryptonRibbonGroupRichTextBox ribbonRichTextBox, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupRichTextBox([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupRichTextBox ribbonRichTextBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonRichTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs index 0b6490fa3..046bf9bb1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupSeparator.cs @@ -37,9 +37,9 @@ internal class ViewDrawRibbonGroupSeparator : ViewLeaf, /// Reference to owning ribbon control. /// Reference to group separator definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupSeparator(KryptonRibbon ribbon, - KryptonRibbonGroupSeparator ribbonSeparator, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupSeparator([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupSeparator ribbonSeparator, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonSeparator != null); @@ -214,7 +214,7 @@ public void ResetSolutionSize() /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs index 0096cb366..78d31ce58 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupText.cs @@ -41,8 +41,8 @@ internal class ViewDrawRibbonGroupText : ViewLeaf, /// Source ribbon control. /// Ribbon group to display title for. /// Should show the first group text. - public ViewDrawRibbonGroupText(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, + public ViewDrawRibbonGroupText([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, bool firstText) { Debug.Assert(ribbon != null); @@ -100,7 +100,7 @@ public void MakeDirty() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs index bcfbeb2b5..46efa4ccc 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupTextBox : ViewComposite, /// Reference to owning ribbon control. /// Reference to source textbox. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupTextBox(KryptonRibbon ribbon, - KryptonRibbonGroupTextBox ribbonTextBox, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupTextBox([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupTextBox ribbonTextBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTextBox != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs index 428824ca9..df16f84ad 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTitle.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonGroupTitle : ViewLeaf, /// /// Source ribbon control. /// Ribbon group to display title for. - public ViewDrawRibbonGroupTitle(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup) + public ViewDrawRibbonGroupTitle([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -114,7 +114,7 @@ public IPaletteRibbonText PaletteRibbonGroup /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs index 2c5a6a794..f8ff9148b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs @@ -36,9 +36,9 @@ internal class ViewDrawRibbonGroupTrackBar : ViewComposite, /// Reference to owning ribbon control. /// Reference to source track bar. /// Delegate for notifying paint requests. - public ViewDrawRibbonGroupTrackBar(KryptonRibbon ribbon, - KryptonRibbonGroupTrackBar ribbonTrackBar, - NeedPaintHandler needPaint) + public ViewDrawRibbonGroupTrackBar([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupTrackBar ribbonTrackBar, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTrackBar != null); @@ -296,7 +296,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -323,7 +323,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs index e6b5a724a..55beae98f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupsBorder.cs @@ -39,9 +39,9 @@ internal class ViewDrawRibbonGroupsBorder : ViewComposite, /// Reference to owning ribbon control. /// Should border be placed outside the contents. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonGroupsBorder(KryptonRibbon ribbon, + public ViewDrawRibbonGroupsBorder([DisallowNull] KryptonRibbon ribbon, bool borderOutside, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(needPaintDelegate != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs index 2e2b59419..01ffe7071 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonMinimizeBar.cs @@ -32,7 +32,7 @@ internal class ViewDrawRibbonMinimizeBar : ViewLayoutRibbonSeparator /// Initialize a new instance of the ViewDrawRibbonMinimizeBar class. /// /// Source for palette values. - public ViewDrawRibbonMinimizeBar(IPaletteRibbonGeneral palette) + public ViewDrawRibbonMinimizeBar([DisallowNull] IPaletteRibbonGeneral palette) : base(SEP_WIDTH, true) { Debug.Assert(palette != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs index b65630589..d3c170366 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATBorder.cs @@ -43,8 +43,8 @@ internal class ViewDrawRibbonQATBorder : ViewComposite /// Reference to owning ribbon control. /// Delegate for notifying paint/layout changes. /// Minibar or full bar drawing. - public ViewDrawRibbonQATBorder(KryptonRibbon ribbon, - NeedPaintHandler needPaintDelegate, + public ViewDrawRibbonQATBorder([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaintDelegate, bool minibar) { Debug.Assert(ribbon != null); @@ -154,7 +154,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs index c34b4187b..043d9dfa0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATButton.cs @@ -36,8 +36,8 @@ internal class ViewDrawRibbonQATButton : ViewComposite, /// Reference to owning ribbon control. /// Reference to button definition. /// Delegate for notifying paint requests. - public ViewDrawRibbonQATButton(KryptonRibbon ribbon, - IQuickAccessToolbarButton qatButton, + public ViewDrawRibbonQATButton([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] IQuickAccessToolbarButton qatButton, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -148,7 +148,7 @@ public override bool Enabled /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs index dfcaf57e6..d1275f1e1 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButton.cs @@ -43,7 +43,7 @@ internal class ViewDrawRibbonQATExtraButton : ViewLeaf /// /// Reference to owning ribbon control. /// Delegate for notifying paint requests. - public ViewDrawRibbonQATExtraButton(KryptonRibbon ribbon, + public ViewDrawRibbonQATExtraButton([DisallowNull] KryptonRibbon ribbon, NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); @@ -128,7 +128,7 @@ public override bool Visible /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs index f27a86c16..9259b9ccf 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATExtraButtonMini.cs @@ -50,7 +50,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs index c8596eb77..27abfa427 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonQATOverflow.cs @@ -33,8 +33,8 @@ internal class ViewDrawRibbonQATOverflow : ViewComposite /// /// Reference to owning ribbon control. /// Delegate for notifying paint/layout changes. - public ViewDrawRibbonQATOverflow(KryptonRibbon ribbon, - NeedPaintHandler needPaintDelegate) + public ViewDrawRibbonQATOverflow([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(needPaintDelegate != null); @@ -94,7 +94,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs index 798f7749a..72146070d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentDocs.cs @@ -31,7 +31,7 @@ internal class ViewDrawRibbonRecentDocs : ViewLeaf, /// Initialize a new instance of the ViewDrawRibbonRecentDocs class. /// /// Source ribbon control. - public ViewDrawRibbonRecentDocs(KryptonRibbon ribbon) + public ViewDrawRibbonRecentDocs([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; @@ -84,7 +84,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs index 74def1a74..30c33f3d0 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonRecentShortcut.cs @@ -46,7 +46,7 @@ public override string ToString() => /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs index 6072ef122..c070ec80e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonScrollButton.cs @@ -83,7 +83,7 @@ protected override void Dispose(bool disposing) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs index d79baf1d8..58f48673b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTab.cs @@ -74,9 +74,9 @@ static ViewDrawRibbonTab() /// Reference to owning ribbon control. /// Reference to view used for layout out tabs. /// Delegate for notifying paint requests. - public ViewDrawRibbonTab(KryptonRibbon ribbon, - ViewLayoutRibbonTabs layoutTabs, - NeedPaintHandler needPaint) + public ViewDrawRibbonTab([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewLayoutRibbonTabs layoutTabs, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(layoutTabs != null); @@ -349,7 +349,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs index bd41c49df..65b9c78d6 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonTabSep.cs @@ -45,7 +45,7 @@ static ViewDrawRibbonTabSep() /// Initialize a new instance of the ViewDrawRibbonTabSep class. /// /// Source for palette values. - public ViewDrawRibbonTabSep(IPaletteRibbonGeneral palette) + public ViewDrawRibbonTabSep([DisallowNull] IPaletteRibbonGeneral palette) : base(SEP_WIDTH, true) { Debug.Assert(palette != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs index e4b73de8e..c6911fd87 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppButton.cs @@ -38,7 +38,7 @@ internal class ViewLayoutRibbonAppButton : ViewLayoutDocker /// /// Owning control instance. /// Scroller orientation. - public ViewLayoutRibbonAppButton(KryptonRibbon ribbon, + public ViewLayoutRibbonAppButton([DisallowNull] KryptonRibbon ribbon, bool bottomHalf) { Debug.Assert(ribbon != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs index 1c8f8ae45..a7ce453ab 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs @@ -29,7 +29,7 @@ internal class ViewLayoutRibbonAppTab : ViewLayoutDocker /// Initialize a new instance of the ViewLayoutRibbonAppTab class. /// /// Owning control instance. - public ViewLayoutRibbonAppTab(KryptonRibbon ribbon) + public ViewLayoutRibbonAppTab([DisallowNull] KryptonRibbon ribbon) { Debug.Assert(ribbon != null); _ribbon = ribbon; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs index 3f058eb04..e6b8fe42e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenter.cs @@ -42,7 +42,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs index cc30ed521..fe1628c31 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonCenterPadding.cs @@ -63,7 +63,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs index ec92ed1d5..98c59aa5e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonContextTitles.cs @@ -39,8 +39,8 @@ private class ViewDrawRibbonContextTitleList : List /// /// Reference to source ribbon control. /// Reference to view element that tracks the top level form. - public ViewLayoutRibbonContextTitles(KryptonRibbon ribbon, - ViewDrawRibbonCaptionArea captionArea) + public ViewLayoutRibbonContextTitles([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] ViewDrawRibbonCaptionArea captionArea) { Debug.Assert(captionArea != null); Debug.Assert(ribbon != null); @@ -94,7 +94,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs index a1d5f766f..ea028a52d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryButtons.cs @@ -66,7 +66,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs index 46cbb47d0..79862cb3a 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGalleryItems.cs @@ -56,12 +56,12 @@ internal class ViewLayoutRibbonGalleryItems : ViewComposite /// Reference to the up button. /// Reference to the down button. /// Reference to the context button. - public ViewLayoutRibbonGalleryItems(PaletteBase palette, - KryptonGallery gallery, - NeedPaintHandler needPaint, - ViewDrawRibbonGalleryButton buttonUp, - ViewDrawRibbonGalleryButton buttonDown, - ViewDrawRibbonGalleryButton buttonContext) + public ViewLayoutRibbonGalleryItems([DisallowNull] PaletteBase palette, + [DisallowNull] KryptonGallery gallery, + [DisallowNull] NeedPaintHandler needPaint, + [DisallowNull] ViewDrawRibbonGalleryButton buttonUp, + [DisallowNull] ViewDrawRibbonGalleryButton buttonDown, + [DisallowNull] ViewDrawRibbonGalleryButton buttonContext) { Debug.Assert(palette != null); Debug.Assert(gallery != null); @@ -358,7 +358,7 @@ public void BringIntoView(int index) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -389,7 +389,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs index 1e3b9799d..93e15bdba 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupCluster.cs @@ -52,9 +52,9 @@ private class ViewToSize : Dictionary { } /// Owning ribbon control instance. /// Reference to cluster definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupCluster(KryptonRibbon ribbon, - KryptonRibbonGroupCluster ribbonCluster, - NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupCluster([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupCluster ribbonCluster, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonCluster != null); @@ -392,7 +392,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs index 3b823e4a8..57cb42fcb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupContent.cs @@ -47,9 +47,9 @@ private class ContainerToView : Dictionary { } /// Owning ribbon control instance. /// The ribbon group this layout is used to display. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupContent(KryptonRibbon ribbon, - KryptonRibbonGroup ribbonGroup, - NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupContent([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroup ribbonGroup, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonGroup != null); @@ -623,7 +623,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs index 92ebed294..4298e5085 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupLines.cs @@ -67,9 +67,9 @@ private class ViewList : List { } /// Owning ribbon control instance. /// Reference to lines definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupLines(KryptonRibbon ribbon, - KryptonRibbonGroupLines ribbonLines, - NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupLines([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupLines ribbonLines, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonLines != null); @@ -597,7 +597,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs index 6ddbfb73b..7954cff61 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupTriple.cs @@ -46,9 +46,9 @@ private class ViewToSize : Dictionary { } /// Owning ribbon control instance. /// Reference to triple definition. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroupTriple(KryptonRibbon ribbon, - KryptonRibbonGroupTriple ribbonTriple, - NeedPaintHandler needPaint) + public ViewLayoutRibbonGroupTriple([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonGroupTriple ribbonTriple, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTriple != null); @@ -463,7 +463,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs index 8d040b18e..694d63106 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroups.cs @@ -48,9 +48,9 @@ private class ViewDrawRibbonGroupSepList : List { } /// Owning ribbon control instance. /// RibbonTab to organize groups. /// Delegate for notifying paint requests. - public ViewLayoutRibbonGroups(KryptonRibbon ribbon, - KryptonRibbonTab ribbonTab, - NeedPaintHandler needPaint) + public ViewLayoutRibbonGroups([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] KryptonRibbonTab ribbonTab, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(ribbonTab != null); @@ -303,7 +303,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs index 058392232..00ffe8ca5 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonGroupsArea.cs @@ -38,9 +38,9 @@ internal class ViewLayoutRibbonGroupsArea : ViewDrawPanel /// Reference to owning ribbon control. /// Reference to redirector for palette settings. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonGroupsArea(KryptonRibbon ribbon, - PaletteRedirect redirect, - NeedPaintHandler needPaintDelegate) + public ViewLayoutRibbonGroupsArea([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] PaletteRedirect redirect, + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); @@ -114,7 +114,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs index 83db09147..b66bd82fd 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATContents.cs @@ -38,8 +38,8 @@ private class QATButtonToView : DictionaryOwning ribbon control instance. /// Delegate for notifying paint requests. /// Should the extra button be shown. - public ViewLayoutRibbonQATContents(KryptonRibbon ribbon, - NeedPaintHandler needPaint, + public ViewLayoutRibbonQATContents([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaint, bool showExtraButton) { Debug.Assert(ribbon != null); @@ -253,7 +253,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs index bdd3cc5b4..8cf1de472 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATFromOverflow.cs @@ -33,11 +33,11 @@ internal class ViewLayoutRibbonQATFromOverflow : ViewLayoutRibbonQATContents /// Delegate for notifying paint requests. /// Should the extra button be shown. /// Source for finding buttons that are overflowing. - public ViewLayoutRibbonQATFromOverflow(Control parentControl, + public ViewLayoutRibbonQATFromOverflow([DisallowNull] Control parentControl, KryptonRibbon ribbon, NeedPaintHandler needPaint, bool showExtraButton, - ViewLayoutRibbonQATContents contents) + [DisallowNull] ViewLayoutRibbonQATContents contents) : base(ribbon, needPaint, showExtraButton) { Debug.Assert(parentControl != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs index fb28c7c03..62e725b6d 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonQATMini.cs @@ -36,7 +36,7 @@ internal class ViewLayoutRibbonQATMini : ViewLayoutDocker /// /// Owning control instance. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonQATMini(KryptonRibbon ribbon, + public ViewLayoutRibbonQATMini([DisallowNull] KryptonRibbon ribbon, NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); @@ -226,7 +226,7 @@ public KeyTipInfo[] GetQATKeyTips() /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs index 823fe2c1d..3769f2cf3 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonRowCenter.cs @@ -69,7 +69,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -143,7 +143,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs index badc66dc0..c81279275 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScrollPort.cs @@ -32,7 +32,7 @@ public class RibbonViewControl : ViewControl /// Initialize a new instance of the ViewControl class. /// /// Top level ribbon control. - public RibbonViewControl(KryptonRibbon ribbon) + public RibbonViewControl([DisallowNull] KryptonRibbon ribbon) : base(ribbon) { Debug.Assert(ribbon != null); @@ -148,12 +148,12 @@ protected override bool ProcessDialogKey(Keys keyData) /// Should scoller be inset for use in tabs area. /// Scrolling speed. /// Delegate for notifying paint/layout requests. - public ViewLayoutRibbonScrollPort(KryptonRibbon ribbon, + public ViewLayoutRibbonScrollPort([DisallowNull] KryptonRibbon ribbon, Orientation orientation, - ViewBase viewFiller, + [DisallowNull] ViewBase viewFiller, bool insetForTabs, int scrollSpeed, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(viewFiller != null); @@ -451,7 +451,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -629,7 +629,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs index cd8c56504..37792602f 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonScroller.cs @@ -110,7 +110,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs index 6290442ec..986cd782c 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonSeparator.cs @@ -93,7 +93,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs index ebc1c4cff..8f902cabf 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabs.cs @@ -55,8 +55,8 @@ private class ContextNameList : List { } /// /// Owning ribbon control instance. /// Delegate for notifying paint requests. - public ViewLayoutRibbonTabs(KryptonRibbon ribbon, - NeedPaintHandler needPaint) + public ViewLayoutRibbonTabs([DisallowNull] KryptonRibbon ribbon, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(ribbon != null); Debug.Assert(needPaint != null); @@ -435,7 +435,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs index 63d140131..963dffebb 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs @@ -93,11 +93,11 @@ public RibbonButtonSpecFixedCollection(KryptonRibbon owner) /// Reference to the caption area. /// Reference to layout of the context area. /// Delegate for notifying paint/layout changes. - public ViewLayoutRibbonTabsArea(KryptonRibbon ribbon, + public ViewLayoutRibbonTabsArea([DisallowNull] KryptonRibbon ribbon, [DisallowNull] PaletteRedirect? redirect, - ViewDrawRibbonCaptionArea captionArea, - ViewLayoutRibbonContextTitles layoutContexts, - NeedPaintHandler needPaintDelegate) + [DisallowNull] ViewDrawRibbonCaptionArea captionArea, + [DisallowNull] ViewLayoutRibbonContextTitles layoutContexts, + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(ribbon != null); Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs index 5076d373c..ab4bd2148 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsSpare.cs @@ -50,7 +50,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs index 84b25d448..d32341e7c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs +++ b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateText.cs @@ -47,10 +47,10 @@ public class AccurateText : GlobalId /// Dispose of font when finished with it. /// /// A memento used to draw the text. - public static AccurateTextMemento MeasureString(Graphics g, + public static AccurateTextMemento MeasureString([DisallowNull] Graphics g, RightToLeft rtl, - string text, - Font font, + [DisallowNull] string text, + [DisallowNull] Font font, PaletteTextTrim trim, PaletteRelativeAlign align, PaletteTextHotkeyPrefix prefix, @@ -206,7 +206,7 @@ public static AccurateTextMemento MeasureString(Graphics g, /// When on composition draw with glowing. /// /// True if draw succeeded; False is draw produced an error. - public static bool DrawString(Graphics g, + public static bool DrawString([DisallowNull] Graphics g, Brush brush, Rectangle rect, RightToLeft rtl, @@ -214,7 +214,7 @@ public static bool DrawString(Graphics g, bool composition, bool glowing, PaletteState state, - AccurateTextMemento memento) + [DisallowNull] AccurateTextMemento memento) { Debug.Assert(g != null); Debug.Assert(memento != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs index 9d60e1241..ae8e28fa9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs +++ b/Source/Krypton Components/Krypton.Toolkit/AccurateText/AccurateTextMemento.cs @@ -37,7 +37,7 @@ public class AccurateTextMemento : GlobalId, /// Drawing hint. /// Should the font be disposed. internal AccurateTextMemento(string text, - Font font, + [DisallowNull] Font font, SizeF sizeF, StringFormat format, TextRenderingHint hint, // TODO: What was this supposed to be used for ? diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs index 67c1a3bc5..109ef8e82 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecCollection.cs @@ -46,7 +46,7 @@ public abstract class ButtonSpecCollectionBase : GlobalId /// Initialize a new instance of the ButtonSpecCollectionBase class. /// /// Reference to owning object instance. - protected ButtonSpecCollectionBase(object owner) + protected ButtonSpecCollectionBase([DisallowNull] object owner) { Debug.Assert(owner != null); Owner = owner!; @@ -224,7 +224,7 @@ public void Remove(object? value) => /// /// T reference. /// -1 if not found; otherwise index position. - public int IndexOf(T item) + public int IndexOf([DisallowNull] T item) { Debug.Assert(item != null); return _specs.IndexOf(item!); @@ -236,7 +236,7 @@ public int IndexOf(T item) /// Insert index. /// T reference. /// - public void Insert(int index, T item) + public void Insert(int index, [DisallowNull] T item) { Debug.Assert(item != null); @@ -323,7 +323,7 @@ public T? this[string uniqueName] /// /// T reference. /// - public void Add(T item) + public void Add([DisallowNull] T item) { Debug.Assert(item != null); @@ -354,7 +354,7 @@ public void Add(T item) /// /// T reference. /// True if spec found; otherwise false. - public bool Contains(T item) + public bool Contains([DisallowNull] T item) { Debug.Assert(item != null); return _specs.Contains(item!); @@ -365,7 +365,7 @@ public bool Contains(T item) /// /// Target array. /// Starting array index. - public void CopyTo(T[] array, int arrayIndex) + public void CopyTo([DisallowNull] T[] array, int arrayIndex) { Debug.Assert(array != null); _specs.CopyTo(array, arrayIndex); @@ -386,7 +386,7 @@ public void CopyTo(T[] array, int arrayIndex) /// /// T reference. /// True if removed; otherwise false. - public bool Remove(T item) + public bool Remove([DisallowNull] T item) { Debug.Assert(item != null, nameof(item) + " != null"); @@ -414,7 +414,7 @@ public bool Remove(T item) /// The Array that is the destination of the elements copied from the collection. /// The index in array at which copying begins. /// - public void CopyTo(Array array, int index) + public void CopyTo([DisallowNull] Array array, int index) { Debug.Assert(array != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs index 4150013f6..5034c6c65 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecFormFixed.cs @@ -24,7 +24,7 @@ public abstract class ButtonSpecFormFixed : ButtonSpec /// /// Reference to owning krypton form. /// Fixed style to use. - protected ButtonSpecFormFixed(KryptonForm form, + protected ButtonSpecFormFixed([DisallowNull] KryptonForm form, PaletteButtonSpecStyle fixedStyle) { Debug.Assert(form != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs index be44747f0..62734cd71 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerBase.cs @@ -52,7 +52,7 @@ internal class ListSpacers : List { } /// Array of target metrics for button padding. /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. - protected ButtonSpecManagerBase(Control control, + protected ButtonSpecManagerBase([DisallowNull] Control control, PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, @@ -60,7 +60,7 @@ protected ButtonSpecManagerBase(Control control, PaletteMetricInt[] viewMetricIntOutside, PaletteMetricInt[] viewMetricIntInside, PaletteMetricPadding[] viewMetricPaddings, - GetToolStripRenderer getRenderer, + [DisallowNull] GetToolStripRenderer getRenderer, NeedPaintHandler needPaint) { Debug.Assert(control != null); @@ -562,7 +562,7 @@ select specView.ButtonSpec /// ButtonSpec instance. /// Palette redirector for the button spec instance. public virtual PaletteRedirect CreateButtonSpecRemap(PaletteRedirect? redirector, - ButtonSpec buttonSpec) => + [DisallowNull] ButtonSpec buttonSpec) => new ButtonSpecRemapByContentView(redirector, buttonSpec); #endregion @@ -651,7 +651,7 @@ protected virtual void ButtonSpecCreated(ButtonSpec buttonSpec, /// Target metric padding. /// ButtonSpec instance. /// ButtonSpecView derived class. - protected virtual ButtonSpecView CreateButtonSpecView(PaletteRedirect redirector, + protected virtual ButtonSpecView CreateButtonSpecView([DisallowNull] PaletteRedirect redirector, IPaletteMetric? viewPaletteMetric, PaletteMetricPadding viewMetricPadding, ButtonSpec buttonSpec) => diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs index 77e7b245c..da661ad52 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs @@ -36,7 +36,7 @@ public class ButtonSpecManagerDraw : ButtonSpecManagerBase /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. public ButtonSpecManagerDraw(Control control, - PaletteRedirect? redirector, + [DisallowNull] PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, ViewDrawDocker[] viewDockers, @@ -66,10 +66,10 @@ public ButtonSpecManagerDraw(Control control, /// Delegate for returning a tool strip renderer. /// Delegate for notifying paint requests. public ButtonSpecManagerDraw(Control control, - PaletteRedirect? redirector, + [DisallowNull] PaletteRedirect? redirector, ButtonSpecCollectionBase? variableSpecs, ButtonSpecCollectionBase? fixedSpecs, - ViewDrawDocker[] viewDockers, + [DisallowNull] ViewDrawDocker[] viewDockers, IPaletteMetric[] viewMetrics, PaletteMetricInt[] viewMetricIntOutside, PaletteMetricInt[] viewMetricIntInside, diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs index a1ceaa751..3c5cd8728 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentBase.cs @@ -28,7 +28,7 @@ public abstract class ButtonSpecRemapByContentBase : PaletteRedirect /// Initial palette target for redirection. /// Reference to button specification. protected ButtonSpecRemapByContentBase(PaletteBase? target, - ButtonSpec buttonSpec) + [DisallowNull] ButtonSpec buttonSpec) : base(target) { Debug.Assert(buttonSpec != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs index 3ebf14787..7b64966dd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecRemapByContentView.cs @@ -24,7 +24,7 @@ public class ButtonSpecRemapByContentView : ButtonSpecRemapByContentBase /// Initial palette target for redirection. /// Reference to button specification. public ButtonSpecRemapByContentView(PaletteBase? target, - ButtonSpec buttonSpec) + [DisallowNull] ButtonSpec buttonSpec) : base(target, buttonSpec) { } diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs index d54c5c3b8..30e7aeb86 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecView.cs @@ -34,11 +34,11 @@ public class ButtonSpecView : GlobalId, /// Padding metric for border padding. /// Reference to owning manager. /// Access - public ButtonSpecView(PaletteRedirect redirector, + public ButtonSpecView([DisallowNull] PaletteRedirect redirector, IPaletteMetric? paletteMetric, PaletteMetricPadding metricPadding, - ButtonSpecManagerBase manager, - ButtonSpec buttonSpec) + [DisallowNull] ButtonSpecManagerBase manager, + [DisallowNull] ButtonSpec buttonSpec) { Debug.Assert(redirector != null); Debug.Assert(manager != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs index 527316004..173e36e11 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecViewControllers.cs @@ -24,9 +24,9 @@ public class ButtonSpecViewControllers /// Mouse controller. /// Source controller. /// Key controller. - public ButtonSpecViewControllers(IMouseController mouseController, - ISourceController sourceController, - IKeyController keyController) + public ButtonSpecViewControllers([DisallowNull] IMouseController mouseController, + [DisallowNull] ISourceController sourceController, + [DisallowNull] IKeyController keyController) { Debug.Assert(mouseController != null); Debug.Assert(sourceController != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs index 35a5b9d8f..c0cdad971 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuColorColumns.cs @@ -320,7 +320,7 @@ public void SetCustomColors(Color[]?[]? colors) /// /// Color to find. /// True if found; otherwise false. - public bool ContainsColor(Color color) + public bool ContainsColor([DisallowNull] Color color) { if ((Colors != null) && (color != null)) { diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs index 965d8e69f..2f3d92610 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItemBase.cs @@ -95,7 +95,7 @@ public abstract ViewBase GenerateView(IContextMenuProvider provider, bool standardStyle, bool imageColumn); - internal void SetProvider(IContextMenuProvider provider) + internal void SetProvider([DisallowNull] IContextMenuProvider provider) { Debug.Assert(provider.ProviderRedirector != null); _provider = provider; diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs index 6e70daf99..845172d34 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ButtonController.cs @@ -87,7 +87,7 @@ public class ButtonController : GlobalId, /// /// Target for state changes. /// Delegate for notifying paint requests. - public ButtonController(ViewBase target, + public ButtonController([DisallowNull] ViewBase target, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -499,7 +499,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -551,7 +551,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -619,7 +619,7 @@ public virtual void GotFocus(Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs index 47db7a93d..d44202e6c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/CheckBoxController.cs @@ -40,8 +40,8 @@ public class CheckBoxController : GlobalId, /// Target for state changes. /// Top element for the check box control. /// Delegate for notifying paint requests. - public CheckBoxController(ViewDrawCheckBox target, - ViewBase top, + public CheckBoxController([DisallowNull] ViewDrawCheckBox target, + [DisallowNull] ViewBase top, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -207,7 +207,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -251,7 +251,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs index fe08e9feb..9e296bd6d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ContextMenuController.cs @@ -39,7 +39,7 @@ public class ContextMenuController : GlobalId, /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -87,7 +87,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -113,7 +113,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs index 55a23d02c..933b8dbce 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/ControllerDefinitions.cs @@ -114,7 +114,7 @@ public interface ISourceController /// Source control has lost the focus. /// /// Reference to the source control instance. - void LostFocus(Control c); + void LostFocus([DisallowNull] Control c); } #endregion } diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs index 83f5e98fd..a2ce6f464 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/LinkLabelController.cs @@ -51,7 +51,7 @@ public class LinkLabelController : GlobalId, /// Palette to use in the pressed state. /// Override to update with the pressed state. /// Delegate for notifying paint requests. - public LinkLabelController(ViewDrawContent target, + public LinkLabelController([DisallowNull] ViewDrawContent target, IPaletteContent paletteDisabled, IPaletteContent paletteNormal, IPaletteContent paletteTracking, @@ -247,7 +247,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -304,7 +304,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { // If we are capturing mouse input if (Captured) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs index 4dcebd69e..fd3e84ab4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckBoxController.cs @@ -44,10 +44,10 @@ internal class MenuCheckBoxController : GlobalId, /// Target for state changes. /// Drawing element that owns check box display. /// Delegate for notifying paint requests. - public MenuCheckBoxController(ViewContextMenuManager viewManager, - ViewBase target, - ViewDrawMenuCheckBox checkBox, - NeedPaintHandler needPaint) + public MenuCheckBoxController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewBase target, + [DisallowNull] ViewDrawMenuCheckBox checkBox, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -237,7 +237,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -294,7 +294,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -320,7 +320,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -348,7 +348,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs index 3657c2368..4b3ae4906 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuCheckButtonController.cs @@ -44,10 +44,10 @@ internal class MenuCheckButtonController : GlobalId, /// Target for state changes. /// Drawing element that owns check button display. /// Delegate for notifying paint requests. - public MenuCheckButtonController(ViewContextMenuManager viewManager, - ViewBase target, - ViewDrawMenuCheckButton checkButton, - NeedPaintHandler needPaint) + public MenuCheckButtonController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewBase target, + [DisallowNull] ViewDrawMenuCheckButton checkButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -240,7 +240,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -297,7 +297,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -323,7 +323,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -351,7 +351,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs index d3e009e2d..812c6b430 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuColorBlockController.cs @@ -43,10 +43,10 @@ internal class MenuColorBlockController : GlobalId, /// Target for state changes. /// Drawing element that owns color block display. /// Delegate for notifying paint requests. - public MenuColorBlockController(ViewContextMenuManager viewManager, - ViewBase target, - ViewDrawMenuColorBlock colorBlock, - NeedPaintHandler needPaint) + public MenuColorBlockController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewBase target, + [DisallowNull] ViewDrawMenuColorBlock colorBlock, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -229,7 +229,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -286,7 +286,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -312,7 +312,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -340,7 +340,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs index 5a2c4190c..6844ab882 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuImageSelectController.cs @@ -45,10 +45,10 @@ internal class MenuImageSelectController : GlobalId, /// Target for state changes. /// Reference to layout of the image items. /// Delegate for notifying paint requests. - public MenuImageSelectController(ViewContextMenuManager viewManager, - ViewDrawMenuImageSelectItem target, - ViewLayoutMenuItemSelect layout, - NeedPaintHandler needPaint) + public MenuImageSelectController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewDrawMenuImageSelectItem target, + [DisallowNull] ViewLayoutMenuItemSelect layout, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -298,7 +298,7 @@ public void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public void LostFocus(Control c) + public void LostFocus([DisallowNull] Control c) { } #endregion @@ -311,7 +311,7 @@ public void LostFocus(Control c) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -368,7 +368,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -394,7 +394,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs index 142d2ca1a..050844799 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuItemController.cs @@ -32,9 +32,9 @@ internal class MenuItemController : GlobalId, /// Owning view manager instance. /// Target menu item view element. /// Delegate for notifying paint requests. - public MenuItemController(ViewContextMenuManager viewManager, - ViewDrawMenuItem menuItem, - NeedPaintHandler needPaint) + public MenuItemController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewDrawMenuItem menuItem, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(menuItem != null); @@ -233,7 +233,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -312,7 +312,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -338,7 +338,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -366,7 +366,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs index 6de330e16..c181e4b28 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuLinkLabelController.cs @@ -44,10 +44,10 @@ internal class MenuLinkLabelController : GlobalId, /// Target for state changes. /// Drawing element that owns link label display. /// Delegate for notifying paint requests. - public MenuLinkLabelController(ViewContextMenuManager viewManager, - ViewDrawContent target, - ViewDrawMenuLinkLabel linkLabel, - NeedPaintHandler needPaint) + public MenuLinkLabelController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewDrawContent target, + [DisallowNull] ViewDrawMenuLinkLabel linkLabel, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -234,7 +234,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -291,7 +291,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -317,7 +317,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -345,7 +345,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs index 0c538abbf..037f825e2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MenuRadioButtonController.cs @@ -44,10 +44,10 @@ internal class MenuRadioButtonController : GlobalId, /// Target for state changes. /// Drawing element that owns radio button display. /// Delegate for notifying paint requests. - public MenuRadioButtonController(ViewContextMenuManager viewManager, - ViewBase target, - ViewDrawMenuRadioButton radioButton, - NeedPaintHandler needPaint) + public MenuRadioButtonController([DisallowNull] ViewContextMenuManager viewManager, + [DisallowNull] ViewBase target, + [DisallowNull] ViewDrawMenuRadioButton radioButton, + [DisallowNull] NeedPaintHandler needPaint) { Debug.Assert(viewManager != null); Debug.Assert(target != null); @@ -237,7 +237,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -294,7 +294,7 @@ public virtual void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyPressEventArgs that contains the event data. /// - public virtual void KeyPress(Control c, KeyPressEventArgs e) + public virtual void KeyPress([DisallowNull] Control c, [DisallowNull] KeyPressEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -320,7 +320,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -348,7 +348,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs index d861a435d..887545766 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/MonthCalendarController.cs @@ -314,7 +314,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -494,7 +494,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// /// Reference to the source control instance. /// - public virtual void GotFocus(Control c) + public virtual void GotFocus([DisallowNull] Control c) { Debug.Assert(c != null); @@ -510,7 +510,7 @@ public virtual void GotFocus(Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs index 639e32b58..6dcee7ed0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/RadioButtonController.cs @@ -37,8 +37,8 @@ internal class RadioButtonController : GlobalId, /// Target for state changes. /// Top element for the radio button control. /// Delegate for notifying paint requests. - public RadioButtonController(ViewDrawRadioButton target, - ViewBase top, + public RadioButtonController([DisallowNull] ViewDrawRadioButton target, + [DisallowNull] ViewBase top, NeedPaintHandler needPaint) { Debug.Assert(target != null); @@ -204,7 +204,7 @@ public virtual void DoubleClick(Point pt) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -248,7 +248,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs index a609eb682..5be46b834 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/SeparatorController.cs @@ -194,7 +194,7 @@ protected override void WndProc(ref Message m) /// Show as split or movement cursors. /// Draw a separator indicator. /// Delegate for notifying paint requests. - public SeparatorController(ISeparatorSource source, + public SeparatorController([DisallowNull] ISeparatorSource source, ViewBase target, bool splitCursors, bool drawIndicator, @@ -394,7 +394,7 @@ public override void KeyDown(Control c, KeyEventArgs e) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// True if capturing input; otherwise false. - public override bool KeyUp(Control c, KeyEventArgs e) + public override bool KeyUp(Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(e != null); @@ -423,7 +423,7 @@ public override bool KeyUp(Control c, KeyEventArgs e) /// Source control has lost the focus. /// /// Reference to the source control instance. - public override void LostFocus(Control c) + public override void LostFocus([DisallowNull] Control c) { // If we are capturing mouse input if (_moving) @@ -678,7 +678,7 @@ internal class SeparatorMessageFilter : IMessageFilter /// Initialize a new instance of the SeparatorMessageFilter class. /// /// Owning class instance. - public SeparatorMessageFilter(SeparatorController controller) + public SeparatorMessageFilter([DisallowNull] SeparatorController controller) { Debug.Assert(controller != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs index 849a4c58a..5c6737849 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/TooltipController.cs @@ -31,8 +31,8 @@ public class ToolTipController : GlobalId, /// Reference to manager of all tooltip functionality. /// Target element that controller is for. /// Target controller that we are snooping. - public ToolTipController(ToolTipManager manager, - ViewBase targetElement, + public ToolTipController([DisallowNull] ToolTipManager manager, + [DisallowNull] ViewBase targetElement, IMouseController? targetController) { Debug.Assert(manager != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs b/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs index 031961069..05964f1f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controller/TrackBarController.cs @@ -163,7 +163,7 @@ public virtual void MouseLeave(Control c, ViewBase? next) /// Reference to the source control instance. /// A KeyEventArgs that contains the event data. /// - public virtual void KeyDown(Control c, KeyEventArgs e) + public virtual void KeyDown([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -252,7 +252,7 @@ public virtual void KeyPress(Control c, KeyPressEventArgs e) /// A KeyEventArgs that contains the event data. /// /// True if capturing input; otherwise false. - public virtual bool KeyUp(Control c, KeyEventArgs e) + public virtual bool KeyUp([DisallowNull] Control c, [DisallowNull] KeyEventArgs e) { Debug.Assert(c != null); Debug.Assert(e != null); @@ -281,7 +281,7 @@ public virtual void GotFocus(Control c) /// /// Reference to the source control instance. /// - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs index 560068772..237653108 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckSet.cs @@ -40,7 +40,7 @@ public class KryptonCheckButtonCollection : CollectionBase /// Initialize a new instance of the KryptonCheckButtonCollection class. /// /// Owning component - public KryptonCheckButtonCollection(KryptonCheckSet owner) + public KryptonCheckButtonCollection([DisallowNull] KryptonCheckSet owner) { Debug.Assert(owner != null); _owner = owner!; @@ -55,7 +55,7 @@ public KryptonCheckButtonCollection(KryptonCheckSet owner) /// The KryptonCheckButton object to add to the collection. /// /// The index of the new entry. - public int Add(KryptonCheckButton checkButton) + public int Add([DisallowNull] KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -103,7 +103,7 @@ public int IndexOf(KryptonCheckButton checkButton) => /// The KryptonCheckButton reference to insert. /// /// - public void Insert(int index, KryptonCheckButton checkButton) + public void Insert(int index, [DisallowNull] KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -133,7 +133,7 @@ public void Insert(int index, KryptonCheckButton checkButton) /// The KryptonCheckButton to remove. /// /// - public void Remove(KryptonCheckButton checkButton) + public void Remove([DisallowNull] KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); @@ -255,7 +255,7 @@ protected override void OnSetComplete(int index, object? oldValue, object? newVa /// /// Container that owns the component. /// - public KryptonCheckSet(IContainer container) + public KryptonCheckSet([DisallowNull] IContainer container) : this() { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs index df482a390..11d983960 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonContextMenu.cs @@ -468,7 +468,7 @@ protected virtual VisualContextMenu CreateContextMenu(KryptonContextMenu kcm, #region Implementation private void PerformNeedPaint(bool needLayout) => OnNeedPaint(this, new NeedLayoutEventArgs(needLayout)); - private void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + private void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs index 47a44dc27..fd1b566fe 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs @@ -3120,7 +3120,7 @@ internal bool HasCircularReference() return null; } - private object? ImportFromFile(object? parameter) + private object? ImportFromFile([DisallowNull] object? parameter) { // Cast to correct type if (parameter is not string filename) @@ -3146,7 +3146,7 @@ internal bool HasCircularReference() return filename; } - private object? ImportFromStream(object? parameter) + private object? ImportFromStream([DisallowNull] object? parameter) { // Cast to correct type if (parameter is not Stream stream) @@ -3166,7 +3166,7 @@ internal bool HasCircularReference() return stream; } - private object? ImportFromByteArray(object? parameter) + private object? ImportFromByteArray([DisallowNull] object? parameter) { // Cast to an array of parameters if (parameter is not byte[] byteArray) @@ -3186,7 +3186,7 @@ internal bool HasCircularReference() return null; } - private void ImportFromXmlDocument(XmlDocument doc) + private void ImportFromXmlDocument([DisallowNull] XmlDocument doc) { // Remember the current culture setting CultureInfo culture = Thread.CurrentThread.CurrentCulture; @@ -3258,7 +3258,7 @@ private void ImportFromXmlDocument(XmlDocument doc) } } - private object? ExportToFile(object? parameter) + private object? ExportToFile([DisallowNull] object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) @@ -3287,7 +3287,7 @@ private void ImportFromXmlDocument(XmlDocument doc) return filename; } - private object? ExportToStream(object? parameter) + private object? ExportToStream([DisallowNull] object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) @@ -3312,7 +3312,7 @@ private void ImportFromXmlDocument(XmlDocument doc) return stream; } - private object? ExportToByteArray(object? parameter) + private object? ExportToByteArray([DisallowNull] object? parameter) { // Cast to an array of parameters if (parameter is not object[] parameters) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs index 0c9e372bc..88f2b436a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs @@ -885,7 +885,7 @@ protected void OnNeedResyncPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); @@ -989,7 +989,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs index a20845213..bcca89211 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs @@ -499,7 +499,7 @@ public bool IsInAdministratorMode /// Reference to view element. /// Docking style of the element. [EditorBrowsable(EditorBrowsableState.Never)] - public void InjectViewElement(ViewBase element, ViewDockStyle style) + public void InjectViewElement([DisallowNull] ViewBase element, ViewDockStyle style) { Debug.Assert(element != null); Debug.Assert(_drawHeading != null); @@ -535,7 +535,7 @@ public void InjectViewElement(ViewBase element, ViewDockStyle style) /// Reference to view element. /// Docking style of the element. [EditorBrowsable(EditorBrowsableState.Never)] - public void RevokeViewElement(ViewBase element, ViewDockStyle style) + public void RevokeViewElement([DisallowNull] ViewBase element, ViewDockStyle style) { Debug.Assert(element != null); @@ -935,7 +935,7 @@ protected override void OnTextChanged(EventArgs e) /// Source of notification. /// An EventArgs containing event data. /// - protected override void OnButtonSpecChanged(object sender, EventArgs e) + protected override void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs index 63aa1ecdd..23e574458 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBoxPanel.cs @@ -27,9 +27,9 @@ public class KryptonGroupBoxPanel : KryptonGroupPanel /// Normal appearance state. /// Callback delegate for layout processing. public KryptonGroupBoxPanel(Control alignControl, - PaletteDoubleRedirect? stateCommon, - PaletteDouble stateDisabled, - PaletteDouble stateNormal, + [DisallowNull] PaletteDoubleRedirect? stateCommon, + [DisallowNull] PaletteDouble stateDisabled, + [DisallowNull] PaletteDouble stateNormal, NeedPaintHandler layoutHandler) : base(alignControl, stateCommon, stateDisabled, stateNormal, layoutHandler) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs index b9ddc2fcf..439723ad6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupPanel.cs @@ -89,9 +89,9 @@ public class KryptonGroupPanel : KryptonPanel /// Normal appearance state. /// Callback delegate for layout processing. public KryptonGroupPanel(Control alignControl, - PaletteDoubleRedirect stateCommon, - PaletteDouble stateDisabled, - PaletteDouble stateNormal, + [DisallowNull] PaletteDoubleRedirect stateCommon, + [DisallowNull] PaletteDouble stateDisabled, + [DisallowNull] PaletteDouble stateNormal, NeedPaintHandler? layoutHandler) : base(stateCommon, stateDisabled, stateNormal) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs index 06f245311..9dab7e8b5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs @@ -1120,7 +1120,7 @@ private void CacheNewPalette(PaletteBase? palette) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs index eb4679613..5b9a2175f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonManager.cs @@ -171,7 +171,7 @@ public KryptonManager() => /// /// Container that owns the component. /// - public KryptonManager(IContainer container) + public KryptonManager([DisallowNull] IContainer container) : this() { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs index 2880ca60f..dbb2f3385 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs @@ -54,9 +54,9 @@ public KryptonPanel() /// Common appearance state to inherit from. /// Disabled appearance state. /// Normal appearance state. - public KryptonPanel(PaletteDoubleRedirect? stateCommon, - PaletteDouble stateDisabled, - PaletteDouble stateNormal) + public KryptonPanel([DisallowNull] PaletteDoubleRedirect? stateCommon, + [DisallowNull] PaletteDouble stateDisabled, + [DisallowNull] PaletteDouble stateNormal) { SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.OptimizedDoubleBuffer, true); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs index 9af65b320..f7a6ac001 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonSplitterPanel.cs @@ -78,7 +78,7 @@ public sealed class KryptonSplitterPanel : KryptonPanel /// Initialize a new instance of the KryptonSplitterPanel class. /// /// Reference to owning container. - public KryptonSplitterPanel(KryptonSplitContainer container) + public KryptonSplitterPanel([DisallowNull] KryptonSplitContainer container) { Debug.Assert(container != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs index df42fa42f..bf3e2449a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualContainerControlBase.cs @@ -609,7 +609,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) { Debug.Assert(e != null); @@ -659,7 +659,7 @@ protected virtual void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs index 516b9b3c3..b4797cf58 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualControlBase.cs @@ -663,7 +663,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) { Debug.Assert(e != null); @@ -710,7 +710,7 @@ protected virtual void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs index dc2dd735c..ce2e72b7b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualForm.cs @@ -1053,7 +1053,7 @@ protected virtual void OnAllowFormChromeChanged(object sender, EventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs index 5c5a6723a..5d08cf95b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPanel.cs @@ -636,7 +636,7 @@ protected NeedPaintHandler NeedPaintDelegate /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); @@ -755,7 +755,7 @@ protected virtual bool EvalTransparentPaint() => /// Source of notification. /// An EventArgs containing event data. /// - protected virtual void OnButtonSpecChanged(object sender, EventArgs e) + protected virtual void OnButtonSpecChanged(object sender, [DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs index 0af57a9c8..3c78f9c0c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopup.cs @@ -372,7 +372,7 @@ protected NeedPaintHandler NeedPaintDelegate /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs index 712a3122e..98012bcae 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupManager.cs @@ -129,7 +129,7 @@ public VisualPopup? CurrentPopup /// Start tracking the provided popup. /// /// Popup instance to track. - public void StartTracking(VisualPopup popup) + public void StartTracking([DisallowNull] VisualPopup popup) { Debug.Assert(popup != null); Debug.Assert(!popup!.IsDisposed); @@ -289,7 +289,7 @@ public void ShowContextMenuStrip(ContextMenuStrip cms, /// Reference to ContextMenuStrip. /// Screen position for showing the context menu strip. /// Delegate to call when strip dismissed. - public void ShowContextMenuStrip(ContextMenuStrip cms, + public void ShowContextMenuStrip([DisallowNull] ContextMenuStrip cms, Point screenPt, EventHandler? cmsFinishDelegate) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs index 6dd2520dd..2fdaece41 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualPopupTooltip.cs @@ -54,8 +54,8 @@ public VisualPopupToolTip(PaletteRedirect? redirector, /// Style for the tooltip border. /// Style for the tooltip content. /// Does the Tooltip need a shadow effect. - public VisualPopupToolTip(PaletteRedirect? redirector, - IContentValues contentValues, + public VisualPopupToolTip([DisallowNull] PaletteRedirect? redirector, + [DisallowNull] IContentValues contentValues, IRenderer? renderer, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs b/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs index 985abd3dd..2f3e98897 100644 --- a/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/EventArgs/ButtonSpecEventArgs.cs @@ -23,7 +23,7 @@ public class ButtonSpecEventArgs : EventArgs /// /// Button spec effected by event. /// Index of page in the owning collection. - public ButtonSpecEventArgs(ButtonSpec spec, int index) + public ButtonSpecEventArgs([DisallowNull] ButtonSpec spec, int index) { Debug.Assert(spec != null); Debug.Assert(index >= 0); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs index e7e597eb3..73fa444e1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/CommonHelper.cs @@ -1116,7 +1116,7 @@ select GetControlWithFocus(child) /// /// Parent control. /// Control to be added. - public static void AddControlToParent(Control parent, Control c) + public static void AddControlToParent([DisallowNull] Control parent, [DisallowNull] Control c) { Debug.Assert(parent != null); Debug.Assert(c != null); @@ -1144,7 +1144,7 @@ public static void AddControlToParent(Control parent, Control c) /// Remove the provided control from its parent collection. /// /// Control to be removed. - public static void RemoveControlFromParent(Control c) + public static void RemoveControlFromParent([DisallowNull] Control c) { Debug.Assert(c != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs b/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs index cf6985f6e..968866802 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/CorrectContextControl.cs @@ -28,7 +28,7 @@ public class CorrectContextControl : IDisposable /// /// Context to update. /// Actual parent control instance. - public CorrectContextControl(ViewLayoutContext context, + public CorrectContextControl([DisallowNull] ViewLayoutContext context, Control control) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs b/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs index 843942db4..73f1693cb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/DesktopWindowManager.cs @@ -45,7 +45,7 @@ public static bool IsCompositionEnabled /// /// Window handle of form. /// Distance for each form edge. - public static void ExtendFrameIntoClientArea(IntPtr hWnd, Padding padding) + public static void ExtendFrameIntoClientArea([DisallowNull] IntPtr hWnd, Padding padding) { // We can't use 'null', since the type of the object is 'IntPtr'. So we need to use 'IntPtr.Zero'. Debug.Assert(hWnd != IntPtr.Zero); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs b/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs index 138bf4f61..32827a672 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/KryptonControlCollection.cs @@ -35,7 +35,7 @@ public KryptonControlCollection(Control owner) /// Control to be added. [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] - public void AddInternal(Control control) => + public void AddInternal([DisallowNull] Control control) => // ReSharper disable RedundantBaseQualifier // Do not remove base, as the KryptonReadOnlyControls is a mess ! base.Add(control); diff --git a/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs b/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs index 2fef306ef..aca758c16 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/TypedCollection.cs @@ -98,7 +98,7 @@ public virtual void AddRange(T[] itemArray) /// /// Object reference. /// The position into which the new item was inserted. - public virtual int Add(object value) + public virtual int Add([DisallowNull] object value) { // Use strongly typed implementation Add((value as T)!); @@ -166,7 +166,7 @@ object IList.this[int index] /// /// Item reference. /// -1 if not found; otherwise index position. - public int IndexOf(T item) + public int IndexOf([DisallowNull] T item) { Debug.Assert(item != null); return _list.IndexOf(item); @@ -179,7 +179,7 @@ public int IndexOf(T item) /// Item reference. /// /// - public virtual void Insert(int index, T item) + public virtual void Insert(int index, [DisallowNull] T item) { Debug.Assert(item != null); @@ -280,7 +280,7 @@ public void MoveBefore(T source, T target) /// Item reference. /// /// - public virtual void Add(T item) + public virtual void Add([DisallowNull] T item) { Debug.Assert(item != null); @@ -333,7 +333,7 @@ public void Clear() /// /// Target array. /// Starting array index. - public void CopyTo(T[] array, int arrayIndex) + public void CopyTo([DisallowNull] T[] array, int arrayIndex) { Debug.Assert(array != null); _list.CopyTo(array, arrayIndex); @@ -354,7 +354,7 @@ public void CopyTo(T[] array, int arrayIndex) /// /// Item reference. /// True if removed; otherwise false. - public virtual bool Remove(T item) + public virtual bool Remove([DisallowNull] T item) { Debug.Assert(item != null); @@ -382,7 +382,7 @@ public virtual bool Remove(T item) /// The Array that is the destination of the elements copied from the collection. /// The index in array at which copying begins. /// - public void CopyTo(Array array, int index) + public void CopyTo([DisallowNull] Array array, int index) { Debug.Assert(array != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs index b7baffa3f..58b56b32e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritForced.cs @@ -27,7 +27,7 @@ public class PaletteBackInheritForced : PaletteBackInherit /// Initialize a new instance of the PaletteBackInheritForced class. /// /// Background palette to inherit from. - public PaletteBackInheritForced(IPaletteBack inherit) + public PaletteBackInheritForced([DisallowNull] IPaletteBack inherit) { Debug.Assert(inherit != null); @@ -44,7 +44,7 @@ public PaletteBackInheritForced(IPaletteBack inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit(IPaletteBack paletteBack) + public void SetInherit([DisallowNull] IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); _inherit = paletteBack; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs index 91564d7a9..74f32ea6b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBackInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteBackInheritOverride : PaletteBackInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteBackInheritOverride(IPaletteBack primary, - IPaletteBack backup) + public PaletteBackInheritOverride([DisallowNull] IPaletteBack primary, + [DisallowNull] IPaletteBack backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs index 6cb930b3b..b53379b94 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs @@ -94,7 +94,7 @@ public InternalStorage() /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteBorder(IPaletteBorder inherit, + public PaletteBorder([DisallowNull] IPaletteBorder inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs index 9fa66c2cf..1e6195a97 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritForced.cs @@ -45,7 +45,7 @@ public PaletteBorderInheritForced(IPaletteBorder? inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit(IPaletteBorder paletteBorder) + public void SetInherit([DisallowNull] IPaletteBorder paletteBorder) { Debug.Assert(paletteBorder != null); _inherit = paletteBorder; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs index 840656b8e..08b834ef5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorderInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteBorderInheritOverride : PaletteBorderInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteBorderInheritOverride(IPaletteBorder primary, - IPaletteBorder backup) + public PaletteBorderInheritOverride([DisallowNull] IPaletteBorder primary, + [DisallowNull] IPaletteBorder backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs index fd7d20931..bbf6d31f1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs @@ -80,7 +80,7 @@ public PaletteContent(IPaletteContent inherit) /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteContent(IPaletteContent inherit, + public PaletteContent([DisallowNull] IPaletteContent inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs index 85d40b99e..2d170b798 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritForced.cs @@ -41,7 +41,7 @@ public PaletteContentInheritForced(IPaletteContent inherit) /// /// Gets and sets the palette to inherit from. /// - public void SetInherit(IPaletteContent paletteContent) + public void SetInherit([DisallowNull] IPaletteContent paletteContent) { Debug.Assert(paletteContent != null); _inherit = paletteContent; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs index 55b04cc5c..32409843a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentInheritOverride.cs @@ -42,8 +42,8 @@ public PaletteContentInheritOverride(IPaletteContent primary, /// Backup inheritance. /// State used by the override. /// Should the override we used. - public PaletteContentInheritOverride(IPaletteContent primary, - IPaletteContent backup, + public PaletteContentInheritOverride([DisallowNull] IPaletteContent primary, + [DisallowNull] IPaletteContent backup, PaletteState overrideState, bool apply) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs index 3c546b61e..6af50e684 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleMetric.cs @@ -37,7 +37,7 @@ public PaletteDoubleMetric(PaletteDoubleMetricRedirect? inherit) /// /// Source for palette defaulted values. /// Delegate for notifying paint requests. - public PaletteDoubleMetric(PaletteDoubleMetricRedirect inherit, + public PaletteDoubleMetric([DisallowNull] PaletteDoubleMetricRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs index 08e862c06..6018c18c5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleOverride.cs @@ -32,8 +32,8 @@ public class PaletteDoubleOverride : GlobalId, /// Override palette to use. /// State used by the override. /// - public PaletteDoubleOverride(IPaletteDouble normalTriple, - IPaletteDouble overrideTriple, + public PaletteDoubleOverride([DisallowNull] IPaletteDouble normalTriple, + [DisallowNull] IPaletteDouble overrideTriple, PaletteState overrideState) { Debug.Assert(normalTriple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs index 96e9d325a..135bd9865 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritOverride.cs @@ -29,8 +29,8 @@ public class PaletteElementColorInheritOverride : PaletteElementColorInherit /// /// First choice inheritance. /// Backup inheritance. - public PaletteElementColorInheritOverride(IPaletteElementColor primary, - IPaletteElementColor backup) + public PaletteElementColorInheritOverride([DisallowNull] IPaletteElementColor primary, + [DisallowNull] IPaletteElementColor backup) { Debug.Assert(primary != null); Debug.Assert(backup != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs index 5e3101a74..bc23403fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteElementColor/PaletteElementColorInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteElementColorInheritRedirect : PaletteElementColorInherit /// /// Source for inherit requests. /// Element value.. - public PaletteElementColorInheritRedirect(PaletteRedirect redirect, + public PaletteElementColorInheritRedirect([DisallowNull] PaletteRedirect redirect, PaletteElement element) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs index f817184cc..b529d2f71 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteMetric/PaletteMetricRedirect.cs @@ -27,7 +27,7 @@ public class PaletteMetricRedirect : Storage, /// Initialize a new instance of the PaletteMetricRedirect class. /// /// inheritance redirection instance. - public PaletteMetricRedirect(PaletteRedirect? redirect) + public PaletteMetricRedirect([DisallowNull] PaletteRedirect? redirect) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs index cff8654df..980e8b447 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectGrids.cs @@ -27,7 +27,7 @@ public class PaletteRedirectGrids : PaletteRedirect /// /// Initial palette target for redirection. /// Grid reference for directing palette requests. - public PaletteRedirectGrids(PaletteBase? target, KryptonPaletteGrid grid) + public PaletteRedirectGrids(PaletteBase? target, [DisallowNull] KryptonPaletteGrid grid) : base(target) { Debug.Assert(grid != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs index d81fb34f3..7bba741d4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBack.cs @@ -34,7 +34,7 @@ public class PaletteRibbonBack : Storage, /// /// Source for inheriting background values. /// Delegate for notifying changes in value. - public PaletteRibbonBack(IPaletteRibbonBack inheritBack, + public PaletteRibbonBack([DisallowNull] IPaletteRibbonBack inheritBack, NeedPaintHandler needPaint) { Debug.Assert(inheritBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs index 5924964de..d6915f02d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteRibbonBackInheritRedirect : PaletteRibbonBackInherit /// /// Source for inherit requests. /// Ribbon item background style. - public PaletteRibbonBackInheritRedirect(PaletteRedirect? redirect, + public PaletteRibbonBackInheritRedirect([DisallowNull] PaletteRedirect? redirect, PaletteRibbonBackStyle styleBack) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs index 4e1951126..80f8c38ed 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackRedirect.cs @@ -34,7 +34,7 @@ public class PaletteRibbonBackRedirect : Storage, /// inheritance redirection instance. /// inheritance ribbon back style. /// Delegate for notifying paint requests. - public PaletteRibbonBackRedirect(PaletteRedirect? redirect, + public PaletteRibbonBackRedirect([DisallowNull] PaletteRedirect? redirect, PaletteRibbonBackStyle backStyle, NeedPaintHandler needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs index 37eede392..44b9225aa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDouble.cs @@ -37,8 +37,8 @@ public class PaletteRibbonDouble : Storage, /// Source for inheriting background values. /// Source for inheriting text values. /// Delegate for notifying paint requests. - public PaletteRibbonDouble(IPaletteRibbonBack inheritBack, - IPaletteRibbonText inheritText, + public PaletteRibbonDouble([DisallowNull] IPaletteRibbonBack inheritBack, + [DisallowNull] IPaletteRibbonText inheritText, NeedPaintHandler needPaint) { Debug.Assert(inheritBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs index e28e22bcf..e4ffba41f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritOverride.cs @@ -34,10 +34,10 @@ public class PaletteRibbonDoubleInheritOverride : PaletteRibbonDoubleInherit /// Backup inheritance background. /// Backup inheritance text. /// Palette state to override. - public PaletteRibbonDoubleInheritOverride(IPaletteRibbonBack primaryBack, - IPaletteRibbonText primaryText, - IPaletteRibbonBack backupBack, - IPaletteRibbonText backupText, + public PaletteRibbonDoubleInheritOverride([DisallowNull] IPaletteRibbonBack primaryBack, + [DisallowNull] IPaletteRibbonText primaryText, + [DisallowNull] IPaletteRibbonBack backupBack, + [DisallowNull] IPaletteRibbonText backupText, PaletteState state) { Debug.Assert(primaryBack != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs index 032557f37..6e9d47a3c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleInheritRedirect.cs @@ -29,7 +29,7 @@ public class PaletteRibbonDoubleInheritRedirect : PaletteRibbonDoubleInherit /// Source for inherit requests. /// Ribbon item background style. /// Ribbon item text style. - public PaletteRibbonDoubleInheritRedirect(PaletteRedirect? redirect, + public PaletteRibbonDoubleInheritRedirect([DisallowNull] PaletteRedirect? redirect, PaletteRibbonBackStyle styleBack, PaletteRibbonTextStyle styleText) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs index 070db603c..2db9f97c0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonDoubleRedirect.cs @@ -38,7 +38,7 @@ public class PaletteRibbonDoubleRedirect : Storage, /// inheritance ribbon back style. /// inheritance ribbon text style. /// Delegate for notifying paint requests. - public PaletteRibbonDoubleRedirect(PaletteRedirect? redirect, + public PaletteRibbonDoubleRedirect([DisallowNull] PaletteRedirect? redirect, PaletteRibbonBackStyle backStyle, PaletteRibbonTextStyle textStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs index d0e3cdb27..a80eee3f6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs @@ -50,7 +50,7 @@ public class PaletteRibbonGeneral : Storage, /// /// Source for inheriting general values. /// Delegate for notifying paint requests. - public PaletteRibbonGeneral(IPaletteRibbonGeneral inherit, + public PaletteRibbonGeneral([DisallowNull] IPaletteRibbonGeneral inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs index ac3fca952..8009c817a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs @@ -26,7 +26,7 @@ public class PaletteRibbonGeneralInheritRedirect : PaletteRibbonGeneralInherit /// Initialize a new instance of the PaletteRibbonGeneralInheritRedirect class. /// /// Source for inherit requests. - public PaletteRibbonGeneralInheritRedirect(PaletteRedirect? redirect) + public PaletteRibbonGeneralInheritRedirect([DisallowNull] PaletteRedirect? redirect) { Debug.Assert(redirect != null); _redirect = redirect; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs index eb882721b..e41672406 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonTextInheritRedirect.cs @@ -28,7 +28,7 @@ public class PaletteRibbonTextInheritRedirect : PaletteRibbonTextInherit /// /// Source for inherit requests. /// Ribbon item text style. - public PaletteRibbonTextInheritRedirect(PaletteRedirect? redirect, + public PaletteRibbonTextInheritRedirect([DisallowNull] PaletteRedirect? redirect, PaletteRibbonTextStyle styleText) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs index 15c344240..bfedd07d6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTriple.cs @@ -24,7 +24,7 @@ public class PaletteTabTriple : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTabTriple(IPaletteTriple inherit, + public PaletteTabTriple([DisallowNull] IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs index 4d06ed598..cabe34c86 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTab/PaletteTabTripleRedirect.cs @@ -34,7 +34,7 @@ public class PaletteTabTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteTabTripleRedirect(PaletteRedirect redirect, + public PaletteTabTripleRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs index 0d6a079ae..ed160ee25 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTriple.cs @@ -33,7 +33,7 @@ public PaletteTriple(IPaletteTriple inherit) /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTriple(IPaletteTriple inherit, + public PaletteTriple([DisallowNull] IPaletteTriple inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs index 7b69cba1a..ffcfadfd3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleJustImage.cs @@ -33,7 +33,7 @@ public PaletteTripleJustImage(IPaletteTriple inherit) /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTripleJustImage(IPaletteTriple inherit, + public PaletteTripleJustImage([DisallowNull] IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs index 0d0d736e1..d5fbce03c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetric.cs @@ -28,7 +28,7 @@ public class PaletteTripleMetric : PaletteTriple, /// /// Source for palette defaulted values. /// Delegate for notifying paint requests. - public PaletteTripleMetric(PaletteTripleMetricRedirect inherit, + public PaletteTripleMetric([DisallowNull] PaletteTripleMetricRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs index 794eb966b..ccf540ca0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleMetricRedirect.cs @@ -31,7 +31,7 @@ public class PaletteTripleMetricRedirect : PaletteTripleRedirect, /// Style for the border. /// Style for the content. /// Delegate for notifying paint requests. - public PaletteTripleMetricRedirect(PaletteRedirect? redirect, + public PaletteTripleMetricRedirect([DisallowNull] PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs index 56610ad7c..3e87e96e5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteTriple/PaletteTripleOverride.cs @@ -31,8 +31,8 @@ public class PaletteTripleOverride : GlobalId, /// Normal palette to use. /// Override palette to use. /// State used by the override. - public PaletteTripleOverride(IPaletteTriple normalTriple, - IPaletteTriple overrideTriple, + public PaletteTripleOverride([DisallowNull] IPaletteTriple normalTriple, + [DisallowNull] IPaletteTriple overrideTriple, PaletteState overrideState) { Debug.Assert(normalTriple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs index ed86e33bc..4cb900f7b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Bases/PaletteMicrosoft365Base.cs @@ -261,10 +261,10 @@ public abstract class PaletteMicrosoft365Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365Base(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365Base([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs index cc3f91876..e94853e97 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs @@ -778,10 +778,10 @@ public abstract class PaletteMicrosoft365BlackDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlackDarkModeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlackDarkModeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4880,7 +4880,7 @@ static KryptonColorTable365BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlackDarkMode(Color[] colors, + public KryptonColorTable365BlackDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs index 2371269a5..921a37766 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs @@ -778,10 +778,10 @@ public abstract class PaletteMicrosoft365BlueDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlueDarkModeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlueDarkModeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4863,7 +4863,7 @@ static KryptonColorTable365BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlueDarkMode(Color[] colors, + public KryptonColorTable365BlueDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs index 009fe6c64..5ed6ef953 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs @@ -777,10 +777,10 @@ public abstract class PaletteMicrosoft365BlueLightModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlueLightModeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[]? trackBarColours) + protected PaletteMicrosoft365BlueLightModeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[]? trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4861,7 +4861,7 @@ static KryptonColorTable365BlueLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365BlueLightMode(Color[] colors, + public KryptonColorTable365BlueLightMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs index 28852b41c..577b1beef 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs @@ -783,10 +783,10 @@ public abstract class PaletteMicrosoft365SilverDarkModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365SilverDarkModeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365SilverDarkModeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4868,7 +4868,7 @@ static KryptonColorTable365SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365SilverDarkMode(Color[] colors, + public KryptonColorTable365SilverDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs index c4d88dfaa..732549734 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs @@ -781,10 +781,10 @@ public abstract class PaletteMicrosoft365SilverLightModeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365SilverLightModeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365SilverLightModeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); @@ -4867,7 +4867,7 @@ static KryptonColorTable365SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365SilverLightMode(Color[] colors, + public KryptonColorTable365SilverLightMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs index aa32b42df..923d7e97c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs @@ -767,10 +767,10 @@ public abstract class PaletteMicrosoft365BlackThemeBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - protected PaletteMicrosoft365BlackThemeBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + protected PaletteMicrosoft365BlackThemeBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs index 813851a86..a7a1cea4a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Bases/PaletteOffice2007Base.cs @@ -205,10 +205,10 @@ public abstract class PaletteOffice2007Base : PaletteBase /// Array of images for radio button. /// Array of track bar specific colors. protected PaletteOffice2007Base(string themeName, - Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + [DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs index 86a098e67..ce6514819 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs @@ -828,10 +828,10 @@ public abstract class PaletteOffice2007BlackDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlackDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2007BlackDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5798,7 +5798,7 @@ static KryptonColorTable2007BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlackDarkMode(Color[] colors, + public KryptonColorTable2007BlackDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs index e64c17094..85af603cf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs @@ -674,10 +674,10 @@ public abstract class PaletteOffice2007BlueDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlueDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2007BlueDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5067,7 +5067,7 @@ static KryptonColorTable2007BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlueDarkMode(Color[] colors, + public KryptonColorTable2007BlueDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs index 441491e6d..80193f2bc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs @@ -625,10 +625,10 @@ public abstract class PaletteOffice2007BlueLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007BlueLightModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2007BlueLightModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5534,7 +5534,7 @@ static KryptonColorTable2007BlueLightMode() /// Source of colours /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007BlueLightMode(Color[] colours, + public KryptonColorTable2007BlueLightMode([DisallowNull] Color[] colours, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs index f97ba184b..584447a87 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs @@ -614,10 +614,10 @@ public abstract class PaletteOffice2007SilverDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007SilverDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2007SilverDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5524,7 +5524,7 @@ static KryptonColorTable2007SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007SilverDarkMode(Color[] colors, + public KryptonColorTable2007SilverDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs index 29279a760..1b4dd13a3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs @@ -663,10 +663,10 @@ public abstract class PaletteOffice2007SilverLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2007SilverLightModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2007SilverLightModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5574,7 +5574,7 @@ static KryptonColorTable2007SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007SilverLightMode(Color[] colors, + public KryptonColorTable2007SilverLightMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs index 044f47f49..48a38039f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Bases/PaletteOffice2010Base.cs @@ -238,10 +238,10 @@ public abstract class PaletteOffice2010Base : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010Base(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010Base([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs index 1a37d5006..b57e9c968 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs @@ -977,10 +977,10 @@ public abstract class PaletteOffice2010BlackDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlackDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010BlackDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -5128,7 +5128,7 @@ static KryptonColorTable2010BlackDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlackDarkMode(Color[] colors, + public KryptonColorTable2010BlackDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs index 557b1d422..580498278 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs @@ -624,10 +624,10 @@ public abstract class PaletteOffice2010BlueDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlueDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010BlueDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4751,7 +4751,7 @@ static KryptonColorTable2010BlueDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlueDarkMode(Color[] colors, + public KryptonColorTable2010BlueDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs index 9affd8396..2fa79255e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs @@ -603,10 +603,10 @@ public abstract class PaletteOffice2010BlueLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010BlueLightModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010BlueLightModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4730,7 +4730,7 @@ static KryptonColorTable2010BlueLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010BlueLightMode(Color[] colors, + public KryptonColorTable2010BlueLightMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs index 90416fdc1..b745b99f7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs @@ -609,10 +609,10 @@ public abstract class PaletteOffice2010SilverDarkModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010SilverDarkModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010SilverDarkModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4737,7 +4737,7 @@ static KryptonColorTable2010SilverDarkMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010SilverDarkMode(Color[] colors, + public KryptonColorTable2010SilverDarkMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs index 40da1c745..4461808b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs @@ -638,10 +638,10 @@ public abstract class PaletteOffice2010SilverLightModeBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2010SilverLightModeBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2010SilverLightModeBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); @@ -4768,7 +4768,7 @@ static KryptonColorTable2010SilverLightMode() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010SilverLightMode(Color[] colors, + public KryptonColorTable2010SilverLightMode([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs index c0b17a34c..ae960745f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Bases/PaletteOffice2013Base.cs @@ -250,10 +250,10 @@ public abstract class PaletteOffice2013Base : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2013Base(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2013Base([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs index b7ef2b763..283206a6c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs @@ -644,10 +644,10 @@ public abstract class PaletteOffice2013WhiteBase : PaletteBase /// List of images for gallery buttons. /// Array of images for radio button. /// Array of track bar specific colors. - protected PaletteOffice2013WhiteBase(Color[] schemeColors, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, + protected PaletteOffice2013WhiteBase([DisallowNull] Color[] schemeColors, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColors) { Debug.Assert(schemeColors != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs index 2117cf0b5..77ed857fd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/PaletteVisualStudioBase.cs @@ -237,10 +237,10 @@ public abstract class PaletteVisualStudioBase : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudioBase(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudioBase([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs index fe728327f..0d6c4df69 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2007/PaletteVisualStudio2010With2007Base.cs @@ -235,10 +235,10 @@ public abstract class PaletteVisualStudio2010With2007Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2007Base(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2007Base([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs index af02c87a5..afc9466b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2010/PaletteVisualStudio2010With2010Base.cs @@ -236,10 +236,10 @@ public abstract class PaletteVisualStudio2010With2010Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2010Base(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2010Base([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs index 2b8fbfe3e..be72934e4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/2013/PaletteVisualStudio2010With2013Base.cs @@ -234,10 +234,10 @@ public abstract class PaletteVisualStudio2010With2013Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With2013Base(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With2013Base([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs index cb5211812..051a21a2d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Base/Visual Studio 2010/Renderers/365/PaletteVisualStudio2010With365Base.cs @@ -235,10 +235,10 @@ public abstract class PaletteVisualStudio2010With365Base : PaletteBase /// The gallery button list. /// The radio button array. /// The track bar colours. - public PaletteVisualStudio2010With365Base(Color[] schemeColours, - ImageList checkBoxList, - ImageList galleryButtonList, - Image[] radioButtonArray, Color[] trackBarColours) + public PaletteVisualStudio2010With365Base([DisallowNull] Color[] schemeColours, + [DisallowNull] ImageList checkBoxList, + [DisallowNull] ImageList galleryButtonList, + [DisallowNull] Image[] radioButtonArray, Color[] trackBarColours) { Debug.Assert(schemeColours != null); Debug.Assert(checkBoxList != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs index 15b46a825..8641d8c82 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonInternalKCT.cs @@ -26,7 +26,7 @@ public class KryptonInternalKCT : KryptonColorTable /// /// Initial base KCT to inherit values from. /// Reference to associated palette. - public KryptonInternalKCT(KryptonColorTable baseKCT, + public KryptonInternalKCT([DisallowNull] KryptonColorTable baseKCT, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs index d03ae7290..f33b22719 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecBase.cs @@ -37,7 +37,7 @@ public class KryptonPaletteButtonSpecBase : Storage, /// Initialize a new instance of the KryptonPaletteButtonSpecBase class. /// /// Palette redirector for sourcing inherited values. - internal KryptonPaletteButtonSpecBase(PaletteRedirect redirector) + internal KryptonPaletteButtonSpecBase([DisallowNull] PaletteRedirect redirector) { Debug.Assert(redirector != null); @@ -76,7 +76,7 @@ internal KryptonPaletteButtonSpecBase(PaletteRedirect redirector) /// Update the redirector with new reference. /// /// Target redirector. - public void SetRedirector(PaletteRedirect redirect) => Redirector = redirect; + public void SetRedirector([DisallowNull] PaletteRedirect redirect) => Redirector = redirect; #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs index 25afb533e..db00ef138 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs @@ -35,7 +35,7 @@ public class KryptonPaletteButtonSpecTyped : KryptonPaletteButtonSpecBase /// Initialize a new instance of the KryptonPaletteButtonSpecCommon class. /// /// Palette redirector for sourcing inherited values. - internal KryptonPaletteButtonSpecTyped(PaletteRedirect redirector) + internal KryptonPaletteButtonSpecTyped([DisallowNull] PaletteRedirect redirector) : base(redirector) { _image = null; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs index 4f28b27e6..932c99f85 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecs.cs @@ -29,7 +29,7 @@ public class KryptonPaletteButtonSpecs : Storage /// Initialize a new instance of the KryptonPaletteButtonSpecs class. /// /// Palette redirector for sourcing inherited values. - public KryptonPaletteButtonSpecs(PaletteRedirect redirector) + public KryptonPaletteButtonSpecs([DisallowNull] PaletteRedirect redirector) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs index c893865d9..bf269c884 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCheckButtons.cs @@ -23,7 +23,7 @@ public class KryptonPaletteCheckButtons : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteCheckButtons(PaletteRedirect redirector, + public KryptonPaletteCheckButtons([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs index 3009e1408..67d105e9b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCommon.cs @@ -23,7 +23,7 @@ public class KryptonPaletteCommon : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteCommon(PaletteRedirect redirector, + public KryptonPaletteCommon([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs index 789a7ed50..b369ae1af 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteControls.cs @@ -23,7 +23,7 @@ public class KryptonPaletteControls : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteControls(PaletteRedirect redirector, + public KryptonPaletteControls([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs index 42d40c0f3..37ce544b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteFont.cs @@ -26,7 +26,7 @@ public class KryptonPaletteFont : Storage /// Initializes a new instance of the class. /// Palette redirector for sourcing inherited values /// Delegate for notifying paint requests. - public KryptonPaletteFont(PaletteRedirect redirector, NeedPaintHandler needPaint) + public KryptonPaletteFont([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { NeedPaint = needPaint; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs index 63cdcf66d..e83242245 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteForms.cs @@ -23,7 +23,7 @@ public class KryptonPaletteForms : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteForms(PaletteRedirect redirector, + public KryptonPaletteForms([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs index 90a9855e7..9f93b5643 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteGrids.cs @@ -23,7 +23,7 @@ public class KryptonPaletteGrids : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteGrids(PaletteRedirect redirector, + public KryptonPaletteGrids([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs index 652134d8f..f5ec039a0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroup.cs @@ -23,7 +23,7 @@ public class KryptonPaletteHeaderGroup : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteHeaderGroup(PaletteRedirect redirect, + public KryptonPaletteHeaderGroup([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs index df96271cb..2e8d332e0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaderGroupState.cs @@ -33,7 +33,7 @@ public class KryptonPaletteHeaderGroupState : Storage, /// /// Redirection for inheriting values. /// Delegate for notifying paint requests. - public KryptonPaletteHeaderGroupState(PaletteRedirect redirect, + public KryptonPaletteHeaderGroupState([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs index 16a36cc9c..fa4442eac 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteHeaders.cs @@ -23,7 +23,7 @@ public class KryptonPaletteHeaders : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteHeaders(PaletteRedirect redirector, + public KryptonPaletteHeaders([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs index a69569b48..8add036de 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteImages.cs @@ -24,7 +24,7 @@ public class KryptonPaletteImages : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteImages(PaletteRedirect redirector, + public KryptonPaletteImages([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs index a7d3bd711..1ff66a875 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteInputControls.cs @@ -23,7 +23,7 @@ public class KryptonPaletteInputControls : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteInputControls(PaletteRedirect redirector, + public KryptonPaletteInputControls([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs index 14ceaf344..b04cb6c5b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteLabels.cs @@ -23,7 +23,7 @@ public class KryptonPaletteLabels : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteLabels(PaletteRedirect redirector, + public KryptonPaletteLabels([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs index d28018076..35ccb2864 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigator.cs @@ -23,7 +23,7 @@ public class KryptonPaletteNavigator : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteNavigator(PaletteRedirect redirect, + public KryptonPaletteNavigator([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs index 7041bdeb2..500554c11 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorState.cs @@ -23,7 +23,7 @@ public class KryptonPaletteNavigatorState : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public KryptonPaletteNavigatorState(PaletteRedirect redirect, + public KryptonPaletteNavigatorState([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs index 64add8d28..e0534f5ea 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteNavigatorStateBar.cs @@ -37,7 +37,7 @@ public class KryptonPaletteNavigatorStateBar : Storage, /// /// Redirection for inheriting values. /// Delegate for notifying paint requests. - public KryptonPaletteNavigatorStateBar(PaletteRedirect redirect, + public KryptonPaletteNavigatorStateBar([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs index 620bce07a..fb2b89f8e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPalettePanels.cs @@ -23,7 +23,7 @@ public class KryptonPalettePanels : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPalettePanels(PaletteRedirect redirector, + public KryptonPalettePanels([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs index 48fc5d2dc..14aa6ecbe 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs @@ -45,7 +45,7 @@ public class KryptonPaletteRibbon : Storage /// /// Redirector to inherit values from. /// Delegate for notifying paint requests. - public KryptonPaletteRibbon(PaletteRedirect? redirect, + public KryptonPaletteRibbon([DisallowNull] PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs index 373b29452..4f88064e7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteSeparators.cs @@ -23,7 +23,7 @@ public class KryptonPaletteSeparators : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteSeparators(PaletteRedirect redirector, + public KryptonPaletteSeparators([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs index 50ab17d12..676fbb541 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMS.cs @@ -25,7 +25,7 @@ public class KryptonPaletteTMS : Storage /// Initial base KCT to inherit values from. /// Delegate for notifying paint requests. public KryptonPaletteTMS(PaletteBase palette, - KryptonColorTable baseKCT, + [DisallowNull] KryptonColorTable baseKCT, NeedPaintHandler needPaint) { Debug.Assert(baseKCT != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs index be78b0eee..0ed6d9fb6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSBase.cs @@ -23,7 +23,7 @@ public abstract class KryptonPaletteTMSBase : Storage /// /// Reference to inherited values. /// Delegate for notifying paint requests. - internal KryptonPaletteTMSBase(KryptonInternalKCT internalKCT, + internal KryptonPaletteTMSBase([DisallowNull] KryptonInternalKCT internalKCT, NeedPaintHandler needPaint) { Debug.Assert(internalKCT != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs index 7e9e84a1d..293c2d15a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButtons.cs @@ -23,7 +23,7 @@ public class KryptonPaletteTabButtons : Storage /// /// Palette redirector for sourcing inherited values. /// Delegate for notifying paint requests. - public KryptonPaletteTabButtons(PaletteRedirect redirector, + public KryptonPaletteTabButtons([DisallowNull] PaletteRedirect redirector, NeedPaintHandler needPaint) { Debug.Assert(redirector != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs index 30d1c6a77..9976b7f17 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2007.cs @@ -49,7 +49,7 @@ static KryptonColorTable2007() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2007(Color[] colors, + public KryptonColorTable2007([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs index 673d6f6b3..428bf6e98 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2010.cs @@ -49,7 +49,7 @@ static KryptonColorTable2010() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2010(Color[] colors, + public KryptonColorTable2010([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs index 59960a11d..9030d76b7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable2013.cs @@ -55,7 +55,7 @@ static KryptonColorTable2013() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable2013(Color[] colors, + public KryptonColorTable2013([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs index 6e1c9291a..4adbb7822 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTable365.cs @@ -55,7 +55,7 @@ static KryptonColorTable365() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTable365(Color[] colors, + public KryptonColorTable365([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs index 6f9897422..6e31c31af 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableMicrosoft365.cs @@ -56,7 +56,7 @@ static KryptonColorTableMicrosoft365() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableMicrosoft365(Color[] colors, + public KryptonColorTableMicrosoft365([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs index 40720c38f..283f56199 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableSparkle.cs @@ -50,8 +50,8 @@ static KryptonColorTableSparkle() /// Source of sparkle colors. /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableSparkle(Color[] colors, - Color[] sparkleColors, + public KryptonColorTableSparkle([DisallowNull] Color[] colors, + [DisallowNull] Color[] sparkleColors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs index e22a7cad6..1120461a8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonColorTableVisualStudio.cs @@ -55,7 +55,7 @@ static KryptonColorTableVisualStudio() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonColorTableVisualStudio(Color[] colors, + public KryptonColorTableVisualStudio([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs index c18810ca8..2b226ae1d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonDataGridViewStyles.cs @@ -31,7 +31,7 @@ public class DataGridViewStyles : Storage /// Initialize a new instance of the DataGridViewStyles class. /// /// Reference to owning control. - public DataGridViewStyles(KryptonDataGridView dataGridView) + public DataGridViewStyles([DisallowNull] KryptonDataGridView dataGridView) { Debug.Assert(dataGridView != null); _dataGridView = dataGridView; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs index a178b7982..ad59ab101 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonProfessionalKCT.cs @@ -25,7 +25,7 @@ internal class KryptonProfessionalKCT : KryptonColorTable /// Set of colors to customize with. /// Should be forced to use system colors. /// Reference to associated palette. - public KryptonProfessionalKCT(Color[] colors, + public KryptonProfessionalKCT([DisallowNull] Color[] colors, bool useSystemColors, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs index a54e145f8..9c2b07953 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2007ColorTable.cs @@ -46,7 +46,7 @@ static KryptonVisualStudio2010With2007ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2007ColorTable(Color[] colors, + public KryptonVisualStudio2010With2007ColorTable([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs index 8ad8a37c1..ecf8f4ad0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2010ColorTable.cs @@ -46,7 +46,7 @@ static KryptonVisualStudio2010With2010ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2010ColorTable(Color[] colors, + public KryptonVisualStudio2010With2010ColorTable([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs index b661ef211..318adf379 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010With2013ColorTable.cs @@ -52,7 +52,7 @@ static KryptonVisualStudio2010With2013ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010With2013ColorTable(Color[] colors, + public KryptonVisualStudio2010With2013ColorTable([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs index 63c1b68ed..5e25d258c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/KryptonVisualStudio2010WithMicrosoft365ColorTable.cs @@ -53,7 +53,7 @@ static KryptonVisualStudio2010WithMicrosoft365ColorTable() /// Source of /// Should have rounded edges. /// Associated palette instance. - public KryptonVisualStudio2010WithMicrosoft365ColorTable(Color[] colors, + public KryptonVisualStudio2010WithMicrosoft365ColorTable([DisallowNull] Color[] colors, InheritBool roundedEdges, PaletteBase palette) : base(palette) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs index ed94cb82c..b3dab974a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/LinkLabelBehaviorInherit.cs @@ -25,7 +25,7 @@ internal class LinkLabelBehaviorInherit : PaletteContentInherit /// /// Palette to inherit from. /// Link behavior to use. - public LinkLabelBehaviorInherit(IPaletteContent inherit, + public LinkLabelBehaviorInherit([DisallowNull] IPaletteContent inherit, KryptonLinkBehavior linkBehavior) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs index eef5c69eb..0180b1561 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBackInheritNode.cs @@ -27,7 +27,7 @@ public class PaletteBackInheritNode : PaletteBackInherit /// Initialize a new instance of the PaletteBackInheritNode class. /// /// Background palette to inherit from. - public PaletteBackInheritNode(IPaletteBack inherit) + public PaletteBackInheritNode([DisallowNull] IPaletteBack inherit) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs index d819e2b31..70b62e935 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdge.cs @@ -28,7 +28,7 @@ public class PaletteBorderEdge : PaletteBack /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteBorderEdge(PaletteBorderEdgeRedirect inherit, + public PaletteBorderEdge([DisallowNull] PaletteBorderEdgeRedirect inherit, NeedPaintHandler? needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs index 2a4386200..9af3443c0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteBorderEdgeRedirect.cs @@ -30,7 +30,7 @@ internal class BackToBorder : IPaletteBack /// Initialize a new instance of the BackToBorder class. /// /// Parent to get border values from. - public BackToBorder(IPaletteBorder parent) + public BackToBorder([DisallowNull] IPaletteBorder parent) { Debug.Assert(parent != null); _parent = parent!; diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs index a27230a11..89f8e3dec 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustComboStates.cs @@ -23,7 +23,7 @@ public class PaletteComboBoxJustComboStates : Storage /// /// Source for inheriting combo box values. /// Delegate for notifying paint requests. - public PaletteComboBoxJustComboStates(IPaletteTriple inheritComboBox, + public PaletteComboBoxJustComboStates([DisallowNull] IPaletteTriple inheritComboBox, NeedPaintHandler needPaint) { Debug.Assert(inheritComboBox != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs index 81605ef6a..9f8daef2d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxJustItemStates.cs @@ -23,7 +23,7 @@ public class PaletteComboBoxJustItemStates : Storage /// /// Source for inheriting item values. /// Delegate for notifying paint requests. - public PaletteComboBoxJustItemStates(IPaletteTriple inheritItem, + public PaletteComboBoxJustItemStates([DisallowNull] IPaletteTriple inheritItem, NeedPaintHandler needPaint) { Debug.Assert(inheritItem != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs index 3216b3166..fe23d267c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxRedirect.cs @@ -28,7 +28,7 @@ public class PaletteComboBoxRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteComboBoxRedirect(PaletteRedirect? redirect, + public PaletteComboBoxRedirect([DisallowNull] PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs index 6aee767f5..46cd903e1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteComboBoxStates.cs @@ -24,8 +24,8 @@ public class PaletteComboBoxStates : Storage /// Source for inheriting combo box values. /// Source for inheriting item values. /// Delegate for notifying paint requests. - public PaletteComboBoxStates(IPaletteTriple inheritComboBox, - IPaletteTriple inheritItem, + public PaletteComboBoxStates([DisallowNull] IPaletteTriple inheritComboBox, + [DisallowNull] IPaletteTriple inheritItem, NeedPaintHandler needPaint) { Debug.Assert(inheritComboBox != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs index 1b22a6c60..3bd2d879e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteContextMenuRedirect.cs @@ -23,7 +23,7 @@ public class PaletteContextMenuRedirect : Storage /// /// inheritance redirection. /// Delegate for notifying paint requests. - public PaletteContextMenuRedirect(PaletteRedirect redirect, + public PaletteContextMenuRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs index 320cd9b8d..8139ba78f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewAll.cs @@ -27,7 +27,7 @@ public class PaletteDataGridViewAll : PaletteDataGridViewCells /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewAll(PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewAll([DisallowNull] PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) : base(inherit, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs index abb5ab1a2..75bdd3f98 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewBackInherit.cs @@ -28,8 +28,8 @@ internal class PaletteDataGridViewBackInherit : PaletteBackInherit /// /// Palette to inherit values from. /// Cell style to recover values from. - public void SetInherit(IPaletteBack inherit, - DataGridViewCellStyle cellStyle) + public void SetInherit([DisallowNull] IPaletteBack inherit, + [DisallowNull] DataGridViewCellStyle cellStyle) { Debug.Assert(inherit != null); Debug.Assert(cellStyle != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs index 23be156f8..aafb9aab7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewCells.cs @@ -29,7 +29,7 @@ public class PaletteDataGridViewCells : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewCells(PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewCells([DisallowNull] PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs index 1e01b19fa..e41aed353 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentInherit.cs @@ -28,8 +28,8 @@ internal class PaletteDataGridViewContentInherit : PaletteContentInherit /// /// Palette to inherit values from. /// Cell style to recover values from. - public void SetInherit(IPaletteContent inherit, - DataGridViewCellStyle cellStyle) + public void SetInherit([DisallowNull] IPaletteContent inherit, + [DisallowNull] DataGridViewCellStyle cellStyle) { Debug.Assert(inherit != null); Debug.Assert(cellStyle != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs index 353e41c0d..3ba128df8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs @@ -41,7 +41,7 @@ public class PaletteDataGridViewContentStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteDataGridViewContentStates(IPaletteContent inherit, + public PaletteDataGridViewContentStates([DisallowNull] IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs index 3672181d4..dff629a64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewHeaders.cs @@ -28,7 +28,7 @@ public class PaletteDataGridViewHeaders : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewHeaders(PaletteDataGridViewRedirect inherit, + public PaletteDataGridViewHeaders([DisallowNull] PaletteDataGridViewRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs index dad8191c7..857919dba 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewRedirect.cs @@ -30,7 +30,7 @@ public class PaletteDataGridViewRedirect : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewRedirect(PaletteRedirect? redirect, + public PaletteDataGridViewRedirect([DisallowNull] PaletteRedirect? redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs index 5613c9129..4ec86ca53 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleCommon.cs @@ -24,7 +24,7 @@ public class PaletteDataGridViewTripleCommon : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleCommon(IPaletteTriple inherit, + public PaletteDataGridViewTripleCommon([DisallowNull] IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs index c7ef5203c..38003d83e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleRedirect.cs @@ -34,7 +34,7 @@ public class PaletteDataGridViewTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleRedirect(PaletteRedirect? redirect, + public PaletteDataGridViewTripleRedirect([DisallowNull] PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs index f34e1c6f4..399ada854 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewTripleStates.cs @@ -24,7 +24,7 @@ public class PaletteDataGridViewTripleStates : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteDataGridViewTripleStates(IPaletteTriple inherit, + public PaletteDataGridViewTripleStates([DisallowNull] IPaletteTriple inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs index d38d5a1e0..0dc8e4024 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteForm.cs @@ -30,8 +30,8 @@ public class PaletteForm : PaletteDouble, /// Source for inheriting palette defaulted values. /// Source for inheriting header defaulted values. /// Delegate for notifying paint requests. - public PaletteForm(PaletteFormRedirect inheritForm, - PaletteTripleMetricRedirect inheritHeader, + public PaletteForm([DisallowNull] PaletteFormRedirect inheritForm, + [DisallowNull] PaletteTripleMetricRedirect inheritHeader, NeedPaintHandler needPaint) : base(inheritForm, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs index 628a8c0dc..2352431a5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteFormRedirect.cs @@ -42,8 +42,8 @@ public PaletteFormRedirect(PaletteRedirect? redirect, /// inheritance redirection for form group. /// inheritance redirection for header. /// Delegate for notifying paint requests. - public PaletteFormRedirect(PaletteRedirect redirectForm, - PaletteRedirect? redirectHeader, + public PaletteFormRedirect([DisallowNull] PaletteRedirect redirectForm, + [DisallowNull] PaletteRedirect? redirectHeader, NeedPaintHandler needPaint) : base(redirectForm, PaletteBackStyle.FormMain, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs index fde62fcdc..b6120f1cc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteGroupBoxRedirect.cs @@ -40,8 +40,8 @@ public PaletteGroupBoxRedirect(PaletteRedirect? redirect, /// inheritance redirection for group border/background. /// inheritance redirection for group header. /// Delegate for notifying paint requests. - public PaletteGroupBoxRedirect(PaletteRedirect redirectDouble, - PaletteRedirect redirectContent, + public PaletteGroupBoxRedirect([DisallowNull] PaletteRedirect redirectDouble, + [DisallowNull] PaletteRedirect redirectContent, NeedPaintHandler needPaint) : base(redirectDouble, PaletteBackStyle.ControlGroupBox, PaletteBorderStyle.ControlGroupBox, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs index 17d5fde7d..30550a64c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderButtonRedirect.cs @@ -32,7 +32,7 @@ public class PaletteHeaderButtonRedirect : PaletteTripleMetricRedirect /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteHeaderButtonRedirect(PaletteRedirect? redirect, + public PaletteHeaderButtonRedirect([DisallowNull] PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs index 24d319c06..4f66a7d41 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroup.cs @@ -31,9 +31,9 @@ public class PaletteHeaderGroup : PaletteDouble, /// Source for inheriting primary header defaulted values. /// Source for inheriting secondary header defaulted values. /// Delegate for notifying paint requests. - public PaletteHeaderGroup(PaletteHeaderGroupRedirect? inheritHeaderGroup, - PaletteHeaderPaddingRedirect inheritHeaderPrimary, - PaletteHeaderPaddingRedirect inheritHeaderSecondary, + public PaletteHeaderGroup([DisallowNull] PaletteHeaderGroupRedirect? inheritHeaderGroup, + [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderPrimary, + [DisallowNull] PaletteHeaderPaddingRedirect inheritHeaderSecondary, NeedPaintHandler needPaint) : base(inheritHeaderGroup, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs index 33ecaa5d7..b4941d0b9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderGroupRedirect.cs @@ -43,9 +43,9 @@ public PaletteHeaderGroupRedirect(PaletteRedirect? redirect, /// inheritance redirection for primary header. /// inheritance redirection for secondary header. /// Delegate for notifying paint requests. - public PaletteHeaderGroupRedirect(PaletteRedirect redirectHeaderGroup, - PaletteRedirect? redirectHeaderPrimary, - PaletteRedirect? redirectHeaderSecondary, + public PaletteHeaderGroupRedirect([DisallowNull] PaletteRedirect redirectHeaderGroup, + [DisallowNull] PaletteRedirect? redirectHeaderPrimary, + [DisallowNull] PaletteRedirect? redirectHeaderSecondary, NeedPaintHandler needPaint) : base(redirectHeaderGroup, PaletteBackStyle.ControlClient, PaletteBorderStyle.ControlClient, needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs index 518593568..0c06b9922 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderPaddingRedirect.cs @@ -31,7 +31,7 @@ public class PaletteHeaderPaddingRedirect : PaletteHeaderButtonRedirect /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteHeaderPaddingRedirect(PaletteRedirect? redirect, + public PaletteHeaderPaddingRedirect([DisallowNull] PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs index 75e91ee64..136632f80 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteHeaderRedirect.cs @@ -32,7 +32,7 @@ public class PaletteHeaderRedirect : PaletteTripleMetricRedirect /// Style for the border. /// Style for the content. /// Delegate for notifying paint requests. - public PaletteHeaderRedirect(PaletteRedirect? redirect, + public PaletteHeaderRedirect([DisallowNull] PaletteRedirect? redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs index 5c3951f8e..b09c5ae8e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs @@ -29,7 +29,7 @@ public class PaletteInputControlBackStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteInputControlBackStates(IPaletteBack inherit, + public PaletteInputControlBackStates([DisallowNull] IPaletteBack inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs index 63d23e3fb..9f57f0da5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs @@ -33,7 +33,7 @@ public class PaletteInputControlContentStates : Storage, /// /// Source for inheriting defaulted values. /// Delegate for notifying paint requests. - public PaletteInputControlContentStates(IPaletteContent inherit, + public PaletteInputControlContentStates([DisallowNull] IPaletteContent inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs index 9ffdc486b..673fbc2c3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleRedirect.cs @@ -36,7 +36,7 @@ public class PaletteInputControlTripleRedirect : Storage, /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteInputControlTripleRedirect(PaletteRedirect redirect, + public PaletteInputControlTripleRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs index 58b31c637..c9c55d7e3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlTripleStates.cs @@ -24,7 +24,7 @@ public class PaletteInputControlTripleStates : Storage, /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteInputControlTripleStates(IPaletteTriple inherit, + public PaletteInputControlTripleStates([DisallowNull] IPaletteTriple inherit, NeedPaintHandler? needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs index a275fe5ef..31d326650 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTriple.cs @@ -27,7 +27,7 @@ public class PaletteListItemTriple : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteListItemTriple(PaletteTripleRedirect inherit, + public PaletteListItemTriple([DisallowNull] PaletteTripleRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs index 19c12af76..74a926bbc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListItemTripleRedirect.cs @@ -26,7 +26,7 @@ public class PaletteListItemTripleRedirect : Storage /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteListItemTripleRedirect(PaletteRedirect redirect, + public PaletteListItemTripleRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs index 5657d6d7d..fd5d9f7f9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteListStateRedirect.cs @@ -31,7 +31,7 @@ public class PaletteListStateRedirect : PaletteDoubleRedirect /// Initial background style. /// Initial border style. /// Delegate for notifying paint requests. - public PaletteListStateRedirect(PaletteRedirect redirect, + public PaletteListStateRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs index fc2620733..001039ac4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteNodeOverride.cs @@ -31,7 +31,7 @@ public class PaletteNodeOverride : GlobalId, /// /// Palette to use. /// - public PaletteNodeOverride(IPaletteTriple triple) + public PaletteNodeOverride([DisallowNull] IPaletteTriple triple) { Debug.Assert(triple != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs index 39b5d41cf..a4944d68a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCheckBox.cs @@ -37,7 +37,7 @@ public PaletteRedirectCheckBox(CheckBoxImages images) /// Initial palette target for redirection. /// Reference to source of check box images. public PaletteRedirectCheckBox(PaletteBase? target, - CheckBoxImages images) + [DisallowNull] CheckBoxImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs index e83118c64..f46dbce5e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectCommon.cs @@ -30,8 +30,8 @@ public class PaletteRedirectCommon : PaletteRedirect /// Redirection for disabled state requests. /// Redirection for all other state requests. public PaletteRedirectCommon(PaletteBase? target, - IPaletteTriple disabled, - IPaletteTriple others) + [DisallowNull] IPaletteTriple disabled, + [DisallowNull] IPaletteTriple others) : base(target) { Debug.Assert(disabled != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs index c425b3b61..77b4f2797 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectContextMenu.cs @@ -28,7 +28,7 @@ public class PaletteRedirectContextMenu : PaletteRedirect /// Initial palette target for redirection. /// Reference to source of context menu images. public PaletteRedirectContextMenu(PaletteBase? target, - ContextMenuImages images) + [DisallowNull] ContextMenuImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs index 869991be5..604489f3f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectDropDownButton.cs @@ -37,7 +37,7 @@ public PaletteRedirectDropDownButton(DropDownButtonImages images) /// Initial palette target for redirection. /// Reference to source of drop down button images. public PaletteRedirectDropDownButton(PaletteBase? target, - DropDownButtonImages images) + [DisallowNull] DropDownButtonImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs index a282ecaed..463965342 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectRadioButton.cs @@ -37,7 +37,7 @@ public PaletteRedirectRadioButton(RadioButtonImages images) /// Initial palette target for redirection. /// Reference to source of radio button images. public PaletteRedirectRadioButton(PaletteBase? target, - RadioButtonImages images) + [DisallowNull] RadioButtonImages images) : base(target) { Debug.Assert(images != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs index 042594a9f..854b10d9c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteRedirectTreeView.cs @@ -41,7 +41,7 @@ public PaletteRedirectTreeView(TreeViewImages plusMinusImages, /// Reference to source of tree view images. /// Reference to source of check box images. public PaletteRedirectTreeView(PaletteBase? target, - TreeViewImages plusMinusImages, + [DisallowNull] TreeViewImages plusMinusImages, CheckBoxImages checkboxImages) : base(target) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs index f063ba12e..e04b1d701 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPadding.cs @@ -31,8 +31,8 @@ public class PaletteSeparatorPadding : PaletteDouble, /// Source for inheriting border and background values. /// Source for inheriting metric values. /// Delegate for notifying paint requests. - public PaletteSeparatorPadding(IPaletteDouble inheritDouble, - IPaletteMetric inheritMetric, + public PaletteSeparatorPadding([DisallowNull] IPaletteDouble inheritDouble, + [DisallowNull] IPaletteMetric inheritMetric, NeedPaintHandler needPaint) : base(inheritDouble, needPaint) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs index efe176010..ec8780e30 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteSeparatorPaddingRedirect.cs @@ -31,7 +31,7 @@ public class PaletteSeparatorPaddingRedirect : PaletteDoubleMetricRedirect /// Initial background style. /// Initial border style. /// Delegate for notifying paint requests. - public PaletteSeparatorPaddingRedirect(PaletteRedirect redirect, + public PaletteSeparatorPaddingRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, NeedPaintHandler needPaint) diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs index 2e887ed41..619200ed7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStates.cs @@ -34,7 +34,7 @@ public PaletteTrackBarPositionStates(PaletteTrackBarRedirect redirect, /// /// Source for inheriting position values. /// Delegate for notifying paint requests. - public PaletteTrackBarPositionStates(IPaletteElementColor inheritPosition, + public PaletteTrackBarPositionStates([DisallowNull] IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritPosition != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs index eabc77aa9..ea4ec38cd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarPositionStatesOverride.cs @@ -26,8 +26,8 @@ public class PaletteTrackBarPositionStatesOverride : GlobalId /// Override state values. /// State to override. /// - public PaletteTrackBarPositionStatesOverride(PaletteTrackBarRedirect normalStates, - PaletteTrackBarPositionStates overrideStates, + public PaletteTrackBarPositionStatesOverride([DisallowNull] PaletteTrackBarRedirect normalStates, + [DisallowNull] PaletteTrackBarPositionStates overrideStates, PaletteState overrideState) { Debug.Assert(normalStates != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs index d60a65253..3f3b88e9a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarRedirect.cs @@ -28,7 +28,7 @@ public class PaletteTrackBarRedirect : Storage /// /// inheritance redirection instance. /// Delegate for notifying paint requests. - public PaletteTrackBarRedirect(PaletteRedirect redirect, + public PaletteTrackBarRedirect([DisallowNull] PaletteRedirect redirect, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs index cedf6edae..886474763 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStates.cs @@ -36,9 +36,9 @@ public PaletteTrackBarStates(PaletteTrackBarRedirect redirect, /// Source for inheriting track values. /// Source for inheriting position values. /// Delegate for notifying paint requests. - public PaletteTrackBarStates(IPaletteElementColor inheritTick, - IPaletteElementColor inheritTrack, - IPaletteElementColor inheritPosition, + public PaletteTrackBarStates([DisallowNull] IPaletteElementColor inheritTick, + [DisallowNull] IPaletteElementColor inheritTrack, + [DisallowNull] IPaletteElementColor inheritPosition, NeedPaintHandler needPaint) { Debug.Assert(inheritTick != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs index 9ed051b5f..972be5188 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTrackBarStatesOverride.cs @@ -26,8 +26,8 @@ public class PaletteTrackBarStatesOverride : GlobalId /// Override state values. /// State to override. /// - public PaletteTrackBarStatesOverride(PaletteTrackBarRedirect normalStates, - PaletteTrackBarStates overrideStates, + public PaletteTrackBarStatesOverride([DisallowNull] PaletteTrackBarRedirect normalStates, + [DisallowNull] PaletteTrackBarStates overrideStates, PaletteState overrideState) { Debug.Assert(normalStates != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs index 323282ddf..f8752a698 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTriple.cs @@ -27,7 +27,7 @@ public class PaletteTreeNodeTriple : Storage /// /// Source for inheriting values. /// Delegate for notifying paint requests. - public PaletteTreeNodeTriple(PaletteTripleRedirect inherit, + public PaletteTreeNodeTriple([DisallowNull] PaletteTripleRedirect inherit, NeedPaintHandler needPaint) { Debug.Assert(inherit != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs index a6cf93fd0..fcfa02a23 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeNodeTripleRedirect.cs @@ -26,7 +26,7 @@ public class PaletteTreeNodeTripleRedirect : Storage /// Initial border style. /// Initial content style. /// Delegate for notifying paint requests. - public PaletteTreeNodeTripleRedirect(PaletteRedirect redirect, + public PaletteTreeNodeTripleRedirect([DisallowNull] PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs index 997d05bff..441ddc954 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteTreeStateRedirect.cs @@ -33,7 +33,7 @@ public class PaletteTreeStateRedirect : PaletteDoubleRedirect /// Storage for border values. /// inheritance for border values. /// Delegate for notifying paint requests. - public PaletteTreeStateRedirect(PaletteRedirect redirect, + public PaletteTreeStateRedirect([DisallowNull] PaletteRedirect redirect, PaletteBack back, PaletteBackInheritRedirect backInherit, PaletteBorder border, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs index bf0b2bbd7..e7d7ed4fd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/KryptonProfessionalRenderer.cs @@ -22,7 +22,7 @@ public class KryptonProfessionalRenderer : ToolStripProfessionalRenderer /// Initialise a new instance of the KryptonProfessionalRenderer class. /// /// Source for text colors. - public KryptonProfessionalRenderer(KryptonColorTable kct) + public KryptonProfessionalRenderer([DisallowNull] KryptonColorTable kct) : base(kct) { Debug.Assert(kct != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs index a2db2c83c..2b2ca3b2c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs @@ -902,7 +902,7 @@ public abstract bool EvalTransparentPaint(IPaletteBack paletteBack, /// Destination rectangle. /// Visual orientation. /// - protected static void DrawIconHelper(ViewContext context, + protected static void DrawIconHelper([DisallowNull] ViewContext context, Icon icon, Rectangle iconRect, VisualOrientation orientation) @@ -934,7 +934,7 @@ protected static void DrawIconHelper(ViewContext context, /// Image color to remap. /// New color for remap. /// - protected static void DrawImageHelper(ViewContext context, + protected static void DrawImageHelper([DisallowNull] ViewContext context, Image image, Color remapTransparent, Rectangle imageRect, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs index fef521ab7..6487909f1 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs @@ -41,9 +41,9 @@ static RenderMicrosoft365() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, PaletteState state) + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -64,7 +64,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs index 31752bb25..bf984d038 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs @@ -59,9 +59,9 @@ static RenderOffice2007() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs index 1979f2b44..9bc520efd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs @@ -59,9 +59,9 @@ static RenderOffice2010() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs index 3044de307..2fd4a4573 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs @@ -52,9 +52,9 @@ static RenderOffice2013() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -81,7 +81,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs index 1be8d8687..aef7edc6a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs @@ -127,9 +127,9 @@ public override IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape /// State associated with rendering. /// public override void DrawRibbonDropArrow(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -173,9 +173,9 @@ public override void DrawRibbonDropArrow(PaletteRibbonShape shape, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlDropDownGlyph(RenderContext context, + public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent paletteContent, + [DisallowNull] IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -212,9 +212,9 @@ public override void DrawInputControlDropDownGlyph(RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericUpGlyph(RenderContext context, + public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent paletteContent, + [DisallowNull] IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -251,9 +251,9 @@ public override void DrawInputControlNumericUpGlyph(RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericDownGlyph(RenderContext context, + public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent paletteContent, + [DisallowNull] IPaletteContent paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -290,7 +290,7 @@ public override void DrawInputControlNumericDownGlyph(RenderContext context, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs index 24cdbb4eb..5d69d4a67 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs @@ -375,7 +375,7 @@ static RenderStandard() /// Gets a renderer for drawing the toolstrips. /// /// Color palette to use when rendering toolstrip. - public override ToolStripRenderer RenderToolStrip(PaletteBase? colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase? colorPalette) { Debug.Assert(colorPalette != null); @@ -407,7 +407,7 @@ public override ToolStripRenderer RenderToolStrip(PaletteBase? colorPalette) /// Visual orientation of the border. /// /// Padding structure detailing all four edges. - public override Padding GetBorderRawPadding(IPaletteBorder palette, + public override Padding GetBorderRawPadding([DisallowNull] IPaletteBorder palette, PaletteState state, VisualOrientation orientation) { @@ -478,7 +478,7 @@ public override Padding GetBorderRawPadding(IPaletteBorder palette, /// Visual orientation of the border. /// /// Padding structure detailing all four edges. - public override Padding GetBorderDisplayPadding(IPaletteBorder palette, + public override Padding GetBorderDisplayPadding([DisallowNull] IPaletteBorder palette, PaletteState state, VisualOrientation orientation) { @@ -572,9 +572,9 @@ public override Padding GetBorderDisplayPadding(IPaletteBorder palette, /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetOutsideBorderPath(RenderContext context, + public override GraphicsPath GetOutsideBorderPath([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -614,9 +614,9 @@ public override GraphicsPath GetOutsideBorderPath(RenderContext context, /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetBorderPath(RenderContext context, + public override GraphicsPath GetBorderPath([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -658,9 +658,9 @@ public override GraphicsPath GetBorderPath(RenderContext context, /// State associated with rendering. /// /// GraphicsPath instance. - public override GraphicsPath GetBackPath(RenderContext context, + public override GraphicsPath GetBackPath([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -701,9 +701,9 @@ public override GraphicsPath GetBackPath(RenderContext context, /// Visual orientation of the border. /// State associated with rendering. /// - public override void DrawBorder(RenderContext context, + public override void DrawBorder([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state) { @@ -827,10 +827,10 @@ public override void DrawBorder(RenderContext context, /// State associated with rendering. /// Cache used for drawing. /// - public override IDisposable? DrawBack(RenderContext context, + public override IDisposable? DrawBack([DisallowNull] RenderContext context, Rectangle rect, - GraphicsPath path, - IPaletteBack palette, + [DisallowNull] GraphicsPath path, + [DisallowNull] IPaletteBack palette, VisualOrientation orientation, PaletteState state, IDisposable? memento) @@ -1039,9 +1039,9 @@ public override void DrawBorder(RenderContext context, /// If composition, should glowing be drawn. /// /// Preferred size. - public override Size GetContentPreferredSize(ViewLayoutContext context, - IPaletteContent palette, - IContentValues values, + public override Size GetContentPreferredSize([DisallowNull] ViewLayoutContext context, + [DisallowNull] IPaletteContent palette, + [DisallowNull] IContentValues values, VisualOrientation orientation, PaletteState state, bool composition, @@ -1138,10 +1138,10 @@ public override Size GetContentPreferredSize(ViewLayoutContext context, /// If composition, should glowing be drawn. /// /// Memento with cached information. - public override IDisposable LayoutContent(ViewLayoutContext context, + public override IDisposable LayoutContent([DisallowNull] ViewLayoutContext context, Rectangle availableRect, - IPaletteContent palette, - IContentValues values, + [DisallowNull] IPaletteContent palette, + [DisallowNull] IContentValues values, VisualOrientation orientation, PaletteState state, bool composition, @@ -1296,10 +1296,10 @@ public override IDisposable LayoutContent(ViewLayoutContext context, /// If composition should glowing be drawn. /// Allow drawing of focus rectangle. /// - public override void DrawContent(RenderContext context, + public override void DrawContent([DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteContent palette, - IDisposable memento, + [DisallowNull] IPaletteContent palette, + [DisallowNull] IDisposable memento, VisualOrientation orientation, PaletteState state, bool composition, @@ -1693,7 +1693,7 @@ public override int GetTabBorderSpacingGap(TabBorderStyle tabBorderStyle) /// /// Padding structure detailing all four edges. public override Padding GetTabBorderDisplayPadding(ViewLayoutContext context, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, PaletteState state, VisualOrientation orientation, TabBorderStyle tabBorderStyle) @@ -1865,9 +1865,9 @@ public override Padding GetTabBorderDisplayPadding(ViewLayoutContext context, /// Style of tab border. /// /// GraphicsPath instance. - public override GraphicsPath GetTabBorderPath(RenderContext context, + public override GraphicsPath GetTabBorderPath([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -1906,9 +1906,9 @@ public override GraphicsPath GetTabBorderPath(RenderContext context, /// Style of tab border. /// /// GraphicsPath instance. - public override GraphicsPath GetTabBackPath(RenderContext context, + public override GraphicsPath GetTabBackPath([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -1946,9 +1946,9 @@ public override GraphicsPath GetTabBackPath(RenderContext context, /// State associated with rendering. /// Style of tab border. /// - public override void DrawTabBorder(RenderContext context, + public override void DrawTabBorder([DisallowNull] RenderContext context, Rectangle rect, - IPaletteBorder palette, + [DisallowNull] IPaletteBorder palette, VisualOrientation orientation, PaletteState state, TabBorderStyle tabBorderStyle) @@ -2223,9 +2223,9 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -2250,10 +2250,10 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// State associated with rendering. /// Can the separator be moved. /// - public override void DrawSeparator(RenderContext context, + public override void DrawSeparator([DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, - IPaletteBorder paletteBorder, + [DisallowNull] IPaletteBack paletteBack, + [DisallowNull] IPaletteBorder paletteBorder, Orientation orientation, PaletteState state, bool canMove) @@ -2324,8 +2324,8 @@ public override void DrawSeparator(RenderContext context, /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. /// - public override Size GetCheckBoxPreferredSize(ViewLayoutContext context, - PaletteBase? palette, + public override Size GetCheckBoxPreferredSize([DisallowNull] ViewLayoutContext context, + [DisallowNull] PaletteBase? palette, bool enabled, CheckState checkState, bool tracking, @@ -2374,9 +2374,9 @@ public override Size GetCheckBoxPreferredSize(ViewLayoutContext context, /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. /// - public override void DrawCheckBox(RenderContext context, + public override void DrawCheckBox([DisallowNull] RenderContext context, Rectangle displayRect, - PaletteBase? palette, + [DisallowNull] PaletteBase? palette, bool enabled, CheckState checkState, bool tracking, @@ -2431,7 +2431,7 @@ public override void DrawCheckBox(RenderContext context, /// Should check box be Displayed as hot tracking. /// Should check box be Displayed as pressed. public override Size GetRadioButtonPreferredSize(ViewLayoutContext context, - PaletteBase palette, + [DisallowNull] PaletteBase palette, bool enabled, bool checkState, bool tracking, @@ -2465,9 +2465,9 @@ public override Size GetRadioButtonPreferredSize(ViewLayoutContext context, /// Should radio button be Displayed as hot tracking. /// Should radio button be Displayed as pressed. /// - public override void DrawRadioButton(RenderContext context, + public override void DrawRadioButton([DisallowNull] RenderContext context, Rectangle displayRect, - PaletteBase palette, + [DisallowNull] PaletteBase palette, bool enabled, bool checkState, bool tracking, @@ -2520,7 +2520,7 @@ public override void DrawRadioButton(RenderContext context, /// State for which image size is needed. /// How to orientate the image. public override Size GetDropDownButtonPreferredSize(ViewLayoutContext context, - PaletteBase? palette, + [DisallowNull] PaletteBase? palette, PaletteState state, VisualOrientation orientation) { @@ -2553,9 +2553,9 @@ public override Size GetDropDownButtonPreferredSize(ViewLayoutContext context, /// State for which image size is needed. /// How to orientate the image. /// - public override void DrawDropDownButton(RenderContext context, + public override void DrawDropDownButton([DisallowNull] RenderContext context, Rectangle displayRect, - PaletteBase? palette, + [DisallowNull] PaletteBase? palette, PaletteState state, VisualOrientation orientation) { @@ -2591,9 +2591,9 @@ public override void DrawDropDownButton(RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericUpGlyph(RenderContext context, + public override void DrawInputControlNumericUpGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2634,9 +2634,9 @@ public override void DrawInputControlNumericUpGlyph(RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlNumericDownGlyph(RenderContext context, + public override void DrawInputControlNumericDownGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2677,9 +2677,9 @@ public override void DrawInputControlNumericDownGlyph(RenderContext context, /// Content palette for getting colors. /// State associated with rendering. /// - public override void DrawInputControlDropDownGlyph(RenderContext context, + public override void DrawInputControlDropDownGlyph([DisallowNull] RenderContext context, Rectangle cellRect, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, PaletteState state) { Debug.Assert(context != null); @@ -2722,9 +2722,9 @@ public override void DrawInputControlDropDownGlyph(RenderContext context, /// State associated with rendering. /// public override void DrawRibbonDialogBoxLauncher(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2815,9 +2815,9 @@ public override void DrawRibbonDialogBoxLauncher(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonDropArrow(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2889,9 +2889,9 @@ public override void DrawRibbonDropArrow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonContextArrow(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -2949,9 +2949,9 @@ public override void DrawRibbonContextArrow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonOverflow(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -3008,9 +3008,9 @@ public override void DrawRibbonOverflow(PaletteRibbonShape shape, /// State associated with rendering. /// public override void DrawRibbonGroupSeparator(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteRibbonGeneral paletteGeneral, + [DisallowNull] IPaletteRibbonGeneral paletteGeneral, PaletteState state) { Debug.Assert(context != null); @@ -3079,10 +3079,10 @@ public override void DrawRibbonGroupSeparator(PaletteRibbonShape shape, /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridSortGlyph(RenderContext context, + public override Rectangle DrawGridSortGlyph([DisallowNull] RenderContext context, SortOrder sortOrder, Rectangle cellRect, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, PaletteState state, bool rtl) { @@ -3141,10 +3141,10 @@ public override Rectangle DrawGridSortGlyph(RenderContext context, /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridRowGlyph(RenderContext context, + public override Rectangle DrawGridRowGlyph([DisallowNull] RenderContext context, GridRowGlyph rowGlyph, Rectangle cellRect, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, PaletteState state, bool rtl) { @@ -3219,7 +3219,7 @@ public override Rectangle DrawGridRowGlyph(RenderContext context, /// State associated with rendering. /// Should be drawn from right to left. /// Remainder space left over for other drawing. - public override Rectangle DrawGridErrorGlyph(RenderContext context, + public override Rectangle DrawGridErrorGlyph([DisallowNull] RenderContext context, Rectangle cellRect, PaletteState state, bool rtl) @@ -3264,9 +3264,9 @@ public override Rectangle DrawGridErrorGlyph(RenderContext context, /// Render context. /// Drawing rectangle space. /// Palette source of drawing values. - public override void DrawDragDropSolidGlyph(RenderContext context, + public override void DrawDragDropSolidGlyph([DisallowNull] RenderContext context, Rectangle drawRect, - IPaletteDragDrop dragDropPalette) + [DisallowNull] IPaletteDragDrop dragDropPalette) { Debug.Assert(context != null); Debug.Assert(dragDropPalette != null); @@ -3288,8 +3288,8 @@ public override void DrawDragDropSolidGlyph(RenderContext context, /// Set of drag docking data. /// Palette source of drawing values. /// Feedback requested. - public override void MeasureDragDropDockingGlyph(RenderDragDockingData dragData, - IPaletteDragDrop dragDropPalette, + public override void MeasureDragDropDockingGlyph([DisallowNull] RenderDragDockingData dragData, + [DisallowNull] IPaletteDragDrop dragDropPalette, PaletteDragFeedback feedback) { Debug.Assert(dragData != null); @@ -3312,9 +3312,9 @@ public override void MeasureDragDropDockingGlyph(RenderDragDockingData dragData, /// Set of drag docking data. /// Palette source of drawing values. /// Feedback requested. - public override void DrawDragDropDockingGlyph(RenderContext context, - RenderDragDockingData dragData, - IPaletteDragDrop dragDropPalette, + public override void DrawDragDropDockingGlyph([DisallowNull] RenderContext context, + [DisallowNull] RenderDragDockingData dragData, + [DisallowNull] IPaletteDragDrop dragDropPalette, PaletteDragFeedback feedback) { Debug.Assert(context != null); @@ -3380,7 +3380,7 @@ public override bool EvalTransparentPaint(IPaletteBack paletteBack, /// Element state associated with palette. /// True if transparent painting required. public override bool EvalTransparentPaint(IPaletteBack paletteBack, - IPaletteBorder? paletteBorder, + [DisallowNull] IPaletteBorder? paletteBorder, PaletteState state) { // If the border takes up some visual space @@ -5247,7 +5247,7 @@ private static Brush CreateColorBrush(Rectangle rect, } private static Brush CreateImageBrush(Rectangle rect, - Image image, + [DisallowNull] Image image, PaletteImageStyle imageStyle) { // Create brush based on the provided image @@ -5709,11 +5709,11 @@ private static Font ContentFontForButtonForm(ViewLayoutContext context, return c as KryptonForm; } - private static void AllocateImageSpace(StandardContentMemento memento, - IPaletteContent? paletteContent, - IContentValues contentValues, + private static void AllocateImageSpace([DisallowNull] StandardContentMemento memento, + [DisallowNull] IPaletteContent? paletteContent, + [DisallowNull] IContentValues contentValues, PaletteState state, - Rectangle displayRect, + [DisallowNull] Rectangle displayRect, RightToLeft rtl, ref Size[,] allocation) { @@ -5765,9 +5765,9 @@ private static void AllocateImageSpace(StandardContentMemento memento, } private static void AllocateShortTextSpace(ViewLayoutContext context, - Graphics g, + [DisallowNull] Graphics g, StandardContentMemento memento, - IPaletteContent? paletteContent, + [DisallowNull] IPaletteContent? paletteContent, IContentValues contentValues, PaletteState state, Rectangle displayRect, @@ -5853,8 +5853,8 @@ private static void AllocateShortTextSpace(ViewLayoutContext context, private static void AllocateLongTextSpace(ViewLayoutContext context, Graphics? g, - StandardContentMemento memento, - IPaletteContent? paletteContent, + [DisallowNull] StandardContentMemento memento, + [DisallowNull] IPaletteContent? paletteContent, IContentValues contentValues, PaletteState state, Rectangle displayRect, @@ -6171,8 +6171,8 @@ private static void ApplyExcessSpace(int excess, ref int[] cells) } } - private static void PositionAlignContent(StandardContentMemento memento, - IPaletteContent paletteContent, + private static void PositionAlignContent([DisallowNull] StandardContentMemento memento, + [DisallowNull] IPaletteContent paletteContent, PaletteState state, RightToLeft rtl, PaletteRelativeAlign alignH, diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs index a2ef05de3..e30a2fb2b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs @@ -34,9 +34,9 @@ static RenderVisualStudio() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, PaletteState state) + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -57,7 +57,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs index 4e37c0c73..184c7d7b7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs @@ -53,9 +53,9 @@ static RenderVisualStudio2010With2007() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -82,7 +82,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs index 8f3a63ee4..67fab72ba 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs @@ -55,9 +55,9 @@ static RenderVisualStudio2010With2010() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -84,7 +84,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs index 6c26f8c1c..17a4be4c4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs @@ -48,9 +48,9 @@ static RenderVisualStudio2010With2013() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -77,7 +77,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// Color palette to use when rendering toolstrip. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colorPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colorPalette) { Debug.Assert(colorPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs index ae6301f70..4b142c41a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs @@ -37,9 +37,9 @@ static RenderVisualStudio2010WithMicrosoft365() /// Palette used for recovering drawing details. /// State associated with rendering. public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, - RenderContext context, + [DisallowNull] RenderContext context, Rectangle displayRect, - IPaletteBack paletteBack, PaletteState state) + [DisallowNull] IPaletteBack paletteBack, PaletteState state) { Debug.Assert(context != null); @@ -60,7 +60,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape, /// /// The colour palette. /// - public override ToolStripRenderer RenderToolStrip(PaletteBase colourPalette) + public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase colourPalette) { Debug.Assert(colourPalette != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs index 9f51e9198..a94b549f2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewBase.cs @@ -685,7 +685,7 @@ public virtual void GotFocus(Control c) /// Source control has lost the focus. /// /// Reference to the source control instance. - public virtual void LostFocus(Control c) + public virtual void LostFocus([DisallowNull] Control c) { // Use source controller as first preference if (SourceController != null) diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs index fc4d89152..4afbd4e5a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewComposite.cs @@ -76,7 +76,7 @@ public override string ToString() => /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -104,7 +104,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -139,7 +139,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -156,7 +156,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs index 19fde85f1..de2e6e5a9 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewControl.cs @@ -45,7 +45,7 @@ public class ViewControl : Control /// Initialize a new instance of the ViewControl class. /// /// Top level visual control. - public ViewControl(VisualControl rootControl) + public ViewControl([DisallowNull] VisualControl rootControl) { Debug.Assert(rootControl != null); @@ -357,7 +357,7 @@ protected override void OnKeyUp(KeyEventArgs e) /// Source of notification. /// An NeedLayoutEventArgs containing event data. /// - protected virtual void OnNeedPaint(object? sender, NeedLayoutEventArgs e) + protected virtual void OnNeedPaint(object? sender, [DisallowNull] NeedLayoutEventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs index 942dba22b..1e449be35 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewDecorator.cs @@ -25,7 +25,7 @@ public abstract class ViewDecorator : ViewBase /// /// Initialize a new instance of the ViewBase class. /// - protected ViewDecorator(ViewBase child) + protected ViewDecorator([DisallowNull] ViewBase child) { Debug.Assert(child != null); _child = child; diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs index 7d39d30fa..124451cb8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewLeaf.cs @@ -41,7 +41,7 @@ public override string ToString() => /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); return false; @@ -53,7 +53,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs index 241d3b724..df9faee69 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Base/ViewManager.cs @@ -202,7 +202,7 @@ public virtual Size GetPreferredSize(IRenderer? renderer, /// Renderer provider. /// /// True if it contains transparent painting. - public bool EvalTransparentPaint(IRenderer renderer) + public bool EvalTransparentPaint([DisallowNull] IRenderer renderer) { Debug.Assert(renderer != null); Debug.Assert(Root != null); @@ -284,7 +284,7 @@ public ViewBase? ActiveView /// Perform a layout of the view. /// /// Renderer provider. - public virtual void Layout(IRenderer renderer) + public virtual void Layout([DisallowNull] IRenderer renderer) { Debug.Assert(renderer != null); Debug.Assert(Root != null); @@ -303,7 +303,7 @@ public virtual void Layout(IRenderer renderer) /// /// View context for layout operation. /// - public virtual void Layout(ViewLayoutContext context) + public virtual void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); Debug.Assert(context!.Renderer != null); @@ -360,7 +360,7 @@ public virtual void Layout(ViewLayoutContext context) /// Renderer provider. /// A PaintEventArgs that contains the event data. /// - public virtual void Paint(IRenderer renderer, PaintEventArgs? e) + public virtual void Paint([DisallowNull] IRenderer renderer, PaintEventArgs? e) { Debug.Assert(renderer != null); Debug.Assert(e != null); @@ -391,7 +391,7 @@ public virtual void Paint(IRenderer renderer, PaintEventArgs? e) /// /// Renderer context. /// - public virtual void Paint(RenderContext context) + public virtual void Paint([DisallowNull] RenderContext context) { Debug.Assert(context != null); Debug.Assert(Root != null); @@ -439,7 +439,7 @@ public virtual void Paint(RenderContext context) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseMove(MouseEventArgs e, Point rawPt) + public virtual void MouseMove([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -464,7 +464,7 @@ public virtual void MouseMove(MouseEventArgs e, Point rawPt) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseDown(MouseEventArgs e, Point rawPt) + public virtual void MouseDown([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -495,7 +495,7 @@ public virtual void MouseDown(MouseEventArgs e, Point rawPt) /// A MouseEventArgs that contains the event data. /// The actual point provided from the windows message. /// - public virtual void MouseUp(MouseEventArgs e, Point rawPt) + public virtual void MouseUp([DisallowNull] MouseEventArgs e, Point rawPt) { Debug.Assert(e != null); @@ -526,7 +526,7 @@ public virtual void MouseUp(MouseEventArgs e, Point rawPt) /// /// An EventArgs that contains the event data. /// - public virtual void MouseLeave(EventArgs e) + public virtual void MouseLeave([DisallowNull] EventArgs e) { Debug.Assert(e != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs index 4d354ea41..88a960add 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawBorderEdge.cs @@ -29,7 +29,7 @@ public class ViewDrawBorderEdge : ViewDrawPanel /// /// Palette source for drawing details. /// Initial orientation of the border. - public ViewDrawBorderEdge(PaletteBorderEdge palette, + public ViewDrawBorderEdge([DisallowNull] PaletteBorderEdge palette, Orientation orientation) : base(palette) { @@ -70,7 +70,7 @@ public override string ToString() => /// Update the source palette for drawing. /// /// Palette source for drawing details. - public void SetPalettes(PaletteBorderEdge palette) + public void SetPalettes([DisallowNull] PaletteBorderEdge palette) { Debug.Assert(palette != null); @@ -88,7 +88,7 @@ public void SetPalettes(PaletteBorderEdge palette) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs index f397cecb4..7811d8d43 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawButton.cs @@ -416,10 +416,10 @@ public bool TestForFocusCues /// Palette source for the normal state. /// Palette source for the tracking state. /// Palette source for the pressed state. - public void SetPalettes(IPaletteTriple paletteDisabled, - IPaletteTriple paletteNormal, - IPaletteTriple paletteTracking, - IPaletteTriple palettePressed) + public void SetPalettes([DisallowNull] IPaletteTriple paletteDisabled, + [DisallowNull] IPaletteTriple paletteNormal, + [DisallowNull] IPaletteTriple paletteTracking, + [DisallowNull] IPaletteTriple palettePressed) { Debug.Assert(paletteDisabled != null); Debug.Assert(paletteNormal != null); @@ -442,9 +442,9 @@ public void SetPalettes(IPaletteTriple paletteDisabled, /// Palette source for the normal checked state. /// Palette source for the tracking checked state. /// Palette source for the pressed checked state. - public void SetCheckedPalettes(IPaletteTriple paletteCheckedNormal, - IPaletteTriple paletteCheckedTracking, - IPaletteTriple paletteCheckedPressed) + public void SetCheckedPalettes([DisallowNull] IPaletteTriple paletteCheckedNormal, + [DisallowNull] IPaletteTriple paletteCheckedTracking, + [DisallowNull] IPaletteTriple paletteCheckedPressed) { Debug.Assert(paletteCheckedNormal != null); Debug.Assert(paletteCheckedTracking != null); @@ -466,7 +466,7 @@ public void SetCheckedPalettes(IPaletteTriple paletteCheckedNormal, /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -483,7 +483,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); Debug.Assert(_drawCanvas != null); @@ -500,7 +500,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -576,7 +576,7 @@ public override void Layout(ViewLayoutContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs index 48df5d76a..5346cbe12 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCanvas.cs @@ -138,8 +138,8 @@ public IPaletteMetric? PaletteMetric /// /// Palette source for the background. /// Palette source for the border. - public virtual void SetPalettes(IPaletteBack paletteBack, - IPaletteBorder paletteBorder) => + public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, + [DisallowNull] IPaletteBorder paletteBorder) => SetPalettes(paletteBack, paletteBorder, null); /// @@ -148,7 +148,7 @@ public virtual void SetPalettes(IPaletteBack paletteBack, /// Palette source for the background. /// Palette source for the border. /// Palette source for the metric. - public virtual void SetPalettes(IPaletteBack paletteBack, + public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, [DisallowNull]IPaletteBorder paletteBorder, IPaletteMetric? paletteMetric) { @@ -337,7 +337,7 @@ public PaletteGraphicsHint ForceGraphicsHint /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -354,7 +354,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -399,7 +399,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -460,7 +460,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -537,7 +537,7 @@ public override void RenderBefore(RenderContext context) /// /// Rendering context. /// - public override void RenderAfter(RenderContext context) + public override void RenderAfter([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -570,7 +570,7 @@ public override void RenderAfter(RenderContext context) /// Draw the canvas border. /// /// - public virtual void RenderBorder(RenderContext context) + public virtual void RenderBorder([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs index 5da76902f..84af62aee 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCheckBox.cs @@ -28,7 +28,7 @@ public class ViewDrawCheckBox : ViewLeaf /// Initialize a new instance of the ViewDrawCheckBox class. /// /// Palette for source of drawing values. - public ViewDrawCheckBox(PaletteBase palette) + public ViewDrawCheckBox([DisallowNull] PaletteBase palette) { Debug.Assert(palette != null); _palette = palette; @@ -84,7 +84,7 @@ public bool Tracking /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -99,7 +99,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs index 2d93c8e46..a17280045 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawContent.cs @@ -165,7 +165,7 @@ public bool UseMnemonic /// Update the source palette for drawing. /// /// Palette source for the content. - public void SetPalette(IPaletteContent paletteContent) + public void SetPalette([DisallowNull] IPaletteContent paletteContent) { Debug.Assert(paletteContent != null); @@ -190,7 +190,7 @@ public void SetPalette(IPaletteContent paletteContent) /// /// ViewLayoutContext context. /// - public bool IsImageDisplayed(ViewContext context) + public bool IsImageDisplayed([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -219,7 +219,7 @@ public bool IsImageDisplayed(ViewContext context) /// /// ViewLayoutContext context. /// - public Rectangle ImageRectangle(ViewContext context) + public Rectangle ImageRectangle([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -248,7 +248,7 @@ public Rectangle ImageRectangle(ViewContext context) /// /// /// Rectangle of short text drawing. - public Rectangle ShortTextRect(ViewContext context) + public Rectangle ShortTextRect([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -277,7 +277,7 @@ public Rectangle ShortTextRect(ViewContext context) /// /// /// Rectangle of short text drawing. - public Rectangle LongTextRect(ViewContext context) + public Rectangle LongTextRect([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -306,7 +306,7 @@ public Rectangle LongTextRect(ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -340,7 +340,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -382,7 +382,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs index d0bdc5a68..b62656899 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeButton.cs @@ -126,7 +126,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs index e6b5a9c05..94f1a7682 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDateTimeText.cs @@ -1591,7 +1591,7 @@ public void PerformKeyPress(KeyPressEventArgs e) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs index 432b60a3d..ed0515a7b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDebug.cs @@ -50,7 +50,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _preferredSize; @@ -60,7 +60,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -78,7 +78,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs index 3f838b937..aba4af8b2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDocker.cs @@ -193,7 +193,7 @@ public override bool DrawBorderLast /// /// Child view element. /// Docking setting. - public ViewDockStyle GetDock(ViewBase child) + public ViewDockStyle GetDock([DisallowNull] ViewBase child) { Debug.Assert(child != null); @@ -212,7 +212,7 @@ public ViewDockStyle GetDock(ViewBase child) /// /// Child view element. /// DockStyle setting. - public void SetDock(ViewBase child, ViewDockStyle dock) + public void SetDock([DisallowNull] ViewBase child, ViewDockStyle dock) { Debug.Assert(child != null); @@ -252,7 +252,7 @@ public void Add(ViewBase item, ViewDockStyle dock) /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -297,7 +297,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// Gets the size required for all except the contents. /// /// Layout context. - public Size GetNonChildSize(ViewLayoutContext context) + public Size GetNonChildSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -356,7 +356,7 @@ public Size GetNonChildSize(ViewLayoutContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -508,7 +508,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs index a9d03d31f..60e0d1ffd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawDropDownButton.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -67,7 +67,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs index 48b6c907e..39bd95d4a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawEmptyContent.cs @@ -53,7 +53,7 @@ public ViewDrawEmptyContent(IPaletteContent? paletteContentDisabled, /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -75,7 +75,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -100,7 +100,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs index 0dd5a53eb..9a38e33fa 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawGroupBoxDocker.cs @@ -76,7 +76,7 @@ public override string ToString() => /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -137,7 +137,7 @@ public override void RenderBefore(RenderContext context) /// /// Rendering context. /// - public override void RenderAfter(RenderContext context) + public override void RenderAfter([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs index aeacf3f97..c24f8d3fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckBox.cs @@ -257,7 +257,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -286,7 +286,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs index 05852365f..58deb29ff 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuCheckButton.cs @@ -246,7 +246,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -273,7 +273,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs index 157ef742d..a9b9209b6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorBlock.cs @@ -127,7 +127,7 @@ public override string ToString() => /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -140,7 +140,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -162,7 +162,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -202,7 +202,7 @@ public override void RenderBefore(RenderContext context) /// /// Rendering context. /// - public override void RenderAfter(RenderContext context) + public override void RenderAfter([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs index de0adf846..a53e2d923 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumn.cs @@ -60,7 +60,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -82,7 +82,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs index 48e8e7f94..1e7661c0e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuColorColumns.cs @@ -117,7 +117,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs index f5d1bf831..9a11e0480 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuHeading.cs @@ -68,7 +68,7 @@ public override string ToString() => /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs index ba8df6046..e08093808 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageCanvas.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -105,7 +105,7 @@ public int OverridePreferredWidth /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -126,7 +126,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs index d512be376..997ee5a68 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageColumn.cs @@ -60,7 +60,7 @@ public int ColumnWidth /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs index 400d05cb6..6a0b0864e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs @@ -126,7 +126,7 @@ public int ImageIndex /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs index c8537d9eb..e5c7e6cfe 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItem.cs @@ -448,7 +448,7 @@ public void ClearSubMenu() /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -567,7 +567,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); ClientRectangle = context.DisplayRectangle; diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs index 3d8be58c6..113e9d2c7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuItemContent.cs @@ -51,7 +51,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs index 3511eb156..4f7c84045 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuLinkLabel.cs @@ -217,7 +217,7 @@ public bool Pressed /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -241,7 +241,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs index 2e68a3d37..8982f5e64 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuMonthCalendar.cs @@ -89,7 +89,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs index d62974eab..58bd5fe24 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuRadioButton.cs @@ -202,7 +202,7 @@ protected override void Dispose(bool disposing) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs index 5bb8da532..dc7bbd291 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMenuSeparator.cs @@ -23,7 +23,7 @@ public class ViewDrawMenuSeparator : ViewDrawDocker /// /// Reference to owning separator entry. /// Palette for obtaining drawing values. - public ViewDrawMenuSeparator(KryptonContextMenuSeparator separator, + public ViewDrawMenuSeparator([DisallowNull] KryptonContextMenuSeparator separator, PaletteDoubleRedirect? palette) : base(separator.StateNormal.Back, separator.StateNormal.Border) { @@ -43,7 +43,7 @@ public ViewDrawMenuSeparator(KryptonContextMenuSeparator separator, /// Initialize a new instance of the ViewDrawMenuSeparator class. /// /// State specific source of palette values. - public ViewDrawMenuSeparator(PaletteDouble state) + public ViewDrawMenuSeparator([DisallowNull] PaletteDouble state) : base(state.Back, state.Border) { // We need to be big enough to contain 1 pixel square spacer @@ -74,7 +74,7 @@ public override string ToString() => /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs index e5dde9dce..59e60c889 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDayNames.cs @@ -73,7 +73,7 @@ protected override void Dispose(bool disposing) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -92,7 +92,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -128,7 +128,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs index db36c2559..1e2b415b3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthDays.cs @@ -211,7 +211,7 @@ public DateTime DayNearPoint(Point pt) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return new Size(_months.SizeDays.Width * WEEKDAYS, _months.SizeDays.Height * WEEKS); @@ -221,7 +221,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -359,7 +359,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs index ba1044b53..d56ef8726 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawMonthUpDown.cs @@ -109,7 +109,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs index 711397dc8..255c7dcd4 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawPanel.cs @@ -37,7 +37,7 @@ public ViewDrawPanel() /// Initialize a new instance of the ViewDrawPanel class. /// /// Palette source for the background. - public ViewDrawPanel(IPaletteBack paletteBack) + public ViewDrawPanel([DisallowNull] IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); _paletteBack = paletteBack; @@ -92,7 +92,7 @@ protected override void Dispose(bool disposing) /// Update the source palettes for drawing. /// /// Palette source for the background. - public void SetPalettes(IPaletteBack paletteBack) + public void SetPalettes([DisallowNull] IPaletteBack paletteBack) { Debug.Assert(paletteBack != null); @@ -114,7 +114,7 @@ public void SetPalettes(IPaletteBack paletteBack) /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -130,7 +130,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -155,7 +155,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs index fe4730ea0..83380c539 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawRadioButton.cs @@ -27,7 +27,7 @@ public class ViewDrawRadioButton : ViewLeaf /// Initialize a new instance of the ViewDrawRadioButton class. /// /// Palette for source of drawing values. - public ViewDrawRadioButton(PaletteBase palette) + public ViewDrawRadioButton([DisallowNull] PaletteBase palette) { Debug.Assert(palette != null); _palette = palette; @@ -72,7 +72,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -87,7 +87,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs index ec640f956..81aeb3796 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawScrollBar.cs @@ -169,7 +169,7 @@ public void SetScrollValues(int min, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -182,7 +182,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs index e9509e620..47c8eb3d3 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSeparator.cs @@ -45,10 +45,10 @@ public class ViewDrawSeparator : ViewLeaf /// Palette source for pressed metric values. /// Metric used to get padding values. /// Visual orientation of the content. - public ViewDrawSeparator(IPaletteDouble paletteDisabled, IPaletteDouble paletteNormal, - IPaletteDouble paletteTracking, IPaletteDouble palettePressed, - IPaletteMetric metricDisabled, IPaletteMetric metricNormal, - IPaletteMetric metricTracking, IPaletteMetric metricPressed, + public ViewDrawSeparator([DisallowNull] IPaletteDouble paletteDisabled, [DisallowNull] IPaletteDouble paletteNormal, + [DisallowNull] IPaletteDouble paletteTracking, [DisallowNull] IPaletteDouble palettePressed, + [DisallowNull] IPaletteMetric metricDisabled, [DisallowNull] IPaletteMetric metricNormal, + [DisallowNull] IPaletteMetric metricTracking, [DisallowNull] IPaletteMetric metricPressed, PaletteMetricPadding metricPadding, Orientation orientation) { @@ -131,14 +131,14 @@ public override string ToString() => /// Palette source for normal metric values. /// Palette source for tracking metric values. /// Palette source for pressed metric values. - public void SetPalettes(IPaletteDouble paletteDisabled, - IPaletteDouble paletteNormal, - IPaletteDouble paletteTracking, - IPaletteDouble palettePressed, - IPaletteMetric metricDisabled, - IPaletteMetric metricNormal, - IPaletteMetric metricTracking, - IPaletteMetric metricPressed) + public void SetPalettes([DisallowNull] IPaletteDouble paletteDisabled, + [DisallowNull] IPaletteDouble paletteNormal, + [DisallowNull] IPaletteDouble paletteTracking, + [DisallowNull] IPaletteDouble palettePressed, + [DisallowNull] IPaletteMetric metricDisabled, + [DisallowNull] IPaletteMetric metricNormal, + [DisallowNull] IPaletteMetric metricTracking, + [DisallowNull] IPaletteMetric metricPressed) { Debug.Assert(paletteDisabled != null); Debug.Assert(paletteNormal != null); @@ -166,7 +166,7 @@ public void SetPalettes(IPaletteDouble paletteDisabled, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return new Size(Length, Length); @@ -176,7 +176,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); ClientRectangle = context.DisplayRectangle; @@ -190,7 +190,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs index 2c18c3d0b..b9af7e9c2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawSplitCanvas.cs @@ -199,8 +199,8 @@ public virtual void SetPalettes(IPaletteBack paletteBack, /// Palette source for the background. /// Palette source for the border. /// Palette source for the metric. - public virtual void SetPalettes(IPaletteBack paletteBack, - IPaletteBorder paletteBorder, + public virtual void SetPalettes([DisallowNull] IPaletteBack paletteBack, + [DisallowNull] IPaletteBorder paletteBorder, IPaletteMetric? paletteMetric) { Debug.Assert(paletteBorder != null); @@ -355,7 +355,7 @@ public PaletteGraphicsHint ForceGraphicsHint /// /// Evaluation context. /// True if transparent areas exist; otherwise false. - public override bool EvalTransparentPaint(ViewContext context) + public override bool EvalTransparentPaint([DisallowNull] ViewContext context) { Debug.Assert(context != null); @@ -372,7 +372,7 @@ public override bool EvalTransparentPaint(ViewContext context) /// /// Layout context. /// - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -417,7 +417,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -478,7 +478,7 @@ public override void Layout(ViewLayoutContext context) /// /// Rendering context. /// - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -530,7 +530,7 @@ public override void RenderBefore(RenderContext context) /// /// Rendering context. /// - public override void RenderAfter(RenderContext context) + public override void RenderAfter([DisallowNull] RenderContext context) { Debug.Assert(context != null); @@ -644,7 +644,7 @@ private void RenderBackground(RenderContext context, Rectangle rect) } } - private void RenderBorder(RenderContext context, Rectangle rect) + private void RenderBorder([DisallowNull] RenderContext context, Rectangle rect) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs index 33cd76335..65c248511 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawToday.cs @@ -111,7 +111,7 @@ public string GetShortText() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); base.Layout(context); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs index 1bb0d4ff2..112b7236c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackPosition.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.PositionSize; @@ -54,7 +54,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// /// Layout context. /// - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs index 4a26b336e..c24934c56 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTP.cs @@ -189,7 +189,7 @@ public int NearestValueFromPoint(Point pt) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs index 5973cbc5c..c137c6edb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTicks.cs @@ -49,7 +49,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.TickSize; @@ -59,7 +59,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs index e1ce3ce6e..41c949432 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawTrackTrack.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _drawTrackBar.TrackSize; @@ -53,7 +53,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs index c10945e27..a7bf147b8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawWeekNumbers.cs @@ -134,7 +134,7 @@ public DateTime Month /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); return _months.SizeDay with { Height = _months.SizeDays.Height * WEEKS }; @@ -144,7 +144,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -198,7 +198,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) + public override void RenderBefore([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs index 0cd645ac7..7b642231e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCenter.cs @@ -116,7 +116,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -177,7 +177,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs index 04f75c864..e019b1699 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutColorStack.cs @@ -38,7 +38,7 @@ public override string ToString() => /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs index ec47a510e..13d70e7b8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutControl.cs @@ -35,9 +35,9 @@ public ViewLayoutControl(VisualControl rootControl, /// View control to use as child. /// Top level visual control. /// View used to size and position the child control. - public ViewLayoutControl(ViewControl viewControl, - VisualControl rootControl, - ViewBase viewChild) + public ViewLayoutControl([DisallowNull] ViewControl viewControl, + [DisallowNull] VisualControl rootControl, + [DisallowNull] ViewBase viewChild) { Debug.Assert(viewControl != null); Debug.Assert(rootControl != null); @@ -207,7 +207,7 @@ public void MakeParent(Control c) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -239,7 +239,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs index 4dfa27d04..cd8fff31f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutCrumbs.cs @@ -122,7 +122,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -247,7 +247,7 @@ public override void RenderBefore(RenderContext context) /// Perform a render of the elements. /// /// Rendering context. - public override void Render(RenderContext context) + public override void Render([DisallowNull] RenderContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs index cfdb32008..629ce5614 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutDocker.cs @@ -114,7 +114,7 @@ public override string ToString() => /// /// Child view element. /// Docking setting. - public ViewDockStyle GetDock(ViewBase child) + public ViewDockStyle GetDock([DisallowNull] ViewBase child) { Debug.Assert(child != null); @@ -133,7 +133,7 @@ public ViewDockStyle GetDock(ViewBase child) /// /// Child view element. /// ViewDockStyle setting. - public void SetDock(ViewBase child, ViewDockStyle dock) + public void SetDock([DisallowNull] ViewBase child, ViewDockStyle dock) { Debug.Assert(child != null); @@ -180,7 +180,7 @@ public void Add(ViewBase item, ViewDockStyle dock) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -329,7 +329,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs index 490b60eaa..d9f161f26 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFill.cs @@ -81,7 +81,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs index 63534d6d0..f9b1b3a84 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutFit.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs index be9dbe4e5..a8cbb96a8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemSelect.cs @@ -40,8 +40,8 @@ internal class ViewLayoutMenuItemSelect : ViewComposite /// /// Reference to owning instance. /// Provider of context menu information. - public ViewLayoutMenuItemSelect(KryptonContextMenuImageSelect itemSelect, - IContextMenuProvider provider) + public ViewLayoutMenuItemSelect([DisallowNull] KryptonContextMenuImageSelect itemSelect, + [DisallowNull] IContextMenuProvider provider) { Debug.Assert(itemSelect != null); Debug.Assert(provider != null); @@ -129,7 +129,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -161,7 +161,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs index bb4ca10b1..5593693c6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMenuItemsPile.cs @@ -102,7 +102,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -130,7 +130,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); base.Layout(context); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs index f356994bf..abca27b2a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMetricSpacer.cs @@ -28,7 +28,7 @@ public class ViewLayoutMetricSpacer : ViewLeaf /// /// Palette source for metric values. /// Metric used to get spacer size. - public ViewLayoutMetricSpacer(IPaletteMetric paletteMetric, + public ViewLayoutMetricSpacer([DisallowNull] IPaletteMetric paletteMetric, PaletteMetricInt metricInt) { Debug.Assert(paletteMetric != null); @@ -73,7 +73,7 @@ public void SetMetrics(IPaletteMetric paletteMetric, /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs index 75ac8e3e0..bc5ce73e6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutMonths.cs @@ -469,7 +469,7 @@ public void PrevMonth() /// Gets the size required to draw a single month. /// /// Layout context. - public Size GetSingleMonthSize(ViewLayoutContext context) + public Size GetSingleMonthSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -483,7 +483,7 @@ public Size GetSingleMonthSize(ViewLayoutContext context) /// Gets the size required to draw extra elements such as headers. /// /// Layout context. - public Size GetExtraSize(ViewLayoutContext context) + public Size GetExtraSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -504,7 +504,7 @@ public Size GetExtraSize(ViewLayoutContext context) /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -541,7 +541,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs index cc135ed55..be2c48d27 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutNull.cs @@ -40,7 +40,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -52,7 +52,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs index cc61c10cf..3ad2765fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPadding.cs @@ -65,7 +65,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -83,7 +83,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs index 445e6a370..8147e1d70 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutPile.cs @@ -40,7 +40,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs index 78eeb37c6..d37bbeead 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutScrollViewport.cs @@ -45,8 +45,8 @@ public class ViewLayoutScrollViewport : ViewLayoutDocker /// Animate changes in the viewport. /// Is the viewport vertical. /// Delegate for notifying paint requests. - public ViewLayoutScrollViewport(VisualControl rootControl, - ViewBase viewportFiller, + public ViewLayoutScrollViewport([DisallowNull] VisualControl rootControl, + [DisallowNull] ViewBase viewportFiller, PaletteBorderEdge paletteBorderEdge, IPaletteMetric? paletteMetrics, PaletteMetricPadding metricPadding, @@ -55,7 +55,7 @@ public ViewLayoutScrollViewport(VisualControl rootControl, RelativePositionAlign alignment, bool animateChange, bool vertical, - NeedPaintHandler needPaintDelegate) + [DisallowNull] NeedPaintHandler needPaintDelegate) { Debug.Assert(rootControl != null); Debug.Assert(viewportFiller != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs index 2dfd05152..29e89131e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutSeparator.cs @@ -83,7 +83,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs index 54d246f93..eceabf9e6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStack.cs @@ -61,7 +61,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -96,7 +96,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs index 8b4e88cd8..9c599a0df 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutStretch.cs @@ -43,7 +43,7 @@ public override string ToString() => /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs index 050ba439d..c99cb2155 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutViewport.cs @@ -463,7 +463,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); diff --git a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs index e39cac35d..7044a3e82 100644 --- a/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/View Layout/ViewLayoutWeekCorner.cs @@ -54,7 +54,7 @@ public override string ToString() => /// Discover the preferred size of the element. /// /// Layout context. - public override Size GetPreferredSize(ViewLayoutContext context) + public override Size GetPreferredSize([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -71,7 +71,7 @@ public override Size GetPreferredSize(ViewLayoutContext context) /// Perform a layout of the elements. /// /// Layout context. - public override void Layout(ViewLayoutContext context) + public override void Layout([DisallowNull] ViewLayoutContext context) { Debug.Assert(context != null); @@ -88,7 +88,7 @@ public override void Layout(ViewLayoutContext context) /// Perform rendering before child elements are rendered. /// /// Rendering context. - public override void RenderBefore(RenderContext context) => Debug.Assert(context != null); + public override void RenderBefore([DisallowNull] RenderContext context) => Debug.Assert(context != null); #endregion } diff --git a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs index f1ef54702..2322b7c96 100644 --- a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs +++ b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonWorkspaceDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs index 3d5fbdba6..336e9cc0b 100644 --- a/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs +++ b/Source/Krypton Components/Krypton.Workspace/Workspace/KryptonWorkspaceSequenceDesigner.cs @@ -33,7 +33,7 @@ public KryptonWorkspaceSequenceDesigner() /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); From 534a10689b09492243d79cabcc62571f5d466ee1 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 08:37:01 +0000 Subject: [PATCH 10/14] Revert "* More `null` checking" This reverts commit f3f55611369499b47b9c3f7b9b342f9ff2264115. --- .../ButtonSpec/ButtonSpecManagerDraw.cs | 1 - .../ButtonSpec/ButtonSpecToContent.cs | 6 +- .../KryptonBorderEdgeActionList.cs | 4 +- .../KryptonCheckButtonActionList.cs | 4 +- .../Action Lists/KryptonGroupActionList.cs | 22 +++--- .../Action Lists/KryptonGroupBoxActionList.cs | 56 +++++++------- .../Action Lists/KryptonHeaderActionList.cs | 40 +++++----- .../KryptonHeaderGroupActionList.cs | 48 ++++++------ .../Action Lists/KryptonLabelActionList.cs | 56 +++++++------- .../KryptonLinkLabelActionList.cs | 70 ++++++++--------- .../KryptonLinkWrapLabelActionList.cs | 24 +++--- .../Designers/KryptonBreadCrumbDesigner.cs | 16 ++-- .../KryptonBreadCrumbItemDesigner.cs | 2 +- .../KryptonComboBoxColumnDesigner.cs | 8 +- .../Designers/KryptonComboBoxDesigner.cs | 14 ++-- .../Designers/KryptonContextMenuDesigner.cs | 2 +- .../KryptonContextMenuItemDesigner.cs | 2 +- .../KryptonContextMenuItemsDesigner.cs | 2 +- .../KryptonDateTimePickerColumnDesigner.cs | 10 +-- .../KryptonDateTimePickerDesigner.cs | 22 +++--- .../KryptonDomainUpDownColumnDesigner.cs | 8 +- .../Designers/KryptonDomainUpDownDesigner.cs | 16 ++-- .../Designers/KryptonGroupBoxDesigner.cs | 6 +- .../Designers/KryptonGroupDesigner.cs | 4 +- .../Designers/KryptonGroupPanelDesigner.cs | 12 +-- .../Designers/KryptonHeaderDesigner.cs | 22 +++--- .../Designers/KryptonHeaderGroupDesigner.cs | 24 +++--- .../Designers/KryptonListBoxDesigner.cs | 2 +- .../KryptonMaskedTextBoxColumnDesigner.cs | 8 +- .../Designers/KryptonMaskedTextBoxDesigner.cs | 18 ++--- .../Designers/KryptonMonthCalendarDesigner.cs | 22 +++--- .../KryptonNumericUpDownColumnDesigner.cs | 8 +- .../Designers/KryptonNumericUpDownDesigner.cs | 16 ++-- .../Designers/KryptonRichTextBoxDesigner.cs | 16 ++-- .../KryptonSplitContainerDesigner.cs | 2 +- .../Designers/KryptonSplitterPanelDesigner.cs | 18 ++--- .../Designers/KryptonTextBoxColumnDesigner.cs | 8 +- .../Designers/KryptonTextBoxDesigner.cs | 14 ++-- .../Designers/KryptonTrackBarDesigner.cs | 6 +- .../Designers/KryptonTreeViewDesigner.cs | 2 +- .../Designers/KryptonWebBrowserDesigner.cs | 2 +- .../Designers/ScrollBarControlDesigner.cs | 4 +- .../Editors/KryptonBreadCrumbItemsEditor.cs | 77 +++++++++---------- .../KryptonCheckButtonCollectionEditor.cs | 2 +- .../Editors/PaletteDrawBordersEditor.cs | 8 +- .../Other/KryptonDesignerActionItem.cs | 4 +- .../Other/KryptonSplitContainerBehavior.cs | 6 +- .../Other/KryptonSplitContainerGlyph.cs | 18 ++--- .../OverrideComboBoxStyleDropDownStyle.cs | 4 +- .../UX/KryptonCheckButtonCollectionForm.cs | 20 ++--- .../UX/KryptonContextMenuCollectionForm.cs | 57 +++++++------- .../General/KryptonAboutBoxUtilities.cs | 8 +- 52 files changed, 422 insertions(+), 429 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs index da661ad52..6bb56ba88 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecManagerDraw.cs @@ -81,7 +81,6 @@ public ButtonSpecManagerDraw(Control control, viewMetricPaddings, getRenderer, needPaint) { Debug.Assert(viewDockers != null); - Debug.Assert(viewDockers != null, nameof(viewDockers) + " != null"); Debug.Assert(viewDockers.Length == viewMetrics.Length); Debug.Assert(viewDockers.Length == viewMetricPaddings.Length); diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs index 9a3a0909d..34eb0f087 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpecToContent.cs @@ -28,13 +28,13 @@ public class ButtonSpecToContent : IContentValues /// /// Palette for sourcing information. /// Source button spec instance. - public ButtonSpecToContent(PaletteBase? palette, - ButtonSpec buttonSpec) + public ButtonSpecToContent([DisallowNull] PaletteBase? palette, + [DisallowNull] ButtonSpec buttonSpec) { Debug.Assert(palette != null); Debug.Assert(buttonSpec != null); _palette = palette; - _buttonSpec = buttonSpec!; + _buttonSpec = buttonSpec; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs index 0b96a7b4e..9e73f916b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonBorderEdgeActionList.cs @@ -40,7 +40,7 @@ public KryptonBorderEdgeActionList(KryptonBorderEdgeDesigner owner) if (orientationProp != null) { // Decide on the next action to take given the current setting - _action = (Orientation)orientationProp.GetValue(_borderEdge)! == Orientation.Vertical + _action = (Orientation)orientationProp.GetValue(_borderEdge) == Orientation.Vertical ? "Horizontal border orientation" : "Vertical border orientation"; } @@ -164,7 +164,7 @@ private void OnOrientationClick(object sender, EventArgs e) _action = orientation == Orientation.Vertical ? "Horizontal border orientation" : "Vertical border orientation"; // Get access to the actual Orientation property - PropertyDescriptor? orientationProp = TypeDescriptor.GetProperties(_borderEdge!)[nameof(Orientation)]; + PropertyDescriptor? orientationProp = TypeDescriptor.GetProperties(_borderEdge)[nameof(Orientation)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs index 25be0f412..a8962b78c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs @@ -41,7 +41,7 @@ public KryptonCheckButtonActionList(KryptonCheckButtonDesigner owner) if (checkedProp != null) { // Decide on the next action to take given the current setting - _action = (bool)checkedProp.GetValue(_checkButton)! ? "Uncheck the button" : "Check the button"; + _action = (bool)checkedProp.GetValue(_checkButton) ? "Uncheck the button" : "Check the button"; } } @@ -114,7 +114,7 @@ private void OnCheckedClick(object sender, EventArgs e) _action = isChecked ? "Uncheck the button" : "Check the button"; // Get access to the actual Orientation property - PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton!)[nameof(Checked)]; + PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs index 8e328fd64..451580234 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupActionList.cs @@ -24,7 +24,7 @@ internal class KryptonGroupActionList : DesignerActionList /// Initialize a new instance of the KryptonGroupActionList class. /// /// Designer that owns this action list instance. - public KryptonGroupActionList(KryptonGroupDesigner owner) + public KryptonGroupActionList(KryptonGroupDesigner owner) : base(owner.Component) { // Remember the group instance @@ -34,18 +34,18 @@ public KryptonGroupActionList(KryptonGroupDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the group background style. /// public PaletteBackStyle GroupBackStyle { - get => _group!.GroupBackStyle; + get => _group.GroupBackStyle; set { - if (_group!.GroupBackStyle != value) + if (_group.GroupBackStyle != value) { _service.OnComponentChanged(_group, null, _group.GroupBackStyle, value); _group.GroupBackStyle = value; @@ -58,11 +58,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _group!.GroupBorderStyle; + get => _group.GroupBorderStyle; - set + set { - if (_group!.GroupBorderStyle != value) + if (_group.GroupBorderStyle != value) { _service.OnComponentChanged(_group, null, _group.GroupBorderStyle, value); _group.GroupBorderStyle = value; @@ -75,11 +75,11 @@ public PaletteBorderStyle GroupBorderStyle /// public PaletteMode PaletteMode { - get => _group!.PaletteMode; + get => _group.PaletteMode; - set + set { - if (_group!.PaletteMode != value) + if (_group.PaletteMode != value) { _service.OnComponentChanged(_group, null, _group.PaletteMode, value); _group.PaletteMode = value; @@ -108,7 +108,7 @@ public override DesignerActionItemCollection GetSortedActionItems() actions.Add(new DesignerActionHeaderItem(@"Visuals")); actions.Add(new DesignerActionPropertyItem(nameof(PaletteMode), @"Palette", @"Visuals", @"Palette applied to drawing")); } - + return actions; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs index ec0b7708c..8b5554662 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonGroupBoxActionList.cs @@ -41,11 +41,11 @@ public KryptonGroupBoxActionList(KryptonGroupBoxDesigner owner) /// public PaletteBackStyle GroupBackStyle { - get => _groupBox!.GroupBackStyle; + get => _groupBox.GroupBackStyle; set { - if (_groupBox!.GroupBackStyle != value) + if (_groupBox.GroupBackStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.GroupBackStyle, value); _groupBox.GroupBackStyle = value; @@ -58,11 +58,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _groupBox!.GroupBorderStyle; + get => _groupBox.GroupBorderStyle; set { - if (_groupBox!.GroupBorderStyle != value) + if (_groupBox.GroupBorderStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.GroupBorderStyle, value); _groupBox.GroupBorderStyle = value; @@ -75,11 +75,11 @@ public PaletteBorderStyle GroupBorderStyle /// public LabelStyle CaptionStyle { - get => _groupBox!.CaptionStyle; + get => _groupBox.CaptionStyle; set { - if (_groupBox!.CaptionStyle != value) + if (_groupBox.CaptionStyle != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionStyle, value); _groupBox.CaptionStyle = value; @@ -92,11 +92,11 @@ public LabelStyle CaptionStyle /// public VisualOrientation CaptionEdge { - get => _groupBox!.CaptionEdge; + get => _groupBox.CaptionEdge; set { - if (_groupBox!.CaptionEdge != value) + if (_groupBox.CaptionEdge != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionEdge, value); _groupBox.CaptionEdge = value; @@ -109,11 +109,11 @@ public VisualOrientation CaptionEdge /// public double CaptionOverlap { - get => _groupBox!.CaptionOverlap; + get => _groupBox.CaptionOverlap; set { - if (_groupBox!.CaptionOverlap != value) + if (_groupBox.CaptionOverlap != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.CaptionOverlap, value); _groupBox.CaptionOverlap = value; @@ -126,11 +126,11 @@ public double CaptionOverlap /// public PaletteMode PaletteMode { - get => _groupBox!.PaletteMode; + get => _groupBox.PaletteMode; set { - if (_groupBox!.PaletteMode != value) + if (_groupBox.PaletteMode != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.PaletteMode, value); _groupBox.PaletteMode = value; @@ -142,11 +142,11 @@ public PaletteMode PaletteMode /// The description. public string Description { - get => _groupBox!.Values.Description; + get => _groupBox.Values.Description; set { - if (_groupBox!.Values.Description != value) + if (_groupBox.Values.Description != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Description, value); @@ -159,11 +159,11 @@ public string Description /// The heading. public string Heading { - get => _groupBox!.Values.Heading; + get => _groupBox.Values.Heading; set { - if (_groupBox!.Values.Heading != value) + if (_groupBox.Values.Heading != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Heading, value); @@ -176,11 +176,11 @@ public string Heading /// The image. public Image? Image { - get => _groupBox!.Values.Image; + get => _groupBox.Values.Image; set { - if (_groupBox!.Values.Image != value) + if (_groupBox.Values.Image != value) { _service.OnComponentChanged(_groupBox, null, _groupBox.Values.Image, value); @@ -191,34 +191,34 @@ public Image? Image /// Gets or sets the State Common State Common Long Text Font. /// The State Common State Common Long Text Font. - public Font? StateCommonLongTextFont + public Font StateCommonLongTextFont { - get => _groupBox!.StateCommon!.Content.LongText.Font; + get => _groupBox.StateCommon.Content.LongText.Font; set { - if (_groupBox!.StateCommon?.Content.LongText.Font != value) + if (_groupBox.StateCommon.Content.LongText.Font != value) { - _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon?.Content.LongText.Font, value); + _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon.Content.LongText.Font, value); - _groupBox.StateCommon!.Content.LongText.Font = value; + _groupBox.StateCommon.Content.LongText.Font = value; } } } /// Gets or sets the State Common Short Text Font. /// The State Common Short Text Font. - public Font? StateCommonShortTextFont + public Font StateCommonShortTextFont { - get => _groupBox!.StateCommon!.Content.ShortText.Font; + get => _groupBox.StateCommon.Content.ShortText.Font; set { - if (_groupBox!.StateCommon?.Content.ShortText.Font != value) + if (_groupBox.StateCommon.Content.ShortText.Font != value) { - _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon?.Content.ShortText.Font, value); + _service.OnComponentChanged(_groupBox, null, _groupBox.StateCommon.Content.ShortText.Font, value); - _groupBox.StateCommon!.Content.ShortText.Font = value; + _groupBox.StateCommon.Content.ShortText.Font = value; } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs index 6085a2650..9101b7f56 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderActionList.cs @@ -34,18 +34,18 @@ public KryptonHeaderActionList(KryptonHeaderDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the header style. /// public HeaderStyle HeaderStyle { - get => _header!.HeaderStyle; + get => _header.HeaderStyle; - set + set { - if (_header!.HeaderStyle != value) + if (_header.HeaderStyle != value) { _service.OnComponentChanged(_header, null, _header.HeaderStyle, value); _header.HeaderStyle = value; @@ -58,11 +58,11 @@ public HeaderStyle HeaderStyle /// public VisualOrientation Orientation { - get => _header!.Orientation; + get => _header.Orientation; - set + set { - if (_header!.Orientation != value) + if (_header.Orientation != value) { _service.OnComponentChanged(_header, null, _header.Orientation, value); _header.Orientation = value; @@ -75,11 +75,11 @@ public VisualOrientation Orientation /// public string Heading { - get => _header!.Values.Heading; + get => _header.Values.Heading; - set + set { - if (_header!.Values.Heading != value) + if (_header.Values.Heading != value) { _service.OnComponentChanged(_header, null, _header.Values.Heading, value); _header.Values.Heading = value; @@ -92,11 +92,11 @@ public string Heading /// public string Description { - get => _header!.Values.Description; + get => _header.Values.Description; - set + set { - if (_header!.Values.Description != value) + if (_header.Values.Description != value) { _service.OnComponentChanged(_header, null, _header.Values.Description, value); _header.Values.Description = value; @@ -109,11 +109,11 @@ public string Description /// public Image? Image { - get => _header!.Values.Image; + get => _header.Values.Image; - set + set { - if (_header!.Values.Image != value) + if (_header.Values.Image != value) { _service.OnComponentChanged(_header, null, _header.Values.Image, value); _header.Values.Image = value; @@ -126,11 +126,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _header!.PaletteMode; + get => _header.PaletteMode; - set + set { - if (_header!.PaletteMode != value) + if (_header.PaletteMode != value) { _service.OnComponentChanged(_header, null, _header.PaletteMode, value); _header.PaletteMode = value; @@ -163,7 +163,7 @@ public override DesignerActionItemCollection GetSortedActionItems() actions.Add(new DesignerActionHeaderItem(@"Visuals")); actions.Add(new DesignerActionPropertyItem(nameof(PaletteMode), @"Palette", @"Visuals", @"Palette applied to drawing")); } - + return actions; } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs index 270798b63..39848a045 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonHeaderGroupActionList.cs @@ -38,18 +38,18 @@ public KryptonHeaderGroupActionList(KryptonHeaderGroupDesigner owner) _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion - + #region Public /// /// Gets and sets the group background style. /// public PaletteBackStyle GroupBackStyle { - get => _headerGroup!.GroupBackStyle; + get => _headerGroup.GroupBackStyle; - set + set { - if (_headerGroup!.GroupBackStyle != value) + if (_headerGroup.GroupBackStyle != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.GroupBackStyle, value); _headerGroup.GroupBackStyle = value; @@ -62,11 +62,11 @@ public PaletteBackStyle GroupBackStyle /// public PaletteBorderStyle GroupBorderStyle { - get => _headerGroup!.GroupBorderStyle; + get => _headerGroup.GroupBorderStyle; - set + set { - if (_headerGroup!.GroupBorderStyle != value) + if (_headerGroup.GroupBorderStyle != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.GroupBorderStyle, value); _headerGroup.GroupBorderStyle = value; @@ -79,11 +79,11 @@ public PaletteBorderStyle GroupBorderStyle /// public HeaderStyle HeaderStylePrimary { - get => _headerGroup!.HeaderStylePrimary; + get => _headerGroup.HeaderStylePrimary; - set - { - if (_headerGroup!.HeaderStylePrimary != value) + set + { + if (_headerGroup.HeaderStylePrimary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderStylePrimary, value); _headerGroup.HeaderStylePrimary = value; @@ -96,11 +96,11 @@ public HeaderStyle HeaderStylePrimary /// public HeaderStyle HeaderStyleSecondary { - get => _headerGroup!.HeaderStyleSecondary; + get => _headerGroup.HeaderStyleSecondary; - set + set { - if (_headerGroup!.HeaderStyleSecondary != value) + if (_headerGroup.HeaderStyleSecondary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderStyleSecondary, value); _headerGroup.HeaderStyleSecondary = value; @@ -113,11 +113,11 @@ public HeaderStyle HeaderStyleSecondary /// public VisualOrientation HeaderPositionPrimary { - get => _headerGroup!.HeaderPositionPrimary; + get => _headerGroup.HeaderPositionPrimary; - set + set { - if (_headerGroup!.HeaderPositionPrimary != value) + if (_headerGroup.HeaderPositionPrimary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderPositionPrimary, value); _headerGroup.HeaderPositionPrimary = value; @@ -130,11 +130,11 @@ public VisualOrientation HeaderPositionPrimary /// public VisualOrientation HeaderPositionSecondary { - get => _headerGroup!.HeaderPositionSecondary; + get => _headerGroup.HeaderPositionSecondary; - set + set { - if (_headerGroup!.HeaderPositionSecondary != value) + if (_headerGroup.HeaderPositionSecondary != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.HeaderPositionSecondary, value); _headerGroup.HeaderPositionSecondary = value; @@ -147,11 +147,11 @@ public VisualOrientation HeaderPositionSecondary /// public PaletteMode PaletteMode { - get => _headerGroup!.PaletteMode; + get => _headerGroup.PaletteMode; - set + set { - if (_headerGroup!.PaletteMode != value) + if (_headerGroup.PaletteMode != value) { _service.OnComponentChanged(_headerGroup, null, _headerGroup.PaletteMode, value); _headerGroup.PaletteMode = value; @@ -215,7 +215,7 @@ private void OnVisibleClick(object sender, EventArgs e) var header1 = verb == _visible1; // The new visible value should be the opposite of the current value - var newVisible = !(header1 ? _headerGroup!.HeaderVisiblePrimary : _headerGroup!.HeaderVisibleSecondary); + var newVisible = !(header1 ? _headerGroup.HeaderVisiblePrimary : _headerGroup.HeaderVisibleSecondary); // Assign the new text to the correct header text if (header1) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs index 8ad242fa2..b2777b886 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLabelActionList.cs @@ -16,7 +16,7 @@ internal class KryptonLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLabel? _label; - private readonly IComponentChangeService? _service; + private readonly IComponentChangeService _service; #endregion #region Identity @@ -31,7 +31,7 @@ public KryptonLabelActionList(KryptonLabelDesigner owner) _label = owner.Component as KryptonLabel; // Cache service used to notify when a property has changed - _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion @@ -41,13 +41,13 @@ public KryptonLabelActionList(KryptonLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _label!.LabelStyle; + get => _label.LabelStyle; set { - if (_label!.LabelStyle != value) + if (_label.LabelStyle != value) { - _service?.OnComponentChanged(_label, null, _label.LabelStyle, value); + _service.OnComponentChanged(_label, null, _label.LabelStyle, value); _label.LabelStyle = value; } } @@ -58,13 +58,13 @@ public LabelStyle LabelStyle /// public VisualOrientation Orientation { - get => _label!.Orientation; + get => _label.Orientation; set { - if (_label!.Orientation != value) + if (_label.Orientation != value) { - _service?.OnComponentChanged(_label, null, _label.Orientation, value); + _service.OnComponentChanged(_label, null, _label.Orientation, value); _label.Orientation = value; } } @@ -75,13 +75,13 @@ public VisualOrientation Orientation /// public string Text { - get => _label!.Values.Text; + get => _label.Values.Text; set { - if (_label!.Values.Text != value) + if (_label.Values.Text != value) { - _service?.OnComponentChanged(_label, null, _label.Values.Text, value); + _service.OnComponentChanged(_label, null, _label.Values.Text, value); _label.Values.Text = value; } } @@ -92,13 +92,13 @@ public string Text /// public string ExtraText { - get => _label!.Values.ExtraText; + get => _label.Values.ExtraText; set { - if (_label!.Values.ExtraText != value) + if (_label.Values.ExtraText != value) { - _service?.OnComponentChanged(_label, null, _label.Values.ExtraText, value); + _service.OnComponentChanged(_label, null, _label.Values.ExtraText, value); _label.Values.ExtraText = value; } } @@ -109,13 +109,13 @@ public string ExtraText /// public Image? Image { - get => _label!.Values.Image; + get => _label.Values.Image; set { - if (_label!.Values.Image != value) + if (_label.Values.Image != value) { - _service?.OnComponentChanged(_label, null, _label.Values.Image, value); + _service.OnComponentChanged(_label, null, _label.Values.Image, value); _label.Values.Image = value; } } @@ -126,13 +126,13 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _label!.PaletteMode; + get => _label.PaletteMode; set { - if (_label!.PaletteMode != value) + if (_label.PaletteMode != value) { - _service?.OnComponentChanged(_label, null, _label.PaletteMode, value); + _service.OnComponentChanged(_label, null, _label.PaletteMode, value); _label.PaletteMode = value; } } @@ -140,15 +140,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font? StateCommonShortTextFont + public Font StateCommonShortTextFont { - get => _label!.StateCommon.ShortText.Font; + get => _label.StateCommon.ShortText.Font; set { - if (_label!.StateCommon.ShortText.Font != value) + if (_label.StateCommon.ShortText.Font != value) { - _service?.OnComponentChanged(_label, null, _label.StateCommon.ShortText.Font, value); + _service.OnComponentChanged(_label, null, _label.StateCommon.ShortText.Font, value); _label.StateCommon.ShortText.Font = value; } @@ -157,15 +157,15 @@ public Font? StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font? StateCommonLongTextFont + public Font StateCommonLongTextFont { - get => _label!.StateCommon.LongText.Font; + get => _label.StateCommon.LongText.Font; set { - if (_label!.StateCommon.LongText.Font != value) + if (_label.StateCommon.LongText.Font != value) { - _service?.OnComponentChanged(_label, null, _label.StateCommon.LongText.Font, value); + _service.OnComponentChanged(_label, null, _label.StateCommon.LongText.Font, value); _label.StateCommon.LongText.Font = value; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs index 34053a1b8..4bcb582a0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkLabelActionList.cs @@ -16,7 +16,7 @@ internal class KryptonLinkLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLinkLabel? _linkLabel; - private readonly IComponentChangeService? _service; + private readonly IComponentChangeService _service; private string _action; #endregion @@ -39,7 +39,7 @@ public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) } // Cache service used to notify when a property has changed - _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion @@ -49,13 +49,13 @@ public KryptonLinkLabelActionList(KryptonLinkLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _linkLabel!.LabelStyle; + get => _linkLabel.LabelStyle; set { - if (_linkLabel!.LabelStyle != value) + if (_linkLabel.LabelStyle != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LabelStyle, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.LabelStyle, value); _linkLabel.LabelStyle = value; } } @@ -66,13 +66,13 @@ public LabelStyle LabelStyle /// public VisualOrientation Orientation { - get => _linkLabel!.Orientation; + get => _linkLabel.Orientation; set { - if (_linkLabel!.Orientation != value) + if (_linkLabel.Orientation != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Orientation, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.Orientation, value); _linkLabel.Orientation = value; } } @@ -83,13 +83,13 @@ public VisualOrientation Orientation /// public KryptonLinkBehavior LinkBehavior { - get => _linkLabel!.LinkBehavior; + get => _linkLabel.LinkBehavior; set { - if (_linkLabel!.LinkBehavior != value) + if (_linkLabel.LinkBehavior != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LinkBehavior, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.LinkBehavior, value); _linkLabel.LinkBehavior = value; } } @@ -100,13 +100,13 @@ public KryptonLinkBehavior LinkBehavior /// public bool LinkVisited { - get => _linkLabel!.LinkVisited; + get => _linkLabel.LinkVisited; set { - if (_linkLabel!.LinkVisited != value) + if (_linkLabel.LinkVisited != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.LinkVisited, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.LinkVisited, value); _linkLabel.LinkVisited = value; } } @@ -117,13 +117,13 @@ public bool LinkVisited /// public string Text { - get => _linkLabel!.Values.Text; + get => _linkLabel.Values.Text; set { - if (_linkLabel!.Values.Text != value) + if (_linkLabel.Values.Text != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Text, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Text, value); _linkLabel.Values.Text = value; } } @@ -134,13 +134,13 @@ public string Text /// public string ExtraText { - get => _linkLabel!.Values.ExtraText; + get => _linkLabel.Values.ExtraText; set { - if (_linkLabel!.Values.ExtraText != value) + if (_linkLabel.Values.ExtraText != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.ExtraText, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.ExtraText, value); _linkLabel.Values.ExtraText = value; } } @@ -151,13 +151,13 @@ public string ExtraText /// public Image? Image { - get => _linkLabel!.Values.Image; + get => _linkLabel.Values.Image; set { - if (_linkLabel!.Values.Image != value) + if (_linkLabel.Values.Image != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Image, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.Values.Image, value); _linkLabel.Values.Image = value; } } @@ -168,13 +168,13 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _linkLabel!.PaletteMode; + get => _linkLabel.PaletteMode; set { - if (_linkLabel!.PaletteMode != value) + if (_linkLabel.PaletteMode != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.PaletteMode, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.PaletteMode, value); _linkLabel.PaletteMode = value; } } @@ -182,15 +182,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font? StateCommonShortTextFont + public Font StateCommonShortTextFont { - get => _linkLabel!.StateCommon.ShortText.Font; + get => _linkLabel.StateCommon.ShortText.Font; set { - if (_linkLabel!.StateCommon.ShortText.Font != value) + if (_linkLabel.StateCommon.ShortText.Font != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.ShortText.Font, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.ShortText.Font, value); _linkLabel.StateCommon.ShortText.Font = value; } @@ -199,15 +199,15 @@ public Font? StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font? StateCommonLongTextFont + public Font StateCommonLongTextFont { - get => _linkLabel!.StateCommon.LongText.Font; + get => _linkLabel.StateCommon.LongText.Font; set { - if (_linkLabel!.StateCommon.LongText.Font != value) + if (_linkLabel.StateCommon.LongText.Font != value) { - _service?.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.LongText.Font, value); + _service.OnComponentChanged(_linkLabel, null, _linkLabel.StateCommon.LongText.Font, value); _linkLabel.StateCommon.LongText.Font = value; } @@ -257,7 +257,7 @@ private void OnLinkVisitedClick(object sender, EventArgs e) if (sender is DesignerVerb) { // Invert the visited setting - _linkLabel!.LinkVisited = !_linkLabel.LinkVisited; + _linkLabel.LinkVisited = !_linkLabel.LinkVisited; // Decide on the next action to take given the new setting _action = _linkLabel.LinkVisited ? "Link has not been visited" : "Link has been visited"; diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs index 5be74d79e..dc6b46dbf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonLinkWrapLabelActionList.cs @@ -13,7 +13,7 @@ internal class KryptonLinkWrapLabelActionList : DesignerActionList { #region Instance Fields private readonly KryptonLinkWrapLabel? _linkWrapLabel; - private readonly IComponentChangeService? _service; + private readonly IComponentChangeService _service; #endregion #region Identity @@ -28,7 +28,7 @@ public KryptonLinkWrapLabelActionList(KryptonLinkWrapLabelDesigner owner) _linkWrapLabel = owner.Component as KryptonLinkWrapLabel; // Cache service used to notify when a property has changed - _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion @@ -38,13 +38,13 @@ public KryptonLinkWrapLabelActionList(KryptonLinkWrapLabelDesigner owner) /// public LabelStyle LabelStyle { - get => _linkWrapLabel!.LabelStyle; + get => _linkWrapLabel.LabelStyle; set { - if (_linkWrapLabel!.LabelStyle != value) + if (_linkWrapLabel.LabelStyle != value) { - _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.LabelStyle, value); + _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.LabelStyle, value); _linkWrapLabel.LabelStyle = value; } } @@ -55,13 +55,13 @@ public LabelStyle LabelStyle /// public PaletteMode PaletteMode { - get => _linkWrapLabel!.PaletteMode; + get => _linkWrapLabel.PaletteMode; set { - if (_linkWrapLabel!.PaletteMode != value) + if (_linkWrapLabel.PaletteMode != value) { - _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.PaletteMode, value); + _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.PaletteMode, value); _linkWrapLabel.PaletteMode = value; } } @@ -69,15 +69,15 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font? Font + public Font Font { - get => _linkWrapLabel!.StateCommon.Font; + get => _linkWrapLabel.StateCommon.Font; set { - if (_linkWrapLabel!.StateCommon.Font != value) + if (_linkWrapLabel.StateCommon.Font != value) { - _service?.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.StateCommon.Font, value); + _service.OnComponentChanged(_linkWrapLabel, null, _linkWrapLabel.StateCommon.Font, value); _linkWrapLabel.StateCommon.Font = value; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs index 608b0dd9f..112f14645 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonBreadCrumbDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_breadCrumb != null) { // Hook into bread crumb events - _breadCrumb.GetViewManager()!.MouseUpProcessed += OnBreadCrumbMouseUp; - _breadCrumb.GetViewManager()!.DoubleClickProcessed += OnBreadCrumbDoubleClick; + _breadCrumb.GetViewManager().MouseUpProcessed += OnBreadCrumbMouseUp; + _breadCrumb.GetViewManager().DoubleClickProcessed += OnBreadCrumbDoubleClick; } // Get access to the design services @@ -106,8 +106,8 @@ protected override void Dispose(bool disposing) // Unhook from events if (_breadCrumb != null) { - _breadCrumb.GetViewManager()!.MouseUpProcessed -= OnBreadCrumbMouseUp; - _breadCrumb.GetViewManager()!.DoubleClickProcessed -= OnBreadCrumbDoubleClick; + _breadCrumb.GetViewManager().MouseUpProcessed -= OnBreadCrumbMouseUp; + _breadCrumb.GetViewManager().DoubleClickProcessed -= OnBreadCrumbDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -188,10 +188,10 @@ private void OnBreadCrumbDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -201,7 +201,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_breadCrumb != null) && (e.Component == _breadCrumb)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _breadCrumb.ButtonSpecs.Count - 1; i >= 0; i--) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs index ebf1d031f..6e05251c2 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonBreadCrumbItemDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonBreadCrumbItemDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs index 0cc8ac1a9..a86cf91f8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonComboBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewComboBoxColumn? _comboBox; - private IComponentChangeService? _changeService; + private KryptonDataGridViewComboBoxColumn _comboBox; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonComboBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _comboBox = component as KryptonDataGridViewComboBoxColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs index 8893d9c7f..6724c9f1a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonComboBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonComboBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_comboBox != null) { // Hook into combobox events - _comboBox.GetViewManager()!.MouseUpProcessed += OnComboBoxMouseUp; - _comboBox.GetViewManager()!.DoubleClickProcessed += OnComboBoxDoubleClick; + _comboBox.GetViewManager().MouseUpProcessed += OnComboBoxMouseUp; + _comboBox.GetViewManager().DoubleClickProcessed += OnComboBoxDoubleClick; } // Get access to the design services @@ -168,10 +168,10 @@ private void OnComboBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -181,7 +181,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_comboBox != null) && (e.Component == _comboBox)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _comboBox.ButtonSpecs.Count - 1; i >= 0; i--) @@ -196,7 +196,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _comboBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_comboBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs index c2fb020fa..656c1e41d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs index 5dbfd033f..32da0b30f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuItemDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs index 1ea3613bd..8c5d8ec16 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonContextMenuItemsDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonContextMenuItemsDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs index 826640a27..667cee8bb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonDateTimePickerColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewDateTimePickerColumn? _dateTimePicker; - private IComponentChangeService? _changeService; + private KryptonDataGridViewDateTimePickerColumn _dateTimePicker; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonDateTimePickerColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _dateTimePicker = component as KryptonDataGridViewDateTimePickerColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion @@ -47,7 +47,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_dateTimePicker != null) && (e.Component == _dateTimePicker)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); } } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs index de286794e..5d9e13747 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDateTimePickerDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonDateTimePickerDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_dateTimePicker != null) { // Hook into date time picker events - _dateTimePicker.GetViewManager()!.MouseUpProcessed += OnDateTimePickerMouseUp; - _dateTimePicker.GetViewManager()!.DoubleClickProcessed += OnDateTimePickerDoubleClick; + _dateTimePicker.GetViewManager().MouseUpProcessed += OnDateTimePickerMouseUp; + _dateTimePicker.GetViewManager().DoubleClickProcessed += OnDateTimePickerDoubleClick; } // Acquire service interfaces @@ -105,8 +105,8 @@ protected override void Dispose(bool disposing) if (_dateTimePicker != null) { // Unhook from events - _dateTimePicker.GetViewManager()!.MouseUpProcessed -= OnDateTimePickerMouseUp; - _dateTimePicker.GetViewManager()!.DoubleClickProcessed -= OnDateTimePickerDoubleClick; + _dateTimePicker.GetViewManager().MouseUpProcessed -= OnDateTimePickerMouseUp; + _dateTimePicker.GetViewManager().DoubleClickProcessed -= OnDateTimePickerDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -182,15 +182,15 @@ private void OnDateTimePickerMouseUp(object sender, MouseEventArgs e) private void OnDateTimePickerDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _dateTimePicker?.DesignerComponentFromPoint(pt); + Component? component = _dateTimePicker.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -200,10 +200,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _dateTimePicker) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances - for (var i = _dateTimePicker!.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _dateTimePicker.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _dateTimePicker.ButtonSpecs[i]; @@ -215,7 +215,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _dateTimePicker.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_dateTimePicker, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs index 16d98d8b3..e45c208fb 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonDomainUpDownColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewDomainUpDownColumn? _domainUpDown; - private IComponentChangeService? _changeService; + private KryptonDataGridViewDomainUpDownColumn _domainUpDown; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonDomainUpDownColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _domainUpDown = component as KryptonDataGridViewDomainUpDownColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs index 5c7726fbd..e6f447e86 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonDomainUpDownDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonDomainUpDownDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -44,9 +44,9 @@ public override void Initialize(IComponent component) if (_domainUpDown != null) { - // Hook into numeric up-down events - _domainUpDown.GetViewManager()!.MouseUpProcessed += OnDomainUpDownMouseUp; - _domainUpDown.GetViewManager()!.DoubleClickProcessed += OnDomainUpDownDoubleClick; + // Hook into numeric updown events + _domainUpDown.GetViewManager().MouseUpProcessed += OnDomainUpDownMouseUp; + _domainUpDown.GetViewManager().DoubleClickProcessed += OnDomainUpDownDoubleClick; } // Get access to the design services @@ -171,10 +171,10 @@ private void OnDomainUpDownDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -184,7 +184,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_domainUpDown != null) && (e.Component == _domainUpDown)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _domainUpDown.ButtonSpecs.Count - 1; i >= 0; i--) @@ -199,7 +199,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _domainUpDown.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_domainUpDown, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs index 7c3cb4a47..cf09cb58c 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupBoxDesigner.cs @@ -24,7 +24,7 @@ internal class KryptonGroupBoxDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -65,8 +65,8 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (_groupBox != null) && (internalControlIndex == 0) - ? (ControlDesigner)_designerHost.GetDesigner(_groupBox.Panel!)! + (_groupBox != null) && (internalControlIndex == 0) + ? (ControlDesigner)_designerHost.GetDesigner(_groupBox.Panel) : null; /// diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs index b62abdf07..8dc2de679 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupDesigner.cs @@ -63,8 +63,8 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (internalControlIndex == 0) && (_group != null) - ? (ControlDesigner)_designerHost.GetDesigner(_group.Panel)! + (internalControlIndex == 0) && (_group != null) + ? (ControlDesigner)_designerHost.GetDesigner(_group.Panel) : null; /// diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs index 1944e93f8..c2e6a05c7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonGroupPanelDesigner.cs @@ -25,7 +25,7 @@ internal class KryptonGroupPanelDesigner : KryptonPanelDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Perform common base class initializing base.Initialize(component); @@ -41,7 +41,7 @@ public override void Initialize(IComponent component) // If inside a Krypton group container then always lock the component from user size/location change if (_panel != null) { - PropertyDescriptor? descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; + PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; if ((descriptor != null) && (_panel.Parent is KryptonGroup or KryptonHeaderGroup)) { descriptor.SetValue(component, true); @@ -146,10 +146,10 @@ protected override void PreFilterProperties(IDictionary properties) foreach (DictionaryEntry entry in properties) { // Get the property descriptor for the entry - var descriptor = entry.Value as PropertyDescriptor; + var descriptor = (PropertyDescriptor)entry.Value; // Is this the 'Name' we are searching for? - if (descriptor!.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) + if (descriptor.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) { // Hide the 'Name' property so the user cannot modify it var attributeArray = new Attribute[2] { BrowsableAttribute.No, DesignerSerializationVisibilityAttribute.Hidden }; @@ -164,7 +164,7 @@ protected override void PreFilterProperties(IDictionary properties) /// /// Gets an attribute that indicates the type of inheritance of the associated component. /// - protected override InheritanceAttribute? InheritanceAttribute + protected override InheritanceAttribute InheritanceAttribute { get { @@ -172,7 +172,7 @@ protected override InheritanceAttribute? InheritanceAttribute if (_panel?.Parent != null) { // Then get the attribute associated with the parent of the panel - return TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)] as InheritanceAttribute; + return (InheritanceAttribute)TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)]; } else { diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs index 43d2326ed..cc80b383b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderDesigner.cs @@ -18,7 +18,7 @@ internal class KryptonHeaderDesigner : ControlDesigner private bool _lastHitTest; private KryptonHeader? _header; private IDesignerHost _designerHost; - private IComponentChangeService? _changeService; + private IComponentChangeService _changeService; private ISelectionService _selectionService; #endregion @@ -30,7 +30,7 @@ internal class KryptonHeaderDesigner : ControlDesigner protected override void Dispose(bool disposing) { // Unhook from events - ViewManager? vm = _header?.GetViewManager(); + ViewManager vm = _header?.GetViewManager(); if (vm != null) { vm.MouseUpProcessed -= OnHeaderMouseUp; @@ -52,7 +52,7 @@ protected override void Dispose(bool disposing) /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -70,8 +70,8 @@ public override void Initialize(IComponent component) if (_header != null) { // Hook into header event - _header.GetViewManager()!.MouseUpProcessed += OnHeaderMouseUp; - _header.GetViewManager()!.DoubleClickProcessed += OnHeaderDoubleClick; + _header.GetViewManager().MouseUpProcessed += OnHeaderMouseUp; + _header.GetViewManager().DoubleClickProcessed += OnHeaderDoubleClick; } // Get access to the design services @@ -181,10 +181,10 @@ private void OnHeaderDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -194,7 +194,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_header != null) && (e.Component == _header)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _header.ButtonSpecs.Count - 1; i >= 0; i--) @@ -203,16 +203,16 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) ButtonSpec spec = _header.ButtonSpecs[i]; // Must wrap button spec removal in change notifications - _changeService?.OnComponentChanging(_header, null); + _changeService.OnComponentChanging(_header, null); // Perform actual removal of button spec from header _header.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications - _changeService?.OnComponentChanged(_header, null, null, null); + _changeService.OnComponentChanged(_header, null, null, null); } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs index 392e2fbcf..088d6b72e 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonHeaderGroupDesigner.cs @@ -32,8 +32,8 @@ protected override void Dispose(bool disposing) if (_headerGroup != null) { // Unhook from events - _headerGroup.GetViewManager()!.MouseUpProcessed -= OnHeaderGroupMouseUp; - _headerGroup.GetViewManager()!.DoubleClickProcessed -= OnHeaderGroupDoubleClick; + _headerGroup.GetViewManager().MouseUpProcessed -= OnHeaderGroupMouseUp; + _headerGroup.GetViewManager().DoubleClickProcessed -= OnHeaderGroupDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -48,7 +48,7 @@ protected override void Dispose(bool disposing) /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -61,8 +61,8 @@ public override void Initialize(IComponent component) if (_headerGroup != null) { // Hook into header event - _headerGroup.GetViewManager()!.MouseUpProcessed += OnHeaderGroupMouseUp; - _headerGroup.GetViewManager()!.DoubleClickProcessed += OnHeaderGroupDoubleClick; + _headerGroup.GetViewManager().MouseUpProcessed += OnHeaderGroupMouseUp; + _headerGroup.GetViewManager().DoubleClickProcessed += OnHeaderGroupDoubleClick; } // The resizing handles around the control need to change depending on the @@ -129,7 +129,7 @@ public override bool CanParent(Control control) => /// A ControlDesigner at the specified index. public override ControlDesigner? InternalControlDesigner(int internalControlIndex) => // Get the control designer for the requested indexed child control - (_headerGroup != null) && (internalControlIndex == 0) ? _designerHost.GetDesigner(_headerGroup.Panel!) as ControlDesigner : null; + (_headerGroup != null) && (internalControlIndex == 0) ? (ControlDesigner)_designerHost.GetDesigner(_headerGroup.Panel) : null; /// /// Returns the number of internal control designers in the ControlDesigner. @@ -224,15 +224,15 @@ private void OnHeaderGroupMouseUp(object sender, MouseEventArgs e) private void OnHeaderGroupDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _headerGroup?.DesignerComponentFromPoint(pt); + Component? component = _headerGroup.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -242,10 +242,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _headerGroup) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances - for (var i = _headerGroup!.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _headerGroup.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _headerGroup.ButtonSpecs[i]; @@ -257,7 +257,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _headerGroup.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_headerGroup, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs index a0c463af4..a0eafc492 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonListBoxDesigner.cs @@ -19,7 +19,7 @@ internal class KryptonListBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs index a531d0f60..6e05ecccf 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonMaskedTextBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewMaskedTextBoxColumn? _maskedTextBox; - private IComponentChangeService? _changeService; + private KryptonDataGridViewMaskedTextBoxColumn _maskedTextBox; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonMaskedTextBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _maskedTextBox = component as KryptonDataGridViewMaskedTextBoxColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs index 541e3afae..c9a254a01 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMaskedTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonMaskedTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_maskedTextBox != null) { // Hook into masked textbox events - _maskedTextBox.GetViewManager()!.MouseUpProcessed += OnMaskedTextBoxMouseUp; - _maskedTextBox.GetViewManager()!.DoubleClickProcessed += OnMaskedTextBoxDoubleClick; + _maskedTextBox.GetViewManager().MouseUpProcessed += OnMaskedTextBoxMouseUp; + _maskedTextBox.GetViewManager().DoubleClickProcessed += OnMaskedTextBoxDoubleClick; } // Get access to the design services @@ -172,15 +172,15 @@ private void OnMaskedTextBoxMouseUp(object sender, MouseEventArgs e) private void OnMaskedTextBoxDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _maskedTextBox?.DesignerComponentFromPoint(pt); + Component? component = _maskedTextBox.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -190,10 +190,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _maskedTextBox) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances - for (var i = _maskedTextBox!.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _maskedTextBox.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _maskedTextBox.ButtonSpecs[i]; @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _maskedTextBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_maskedTextBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs index 4cf8aa8db..ec9d66160 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonMonthCalendarDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonMonthCalendarDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_monthCalendar != null) { // Hook into header event - _monthCalendar.GetViewManager()!.MouseUpProcessed += OnCalendarMouseUp; - _monthCalendar.GetViewManager()!.DoubleClickProcessed += OnCalendarDoubleClick; + _monthCalendar.GetViewManager().MouseUpProcessed += OnCalendarMouseUp; + _monthCalendar.GetViewManager().DoubleClickProcessed += OnCalendarDoubleClick; } // Acquire service interfaces @@ -128,8 +128,8 @@ protected override void Dispose(bool disposing) if (_monthCalendar != null) { // Unhook from events - _monthCalendar.GetViewManager()!.MouseUpProcessed -= OnCalendarMouseUp; - _monthCalendar.GetViewManager()!.DoubleClickProcessed -= OnCalendarDoubleClick; + _monthCalendar.GetViewManager().MouseUpProcessed -= OnCalendarMouseUp; + _monthCalendar.GetViewManager().DoubleClickProcessed -= OnCalendarDoubleClick; } _changeService.ComponentRemoving -= OnComponentRemoving; @@ -205,15 +205,15 @@ private void OnCalendarMouseUp(object sender, MouseEventArgs e) private void OnCalendarDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _monthCalendar?.DesignerComponentFromPoint(pt); + Component component = _monthCalendar.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -223,10 +223,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _monthCalendar) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances - for (var i = _monthCalendar!.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _monthCalendar.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _monthCalendar.ButtonSpecs[i]; @@ -238,7 +238,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _monthCalendar.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_monthCalendar, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs index 73d1bc496..9c2fbce77 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonNumericUpDownColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewNumericUpDownColumn? _numericUpDown; - private IComponentChangeService? _changeService; + private KryptonDataGridViewNumericUpDownColumn _numericUpDown; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonNumericUpDownColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _numericUpDown = component as KryptonDataGridViewNumericUpDownColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs index e796e92fa..af48140a8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonNumericUpDownDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonNumericUpDownDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_numericUpDown != null) { // Hook into numeric updown events - _numericUpDown.GetViewManager()!.MouseUpProcessed += OnNumericUpDownMouseUp; - _numericUpDown.GetViewManager()!.DoubleClickProcessed += OnNumericUpDownDoubleClick; + _numericUpDown.GetViewManager().MouseUpProcessed += OnNumericUpDownMouseUp; + _numericUpDown.GetViewManager().DoubleClickProcessed += OnNumericUpDownDoubleClick; } // Get access to the design services @@ -166,15 +166,15 @@ private void OnNumericUpDownMouseUp(object sender, MouseEventArgs e) private void OnNumericUpDownDoubleClick(object sender, Point pt) { // Get any component associated with the current mouse position - Component? component = _numericUpDown?.DesignerComponentFromPoint(pt); + Component component = _numericUpDown?.DesignerComponentFromPoint(pt); if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -184,7 +184,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_numericUpDown != null) && (e.Component == _numericUpDown)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _numericUpDown.ButtonSpecs.Count - 1; i >= 0; i--) @@ -199,7 +199,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _numericUpDown.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_numericUpDown, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs index a92aaa5ad..687ced2fc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonRichTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonRichTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_richTextBox != null) { // Hook into rich textbox events - _richTextBox.GetViewManager()!.MouseUpProcessed += OnTextBoxMouseUp; - _richTextBox.GetViewManager()!.DoubleClickProcessed += OnTextBoxDoubleClick; + _richTextBox.GetViewManager().MouseUpProcessed += OnTextBoxMouseUp; + _richTextBox.GetViewManager().DoubleClickProcessed += OnTextBoxDoubleClick; } // Get access to the design services @@ -177,10 +177,10 @@ private void OnTextBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -190,10 +190,10 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if (e.Component == _richTextBox) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances - for (var i = _richTextBox!.ButtonSpecs.Count - 1; i >= 0; i--) + for (var i = _richTextBox.ButtonSpecs.Count - 1; i >= 0; i--) { // Get access to the indexed button spec ButtonSpec spec = _richTextBox.ButtonSpecs[i]; @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _richTextBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_richTextBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs index 50d751f4d..609fb2c03 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitContainerDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonSplitContainerDesigner : ParentControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs index 9c8010253..1b550a76a 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonSplitterPanelDesigner.cs @@ -25,7 +25,7 @@ internal class KryptonSplitterPanelDesigner : KryptonPanelDesigner, /// Initializes the designer with the specified component. /// /// The IComponent to associate with the designer. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Perform common base class initializating base.Initialize(component); @@ -48,8 +48,8 @@ public override void Initialize(IComponent component) // If inside a Krypton split container then always lock the component from user size/location change if (_panel != null) { - PropertyDescriptor? descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; - if (descriptor != null && _panel.Parent is KryptonSplitContainer) + PropertyDescriptor descriptor = TypeDescriptor.GetProperties(component)[@"Locked"]; + if ((descriptor != null) && (_panel.Parent is KryptonSplitContainer)) { descriptor.SetValue(component, true); } @@ -152,10 +152,10 @@ protected override void PreFilterProperties(IDictionary properties) foreach (DictionaryEntry entry in properties) { // Get the property descriptor for the entry - var descriptor = entry.Value as PropertyDescriptor; + var descriptor = (PropertyDescriptor)entry.Value; // Is this the 'Name' we are searching for? - if (descriptor!.Name.Equals(@"Name") && descriptor.DesignTimeOnly) + if (descriptor.Name.Equals((@"Name")) && descriptor.DesignTimeOnly) { // Hide the 'Name' property so the user cannot modify it var attributeArray = new Attribute[2] { BrowsableAttribute.No, DesignerSerializationVisibilityAttribute.Hidden }; @@ -170,7 +170,7 @@ protected override void PreFilterProperties(IDictionary properties) /// /// Gets an attribute that indicates the type of inheritance of the associated component. /// - protected override InheritanceAttribute? InheritanceAttribute + protected override InheritanceAttribute InheritanceAttribute { get { @@ -178,7 +178,7 @@ protected override InheritanceAttribute? InheritanceAttribute if (_panel?.Parent != null) { // Then get the attribute associated with the parent of the panel - return TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)] as InheritanceAttribute; + return (InheritanceAttribute)TypeDescriptor.GetAttributes(_panel.Parent)[typeof(InheritanceAttribute)]; } else { @@ -225,8 +225,8 @@ private void DrawWaterMark(Graphics g) SizeF sizeF = g.MeasureString(drawText, f); // Find the drawing position to centre the text - var middleX = clientRect.Width / 2 - (int)sizeF.Width / 2; - var middleY = clientRect.Height / 2 - (int)sizeF.Height / 2; + var middleX = (clientRect.Width / 2) - (((int)sizeF.Width) / 2); + var middleY = (clientRect.Height / 2) - (((int)sizeF.Height) / 2); // Draw the name of the panel in the centre TextRenderer.DrawText(g, drawText, f, diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs index 7279f870b..d1b8edaca 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxColumnDesigner.cs @@ -15,8 +15,8 @@ namespace Krypton.Toolkit internal class KryptonTextBoxColumnDesigner : ComponentDesigner { #region Instance Fields - private KryptonDataGridViewTextBoxColumn? _textBox; - private IComponentChangeService? _changeService; + private KryptonDataGridViewTextBoxColumn _textBox; + private IComponentChangeService _changeService; #endregion #region Public Overrides @@ -24,7 +24,7 @@ internal class KryptonTextBoxColumnDesigner : ComponentDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -35,7 +35,7 @@ public override void Initialize(IComponent component) _textBox = component as KryptonDataGridViewTextBoxColumn; // Get access to the design services - _changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); } #endregion diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs index 42552ca61..5160de779 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTextBoxDesigner.cs @@ -27,7 +27,7 @@ internal class KryptonTextBoxDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); @@ -45,8 +45,8 @@ public override void Initialize(IComponent component) if (_textBox != null) { // Hook into textbox events - _textBox.GetViewManager()!.MouseUpProcessed += OnTextBoxMouseUp; - _textBox.GetViewManager()!.DoubleClickProcessed += OnTextBoxDoubleClick; + _textBox.GetViewManager().MouseUpProcessed += OnTextBoxMouseUp; + _textBox.GetViewManager().DoubleClickProcessed += OnTextBoxDoubleClick; } // Get access to the design services @@ -177,10 +177,10 @@ private void OnTextBoxDoubleClick(object sender, Point pt) if (component != null) { // Get the designer for the component - IDesigner? designer = _designerHost.GetDesigner(component); + IDesigner designer = _designerHost.GetDesigner(component); // Request code for the default event be generated - designer?.DoDefaultAction(); + designer.DoDefaultAction(); } } @@ -190,7 +190,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) if ((_textBox != null) && (e.Component == _textBox)) { // Need access to host in order to delete a component - var host = GetService(typeof(IDesignerHost)) as IDesignerHost; + var host = (IDesignerHost)GetService(typeof(IDesignerHost)); // We need to remove all the button spec instances for (var i = _textBox.ButtonSpecs.Count - 1; i >= 0; i--) @@ -205,7 +205,7 @@ private void OnComponentRemoving(object sender, ComponentEventArgs e) _textBox.ButtonSpecs.Remove(spec); // Get host to remove it from design time - host?.DestroyComponent(spec); + host.DestroyComponent(spec); // Must wrap button spec removal in change notifications _changeService.OnComponentChanged(_textBox, null, null, null); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs index 530925cfe..379e19ffc 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTrackBarDesigner.cs @@ -15,7 +15,7 @@ namespace Krypton.Toolkit internal class KryptonTrackBarDesigner : ControlDesigner { #region Instance Fields - private KryptonTrackBar? _trackBar; + private KryptonTrackBar _trackBar; #endregion #region Public Overrides @@ -23,7 +23,7 @@ internal class KryptonTrackBarDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // ReSharper disable RedundantBaseQualifier // Let base class do standard stuff @@ -45,7 +45,7 @@ public override SelectionRules SelectionRules { get { - if (!_trackBar!.AutoSize) + if (!_trackBar.AutoSize) { return SelectionRules.AllSizeable | SelectionRules.Moveable; } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs index e481b8fb2..885064f76 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonTreeViewDesigner.cs @@ -19,7 +19,7 @@ internal class KryptonTreeViewDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs index a71b638f8..b0a298e00 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonWebBrowserDesigner.cs @@ -20,7 +20,7 @@ internal class KryptonWebBrowserDesigner : ControlDesigner /// Initializes the designer with the specified component. /// /// The IComponent to associate the designer with. - public override void Initialize(IComponent component) + public override void Initialize([DisallowNull] IComponent component) { // Let base class do standard stuff base.Initialize(component); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs index a7ffe7902..e997c45d6 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/ScrollBarControlDesigner.cs @@ -25,7 +25,7 @@ public override SelectionRules SelectionRules get { // gets the property descriptor for the property "Orientation" - PropertyDescriptor? propDescriptor = + PropertyDescriptor propDescriptor = TypeDescriptor.GetProperties(Component)[nameof(Orientation)]; // if not null - we can read the current orientation of the scroll bar @@ -33,7 +33,7 @@ public override SelectionRules SelectionRules { // get the current orientation var orientation = - (ScrollBarOrientation)propDescriptor.GetValue(Component)!; + (ScrollBarOrientation)propDescriptor.GetValue(Component); // if vertical orientation return orientation == ScrollBarOrientation.Vertical diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs index 8b5a4c731..677527fd8 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonBreadCrumbItemsEditor.cs @@ -32,7 +32,7 @@ protected class DictItemBase : Dictionary /// Item to act as proxy for. - public CrumbProxy(KryptonBreadCrumbItem? item) => _item = item; + public CrumbProxy(KryptonBreadCrumbItem item) => _item = item; #endregion @@ -51,8 +51,8 @@ protected class CrumbProxy [Category(@"Appearance")] public string ShortText { - get => _item!.ShortText; - set => _item!.ShortText = value; + get => _item.ShortText; + set => _item.ShortText = value; } #endregion @@ -63,8 +63,8 @@ public string ShortText [Category(@"Appearance")] public string LongText { - get => _item!.LongText; - set => _item!.LongText = value; + get => _item.LongText; + set => _item.LongText = value; } #endregion @@ -76,8 +76,8 @@ public string LongText [DefaultValue(null)] public Image? Image { - get => _item!.Image; - set => _item!.Image = value; + get => _item.Image; + set => _item.Image = value; } #endregion @@ -89,8 +89,8 @@ public Image? Image [DefaultValue(typeof(Color), "Empty")] public Color ImageTransparentColor { - get => _item!.ImageTransparentColor; - set => _item!.ImageTransparentColor = value; + get => _item.ImageTransparentColor; + set => _item.ImageTransparentColor = value; } #endregion @@ -103,8 +103,8 @@ public Color ImageTransparentColor [DefaultValue(null)] public object? Tag { - get => _item!.Tag; - set => _item!.Tag = value; + get => _item.Tag; + set => _item.Tag = value; } #endregion } @@ -119,18 +119,15 @@ protected class MenuTreeNode : TreeNode /// Initialize a new instance of the MenuTreeNode class. /// /// Menu item to represent. - public MenuTreeNode(KryptonBreadCrumbItem? item) + public MenuTreeNode(KryptonBreadCrumbItem item) { Item = item; PropertyObject = item; - Text = Item?.ToString(); + Text = Item.ToString(); // Hook into property changes - if (Item != null) - { - Item.PropertyChanged += OnPropertyChanged; - } + Item.PropertyChanged += OnPropertyChanged; } #endregion @@ -138,26 +135,26 @@ public MenuTreeNode(KryptonBreadCrumbItem? item) /// /// Gets access to the associated item. /// - public KryptonBreadCrumbItem? Item { get; } + public KryptonBreadCrumbItem Item { get; } /// /// Gets access to object wrapper for use in the property grid. /// - public object? PropertyObject { get; } + public object PropertyObject { get; } #endregion #region Implementation private void OnPropertyChanged(object sender, PropertyChangedEventArgs e) => // Update with correct string for new state - Text = Item?.ToString(); + Text = Item.ToString(); #endregion } /// /// Site that allows the property grid to discover Visual Studio services. /// - protected class PropertyGridSite : ISite + protected class PropertyGridSite : ISite, IServiceProvider { #region Instance Fields @@ -439,7 +436,7 @@ protected override void OnEditValueChanged() // Add all the top level clones treeView1.Nodes.Clear(); - foreach (KryptonBreadCrumbItem? item in Items) + foreach (KryptonBreadCrumbItem item in Items) { AddMenuTreeNode(item, null); } @@ -463,7 +460,7 @@ protected override void OnEditValueChanged() private void buttonOK_Click(object sender, EventArgs e) { // Create an array with all the root items - var rootItems = new object?[treeView1.Nodes.Count]; + var rootItems = new object[treeView1.Nodes.Count]; for (var i = 0; i < rootItems.Length; i++) { rootItems[i] = ((MenuTreeNode)treeView1.Nodes[i]).Item; @@ -598,7 +595,7 @@ private void buttonMoveUp_Click(object sender, EventArgs e) // Remove cell from parent collection var parentNode = (MenuTreeNode)node.Parent; TreeNodeCollection parentCollection = node.Parent == null ? treeView1.Nodes : node.Parent.Nodes; - parentNode?.Item?.Items.Remove(node.Item!); + parentNode?.Item.Items.Remove(node.Item); parentCollection.Remove(node); if (contained) @@ -621,13 +618,13 @@ private void buttonMoveUp_Click(object sender, EventArgs e) } } - previousParent?.Item?.Items.Insert(pageIndex, node.Item!); + previousParent?.Item.Items.Insert(pageIndex, node.Item); parentCollection.Insert(pageIndex, node); } else { parentNode = previousNode; - parentNode.Item?.Items.Insert(parentNode.Nodes.Count, node.Item!); + parentNode.Item.Items.Insert(parentNode.Nodes.Count, node.Item); parentNode.Nodes.Insert(parentNode.Nodes.Count, node); } } @@ -655,7 +652,7 @@ private void buttonMoveDown_Click(object sender, EventArgs e) // Remove cell from parent collection var parentNode = node.Parent as MenuTreeNode; TreeNodeCollection parentCollection = node.Parent == null ? treeView1.Nodes : node.Parent.Nodes; - parentNode?.Item?.Items.Remove(node.Item!); + parentNode?.Item.Items.Remove(node.Item); parentCollection.Remove(node); if (contained) @@ -664,13 +661,13 @@ private void buttonMoveDown_Click(object sender, EventArgs e) var previousParent = (MenuTreeNode)nextNode.Parent; parentCollection = nextNode.Parent == null ? treeView1.Nodes : nextNode.Parent.Nodes; var pageIndex = parentCollection.IndexOf(nextNode); - previousParent?.Item?.Items.Insert(pageIndex + 1, node.Item!); + previousParent?.Item.Items.Insert(pageIndex + 1, node.Item); parentCollection.Insert(pageIndex + 1, node); } else { parentNode = nextNode; - parentNode.Item?.Items.Insert(0, node.Item!); + parentNode.Item.Items.Insert(0, node.Item); parentNode.Nodes.Insert(0, node); } } @@ -686,7 +683,7 @@ private void buttonMoveDown_Click(object sender, EventArgs e) private void buttonAddSibling_Click(object sender, EventArgs e) { var item = CreateInstance(typeof(KryptonBreadCrumbItem)) as KryptonBreadCrumbItem; - TreeNode? newNode = new MenuTreeNode(item); + TreeNode newNode = new MenuTreeNode(item); TreeNode selectedNode = treeView1.SelectedNode; // If there is no selection then append to root @@ -705,7 +702,7 @@ private void buttonAddSibling_Click(object sender, EventArgs e) else { var parentMenu = (MenuTreeNode)parentNode; - parentMenu.Item?.Items.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, item!); + parentMenu.Item.Items.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, item); parentNode.Nodes.Insert(parentNode.Nodes.IndexOf(selectedNode) + 1, newNode); } } @@ -724,7 +721,7 @@ private void buttonAddSibling_Click(object sender, EventArgs e) private void buttonAddChild_Click(object sender, EventArgs e) { var item = (KryptonBreadCrumbItem)CreateInstance(typeof(KryptonBreadCrumbItem)); - TreeNode? newNode = new MenuTreeNode(item); + TreeNode newNode = new MenuTreeNode(item); TreeNode selectedNode = treeView1.SelectedNode; // If there is no selection then append to root @@ -735,7 +732,7 @@ private void buttonAddChild_Click(object sender, EventArgs e) else { var selectedMenu = (MenuTreeNode)selectedNode; - selectedMenu.Item?.Items.Add(item); + selectedMenu.Item.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -768,7 +765,7 @@ private void buttonDelete_Click(object sender, EventArgs e) { TreeNode parentNode = node.Parent; var treeParentNode = parentNode as MenuTreeNode; - treeParentNode?.Item?.Items.Remove(treeNode?.Item!); + treeParentNode.Item.Items.Remove(treeNode.Item); node.Parent.Nodes.Remove(node); } @@ -796,10 +793,10 @@ private void UpdateButtons() private void UpdatePropertyGrid() { TreeNode node = treeView1.SelectedNode; - propertyGrid1.SelectedObject = node == null ? null : new CrumbProxy(((MenuTreeNode)node).PropertyObject as KryptonBreadCrumbItem); + propertyGrid1.SelectedObject = node == null ? null : new CrumbProxy((KryptonBreadCrumbItem)((MenuTreeNode)node).PropertyObject); } - private DictItemBase CreateItemsDictionary(object?[] items) + private DictItemBase CreateItemsDictionary(object[] items) { var dictItems = new DictItemBase(); @@ -823,7 +820,7 @@ private void AddItemsToDictionary(DictItemBase dictItems, KryptonBreadCrumbItem } } - private void AddMenuTreeNode(KryptonBreadCrumbItem? item, MenuTreeNode? parent) + private void AddMenuTreeNode(KryptonBreadCrumbItem item, MenuTreeNode? parent) { // Create a node to match the item var node = new MenuTreeNode(item); @@ -839,7 +836,7 @@ private void AddMenuTreeNode(KryptonBreadCrumbItem? item, MenuTreeNode? parent) } // Add children of an items collection - foreach (KryptonBreadCrumbItem? child in item?.Items!) + foreach (KryptonBreadCrumbItem child in item.Items) { AddMenuTreeNode(child, node); } @@ -869,7 +866,7 @@ private void SynchronizeCollections(DictItemBase before, } } - var changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + var changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); if (changeService != null) { // Mark components as changed when not added or removed diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs index 9e4fac43a..cd591aadd 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/KryptonCheckButtonCollectionEditor.cs @@ -34,7 +34,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte if ((context?.Instance != null) && (provider != null)) { // Must use the editor service for showing dialogs - var editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; + var editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (editorService != null) { diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs index db6eec7f5..15f09cd5d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Editors/PaletteDrawBordersEditor.cs @@ -33,14 +33,14 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte /// An IServiceProvider that this editor can use to obtain services. /// The object to edit. /// The new value of the object. - public override object? EditValue(ITypeDescriptorContext? context, - IServiceProvider? provider, + public override object? EditValue(ITypeDescriptorContext? context, + IServiceProvider? provider, object? value) { if ((context != null) && (provider != null) && (value != null)) { // Grab the service needed to show the drop down - var service = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; + var service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (service != null) { @@ -59,7 +59,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte } } - return base.EditValue(context, provider!, value); + return base.EditValue(context, provider, value); } } } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs index 1b44fc322..f4eeee7ed 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonDesignerActionItem.cs @@ -28,7 +28,7 @@ public class KryptonDesignerActionItem : DesignerActionMethodItem /// /// Verb instance to wrap. /// Name of the category the action belongs to. - public KryptonDesignerActionItem(DesignerVerb verb, string category) + public KryptonDesignerActionItem([DisallowNull] DesignerVerb verb, [DisallowNull] string category) : base(null, null, null) { Debug.Assert(verb != null); @@ -69,7 +69,7 @@ public KryptonDesignerActionItem(DesignerVerb verb, string category) /// /// Gets the name of the method that this item is associated with. /// - public override string? MemberName => null; + public override string MemberName => null; #endregion } diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs index f3e895a5a..cacdfb800 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerBehavior.cs @@ -116,13 +116,13 @@ public override bool OnMouseLeave(Glyph? g) #endregion #region Implementation Static - private static Point PointToSplitContainer(Glyph? g, Point pt) + private static Point PointToSplitContainer(Glyph g, Point pt) { // Cast the correct type - var splitGlyph = g as KryptonSplitContainerGlyph; + var splitGlyph = (KryptonSplitContainerGlyph)g; // Gets the bounds of the glyph in adorner coordinates - Rectangle bounds = splitGlyph!.Bounds; + Rectangle bounds = splitGlyph.Bounds; // Convert from adorner coordinates to the control client coordinates return new Point(pt.X - bounds.X, pt.Y - bounds.Y); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs index fcb369199..c5168fce7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/KryptonSplitContainerGlyph.cs @@ -17,7 +17,7 @@ internal class KryptonSplitContainerGlyph : Glyph #region Instance Fields private readonly KryptonSplitContainer? _splitContainer; private readonly ISelectionService _selectionService; - private readonly BehaviorService _behaviorService; + private readonly BehaviorService _behaviorService; private readonly Adorner _adorner; #endregion @@ -29,10 +29,10 @@ internal class KryptonSplitContainerGlyph : Glyph /// Reference to the behavior service. /// Reference to the containing adorner. /// Reference to the containing designer. - public KryptonSplitContainerGlyph(ISelectionService selectionService, - BehaviorService behaviorService, - Adorner adorner, - IDesigner relatedDesigner) + public KryptonSplitContainerGlyph([DisallowNull] ISelectionService selectionService, + [DisallowNull] BehaviorService behaviorService, + [DisallowNull] Adorner adorner, + [DisallowNull] IDesigner relatedDesigner) : base(new KryptonSplitContainerBehavior(relatedDesigner)) { Debug.Assert(selectionService != null); @@ -41,12 +41,12 @@ public KryptonSplitContainerGlyph(ISelectionService selectionService, Debug.Assert(relatedDesigner != null); // Remember incoming references - _selectionService = selectionService!; - _behaviorService = behaviorService!; - _adorner = adorner!; + _selectionService = selectionService; + _behaviorService = behaviorService; + _adorner = adorner; // Find the related control - _splitContainer = relatedDesigner!.Component as KryptonSplitContainer; + _splitContainer = relatedDesigner.Component as KryptonSplitContainer; // We want to know whenever the selection has changed or a property has changed _selectionService.SelectionChanged += OnSelectionChanged; diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs index 3cf42875f..8d9154557 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Other/OverrideComboBoxStyleDropDownStyle.cs @@ -29,7 +29,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider? provider, object? value) { - var svc = provider?.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; + var svc = (IWindowsFormsEditorService)provider?.GetService(typeof(IWindowsFormsEditorService)); if (svc != null) { var ctrl = new UserControl(); @@ -38,7 +38,7 @@ public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? conte clb.Items.Add(ComboBoxStyle.DropDownList); clb.SelectedIndexChanged += delegate { - value = Enum.Parse(typeof(ComboBoxStyle), clb.SelectedItem?.ToString()!); + value = Enum.Parse(typeof(ComboBoxStyle), clb.SelectedItem.ToString()); svc.CloseDropDown(); }; ctrl.Controls.Add(clb); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs index 3e27846b6..98d93c71f 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/UX/KryptonCheckButtonCollectionForm.cs @@ -22,17 +22,17 @@ private class ListEntry /// Initialize a new instance of the ListEntry class. /// /// CheckButton to encapsulate. - public ListEntry(KryptonCheckButton checkButton) + public ListEntry([DisallowNull] KryptonCheckButton checkButton) { Debug.Assert(checkButton != null); - CheckButton = checkButton!; + CheckButton = checkButton; } /// /// Gets a string representation of the encapsulated check button. /// /// String instance. - public override string ToString() => $"{CheckButton.Site?.Name} (Text: {CheckButton.Text})"; + public override string ToString() => $"{CheckButton.Site.Name} (Text: {CheckButton.Text})"; #endregion @@ -47,7 +47,7 @@ public ListEntry(KryptonCheckButton checkButton) #endregion #region Instance Fields - private readonly KryptonCheckSet? _checkSet; + private readonly KryptonCheckSet _checkSet; #endregion #region Identity @@ -62,7 +62,7 @@ public KryptonCheckButtonCollectionForm() /// /// Initialize a new instance of the KryptonCheckButtonCollectionForm class. /// - public KryptonCheckButtonCollectionForm(KryptonCheckSet? checkSet) + public KryptonCheckButtonCollectionForm(KryptonCheckSet checkSet) { // Remember the owning control _checkSet = checkSet; @@ -75,7 +75,7 @@ public KryptonCheckButtonCollectionForm(KryptonCheckSet? checkSet) private void KryptonCheckButtonCollectionForm_Load(object sender, EventArgs e) { // Get access to the container of the check set - IContainer? container = _checkSet?.Container; + IContainer container = _checkSet.Container; // Assuming we manage to find a container if (container != null) @@ -91,7 +91,7 @@ private void KryptonCheckButtonCollectionForm_Load(object sender, EventArgs e) // Add a new entry to the list box but only check it if // it is already present in the check buttons collection checkedListBox.Items.Add(new ListEntry(checkButton), - _checkSet!.CheckButtons.Contains(checkButton)); + _checkSet.CheckButtons.Contains(checkButton)); } } } @@ -101,13 +101,13 @@ private void buttonOK_Click(object sender, EventArgs e) { // Create a copy of the current check set buttons var copy = new List(); - foreach (KryptonCheckButton checkButton in _checkSet?.CheckButtons!) + foreach (KryptonCheckButton checkButton in _checkSet.CheckButtons) { copy.Add(checkButton); } // Process each of the list entries in turn - for (var i = 0; i < checkedListBox.Items.Count; i++) + for(var i=0; i /// Menu item to represent. - public MenuTreeNode(KryptonContextMenuItemBase item) + public MenuTreeNode([DisallowNull] KryptonContextMenuItemBase item) { Debug.Assert(item != null); - Item = item!; - PropertyObject = item!; + Item = item; + PropertyObject = item; // Setup the initial starting image and description strings ImageIndex = ImageIndexFromItem(); @@ -740,12 +739,12 @@ private void buttonMoveUp_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode?.Item!); - items1.Items.Insert(index - 1, treeNode?.Item); + items1.Items.Remove(treeNode.Item); + items1.Items.Insert(index - 1, treeNode.Item); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode?.Item!); - items.Items.Insert(index - 1, treeNode?.Item); + items.Items.Remove(treeNode.Item); + items.Items.Insert(index - 1, treeNode.Item); break; } @@ -786,12 +785,12 @@ private void buttonMoveDown_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode?.Item!); - items1.Items.Insert(index + 1, treeNode?.Item); + items1.Items.Remove(treeNode.Item); + items1.Items.Insert(index + 1, treeNode.Item); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode?.Item!); - items.Items.Insert(index + 1, treeNode?.Item); + items.Items.Remove(treeNode.Item); + items.Items.Insert(index + 1, treeNode.Item); break; } @@ -853,10 +852,10 @@ private void buttonDelete_Click(object sender, EventArgs e) switch (treeParentNode?.Item) { case KryptonContextMenuItems items1: - items1.Items.Remove(treeNode?.Item!); + items1.Items.Remove(treeNode.Item); break; case KryptonContextMenuItem items: - items.Items.Remove(treeNode?.Item!); + items.Items.Remove(treeNode.Item); break; } @@ -962,7 +961,7 @@ private void AddNewItem(KryptonContextMenuItemBase item) { var treeSelectedNode = selectedNode as MenuTreeNode; Debug.Assert(treeSelectedNode?.Item is KryptonContextMenuItem); - var items = treeSelectedNode?.Item as KryptonContextMenuItem; + var items = treeSelectedNode.Item as KryptonContextMenuItem; items!.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -977,7 +976,7 @@ private void AddNewItem(KryptonContextMenuItemBase item) { var treeSelectedNode = selectedNode as MenuTreeNode; Debug.Assert(treeSelectedNode?.Item is KryptonContextMenuItems); - var items = treeSelectedNode?.Item as KryptonContextMenuItems; + var items = treeSelectedNode.Item as KryptonContextMenuItems; items!.Items.Add(item); selectedNode.Nodes.Add(newNode); } @@ -1008,7 +1007,7 @@ private void UpdateButtons() { parentNodeCount = node.Parent.Nodes.Count; nodeIndex = node.Parent.Nodes.IndexOf(node); - node = (node.Parent! as MenuTreeNode)!; + node = node.Parent! as MenuTreeNode; if (node != null) { parent = node.Item; @@ -1018,17 +1017,17 @@ private void UpdateButtons() _buttonMoveUp.Enabled = (item != null) && (nodeIndex > 0); _buttonMoveDown.Enabled = (item != null) && (nodeIndex < (parentNodeCount - 1)); - _buttonAddItem.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuItem)); - _buttonAddItems.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuItems)); - _buttonAddSeparator.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuSeparator)); - _buttonAddHeading.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuHeading)); - _buttonAddMonthCalendar.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuMonthCalendar)); - _buttonAddCheckBox.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuCheckBox)); - _buttonAddCheckButton.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuCheckButton)); - _buttonAddRadioButton.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuRadioButton)); - _buttonAddLinkLabel.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuLinkLabel)); - _buttonAddColorColumns.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuColorColumns)); - _buttonAddImageSelect.Enabled = AllowAddItem(item!, parent!, typeof(KryptonContextMenuImageSelect)); + _buttonAddItem.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuItem)); + _buttonAddItems.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuItems)); + _buttonAddSeparator.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuSeparator)); + _buttonAddHeading.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuHeading)); + _buttonAddMonthCalendar.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuMonthCalendar)); + _buttonAddCheckBox.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuCheckBox)); + _buttonAddCheckButton.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuCheckButton)); + _buttonAddRadioButton.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuRadioButton)); + _buttonAddLinkLabel.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuLinkLabel)); + _buttonAddColorColumns.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuColorColumns)); + _buttonAddImageSelect.Enabled = AllowAddItem(item, parent, typeof(KryptonContextMenuImageSelect)); _buttonDelete.Enabled = item != null; } @@ -1138,7 +1137,7 @@ private void SynchronizeCollections(DictItemBase before, context.Container?.Remove(item); } - var changeService = GetService(typeof(IComponentChangeService)) as IComponentChangeService; + var changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); if (changeService != null) { // Mark components as changed when not added or removed diff --git a/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs b/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs index d96186ac0..40bf357e0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs +++ b/Source/Krypton Components/Krypton.Toolkit/General/KryptonAboutBoxUtilities.cs @@ -36,15 +36,13 @@ public static DateTime AssemblyLastWriteTime(Assembly assembly) } catch (Exception e) { - ExceptionHandler.CaptureException(e); - return DateTime.MaxValue; } } public static DateTime AssemblyBuildDate(Assembly assembly, bool forceFileDate) { - Version? assemblyVersion = assembly.GetName().Version; + Version assemblyVersion = assembly.GetName().Version; DateTime dateTime; @@ -54,7 +52,7 @@ public static DateTime AssemblyBuildDate(Assembly assembly, bool forceFileDate) } else { - dateTime = DateTime.Parse(@"01/01/1970").AddDays(assemblyVersion!.Build).AddSeconds(assemblyVersion.Revision * 2); + dateTime = DateTime.Parse(@"01/01/1970").AddDays(assemblyVersion.Build).AddSeconds(assemblyVersion.Revision * 2); if (TimeZone.IsDaylightSavingTime(dateTime, TimeZone.CurrentTimeZone.GetDaylightChanges(dateTime.Year))) { @@ -169,7 +167,7 @@ public static NameValueCollection AssemblyAttribs(Assembly assembly) // codebase try { - nvc.Add("CodeBase", assembly.CodeBase?.Replace("file:///", "")); + nvc.Add("CodeBase", assembly.CodeBase.Replace("file:///", "")); } catch (NotSupportedException) { From 3af4e4566296cbdc6e316d8fc0e0ec77fcb81063 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 08:37:11 +0000 Subject: [PATCH 11/14] Revert "* `nullable`s" This reverts commit 81bed06b49654e62d60f3095af28cc47bf0c0f32. --- .../KryptonCheckButtonActionList.cs | 2 +- .../KryptonColorButtonActionList.cs | 64 +++++++++---------- .../Action Lists/KryptonComboBoxActionList.cs | 26 ++++---- .../Action Lists/KryptonCommandActionList.cs | 16 ++--- .../KryptonContextMenuActionList.cs | 8 +-- .../KryptonDateTimePickerActionList.cs | 34 +++++----- .../KryptonDomainUpDownActionList.cs | 22 +++---- .../KryptonDropButtonActionList.cs | 56 ++++++++-------- 8 files changed, 114 insertions(+), 114 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs index a8962b78c..a7380c2a0 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCheckButtonActionList.cs @@ -114,7 +114,7 @@ private void OnCheckedClick(object sender, EventArgs e) _action = isChecked ? "Uncheck the button" : "Check the button"; // Get access to the actual Orientation property - PropertyDescriptor? checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; + PropertyDescriptor checkedProp = TypeDescriptor.GetProperties(_checkButton)[nameof(Checked)]; // If we succeeded in getting the property // Update the actual property with the new value diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs index 5c50b4f64..7525c3428 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonColorButtonActionList.cs @@ -41,11 +41,11 @@ public KryptonColorButtonActionList(KryptonColorButtonDesigner owner) /// public ButtonStyle ButtonStyle { - get => _colorButton!.ButtonStyle; + get => _colorButton.ButtonStyle; set { - if (_colorButton!.ButtonStyle != value) + if (_colorButton.ButtonStyle != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.ButtonStyle, value); _colorButton.ButtonStyle = value; @@ -58,11 +58,11 @@ public ButtonStyle ButtonStyle /// public VisualOrientation ButtonOrientation { - get => _colorButton!.ButtonOrientation; + get => _colorButton.ButtonOrientation; set { - if (_colorButton!.ButtonOrientation != value) + if (_colorButton.ButtonOrientation != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.ButtonOrientation, value); _colorButton.ButtonOrientation = value; @@ -74,11 +74,11 @@ public VisualOrientation ButtonOrientation /// The selected colour. public Color SelectedColour { - get => _colorButton!.SelectedColor; + get => _colorButton.SelectedColor; set { - if (_colorButton!.SelectedColor != value) + if (_colorButton.SelectedColor != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.SelectedColor, value); @@ -92,11 +92,11 @@ public Color SelectedColour /// public VisualOrientation DropDownPosition { - get => _colorButton!.DropDownPosition; + get => _colorButton.DropDownPosition; set { - if (_colorButton!.DropDownPosition != value) + if (_colorButton.DropDownPosition != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.DropDownPosition, value); _colorButton.DropDownPosition = value; @@ -109,11 +109,11 @@ public VisualOrientation DropDownPosition /// public VisualOrientation DropDownOrientation { - get => _colorButton!.DropDownOrientation; + get => _colorButton.DropDownOrientation; set { - if (_colorButton!.DropDownOrientation != value) + if (_colorButton.DropDownOrientation != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.DropDownOrientation, value); _colorButton.DropDownOrientation = value; @@ -126,11 +126,11 @@ public VisualOrientation DropDownOrientation /// public bool Splitter { - get => _colorButton!.Splitter; + get => _colorButton.Splitter; set { - if (_colorButton!.Splitter != value) + if (_colorButton.Splitter != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Splitter, value); _colorButton.Splitter = value; @@ -143,11 +143,11 @@ public bool Splitter /// public string Text { - get => _colorButton!.Values.Text; + get => _colorButton.Values.Text; set { - if (_colorButton!.Values.Text != value) + if (_colorButton.Values.Text != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.Text, value); _colorButton.Values.Text = value; @@ -160,11 +160,11 @@ public string Text /// public string ExtraText { - get => _colorButton!.Values.ExtraText; + get => _colorButton.Values.ExtraText; set { - if (_colorButton!.Values.ExtraText != value) + if (_colorButton.Values.ExtraText != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.ExtraText, value); _colorButton.Values.ExtraText = value; @@ -177,11 +177,11 @@ public string ExtraText /// public Image? Image { - get => _colorButton!.Values.Image; + get => _colorButton.Values.Image; set { - if (_colorButton!.Values.Image != value) + if (_colorButton.Values.Image != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.Values.Image, value); _colorButton.Values.Image = value; @@ -194,11 +194,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _colorButton!.PaletteMode; + get => _colorButton.PaletteMode; set { - if (_colorButton!.PaletteMode != value) + if (_colorButton.PaletteMode != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.PaletteMode, value); _colorButton.PaletteMode = value; @@ -208,13 +208,13 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font? StateCommonShortTextFont + public Font StateCommonShortTextFont { - get => _colorButton!.StateCommon.Content.ShortText.Font; + get => _colorButton.StateCommon.Content.ShortText.Font; set { - if (_colorButton!.StateCommon.Content.ShortText.Font != value) + if (_colorButton.StateCommon.Content.ShortText.Font != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Content.ShortText.Font, value); @@ -225,13 +225,13 @@ public Font? StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font? StateCommonLongTextFont + public Font StateCommonLongTextFont { - get => _colorButton!.StateCommon.Content.LongText.Font; + get => _colorButton.StateCommon.Content.LongText.Font; set { - if (_colorButton!.StateCommon.Content.LongText.Font != value) + if (_colorButton.StateCommon.Content.LongText.Font != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Content.LongText.Font, value); @@ -245,11 +245,11 @@ public Font? StateCommonLongTextFont [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _colorButton!.StateCommon.Border.Rounding; + get => _colorButton.StateCommon.Border.Rounding; set { - if (_colorButton!.StateCommon.Border.Rounding != value) + if (_colorButton.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.StateCommon.Border.Rounding, value); @@ -260,11 +260,11 @@ public float StateCommonCornerRoundingRadius public bool AllowFullOpen { - get => _colorButton!.AllowFullOpen; + get => _colorButton.AllowFullOpen; set { - if (_colorButton!.AllowFullOpen != value) + if (_colorButton.AllowFullOpen != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.AllowFullOpen, value); @@ -275,11 +275,11 @@ public bool AllowFullOpen public Rectangle SelectedRect { - get => _colorButton!.SelectedRect; + get => _colorButton.SelectedRect; set { - if (_colorButton!.SelectedRect != value) + if (_colorButton.SelectedRect != value) { _service.OnComponentChanged(_colorButton, null, _colorButton.SelectedRect, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs index 3fa40ee7d..257d777b7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonComboBoxActionList.cs @@ -40,11 +40,11 @@ public KryptonComboBoxActionList(KryptonComboBoxDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _comboBox!.KryptonContextMenu; + get => _comboBox.KryptonContextMenu; set { - if (_comboBox!.KryptonContextMenu != value) + if (_comboBox.KryptonContextMenu != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.KryptonContextMenu, value); @@ -57,11 +57,11 @@ public KryptonContextMenu? KryptonContextMenu /// The drop down style. public ComboBoxStyle DropDownStyle { - get => _comboBox!.DropDownStyle; + get => _comboBox.DropDownStyle; set { - if (_comboBox!.DropDownStyle != value) + if (_comboBox.DropDownStyle != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.DropDownStyle, value); @@ -75,11 +75,11 @@ public ComboBoxStyle DropDownStyle /// public PaletteMode PaletteMode { - get => _comboBox!.PaletteMode; + get => _comboBox.PaletteMode; set { - if (_comboBox!.PaletteMode != value) + if (_comboBox.PaletteMode != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.PaletteMode, value); _comboBox.PaletteMode = value; @@ -92,11 +92,11 @@ public PaletteMode PaletteMode /// public InputControlStyle InputControlStyle { - get => _comboBox!.InputControlStyle; + get => _comboBox.InputControlStyle; set { - if (_comboBox!.InputControlStyle != value) + if (_comboBox.InputControlStyle != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.InputControlStyle, value); _comboBox.InputControlStyle = value; @@ -106,13 +106,13 @@ public InputControlStyle InputControlStyle /// Gets or sets the font. /// The font. - public Font? Font + public Font Font { - get => _comboBox!.StateCommon.ComboBox.Content.Font; + get => _comboBox.StateCommon.ComboBox.Content.Font; set { - if (_comboBox!.StateCommon.ComboBox.Content.Font != value) + if (_comboBox.StateCommon.ComboBox.Content.Font != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.StateCommon.ComboBox.Content.Font, value); @@ -126,11 +126,11 @@ public Font? Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _comboBox!.StateCommon.ComboBox.Border.Rounding; + get => _comboBox.StateCommon.ComboBox.Border.Rounding; set { - if (_comboBox!.StateCommon.ComboBox.Border.Rounding != value) + if (_comboBox.StateCommon.ComboBox.Border.Rounding != value) { _service.OnComponentChanged(_comboBox, null, _comboBox.StateCommon.ComboBox.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs index 158b2b3a6..833227ea7 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandActionList.cs @@ -37,11 +37,11 @@ public KryptonCommandActionList(KryptonCommandDesigner owner) public string Text { - get => _command!.Text; + get => _command.Text; set { - if (_command!.Text != value) + if (_command.Text != value) { _service.OnComponentChanged(_command, null, _command.Text, value); @@ -52,11 +52,11 @@ public string Text public Image? ImageSmall { - get => _command!.ImageSmall; + get => _command.ImageSmall; set { - if (_command!.ImageSmall != value) + if (_command.ImageSmall != value) { _service.OnComponentChanged(_command, null, _command.ImageSmall, value); @@ -67,11 +67,11 @@ public Image? ImageSmall public Image? ImageLarge { - get => _command!.ImageLarge; + get => _command.ImageLarge; set { - if (_command!.ImageLarge != value) + if (_command.ImageLarge != value) { _service.OnComponentChanged(_command, null, _command.ImageLarge, value); @@ -82,11 +82,11 @@ public Image? ImageLarge public Color ImageTransparentColor { - get => _command!.ImageTransparentColor; + get => _command.ImageTransparentColor; set { - if (_command!.ImageTransparentColor != value) + if (_command.ImageTransparentColor != value) { _service.OnComponentChanged(_command, null, _command.ImageTransparentColor, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs index db24a81ce..87af5b1ef 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonContextMenuActionList.cs @@ -66,11 +66,11 @@ public override DesignerActionItemCollection GetSortedActionItems() /// public PaletteMode PaletteMode { - get => _contextMenu!.PaletteMode; + get => _contextMenu.PaletteMode; set { - if (_contextMenu!.PaletteMode != value) + if (_contextMenu.PaletteMode != value) { _service.OnComponentChanged(_contextMenu, null, _contextMenu.PaletteMode, value); _contextMenu.PaletteMode = value; @@ -82,11 +82,11 @@ public PaletteMode PaletteMode /// The items. public KryptonContextMenuCollection Items { - get => _contextMenu!.Items; + get => _contextMenu.Items; set { - if (_contextMenu!.Items != value) + if (_contextMenu.Items != value) { _service.OnComponentChanged(_contextMenu, null, _contextMenu.Items, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs index db16ad791..85d3ee663 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDateTimePickerActionList.cs @@ -40,11 +40,11 @@ public KryptonDateTimePickerActionList(KryptonDateTimePickerDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _dateTimePicker!.KryptonContextMenu; + get => _dateTimePicker.KryptonContextMenu; set { - if (_dateTimePicker!.KryptonContextMenu != value) + if (_dateTimePicker.KryptonContextMenu != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.KryptonContextMenu, value); @@ -58,11 +58,11 @@ public KryptonContextMenu? KryptonContextMenu /// public DateTimePickerFormat Format { - get => _dateTimePicker!.Format; + get => _dateTimePicker.Format; set { - if (_dateTimePicker!.Format != value) + if (_dateTimePicker.Format != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.Format, value); _dateTimePicker.Format = value; @@ -75,11 +75,11 @@ public DateTimePickerFormat Format /// public bool ShowUpDown { - get => _dateTimePicker!.ShowUpDown; + get => _dateTimePicker.ShowUpDown; set { - if (_dateTimePicker!.ShowUpDown != value) + if (_dateTimePicker.ShowUpDown != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.ShowUpDown, value); _dateTimePicker.ShowUpDown = value; @@ -92,11 +92,11 @@ public bool ShowUpDown /// public bool ShowCheckBox { - get => _dateTimePicker!.ShowCheckBox; + get => _dateTimePicker.ShowCheckBox; set { - if (_dateTimePicker!.ShowCheckBox != value) + if (_dateTimePicker.ShowCheckBox != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.ShowCheckBox, value); _dateTimePicker.ShowCheckBox = value; @@ -109,11 +109,11 @@ public bool ShowCheckBox /// public bool Checked { - get => _dateTimePicker!.Checked; + get => _dateTimePicker.Checked; set { - if (_dateTimePicker!.Checked != value) + if (_dateTimePicker.Checked != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.Checked, value); _dateTimePicker.Checked = value; @@ -126,11 +126,11 @@ public bool Checked /// public PaletteMode PaletteMode { - get => _dateTimePicker!.PaletteMode; + get => _dateTimePicker.PaletteMode; set { - if (_dateTimePicker!.PaletteMode != value) + if (_dateTimePicker.PaletteMode != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.PaletteMode, value); _dateTimePicker.PaletteMode = value; @@ -138,13 +138,13 @@ public PaletteMode PaletteMode } } - public Font? Font + public Font Font { - get => _dateTimePicker!.StateCommon.Content.Font; + get => _dateTimePicker.StateCommon.Content.Font; set { - if (_dateTimePicker!.StateCommon.Content.Font != value) + if (_dateTimePicker.StateCommon.Content.Font != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.StateCommon.Content.Font, value); @@ -158,11 +158,11 @@ public Font? Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _dateTimePicker!.StateCommon.Border.Rounding; + get => _dateTimePicker.StateCommon.Border.Rounding; set { - if (_dateTimePicker!.StateCommon.Border.Rounding != value) + if (_dateTimePicker.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_dateTimePicker, null, _dateTimePicker.StateCommon.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs index 20baba26e..d12d58cf5 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDomainUpDownActionList.cs @@ -40,11 +40,11 @@ public KryptonDomainUpDownActionList(KryptonDomainUpDownDesigner owner) /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _domainUpDown!.KryptonContextMenu; + get => _domainUpDown.KryptonContextMenu; set { - if (_domainUpDown!.KryptonContextMenu != value) + if (_domainUpDown.KryptonContextMenu != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.KryptonContextMenu, value); @@ -58,11 +58,11 @@ public KryptonContextMenu? KryptonContextMenu /// public PaletteMode PaletteMode { - get => _domainUpDown!.PaletteMode; + get => _domainUpDown.PaletteMode; set { - if (_domainUpDown!.PaletteMode != value) + if (_domainUpDown.PaletteMode != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.PaletteMode, value); _domainUpDown.PaletteMode = value; @@ -75,11 +75,11 @@ public PaletteMode PaletteMode /// public InputControlStyle InputControlStyle { - get => _domainUpDown!.InputControlStyle; + get => _domainUpDown.InputControlStyle; set { - if (_domainUpDown!.InputControlStyle != value) + if (_domainUpDown.InputControlStyle != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.InputControlStyle, value); _domainUpDown.InputControlStyle = value; @@ -87,13 +87,13 @@ public InputControlStyle InputControlStyle } } - public Font? Font + public Font Font { - get => _domainUpDown!.StateCommon.Content.Font; + get => _domainUpDown.StateCommon.Content.Font; set { - if (_domainUpDown!.StateCommon.Content.Font != value) + if (_domainUpDown.StateCommon.Content.Font != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.StateCommon.Content.Font, value); @@ -107,11 +107,11 @@ public Font? Font [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _domainUpDown!.StateCommon.Border.Rounding; + get => _domainUpDown.StateCommon.Border.Rounding; set { - if (_domainUpDown!.StateCommon.Border.Rounding != value) + if (_domainUpDown.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_domainUpDown, null, _domainUpDown.StateCommon.Border.Rounding, value); diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs index 89979f75c..49ce24947 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonDropButtonActionList.cs @@ -41,11 +41,11 @@ public KryptonDropButtonActionList(KryptonDropButtonDesigner owner) /// public ButtonStyle ButtonStyle { - get => _dropButton!.ButtonStyle; + get => _dropButton.ButtonStyle; set { - if (_dropButton!.ButtonStyle != value) + if (_dropButton.ButtonStyle != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.ButtonStyle, value); _dropButton.ButtonStyle = value; @@ -58,11 +58,11 @@ public ButtonStyle ButtonStyle /// public VisualOrientation ButtonOrientation { - get => _dropButton!.ButtonOrientation; + get => _dropButton.ButtonOrientation; set { - if (_dropButton!.ButtonOrientation != value) + if (_dropButton.ButtonOrientation != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.ButtonOrientation, value); _dropButton.ButtonOrientation = value; @@ -74,11 +74,11 @@ public VisualOrientation ButtonOrientation /// The Krypton Context Menu. public KryptonContextMenu? KryptonContextMenu { - get => _dropButton!.KryptonContextMenu; + get => _dropButton.KryptonContextMenu; set { - if (_dropButton!.KryptonContextMenu != value) + if (_dropButton.KryptonContextMenu != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.KryptonContextMenu, value); @@ -92,11 +92,11 @@ public KryptonContextMenu? KryptonContextMenu /// public VisualOrientation DropDownPosition { - get => _dropButton!.DropDownPosition; + get => _dropButton.DropDownPosition; set { - if (_dropButton!.DropDownPosition != value) + if (_dropButton.DropDownPosition != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.DropDownPosition, value); _dropButton.DropDownPosition = value; @@ -109,11 +109,11 @@ public VisualOrientation DropDownPosition /// public VisualOrientation DropDownOrientation { - get => _dropButton!.DropDownOrientation; + get => _dropButton.DropDownOrientation; set { - if (_dropButton!.DropDownOrientation != value) + if (_dropButton.DropDownOrientation != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.DropDownOrientation, value); _dropButton.DropDownOrientation = value; @@ -126,11 +126,11 @@ public VisualOrientation DropDownOrientation /// public bool Splitter { - get => _dropButton!.Splitter; + get => _dropButton.Splitter; set { - if (_dropButton!.Splitter != value) + if (_dropButton.Splitter != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Splitter, value); _dropButton.Splitter = value; @@ -143,11 +143,11 @@ public bool Splitter /// public string Text { - get => _dropButton!.Values.Text; + get => _dropButton.Values.Text; set { - if (_dropButton!.Values.Text != value) + if (_dropButton.Values.Text != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.Text, value); _dropButton.Values.Text = value; @@ -160,11 +160,11 @@ public string Text /// public string ExtraText { - get => _dropButton!.Values.ExtraText; + get => _dropButton.Values.ExtraText; set { - if (_dropButton!.Values.ExtraText != value) + if (_dropButton.Values.ExtraText != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.ExtraText, value); _dropButton.Values.ExtraText = value; @@ -177,11 +177,11 @@ public string ExtraText /// public Image? Image { - get => _dropButton!.Values.Image; + get => _dropButton.Values.Image; set { - if (_dropButton!.Values.Image != value) + if (_dropButton.Values.Image != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.Values.Image, value); _dropButton.Values.Image = value; @@ -194,11 +194,11 @@ public Image? Image /// public PaletteMode PaletteMode { - get => _dropButton!.PaletteMode; + get => _dropButton.PaletteMode; set { - if (_dropButton!.PaletteMode != value) + if (_dropButton.PaletteMode != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.PaletteMode, value); _dropButton.PaletteMode = value; @@ -208,13 +208,13 @@ public PaletteMode PaletteMode /// Gets or sets the font. /// The font. - public Font? StateCommonShortTextFont + public Font StateCommonShortTextFont { - get => _dropButton!.StateCommon.Content.ShortText.Font; + get => _dropButton.StateCommon.Content.ShortText.Font; set { - if (_dropButton!.StateCommon.Content.ShortText.Font != value) + if (_dropButton.StateCommon.Content.ShortText.Font != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Content.ShortText.Font, value); @@ -225,13 +225,13 @@ public Font? StateCommonShortTextFont /// Gets or sets the font. /// The font. - public Font? StateCommonLongTextFont + public Font StateCommonLongTextFont { - get => _dropButton!.StateCommon.Content.LongText.Font; + get => _dropButton.StateCommon.Content.LongText.Font; set { - if (_dropButton!.StateCommon.Content.LongText.Font != value) + if (_dropButton.StateCommon.Content.LongText.Font != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Content.LongText.Font, value); @@ -245,11 +245,11 @@ public Font? StateCommonLongTextFont [DefaultValue(GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE)] public float StateCommonCornerRoundingRadius { - get => _dropButton!.StateCommon.Border.Rounding; + get => _dropButton.StateCommon.Border.Rounding; set { - if (_dropButton!.StateCommon.Border.Rounding != value) + if (_dropButton.StateCommon.Border.Rounding != value) { _service.OnComponentChanged(_dropButton, null, _dropButton.StateCommon.Border.Rounding, value); From 4c15f66dcc146a0759312c32ec93ff7ae56c64e8 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 08:37:26 +0000 Subject: [PATCH 12/14] Revert "Update KryptonCustomPaletteBase.cs" This reverts commit 6dcca7ba6915cc19b25f6f2516a461cae97590b2. --- .../KryptonCustomPaletteBase.cs | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs index fd1b566fe..770974f1b 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs @@ -128,7 +128,7 @@ public KryptonCustomPaletteBase() /// Initialize a new instance of the KryptonPalette class. /// /// Container that owns the component. - public KryptonCustomPaletteBase(IContainer container) + public KryptonCustomPaletteBase([DisallowNull] IContainer container) : this() { Debug.Assert(container != null); @@ -4436,15 +4436,15 @@ private static Type StringToType(string s) case PaletteBackStyle.ControlCustom3: return GetPaletteBackControl(ControlStyles.ControlCustom3, state); case PaletteBackStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Back; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Back; case PaletteBackStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Back; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Back; case PaletteBackStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Back; case PaletteBackStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Back; case PaletteBackStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Back; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Back; case PaletteBackStyle.FormMain: return GetPaletteBackForm(FormStyles.FormMain, state); case PaletteBackStyle.FormCustom1: @@ -4566,9 +4566,9 @@ private static Type StringToType(string s) case PaletteBackStyle.ContextMenuItemSplit: return GetPaletteBackContextMenuItemSplit(state); case PaletteBackStyle.ContextMenuItemImageColumn: - return ContextMenu.StateCommon.ItemImageColumn!.Back; + return ContextMenu.StateCommon.ItemImageColumn.Back; case PaletteBackStyle.ContextMenuSeparator: - return ContextMenu.StateCommon.Separator!.Back; + return ContextMenu.StateCommon.Separator.Back; default: // Should never happen! Debug.Assert(false); @@ -4640,15 +4640,15 @@ private static Type StringToType(string s) case PaletteBorderStyle.ControlCustom3: return GetPaletteBorderControl(ControlStyles.ControlCustom3, state); case PaletteBorderStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Border; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Border; case PaletteBorderStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Border; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Border; case PaletteBorderStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Border; case PaletteBorderStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Border; case PaletteBorderStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Border; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Border; case PaletteBorderStyle.FormMain: return GetPaletteBorderForm(FormStyles.FormMain, state); case PaletteBorderStyle.FormCustom1: @@ -4748,9 +4748,9 @@ private static Type StringToType(string s) case PaletteBorderStyle.ContextMenuItemSplit: return GetPaletteBorderContextMenuItemSplit(state); case PaletteBorderStyle.ContextMenuItemImageColumn: - return ContextMenu.StateCommon.ItemImageColumn!.Border; + return ContextMenu.StateCommon.ItemImageColumn.Border; case PaletteBorderStyle.ContextMenuSeparator: - return ContextMenu.StateCommon.Separator!.Border; + return ContextMenu.StateCommon.Separator.Border; default: // Should never happen! Debug.Assert(false); @@ -4882,15 +4882,15 @@ private static Type StringToType(string s) case PaletteContentStyle.LabelCustom3: return GetPaletteLabel(LabelStyles.LabelCustom3, state); case PaletteContentStyle.InputControlStandalone: - return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state)!.Content; + return GetPaletteInputControl(InputControlStyles.InputControlStandalone, state).Content; case PaletteContentStyle.InputControlRibbon: - return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state)!.Content; + return GetPaletteInputControl(InputControlStyles.InputControlRibbon, state).Content; case PaletteContentStyle.InputControlCustom1: - return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state)!.Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom1, state).Content; case PaletteContentStyle.InputControlCustom2: - return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state)!.Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom2, state).Content; case PaletteContentStyle.InputControlCustom3: - return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state)!.Content; + return GetPaletteInputControl(InputControlStyles.InputControlCustom3, state).Content; case PaletteContentStyle.TabHighProfile: return GetPaletteContentTab(TabStyles.TabHighProfile, state); case PaletteContentStyle.TabStandardProfile: @@ -5715,11 +5715,11 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemSplit!.Back; + return ContextMenu.StateDisabled.ItemSplit.Back; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemSplit!.Back; + return ContextMenu.StateNormal.ItemSplit.Back; case PaletteState.Tracking: - return ContextMenu.StateHighlight.ItemSplit!.Back; + return ContextMenu.StateHighlight.ItemSplit.Back; default: // Should never happen! Debug.Assert(false); @@ -5732,9 +5732,9 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemHighlight!.Back; + return ContextMenu.StateDisabled.ItemHighlight.Back; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemHighlight!.Back; + return ContextMenu.StateNormal.ItemHighlight.Back; case PaletteState.Tracking: return ContextMenu.StateHighlight.ItemHighlight.Back; default: @@ -5766,9 +5766,9 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemHighlight!.Border; + return ContextMenu.StateDisabled.ItemHighlight.Border; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemHighlight!.Border; + return ContextMenu.StateNormal.ItemHighlight.Border; case PaletteState.Tracking: return ContextMenu.StateHighlight.ItemHighlight.Border; default: @@ -5783,11 +5783,11 @@ private static Type StringToType(string s) switch (state) { case PaletteState.Disabled: - return ContextMenu.StateDisabled.ItemSplit!.Border; + return ContextMenu.StateDisabled.ItemSplit.Border; case PaletteState.Normal: - return ContextMenu.StateNormal.ItemSplit!.Border; + return ContextMenu.StateNormal.ItemSplit.Border; case PaletteState.Tracking: - return ContextMenu.StateHighlight.ItemSplit!.Border; + return ContextMenu.StateHighlight.ItemSplit.Border; default: // Should never happen! Debug.Assert(false); @@ -5919,7 +5919,7 @@ private void SetPalette(PaletteBase? basePalette) _redirector.Target = _basePalette; // Update the color table we inherit from - ToolMenuStatus.BaseKCT = _basePalette!.ColorTable; + ToolMenuStatus.BaseKCT = _basePalette.ColorTable; // Hook to new palette events if (_basePalette != null) From c294bd31b89f3a1453fdad849cacf6426b4ad0c0 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 09:06:23 +0000 Subject: [PATCH 13/14] * Use `?:` instead --- .../Controls Toolkit/KryptonButton.cs | 1 + .../KryptonCommandLinkButton.cs | 77 ++++++------------- 2 files changed, 25 insertions(+), 53 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs index 526fbcd97..1c8ea3443 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs @@ -971,6 +971,7 @@ private void SetCornerRoundingRadius(float? radius) /// Paints the drop-down arrow. /// The drop-down arrow graphics. /// The drop-down rectangle area. + /// The color of the drop-down arrow. private static void PaintArrow(Color? dropDownArrowColor, Graphics graphics, Rectangle rectangle) { var midPoint = new Point(Convert.ToInt32(rectangle.Left + rectangle.Width / 2), diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs index 391a7d77a..602f3879d 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs @@ -602,59 +602,30 @@ protected override void ContextMenuClosed() /// protected override void OnPaint(PaintEventArgs? e) { - if (CommandLinkTextValues.DescriptionFont != null) - { - StateCommon.Content.LongText.Font = CommandLinkTextValues.DescriptionFont; - } - else - { - StateCommon.Content.LongText.Font = null; - } - - if (CommandLinkTextValues.HeadingFont != null) - { - StateCommon.Content.ShortText.Font = CommandLinkTextValues.HeadingFont; - } - else - { - StateCommon.Content.ShortText.Font = null; - } - - if (CommandLinkTextValues.DescriptionTextHAlignment != null) - { - StateCommon.Content.LongText.TextH = CommandLinkTextValues.DescriptionTextHAlignment ?? PaletteRelativeAlign.Near; - } - else - { - StateCommon.Content.LongText.TextH = PaletteRelativeAlign.Near; - } - - if (CommandLinkTextValues.DescriptionTextVAlignment != null) - { - StateCommon.Content.LongText.TextV = CommandLinkTextValues.DescriptionTextVAlignment ?? PaletteRelativeAlign.Far; - } - else - { - StateCommon.Content.LongText.TextV = PaletteRelativeAlign.Far; - } - - if (CommandLinkTextValues.HeadingTextHAlignment != null) - { - StateCommon.Content.ShortText.TextH = CommandLinkTextValues.HeadingTextHAlignment ?? PaletteRelativeAlign.Near; - } - else - { - StateCommon.Content.ShortText.TextH = PaletteRelativeAlign.Near; - } - - if (CommandLinkTextValues.HeadingTextVAlignment != null) - { - StateCommon.Content.ShortText.TextV = CommandLinkTextValues.HeadingTextVAlignment ?? PaletteRelativeAlign.Center; - } - else - { - StateCommon.Content.ShortText.TextV = PaletteRelativeAlign.Center; - } + StateCommon.Content.LongText.Font = CommandLinkTextValues.DescriptionFont != null + ? CommandLinkTextValues.DescriptionFont + : null; + + StateCommon.Content.ShortText.Font = + CommandLinkTextValues.HeadingFont != null + ? CommandLinkTextValues.HeadingFont + : null; + + StateCommon.Content.LongText.TextH = CommandLinkTextValues.DescriptionTextHAlignment != null + ? CommandLinkTextValues.DescriptionTextHAlignment ?? PaletteRelativeAlign.Near + : PaletteRelativeAlign.Near; + + StateCommon.Content.LongText.TextV = CommandLinkTextValues.DescriptionTextVAlignment != null + ? CommandLinkTextValues.DescriptionTextVAlignment ?? PaletteRelativeAlign.Far + : PaletteRelativeAlign.Far; + + StateCommon.Content.ShortText.TextH = CommandLinkTextValues.HeadingTextHAlignment != null + ? CommandLinkTextValues.HeadingTextHAlignment ?? PaletteRelativeAlign.Near + : PaletteRelativeAlign.Near; + + StateCommon.Content.ShortText.TextV = CommandLinkTextValues.HeadingTextVAlignment != null + ? CommandLinkTextValues.HeadingTextVAlignment ?? PaletteRelativeAlign.Center + : PaletteRelativeAlign.Center; base.OnPaint(e); } From 9e22507e72de415bce26ce630fe161e01a9077e0 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Thu, 7 Dec 2023 09:22:50 +0000 Subject: [PATCH 14/14] Update KryptonCommandLinkButton.cs --- .../KryptonCommandLinkButton.cs | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs index 602f3879d..e84599891 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs @@ -276,10 +276,7 @@ public ButtonStyle ButtonStyle [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTriple StateDisabled { get; } - private bool ShouldSerializeStateDisabled() - { - return !StateDisabled.IsDefault; - } + private bool ShouldSerializeStateDisabled() => !StateDisabled.IsDefault; /// /// Gets access to the normal button appearance entries. @@ -289,10 +286,7 @@ private bool ShouldSerializeStateDisabled() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTriple StateNormal { get; } - private bool ShouldSerializeStateNormal() - { - return !StateNormal.IsDefault; - } + private bool ShouldSerializeStateNormal() => !StateNormal.IsDefault; /// /// Gets access to the hot tracking button appearance entries. @@ -302,10 +296,7 @@ private bool ShouldSerializeStateNormal() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTriple StateTracking { get; } - private bool ShouldSerializeStateTracking() - { - return !StateTracking.IsDefault; - } + private bool ShouldSerializeStateTracking() => !StateTracking.IsDefault; /// /// Gets access to the pressed button appearance entries. @@ -315,10 +306,7 @@ private bool ShouldSerializeStateTracking() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTriple StatePressed { get; } - private bool ShouldSerializeStatePressed() - { - return !StatePressed.IsDefault; - } + private bool ShouldSerializeStatePressed() => !StatePressed.IsDefault; /// /// Gets access to the normal button appearance when default. @@ -328,10 +316,7 @@ private bool ShouldSerializeStatePressed() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTripleRedirect OverrideDefault { get; } - private bool ShouldSerializeOverrideDefault() - { - return !OverrideDefault.IsDefault; - } + private bool ShouldSerializeOverrideDefault() => !OverrideDefault.IsDefault; /// /// Gets access to the button appearance when it has focus. @@ -341,10 +326,7 @@ private bool ShouldSerializeOverrideDefault() [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public PaletteTripleRedirect OverrideFocus { get; } - private bool ShouldSerializeOverrideFocus() - { - return !OverrideFocus.IsDefault; - } + private bool ShouldSerializeOverrideFocus() => !OverrideFocus.IsDefault; /// /// Gets or sets the value returned to the parent form when the button is clicked. @@ -453,7 +435,7 @@ public virtual void SetFixedState(PaletteState state) { if (state == PaletteState.NormalDefaultOverride) { - // Setup the overrides correctly to match state + // Set up the overrides correctly to match state _overrideFocus.Apply = true; _overrideNormal.Apply = true;