public void ExecuteCommand(string command) { if (_richTextBox.Visible) { _richTextBox.ExecuteCommand(command); } else { Core.WebBrowser.ExecuteCommand(command); } }
/// <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); } }