Example #1
0
        public static void appendLnToHistory(RichTextBox history, HistoryMessage historyMessage, bool showTime = true)
        {
            appendTimeToHistory(history);
            setColorToHistory(history, historyMessage.getColor());

            history.AppendText(historyMessage.messageValue + "\n");
        }
Example #2
0
        public static async void asyncRomanianNumbersToArab(Button buttonToEnable, RichTextBox richHistory, HistoryMessage message)
        {
            await Task.Run(() =>
            {
                List <string> romanianStrNumbers = new List <string>();

                string[] splitWords = fileWordsSplit == null ? docxManager.Text.Split(spaceSplitters) : fileWordsSplit;

                foreach (string word in splitWords)
                {
                    if (word.Length > 0)
                    {
                        if (isRomanian(word))
                        {
                            romanianStrNumbers.Add(word);
                        }
                    }
                }
                romanianStrNumbers.Sort();
                romanianStrNumbers.Reverse();
                foreach (string romWord in romanianStrNumbers)
                {
                    changeTextAccordingToFormat(romWord, DecodeRomanToArab(romWord).ToString());
                    //fullFileData = fullFileData.Replace(romWord, DecodeRomanToArab(romWord).ToString());
                }
            });

            buttonToEnable.Enabled = true;
            HistoryWorker.appendLnToHistory(richHistory, message);
        }