/// <summary> /// Open spelling list so user can edit the list or delete the list. /// </summary> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OpenSpellingList() { MyMessagesClass.NameOfMethod = MethodBase.GetCurrentMethod().Name; var value = string.Empty; DialogResult retVal; using (var dlgInput = new SelectSpellingListForm()) { retVal = dlgInput.GetSpellingListPath(ref value); } if (DialogResult.OK != retVal) { return; } SpellingPropertiesClass.SpellingListPath = value; SpellingPropertiesClass.OpenedSpellingList = true; SpellingPropertiesClass.CreatingNewSpellingList = false; this.lstWords.Items.Clear(); if (!this.GetWordsFromFile()) { return; } this.SetButtonsEnabledState_OpenSpellingListButtonStateClicked(); this.ChangeControlsBackgroundColors(); }
/// <summary> /// Open spelling list so user can edit the list or delete the list. /// </summary> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OpenSpellingList() { var value = string.Empty; using (var sel = new SelectSpellingListForm()) { DialogResult retVal = sel.GetSpellingListPath(ref value); } /*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(); * }*/ }
/// <summary> /// Open spelling list so user can edit the list or delete the list. /// </summary> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OpenSpellingList() { MyMessagesClass.NameOfMethod = MethodBase.GetCurrentMethod().Name; var value = string.Empty; DialogResult retVal; using (var dlgInput = new SelectSpellingListForm()) { retVal = dlgInput.GetSpellingListPath(value); i } if (DialogResult.OK == retVal) { if (string.IsNullOrEmpty(value)) { MyMessagesClass.WarningMessage = "You need to name this file in order to save it."; MyMessagesClass.ShowWarningMessageBox(); return; } var filePath = DirectoryFileOperationsClass.CombineDirectoryPathFileNameCheckCreateFile( dirPath, value); WriteWordsToFile(filePath, words); } else { MyMessagesClass.WarningMessage = "You need to name this file in order to save it."; MyMessagesClass.ShowWarningMessageBox(); } /*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(); * }*/ }
/// <summary> /// Open spelling list so user can edit the list or delete the list. /// </summary> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/17/2019</changed> private void OpenSpellingList() { MyMessagesClass.NameOfMethod = MethodBase.GetCurrentMethod().Name; var value = string.Empty; DialogResult retVal; using (var dlgInput = new SelectSpellingListForm()) { retVal = dlgInput.GetSpellingListPath(ref value); } if (DialogResult.OK == retVal) { var filePath = value; } }