Пример #1
0
        private void ToolStripButtonEditBlacklistClick(object sender, EventArgs e)
        {
            Language language = ByLanguageFactory.GetLanguageFromString(toolStripComboBoxLanguage.Text);
            string   fileName = ByLanguageFactory.GetBlacklistFileName(language);

            Process.Start("notepad.exe", fileName);
        }
Пример #2
0
        private void AddToBlacklist(string term)
        {
            Language language = ByLanguageFactory.GetLanguageFromString(toolStripComboBoxLanguage.Text);
            string   fileName = ByLanguageFactory.GetBlacklistFileName(language);

            using (StreamWriter writer = new StreamWriter(fileName, true, Encoding.UTF8))
            {
                writer.WriteLine();
                writer.Write(term);
            }
        }