コード例 #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 ParentServer_OnJoinSelf(object sender, Common.DataEventArgs <Channel> e)
        {
            ((MainForm)MdiParent).CreateChannelForm(e.Data);

            NetworkSettings nwSettings = IrcSettingsManager.Instance.GetNetwork(Server);
            ChannelSettings chan       = nwSettings.GetChannel(e.Data.Name) ?? nwSettings.AddChannel(e.Data);

            chan.AutoJoin = true;
        }
コード例 #3
0
ファイル: ChannelForm.cs プロジェクト: ortzinator/mutinyirc
        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
            }
        }
コード例 #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);
            }
        }
コード例 #5
0
ファイル: ChannelForm.cs プロジェクト: ortzinator/mutinyirc
 private void Channel_TopicReceived(object sender, Common.DataEventArgs <string> e)
 {
     AddLine(ChannelStrings.TopicRecieved.With(e.Data));
 }
コード例 #6
0
 private void pmsession_MessageReceived(object sender, Common.DataEventArgs <string> e)
 {
     AddLine(ChannelStrings.PublicMessage.With(pmsession.User.Nick, e.Data));
 }
コード例 #7
0
        private void pmsession_MessageSent(object sender, Common.DataEventArgs <string> e)
        {
            string nick = PMSession.Server.Connection.ConnectionData.Nick;

            AddLine(ChannelStrings.PublicMessage.With(nick, e.Data));
        }
コード例 #8
0
 private void ParentServer_OnRawMessageReceived(object sender, Common.DataEventArgs <string> e)
 {
     //intentionally blank
     AddLine(e.Data, Color.FromArgb(0, 170, 222));
 }