/// <summary> /// Modifies the text in the buffer. /// </summary> private void ModifyInBuffer(string oldValue, string newValue, int numberOfString) { for (int i = 0; i < numberOfString; ++i) { IndexesModified.AddRange(buffer.ModifyData(oldValue, newValue)); } }
/// <summary> /// Starts a thread to modify the text in the buffer. /// </summary> public void ModifyText(string oldValue, string newValue, int numberOfString) { IndexesModified.Clear(); thread = new Thread(new ThreadStart(() => ModifyInBuffer(oldValue, newValue, numberOfString))); thread.IsBackground = true; thread.Start(); }