Пример #1
0
 /// <summary>
 /// User pressed cancel button on find form
 /// </summary>
 private void findDialog1_CancelReplaceRequested(object sender, EventArgs e)
 {
     // Ensure we are overwriting what we expect
     if (Rtf.Equals(textAfterReplace))
     {
         Rtf = textBeforeReplace;
     }
 }
Пример #2
0
 /// <summary>
 /// Overriden Redo to redo replace operations
 /// </summary>
 /// <remarks>
 /// Would be a lot simpler if the framework controls gave you access to their undo stack
 /// </remarks>
 public new void Redo()
 {
     if (Rtf.Equals(textBeforeReplace))
     {
         Rtf = textAfterReplace;
     }
     else
     {
         // Call ordinary redo
         base.Redo();
     }
 }