Пример #1
0
 public void ExecuteCommand(string command)
 {
     if (_richTextBox.Visible)
     {
         _richTextBox.ExecuteCommand(command);
     }
     else
     {
         Core.WebBrowser.ExecuteCommand(command);
     }
 }
Пример #2
0
 /// <summary>
 /// Executes the command with the specified ID.
 /// </summary>
 /// <param name="command">ID of the command to execute.</param>
 public void ExecuteCommand(string command)
 {
     // Delegate to the proper control
     if (_edtName.Focused)
     {
         _edtName.ExecuteCommand(command);
     }
     else if (_edtAnnotation.Focused)
     {
         _edtAnnotation.ExecuteCommand(command);
     }
     else if (_richTextBox.Focused)
     {
         _richTextBox.ExecuteCommand(command);
     }
     else
     {
         _browser.ExecuteCommand(command);
     }
 }