public void ArrToObsColl(string[] arr) { foreach (string str in arr) { SortedText.Add(str); } }
public void ClearInfo() { SortedTextWords.Clear(); SortedText.Clear(); WordsInText = 0; UniqueWordsInText = 0; MergeSortingTime = 0; BubbleSortingTime = 0; UpdateInfo(); }
public void SortText(int sortIndex) { SortedText inputText = new SortedText(); switch (sortIndex) { case (int)SortingStrategy.BubbleSort: inputText.SetSortStrategy(new BubbleSortStrategy()); this._view.OutputText = inputText.Sort(this._view.InputText); break; case (int)SortingStrategy.QuickSort: inputText.SetSortStrategy(new QuickSortStrategy()); this._view.OutputText = inputText.Sort(this._view.InputText); break; default: this._view.OutputText = "Invalid Sorting Method"; break; } }