Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            addingEditingLoadXMLFile = true;

            var form = new AddEditHotkeyForm();

            form.ShowDialog();

            addingEditingLoadXMLFile = false;
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (lvKeysLocs.SelectedIndices.Count > 0)
            {
                addingEditingLoadXMLFile = true;

                var form = new AddEditHotkeyForm();

                form.editIndex     = lvKeysLocs.SelectedIndices[0];
                form.editSoundKeys = new string[] { lvKeysLocs.SelectedItems[0].Text, lvKeysLocs.SelectedItems[0].SubItems[1].Text };

                form.ShowDialog();

                addingEditingLoadXMLFile = false;
            }
        }
Exemplo n.º 3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (lvKeySounds.SelectedItems.Count > 0)
            {
                var form = new AddEditHotkeyForm();

                ListViewItem item = lvKeySounds.SelectedItems[0];

                form.editSoundKeys    = new string[2];
                form.editSoundKeys[0] = item.Text;
                form.editSoundKeys[1] = item.SubItems[1].Text;

                form.editIndex = lvKeySounds.SelectedIndices[0];

                form.ShowDialog();
            }
        }
Exemplo n.º 4
0
        private void editSelectedSoundHotkey()
        {
            if (lvKeySounds.SelectedItems.Count > 0)
            {
                var form = new AddEditHotkeyForm();

                ListViewItem item = lvKeySounds.SelectedItems[0];

                form.editStrings    = new string[3];
                form.editStrings[0] = item.Text;
                form.editStrings[1] = item.SubItems[1].Text;
                form.editStrings[2] = item.SubItems[2].Text;

                form.editIndex = lvKeySounds.SelectedIndices[0];

                form.ShowDialog();
            }
        }
Exemplo n.º 5
0
        private void editSelectedSoundHotkey()
        {
            if (lvKeySounds.SelectedItems.Count > 0)
            {
                var form = new AddEditHotkeyForm();

                int selectedIndex = lvKeySounds.SelectedIndices[0];

                form.editStrings = new string[4];

                form.editStrings[0] = Helper.keysArrayToString(soundHotkeys[selectedIndex].Keys);
                form.editStrings[1] = soundHotkeys[selectedIndex].WindowTitle;
                form.editStrings[2] = Helper.fileLocationsArrayToString(soundHotkeys[selectedIndex].SoundLocations);
                form.editVolume     = soundHotkeys[selectedIndex].SoundVolume;

                form.editIndex = lvKeySounds.SelectedIndices[0];

                form.ShowDialog();
            }
        }
Exemplo n.º 6
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var form = new AddEditHotkeyForm();

            form.ShowDialog();
        }