using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Fusion_Control_Centre_UberMDX { public partial class DEBUG_IfThenNodeForm : Form { public DEBUG_IfThenNodeForm(Fusion_Control_Centre_UberMDX.MainMDX _Momma) { InitializeComponent(); _Momma.Debug_IfThenList += new MainMDX.Debug_Delegate_DebugIfThens(UpdateIfThenList); } void UpdateIfThenList(List AllIfThenSuccess) { bool AddNotUpdate = false; if (AllIfThenSuccess.Count != LIST_IFS.Items.Count) { LIST_IFS.Items.Clear(); AddNotUpdate = true; } for (int i = 0; i < AllIfThenSuccess.Count; i++) { string _uS = "If/Then Node #" + ((int)(i + 1)).ToString() + ": " + AllIfThenSuccess[i].ToString(); if (AddNotUpdate) { LIST_IFS.Items.Add(_uS); } else { LIST_IFS.Items[i] = _uS; } } LIST_IFS.Update(); } } }