예제 #1
0
파일: MacroMax.cs 프로젝트: Ikkari/MacroMax
        private void insertButton_Click(object sender, EventArgs e)
        {
            int element = macroListBox.SelectedIndex / 2;

            EditMacro    editForm = new EditMacro();
            DialogResult result   = editForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                keyBinds.ElementAt(selectedMacro).macroList.Insert(element, editForm.macro);
            }
            editForm.Close();
            refreshMacro();
        }
예제 #2
0
파일: MacroMax.cs 프로젝트: Ikkari/MacroMax
        private void editButton_Click(object sender, EventArgs e)
        {
            int element = macroListBox.SelectedIndex / 2;

            Macro        temp     = keyBinds.ElementAt(selectedMacro).macroList.ElementAt(element);
            EditMacro    editForm = new EditMacro(temp);
            DialogResult result   = editForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                keyBinds.ElementAt(selectedMacro).macroList.ElementAt(element).theMacro        = editForm.eventType;
                keyBinds.ElementAt(selectedMacro).macroList.ElementAt(element).theMacroEvent   = (int)editForm.key;
                keyBinds.ElementAt(selectedMacro).macroList.ElementAt(element).timeBeforeEvent = editForm.time;
            }
            editForm.Close();
            refreshMacro();
        }