コード例 #1
0
        public static VengeanceHotkeysForm VengeanceHotkeysForm(DemonHunterHotkeys keys)
        {
            if (vengeanceHotkeysForm != null && vengeanceHotkeysForm.IsDisposed)
            {
                vengeanceHotkeysForm = null;
            }

            return(vengeanceHotkeysForm ?? (vengeanceHotkeysForm = new VengeanceHotkeysForm(keys)));
        }
コード例 #2
0
        public static HavocHotkeysForm HavocHotkeysForm(DemonHunterHotkeys keys)
        {
            // If the form is not null and is disposed then the form would have been closed. Set it to null.
            if (havocHotkeysForm != null && havocHotkeysForm.IsDisposed)
            {
                havocHotkeysForm = null;
            }

            return(havocHotkeysForm ?? (havocHotkeysForm = new HavocHotkeysForm(keys)));
        }
コード例 #3
0
        public HavocHotkeysForm(DemonHunterHotkeys keys)
        {
            InitializeComponent();

            FormClosed += HavocHotkeysForm_FormClosed;

            HavocHotkeys = keys;

            // If the ability name column is entered, deseslect. Ability name doesn't have to be selected.
            abilitiesDataGridView.CellEnter += (sender, e) => { if (e.ColumnIndex == 0)
                                                                {
                                                                    (sender as DataGridView).ClearSelection();
                                                                }
            };

            abilitiesDataGridView.ClearSelection();

            abilitiesDataGridView.KeyDown   += AbilitiesDataGridView_KeyDown;
            abilitiesDataGridView.CellEnter += AbilitiesDataGridView_CellEnter;
            abilitiesDataGridView.CellLeave += AbilitiesDataGridView_CellLeave;
        }