C2026-043-Tech-Debt_v1 - Stash 1
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
@@ -30,7 +26,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!DesignMode && _MainStepSection == null) // B2019-043 need to check if we are just saving changes to the user interface
|
||||
{
|
||||
foreach (SectionInfo si in MyItemInfo.MyProcedure.Sections)
|
||||
foreach (SectionInfo si in MyItemInfo.MyProcedure.Sections.OfType<SectionInfo>())
|
||||
{
|
||||
SectionConfig sc = (SectionConfig)si.MyConfig;
|
||||
if (sc.Section_OriginalSteps == "Y") _MainStepSection = si;
|
||||
@@ -39,9 +35,6 @@ namespace Volian.Controls.Library
|
||||
return _MainStepSection;
|
||||
}
|
||||
}
|
||||
//private ItemInfo _firstStep;
|
||||
//private ItemInfo _lastStep;
|
||||
private bool _Initializing;
|
||||
|
||||
public DisplayFoldoutMaint()
|
||||
{
|
||||
@@ -56,11 +49,10 @@ namespace Volian.Controls.Library
|
||||
if (MyItemInfo != null)
|
||||
{
|
||||
if (MyItemInfo.MyProcedure.Sections == null || MyItemInfo.MyProcedure.Sections.Count == 0) return;
|
||||
_Initializing = true;
|
||||
ProcedureInfo pi = MyItemInfo.MyProcedure;
|
||||
listBoxFoldouts.Items.Clear();
|
||||
lstCBSteps.Items.Clear();
|
||||
foreach (SectionInfo si in pi.Sections)
|
||||
foreach (SectionInfo si in pi.Sections.OfType<SectionInfo>())
|
||||
if (si.DisplayText.ToUpper().StartsWith("FOLDOUT")) listBoxFoldouts.Items.Add(si);
|
||||
if (listBoxFoldouts.Items.Count > 0) listBoxFoldouts.SelectedIndex = 0;
|
||||
else
|
||||
@@ -71,7 +63,6 @@ namespace Volian.Controls.Library
|
||||
|
||||
// find default step section & use its steps to fill in tree.
|
||||
FillInSteps();
|
||||
_Initializing = false;
|
||||
}
|
||||
}
|
||||
private void FillInSteps()
|
||||
@@ -80,19 +71,18 @@ namespace Volian.Controls.Library
|
||||
ItemInfo startitm = MainStepSection.Steps != null && MainStepSection.Steps.Count > 0 ? MainStepSection.Steps[0] : null;
|
||||
while (startitm != null)
|
||||
{
|
||||
StepConfig sc = startitm.MyConfig as StepConfig;
|
||||
if (sc != null)
|
||||
{
|
||||
if (sc.Step_FloatingFoldout == foldOutselected.ItemID)
|
||||
{
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Checked);
|
||||
}
|
||||
else
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||
}
|
||||
else
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||
startitm = startitm.GetNext();
|
||||
if (startitm.MyConfig is StepConfig sc)
|
||||
{
|
||||
if (sc.Step_FloatingFoldout == foldOutselected.ItemID)
|
||||
{
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Checked);
|
||||
}
|
||||
else
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||
}
|
||||
else
|
||||
lstCBSteps.Items.Add(startitm, CheckState.Unchecked);
|
||||
startitm = startitm.GetNext();
|
||||
}
|
||||
}
|
||||
private void listBoxFoldouts_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -102,12 +92,11 @@ namespace Volian.Controls.Library
|
||||
for (int i = 0; i < lstCBSteps.Items.Count; i++)
|
||||
{
|
||||
ItemInfo startitm = lstCBSteps.Items[i] as ItemInfo;
|
||||
StepConfig sc = startitm.MyConfig as StepConfig;
|
||||
if (sc != null)
|
||||
lstCBSteps.SetItemChecked(itemInList, sc.Step_FloatingFoldout == foldOutselected.ItemID);
|
||||
else
|
||||
lstCBSteps.SetItemChecked(itemInList, false);
|
||||
itemInList++;
|
||||
if (startitm.MyConfig is StepConfig sc)
|
||||
lstCBSteps.SetItemChecked(itemInList, sc.Step_FloatingFoldout == foldOutselected.ItemID);
|
||||
else
|
||||
lstCBSteps.SetItemChecked(itemInList, false);
|
||||
itemInList++;
|
||||
}
|
||||
}
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user