/// <summary> /// Настройка изначальных данных /// </summary> private void Setup() { if (File.Exists("../../Words.txt")) { var wordList = FormUtils.GetWordsFromFile("../../Words.txt"); foreach (var word in wordList) { TextBoxSource.AppendText(word + "\n"); } } }
private void ButtonOpen_Click(object sender, EventArgs e) { var filename = ""; if (FormUtils.ChooseFile(ref filename)) { ClearTextBoxes(); var wordList = FormUtils.GetWordsFromFile(filename); foreach (var word in wordList) { TextBoxSource.AppendText(word + "\n"); } } }