/// <summary> /// This is used to replace all occurrences of the specified word /// </summary> /// <param name="word">The word to be replaced</param> /// <param name="replacement">The suggestion to use as the replacement</param> public void ReplaceAllOccurrences(string word, ISpellingSuggestion replacement) { ReplaceAll?.Invoke(this, new SpellingEventArgs(word, replacement)); }
/* ----------------------------------------------------------------- */ /// /// OnReplaceAll /// /// <summary> /// ReplaceAll イベントを発生させます。 /// </summary> /// /* ----------------------------------------------------------------- */ protected virtual void OnReplaceAll(EventArgs e) => ReplaceAll?.Invoke(this, e);
private void btnReplaceAll_Click(object sender, RoutedEventArgs e) { PopulateComboBox("Find"); PopulateComboBox("Replace"); ReplaceAll?.Invoke(this, e); }
/// <summary> /// Extends ReplaceAll action with the replacement value. /// Action is case sensitive by default, use IgnoringCase extension to change behaviour. /// </summary> /// <param name="replacement">Value for replacement</param> public static ReplaceAllWith With(this ReplaceAll source, string replacement) { return(new ReplaceAllWith(source, replacement)); }