Esempio n. 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);
            }
        }
Esempio n. 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
            }
        }
Esempio n. 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
            }
        }
Esempio n. 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);
            }
        }