C2026-043-Tech-Debt_v1 - Stash 1

This commit is contained in:
2026-07-21 06:49:28 -04:00
parent 0fed1acfd8
commit 9486b37300
70 changed files with 4222 additions and 10191 deletions
+12 -19
View File
@@ -1,8 +1,5 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Drawing.Design;
using System.Windows.Forms.Design;
@@ -13,7 +10,8 @@ namespace Volian.Controls.Library
public class FlagCheckedListBox : CheckedListBox
{
private System.ComponentModel.Container components = null;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
private System.ComponentModel.Container components = null;
public FlagCheckedListBox()
{
@@ -28,8 +26,7 @@ namespace Volian.Controls.Library
{
if (disposing)
{
if (components != null)
components.Dispose();
components?.Dispose();
}
base.Dispose(disposing);
}
@@ -37,9 +34,6 @@ namespace Volian.Controls.Library
#region Component Designer generated code
private void InitializeComponent()
{
//
// FlaggedCheckedListBox
//
this.CheckOnClick = true;
}
@@ -127,7 +121,7 @@ namespace Volian.Controls.Library
// If the item has been unchecked, remove its bits from the sum
if (cs == CheckState.Unchecked)
sum = sum & (~composite.value);
sum &= (~composite.value);
// If the item has been checked, combine its bits with the sum
else
sum |= composite.value;
@@ -239,13 +233,15 @@ namespace Volian.Controls.Library
public class FlagEnumUIEditor : UITypeEditor
{
// The checklistbox
private FlagCheckedListBox flagEnumCB;
private readonly FlagCheckedListBox flagEnumCB;
public FlagEnumUIEditor()
{
flagEnumCB = new FlagCheckedListBox();
flagEnumCB.BorderStyle = BorderStyle.None;
}
flagEnumCB = new FlagCheckedListBox
{
BorderStyle = BorderStyle.None
};
}
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
@@ -269,12 +265,9 @@ namespace Volian.Controls.Library
return null;
}
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.DropDown;
}
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) => UITypeEditorEditStyle.DropDown;
}
}
}