public bool CanExecuteCommand(string command) { if (_richTextBox.Visible) { return(_richTextBox.CanExecuteCommand(command)); } else { return(Core.WebBrowser.CanExecuteCommand(command)); } }
/// <summary> /// Checks if the command with the specified ID can be executed in the current state /// of the control. /// </summary> /// <param name="command">The ID of the command.</param> /// <returns>true if the ID of the command is known to the control and can be /// executed; false otherwise.</returns> public bool CanExecuteCommand(string command) { // Delegate to the proper control if (_edtName.Focused) { return(_edtName.CanExecuteCommand(command)); } else if (_edtAnnotation.Focused) { return(_edtAnnotation.CanExecuteCommand(command)); } else if (_richTextBox.Focused) { return(_richTextBox.CanExecuteCommand(command)); } else { return(_browser.CanExecuteCommand(command)); } }