public void Dispose() { DisableMonitor(); if (reformatterCode != null) { reformatterCode.Dispose(); reformatterCode = null; } if (abbrevationCompletition != null) { abbrevationCompletition.Dispose(); abbrevationCompletition = null; } if (ctrDoubleChar != null) ctrDoubleChar.Dispose(); }
private void EnableReformatterCode() { reformatterCode = new ReformatterCode(settings); if (abbrevationCompletition != null) abbrevationCompletition.reformatterCode = reformatterCode; bool alreadyPresent = false; if (settings.FormatterCodeShortCut != Keys.None) { if (dictNotifyPressKey.ContainsKey(settings.FormatterCodeShortCut)) { settings.formatterCodeShortCut = Keys.None; alreadyPresent = true; } else dictNotifyPressKey.Add(settings.FormatterCodeShortCut, reformatterCode); if (alreadyPresent) MessageBox.Show("Shorcut already in use in QuickGenerator!!\nPlease choose another Shorcut!!"); ActivateEventKeys(); } // insertShortCutHandle(reformatterCode); }
private void DisableReformatterCode() { //removeShortCutHandle(reformatterCode); reformatterCode.Dispose(); reformatterCode = null; if (abbrevationCompletition != null) abbrevationCompletition.reformatterCode = null; if (settings.FormatterCodeShortCut != Keys.None) { if (dictNotifyPressKey.ContainsKey(settings.FormatterCodeShortCut)) dictNotifyPressKey.Remove(settings.FormatterCodeShortCut); DisactivateEventKey(); } }