Exemplo n.º 1
0
        private void CB_presets_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mIsLoading)
            {
                return;
            }

            mPresetPool.SetActivePreset(CB_presets.SelectedIndex);
            LB_chosenCMDs.DataSource = mPresetPool.ActivePreset;
            LB_chosenCMDs.Update();
        }
Exemplo n.º 2
0
        private void cmd_removeCMD_Click(object sender, EventArgs e)
        {
            int index = LB_chosenCMDs.SelectedIndex;

            if (index < 0)
            {
                return;
            }

            mPresetPool.RemoveFromActivePreset(index);
            LB_chosenCMDs.Update();
        }
Exemplo n.º 3
0
        private void BTN_addCMD_Click(object sender, EventArgs e)
        {
            string cmd = LB_commands.SelectedItem as string;

            if (!mPresetPool.AddToActivePreset(cmd))
            {
                return;
            }

            LB_chosenCMDs.Update();
            if (LB_commands.SelectedIndex < LB_commands.Items.Count - 1)
            {
                LB_commands.SelectedIndex++;
            }
        }