Пример #1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            DmxFramework.Keyboard.Hotkey key    = (DmxFramework.Keyboard.Hotkey) this.dataGridView1.Rows[e.RowIndex].Tag;
            DmxFramework.Keyboard.Action action = (DmxFramework.Keyboard.Action) this.dataGridView1.Rows[e.RowIndex].Cells[2].Tag;
            if (e.ColumnIndex == 4)
            {
                key.Actions.Remove(action);

                /*if (key.Actions.Count == 0)
                 * {
                 *  Main.mFrameWork.KeyBord.Remove(key);
                 *  this.comboKey.rem
                 * }*/
                RefreshKeyTable((Hotkey)this.comboKey.SelectedItem);
            }
            else if (e.ColumnIndex == 3)
            {
                action.StopOnKeyUp = !(action.StopOnKeyUp);
                RefreshKeyTable((Hotkey)this.comboKey.SelectedItem);
            }
        }
Пример #2
0
        void sceneBrowserCtrl1_OnDoubleClick(DmxFramework.Keyboard.Action pAction)
        {
            Hotkey key = (Hotkey)this.comboKey.SelectedItem;

            if (key != null)
            {
                key.Actions.Add(pAction);
                RefreshKeyTable(key);
            }
        }