private void generateEnumsButton_Click(object sender, EventArgs e) { StreamReader reader = new StreamReader("C:\\Users\\Daniel Nilsson\\Desktop\\Entities.txt"); StringBuilder text = new StringBuilder(); EasyBaseSystem easyBaseSystem = new EasyBaseSystem(reader.ReadToEnd()); reader.Close(); TextMessageBox.Show(easyBaseSystem.GenerateEnums()); }
private async void Start_Analyze(object sender, RoutedEventArgs e) { if (!_textModel.IsAnalyzed && !_textModel.IsAnalasing) { await _textModel.StartWorkAsync(); } else { string message; message = (_textModel.IsAnalyzed) ? "The text has already been analyzed" : "The text is currently being analyzed"; TextMessageBox textMessage = new TextMessageBox(message); textMessage.Show(); } }
private async void StartFileSaving(object sender, RoutedEventArgs e) { if (_textModel.IsAnalyzed && !_textModel.IsAnalasing) { bool openResult = SaveFile(); if (openResult && FilePath != null) { await Loader.SaveTextFile(_textModel, FilePath); } } else { TextMessageBox textMessage = new TextMessageBox("The text is currently being analyzed"); textMessage.Show(); } }
private void Show_Help(object sender, RoutedEventArgs e) { string messageText = "Welcome to the Text Analyzer!\n" + "The program is designed for text analysis,\n" + "it highlights the features of the text with differents colors,\n" + "and also provides other info about text.\n\n" + "Steps to work:\n" + "1. Load text file (.txt, .html)\n" + "2. Click \"Analyze\" button\n" + "3. Wait for the end of the analysis\n" + "4. Save result as text file(.txt, .html)\n" + "To read various files, it is possible to change I/O file encoding\n" + "Standart Encoding - Unicode(UTF-8)\n\n" + "©Created by BNTU student Artyom Kolosov"; TextMessageBox messageBox = new TextMessageBox(messageText); messageBox.Show(); }