Skip to content

Commit 33288fe

Browse files
authored
Merge pull request #586 from Krypton-Suite/alpha-cleanup
* Cleanup
2 parents 8c60cc0 + 802fe64 commit 33288fe

202 files changed

Lines changed: 1165 additions & 1088 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/Krypton Toolkit/Directory.Build.props

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<!-- License file (excluded for Ultimate projects which use their own) -->
2424
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
2525

26-
<!-- Include README.md if it exists in the project directory -->
26+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
2727
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
28-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
28+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
2929
</ItemGroup>
3030

3131
<PropertyGroup>
@@ -58,9 +58,9 @@
5858
<!-- License file (excluded for Ultimate projects which use their own) -->
5959
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
6060

61-
<!-- Include README.md if it exists in the project directory -->
61+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
6262
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
63-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
63+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
6464
</ItemGroup>
6565

6666
<PropertyGroup>
@@ -93,9 +93,9 @@
9393
<!-- License file (excluded for Ultimate projects which use their own) -->
9494
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
9595

96-
<!-- Include README.md if it exists in the project directory -->
96+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
9797
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
98-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
98+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
9999
</ItemGroup>
100100

101101
<PropertyGroup>
@@ -128,9 +128,9 @@
128128
<!-- License file (excluded for Ultimate projects which use their own) -->
129129
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
130130

131-
<!-- Include README.md if it exists in the project directory -->
131+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
132132
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
133-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
133+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
134134
</ItemGroup>
135135

136136
<PropertyGroup>
@@ -163,9 +163,9 @@
163163
<!-- License file (excluded for Ultimate projects which use their own) -->
164164
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
165165

166-
<!-- Include README.md if it exists in the project directory -->
166+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
167167
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
168-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
168+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
169169
</ItemGroup>
170170

171171
<PropertyGroup>
@@ -199,9 +199,9 @@
199199
<!-- License file (excluded for Ultimate projects which use their own) -->
200200
<None Include="..\..\..\Documents\License\License.md" Link="License.md" Pack="true" PackagePath="" Condition="!$([System.String]::Copy('$(MSBuildProjectName)').Contains('Ultimate'))" />
201201

202-
<!-- Include README.md if it exists in the project directory -->
202+
<!-- Include README.md if it exists in the project directory (use README.md only to avoid duplicate with Readme.md on case-insensitive FS) -->
203203
<None Include="README.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
204-
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md')" />
204+
<None Include="Readme.md" Pack="true" PackagePath="" Condition="Exists('$(MSBuildProjectDirectory)\Readme.md') AND !Exists('$(MSBuildProjectDirectory)\README.md')" />
205205
</ItemGroup>
206206

207207
<PropertyGroup>

Source/Krypton Toolkit/Krypton Toolkit Suite Extended 2022 - VS2022 - NuGet.slnx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@
7171
<BuildType Solution="Nightly|*" Project="Debug" />
7272
</Project>
7373
<Project Path="Krypton.Toolkit.Suite.Extended.Scintilla.NET/Krypton.Toolkit.Suite.Extended.Scintilla.NET 2022.csproj" />
74-
<Project Path="Krypton.Toolkit.Suite.Extended.Security/Krypton.Toolkit.Suite.Extended.Security 2022.csproj">
75-
<BuildType Solution="Canary|*" Project="Release" />
76-
</Project>
74+
<Project Path="Krypton.Toolkit.Suite.Extended.Security/Krypton.Toolkit.Suite.Extended.Security 2022.csproj" />
7775
<Project Path="Krypton.Toolkit.Suite.Extended.Software.Updater/Krypton.Toolkit.Suite.Extended.Software.Updater 2022.csproj" />
7876
<Project Path="Krypton.Toolkit.Suite.Extended.TaskDialogs/Krypton.Toolkit.Suite.Extended.TaskDialogs 2022.csproj" />
7977
<Project Path="Krypton.Toolkit.Suite.Extended.Themes/Krypton.Toolkit.Suite.Extended.Themes 2022.csproj" />

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView/Controls Toolkit/KryptonAdvancedDataGridView.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -937,12 +937,9 @@ public void TriggerFilterStringChanged()
937937
{
938938
dataview.RowFilter = filterEventArgs.FilterString;
939939
}
940-
else if (DataSource is DataTable datatable)
940+
else if (DataSource is DataTable { DefaultView: not null } datatable)
941941
{
942-
if (datatable.DefaultView != null)
943-
{
944-
datatable.DefaultView.RowFilter = filterEventArgs.FilterString;
945-
}
942+
datatable.DefaultView.RowFilter = filterEventArgs.FilterString;
946943
}
947944
}
948945
//invoke FilterStringChanged
@@ -1217,7 +1214,7 @@ public void ShowMenuStrip(DataGridViewColumn column)
12171214
/// </summary>
12181215
private IEnumerable<KryptonColumnHeaderCell> FilterableCells =>
12191216
from DataGridViewColumn c in Columns
1220-
where c.HeaderCell != null && c.HeaderCell is KryptonColumnHeaderCell
1217+
where c.HeaderCell is KryptonColumnHeaderCell
12211218
select c.HeaderCell as KryptonColumnHeaderCell;
12221219

12231220
#endregion
@@ -1321,7 +1318,7 @@ protected override void OnRowsRemoved(DataGridViewRowsRemovedEventArgs e)
13211318
/// <param name="e"></param>
13221319
protected override void OnCellValueChanged(DataGridViewCellEventArgs e)
13231320
{
1324-
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
1321+
if (e is { RowIndex: >= 0, ColumnIndex: >= 0 })
13251322
{
13261323
_filteredColumns.Remove(Columns[e.ColumnIndex].Name);
13271324
}

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView/Controls Toolkit/KryptonColumnHeaderCell.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public KryptonColumnHeaderCell(DataGridViewColumnHeaderCell oldCell, bool filter
125125
_filterEnabled = filterEnabled;
126126

127127
KryptonColumnHeaderCell? oldCellt = oldCell as KryptonColumnHeaderCell;
128-
if (oldCellt != null && oldCellt.MenuStrip != null)
128+
if (oldCellt is { MenuStrip: not null })
129129
{
130130
MenuStrip = oldCellt.MenuStrip;
131131
_filterImage = oldCellt._filterImage;

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView/Controls Toolkit/MenuStrip.cs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region Original License
1+
#region Original License
22
/*
33
*
44
* Microsoft Public License (Ms-PL)
@@ -712,6 +712,7 @@ private static ImageList GetCheckListStateImages()
712712
/// <summary>
713713
/// Set the max checklist nodes
714714
/// </summary>
715+
[DefaultValue(DefaultMaxChecklistNodes)]
715716
public int MaxChecklistNodes
716717
{
717718
get => _maxChecklistNodes;
@@ -736,36 +737,43 @@ public int MaxChecklistNodes
736737
/// <summary>
737738
/// Get or Set the Filter Sort enabled
738739
/// </summary>
740+
[DefaultValue(false)]
739741
public bool IsSortEnabled { get; set; }
740742

741743
/// <summary>
742744
/// Get or Set the Filter enabled
743745
/// </summary>
746+
[DefaultValue(false)]
744747
public bool IsFilterEnabled { get; set; }
745748

746749
/// <summary>
747750
/// Get or Set the Filter Checklist enabled
748751
/// </summary>
752+
[DefaultValue(false)]
749753
public bool IsFilterChecklistEnabled { get; set; }
750754

751755
/// <summary>
752756
/// Get or Set the Filter Custom enabled
753757
/// </summary>
758+
[DefaultValue(false)]
754759
public bool IsFilterCustomEnabled { get; set; }
755760

756761
/// <summary>
757762
/// Get or Set the Filter DateAndTime enabled
758763
/// </summary>
764+
[DefaultValue(false)]
759765
public bool IsFilterDateAndTimeEnabled { get; set; }
760766

761767
/// <summary>
762768
/// Get or Set the NOT IN logic for Filter
763769
/// </summary>
770+
[DefaultValue(false)]
764771
public bool IsFilterNotinLogicEnabled { get; set; }
765772

766773
/// <summary>
767774
/// Set the text filter search nodes behaviour
768775
/// </summary>
776+
[DefaultValue(DefaultCheckTextFilterRemoveNodesOnSearch)]
769777
public bool DoesTextFilterRemoveNodesOnSearch
770778
{
771779
get => _checkTextFilterRemoveNodesOnSearch;
@@ -775,6 +783,7 @@ public bool DoesTextFilterRemoveNodesOnSearch
775783
/// <summary>
776784
/// Number of nodes to enable the TextChanged delay on text filter
777785
/// </summary>
786+
[DefaultValue(DefaultTextFilterTextChangedDelayNodes)]
778787
public int TextFilterTextChangedDelayNodes
779788
{
780789
get => _textFilterTextChangedDelayNodes;
@@ -784,6 +793,7 @@ public int TextFilterTextChangedDelayNodes
784793
/// <summary>
785794
/// Delay milliseconds for TextChanged delay on text filter
786795
/// </summary>
796+
[DefaultValue(DefaultTextFilterTextChangedDelayMs)]
787797
public int TextFilterTextChangedDelayMs
788798
{
789799
get => _textFilterTextChangedDelayMs;
@@ -1024,12 +1034,13 @@ public void SortDesc()
10241034
/// <summary>
10251035
/// Get the Sorting String
10261036
/// </summary>
1037+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
10271038
public string? SortString
10281039
{
10291040
get => !String.IsNullOrEmpty(_sortString) ? _sortString : "";
10301041
private set
10311042
{
1032-
_cancelSortMenuItem.Enabled = value != null && value.Length > 0;
1043+
_cancelSortMenuItem.Enabled = value is { Length: > 0 };
10331044
_sortString = value;
10341045
}
10351046
}
@@ -1053,12 +1064,13 @@ public void CleanSort()
10531064
/// <summary>
10541065
/// Get the Filter string
10551066
/// </summary>
1067+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
10561068
public string? FilterString
10571069
{
10581070
get => !String.IsNullOrEmpty(_filterString) ? _filterString : "";
10591071
private set
10601072
{
1061-
_cancelFilterMenuItem.Enabled = value != null && value.Length > 0;
1073+
_cancelFilterMenuItem.Enabled = value is { Length: > 0 };
10621074
_filterString = value;
10631075
}
10641076
}
@@ -1184,7 +1196,7 @@ private void SetCheckListFilter()
11841196
TreeNodeItemSelector? selectAllNode = GetSelectAllNode();
11851197
_customFilterLastFiltersListMenuItem.Checked = false;
11861198

1187-
if (selectAllNode != null && selectAllNode.Checked && String.IsNullOrEmpty(_checkTextFilter.Text))
1199+
if (selectAllNode is { Checked: true } && String.IsNullOrEmpty(_checkTextFilter.Text))
11881200
{
11891201
CancelFilterMenuItem_Click(null, EventArgs.Empty);
11901202
}
@@ -1197,7 +1209,7 @@ private void SetCheckListFilter()
11971209
if (_loadedNodes.Length > 1)
11981210
{
11991211
selectAllNode = GetSelectEmptyNode();
1200-
if (selectAllNode != null && selectAllNode.Checked)
1212+
if (selectAllNode is { Checked: true })
12011213
{
12021214
FilterString = "[{0}] IS NULL";
12031215
}
@@ -1662,7 +1674,7 @@ private void SetNodesCheckState(TreeNodeItemSelector?[] nodes, bool isChecked)
16621674
foreach (TreeNodeItemSelector? node in nodes)
16631675
{
16641676
node!.Checked = isChecked;
1665-
if (node.Nodes != null && node.Nodes.Count > 0)
1677+
if (node.Nodes is { Count: > 0 })
16661678
{
16671679
foreach (TreeNodeItemSelector subnode in node.Nodes)
16681680
{
@@ -1797,7 +1809,7 @@ private CheckState UpdateNodesCheckState(TreeNodeCollection nodes)
17971809
private void CheckList_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
17981810
{
17991811
TreeViewHitTestInfo hitTestInfo = _checkList.HitTest(e.X, e.Y);
1800-
if (hitTestInfo != null && hitTestInfo.Location == TreeViewHitTestLocations.StateImage)
1812+
if (hitTestInfo is { Location: TreeViewHitTestLocations.StateImage })
18011813
{
18021814
//check the node check status
18031815
NodeCheckChange(e.Node as TreeNodeItemSelector);

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView/Controls Visuals/Filtering/FormCustomFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ private void valControl_KeyDown(object? sender, KeyEventArgs e)
579579
{
580580
if (sender == _valControl1)
581581
{
582-
if (_valControl2 != null && _valControl2.Visible)
582+
if (_valControl2 is { Visible: true })
583583
{
584584
_valControl2.Focus();
585585
}

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView/Krypton.Toolkit.Suite.Extended.AdvancedDataGridView 2022.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
<Choose>
7575
<When Condition="'$(Configuration)' == 'Nightly'">
7676
<ItemGroup>
77-
<PackageReference Include="Krypton.Standard.Toolkit.Nightly" Version="110.26.2.47-alpha" />
77+
<PackageReference Include="Krypton.Standard.Toolkit.Nightly" Version="110.26.3.60-alpha" />
7878
</ItemGroup>
7979
</When>
8080

8181
<When Condition="'$(Configuration)' == 'Canary'">
8282
<ItemGroup>
83-
<PackageReference Include="Krypton.Standard.Toolkit.Canary" Version="110.26.1.19-beta" />
83+
<PackageReference Include="Krypton.Standard.Toolkit.Canary" Version="110.26.2.58-beta" />
8484
</ItemGroup>
8585
</When>
8686

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.Buttons/Controls Toolkit/Split Button/KryptonSplitButton.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region MIT License
1+
#region MIT License
22
/*
33
* MIT License
44
*
@@ -47,6 +47,7 @@ public class KryptonSplitButton : KryptonButton
4747
#endregion
4848

4949
#region Properties
50+
[DefaultValue(true)]
5051
public bool ShowSplitOption
5152
{
5253
get => _showSplitOption;
@@ -70,6 +71,7 @@ public bool ShowSplitOption
7071
/// <summary>Gets or sets a value indicating whether [use uac elevation].</summary>
7172
/// <value>
7273
/// <c>true</c> if [use uac elevation]; otherwise, <c>false</c>.</value>
74+
[DefaultValue(false)]
7375
public bool UseUACElevation
7476
{
7577
get => _useUACElevation;
@@ -92,6 +94,7 @@ public bool UseUACElevation
9294
}
9395
}
9496

97+
[DefaultValue("")]
9598
public string ProcessPath { get => _processPath; set => _processPath = value; }
9699
#endregion
97100

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.Buttons/Controls Toolkit/UAC Buttons/KryptonUACButtonVersion2.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region MIT License
1+
#region MIT License
22
/*
33
* MIT License
44
*
@@ -51,6 +51,7 @@ public class KryptonUACButtonVersion2 : KryptonButton
5151
#endregion
5252

5353
#region Properties
54+
[DefaultValue(false)]
5455
public bool UseAsUACElevatedButton
5556
{
5657
get => _useAsUACElevatedButton;
@@ -65,10 +66,13 @@ public bool UseAsUACElevatedButton
6566
}
6667
}
6768

69+
[DefaultValue("")]
6870
public string PathToElevatedObject { get => _pathToElevatedObject; set => _pathToElevatedObject = value; }
6971

72+
[DefaultValue("")]
7073
public string ExtraArguments { get => _extraArguments; set => _extraArguments = value; }
7174

75+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
7276
public Size CustomShieldSize { get => _customShieldSize; set { _customShieldSize = value; ShowUACShield(_useAsUACElevatedButton, UACShieldSize.Custom, value.Height, value.Width); UACShieldSize = UACShieldSize.Custom; } }
7377

7478
[DefaultValue(typeof(UACShieldSize), "UACShieldSize.SMALL")]

Source/Krypton Toolkit/Krypton.Toolkit.Suite.Extended.Buttons/Krypton.Toolkit.Suite.Extended.Buttons 2022.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@
7272
<Choose>
7373
<When Condition="'$(Configuration)' == 'Nightly'">
7474
<ItemGroup>
75-
<PackageReference Include="Krypton.Standard.Toolkit.Nightly" Version="110.26.2.47-alpha" />
75+
<PackageReference Include="Krypton.Standard.Toolkit.Nightly" Version="110.26.3.60-alpha" />
7676
</ItemGroup>
7777
</When>
7878

7979
<When Condition="'$(Configuration)' == 'Canary'">
8080
<ItemGroup>
81-
<PackageReference Include="Krypton.Standard.Toolkit.Canary" Version="110.26.1.19-beta" />
81+
<PackageReference Include="Krypton.Standard.Toolkit.Canary" Version="110.26.2.58-beta" />
8282
</ItemGroup>
8383
</When>
8484

0 commit comments

Comments
 (0)