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
@@ -24,6 +24,7 @@ namespace Volian.Controls.Library
};
private DataTable values;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping bindingSource flexible")]
private BindingSource bindingSource = null;
private int totalrows = 1;
private int totalcols = 1;
@@ -104,8 +105,10 @@ namespace Volian.Controls.Library
void FormLoad_setDefaults(object sender, EventArgs e)
{
BindingSource bindingSourceDropDown = new BindingSource();
bindingSourceDropDown.DataSource = Enum.GetNames(typeof(EPinputtype));
BindingSource bindingSourceDropDown = new BindingSource
{
DataSource = Enum.GetNames(typeof(EPinputtype))
};
//in order to achieve a dropdown of possible values need
//to remove the auto-inserted columns
@@ -114,8 +117,10 @@ namespace Volian.Controls.Library
for (int c = 0; c < totalcols; c++)
{
dataview.Columns.RemoveAt(c);
var cName = new DataGridViewComboBoxColumn();
cName.DataSource = bindingSourceDropDown;
var cName = new DataGridViewComboBoxColumn
{
DataSource = bindingSourceDropDown
};
cName.DefaultCellStyle.NullValue = "none";
dataview.Columns.Insert(c, cName);
}
@@ -200,8 +205,10 @@ namespace Volian.Controls.Library
int endNumCols = (int)NumCols.Value;
int curNumCols = totalcols;
BindingSource bindingSourceDropDown = new BindingSource();
bindingSourceDropDown.DataSource = Enum.GetNames(typeof(EPinputtype));
BindingSource bindingSourceDropDown = new BindingSource
{
DataSource = Enum.GetNames(typeof(EPinputtype))
};
//remove cols till equal
while (curNumCols > endNumCols)
@@ -215,8 +222,10 @@ namespace Volian.Controls.Library
{
values.Columns.Add(new DataColumn($"Column{curNumCols + 1}") { DefaultValue = "none"});
if (dataview.Columns.Count > curNumCols) dataview.Columns.RemoveAt(curNumCols);
var cName = new DataGridViewComboBoxColumn();
cName.DataSource = bindingSourceDropDown;
var cName = new DataGridViewComboBoxColumn
{
DataSource = bindingSourceDropDown
};
cName.DefaultCellStyle.NullValue = "none";
dataview.Columns.Add(cName);