private void commandTextBox_CommandEntered(object sender, Common.DataEventArgs <string> e) { CommandResultInfo result = _pluginManager.ExecuteCommand(_pluginManager.ParseCommand(PMSession, e.Data)); if (result != null && result.Result == CommandResult.Fail) { serverOutputBox.AppendLine(CommonStrings.CommandErrorMessage.With(result.Message), Color.Red); } }
private void commandTextBox_CommandEntered(object sender, Common.DataEventArgs <string> e) { CommandResultInfo result = _pluginManager.ExecuteCommand(_pluginManager.ParseCommand(Channel, e.Data)); if (result != null && result.Result == Result.Fail) { channelOutputBox.AppendLine(result.Message, Color.Red); //TODO: Log } }
protected override void OnExecute(string commandLine) { CommandResultInfo result = _pluginManager.ExecuteCommand(_pluginManager.ParseCommand(_channel, commandLine)); if (result != null && result.Result == CommandResult.Fail) { ChatLines.Add(new ErrorMessageViewModel(DateTime.Now, result.Message)); //TODO: Log } }
private void commandTextBox_CommandEntered(object sender, Common.DataEventArgs <string> e) { CommandResultInfo result = new CommandResultInfo(); try { result = _pluginManager.ExecuteCommand(_pluginManager.ParseCommand(Server, e.Data)); } catch (TargetInvocationException ex) { serverOutputBox.AppendLine(ex.InnerException.Message, Color.Red); } if (result != null && result.Result == CommandResult.Fail) { serverOutputBox.AppendLine(result.Message, Color.Red); } }