예제 #1
0
        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);
            }
        }
예제 #2
0
        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
            }
        }
예제 #3
0
        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
            }
        }
예제 #4
0
        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);
            }
        }