/// <summary> /// Call method to create new spelling list. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Instance containing the event data.</param> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OnButtonCreateNewSpellingList_Click(object sender, EventArgs e) { this.CreateNewSpellingList(); var mwc = new MisspelledWordsCollection(); mwc.ClearCollection(); }
/// <summary> /// Opens user selected spelling list. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Instance containing event data.</param> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OnMenuSpellOpenSpellingList_Click(object sender, EventArgs e) { var mwc = new MisspelledWordsCollection(); mwc.ClearCollection(); using (var openDlg = new OpenFileDialog()) { openDlg.ShowDialog(); SpellingPropertiesClass.SpellingListPath = openDlg.FileName; SpellingPropertiesClass.OpenedSpellingList = true; SpellingPropertiesClass.CreatingNewSpellingList = false; this.lstWords.Items.Clear(); if (!this.GetWordsFromFile()) { return; } this.SetButtonsEnabledState_OpenSpellingListButtonStateClicked(); this.ChangeControlsBackgroundColors(); } }