[]
        
(Showing Draft Content)

Editing Commands

The ToolStripMain class implements the usual Undo, Redo, Find, and Replace commands, which are also deferred to the C1Editor control:

To write code in C#

void Undo_Click(object sender, EventArgs e)
{
    Editor.Undo();
}
void Redo_Click(object sender, EventArgs e)
{
    Editor.Redo();
}
void Find_Click(object sender, EventArgs e)
{
    Editor.ShowDialog(C1.Win.C1Editor.DialogType.Find);
}
void Replace_Click(object sender, EventArgs e)
{
    Editor.ShowDialog(C1.Win.C1Editor.DialogType.Replace);
}

The find and replace commands are implemented with calls to the C1Editor's ShowDialog commands, which also supports several other commands defined by the DialogType enumeration and not used in this sample:

  • NewTable: Inserts a new table.
  • Image: Inserts or edits an image.
  • FlashMovie: Inserts or edits a Flash movie.
  • Hyperlink: Inserts or edits a hyperlink.
  • Bookmark: Inserts or edits a bookmark.
  • Find: Finds text in the document.
  • Replace: Finds and replaces text in the document.
  • Format: Applies formatting to the current selection.
  • PageSetup: Shows a page setup dialog.