Beispiel #1
0
 public virtual void ExecuteCommand(string action)
 {
     if (_ieBrowser.Visible)
     {
         _ieBrowser.ExecuteCommand(action);
     }
     else if (_editRtfBody.Visible)
     {
         _editRtfBody.ExecuteCommand(action);
     }
 }
Beispiel #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);
     }
 }