using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace FCC_Uber_MDX_Configurator { public partial class DebuggingForm : Form { public DebuggingForm() { InitializeComponent(); CHKLIST_VIRTUALBRAINS.Items.Clear(); foreach (GlobalStaticClass._GlobalBrainClass _bC in GlobalStaticClass._Global_List_Brains) { bool isChecked = GlobalStaticClass.Debug_VirtualBrainList.Contains(_bC._humanName.ToLower()); CHKLIST_VIRTUALBRAINS.Items.Add(_bC._humanName, isChecked); } CHK_IFTHEN.Checked = GlobalStaticClass.Debug_IfThenWindow; CHK_SPEECH.Checked = GlobalStaticClass.Debug_SpeechWindow; CHK_VARIABLES.Checked = GlobalStaticClass.Debug_VariableWindow; UpdateForm(); } private void TSMI_Enabled_Click(object sender, EventArgs e) { GlobalStaticClass.Debug_MasterEnable = true; UpdateForm(); } private void TSMI_Disabled_Click(object sender, EventArgs e) { GlobalStaticClass.Debug_MasterEnable = false; UpdateForm(); } private void UpdateForm() { TSMI_Enabled.Checked = GlobalStaticClass.Debug_MasterEnable; TSMI_Disabled.Checked = !GlobalStaticClass.Debug_MasterEnable; } private void DebuggingForm_FormClosing(object sender, FormClosingEventArgs e) { GlobalStaticClass.Debug_IfThenWindow = CHK_IFTHEN.Checked; GlobalStaticClass.Debug_VariableWindow = CHK_VARIABLES.Checked; GlobalStaticClass.Debug_SpeechWindow = CHK_SPEECH.Checked; GlobalStaticClass.Debug_VirtualBrainList.Clear(); for (int i = 0; i < CHKLIST_VIRTUALBRAINS.Items.Count; i++) { if (CHKLIST_VIRTUALBRAINS.CheckedItems.Contains(CHKLIST_VIRTUALBRAINS.Items[i])) { GlobalStaticClass.Debug_VirtualBrainList.Add(GlobalStaticClass._Global_List_Brains[i]._humanName.ToLower()); } } } } }