Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            addingEditingLoadXMLFile = true;

            var form = new AddEditHotkeyForm();

            form.ShowDialog();

            addingEditingLoadXMLFile = false;
        }
Beispiel #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgvSoundboardFiles.SelectedRows.Count > 0)
            {
                addingEditingLoadXMLFile = true;

                var form = new AddEditHotkeyForm();

                form.editIndex   = dgvSoundboardFiles.SelectedRows[0].Index;
                form.editStrings = new string[] { (string)loadXMLFilesList[form.editIndex].XMLLocation, (string)dgvSoundboardFiles.SelectedRows[0].Cells[1].Value };

                form.ShowDialog();

                addingEditingLoadXMLFile = false;
            }
        }
        private void editSelectedSoundHotkey()
        {
            if (dgvKeySounds.SelectedRows.Count > 0)
            {
                var form = new AddEditHotkeyForm();

                DataGridViewRow row = dgvKeySounds.SelectedRows[0];

                form.editIndex = dgvKeySounds.SelectedRows[0].Index;

                form.editStrings    = new string[2];
                form.editStrings[0] = Helper.soundLocsArrayToString(soundHotkeys[form.editIndex].SoundLocations);
                form.editStrings[1] = (string)row.Cells[1].Value;

                form.ShowDialog();
            }

            AutoSave();
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var form = new AddEditHotkeyForm();

            form.ShowDialog();
        }