public static VengeanceHotkeysForm VengeanceHotkeysForm(DemonHunterHotkeys keys) { if (vengeanceHotkeysForm != null && vengeanceHotkeysForm.IsDisposed) { vengeanceHotkeysForm = null; } return(vengeanceHotkeysForm ?? (vengeanceHotkeysForm = new VengeanceHotkeysForm(keys))); }
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))); }
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; }