Beispiel #1
0
        private PrivateMessageSession GetPM(User user)
        {
            foreach (var session in PMSessions)
            {
                if (session.User.Equals(user))
                {
                    return(session);
                }
            }

            var tmpsession = new PrivateMessageSession(this, user);

            PMSessions.Add(tmpsession);
            PrivateMessageSessionAdded.Fire(this, new PrivateMessageSessionEventArgs(tmpsession));
            return(tmpsession);
        }
Beispiel #2
0
        public void CreatePmForm(PrivateMessageSession pm)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<PrivateMessageSession>(CreatePmForm), pm);
            }
            else
            {
                var newPmForm = CompositionRoot.Resolve<PrivateMessageForm>();
                newPmForm.PMSession = pm;

                ServerTreeNode node = windowManagerTreeView.GetServerNode(pm.Server);

                node.AddPmNode(new PmTreeNode(newPmForm));
                node.Expand();
                newPmForm.MdiParent = this;
                newPmForm.Show();
                newPmForm.Enter += newForm_Enter;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Parts the specified channel
 /// </summary>
 /// <param name="context"></param>
 /// <param name="channel"></param>
 public void Execute(PrivateMessageSession context, ChannelInfo channel)
 {
     Execute(context.Server, channel, defaultMessage);
 }
Beispiel #4
0
 /// <summary>
 /// Parts the specified channel with the specified message
 /// </summary>
 /// <param name="context"></param>
 /// <param name="channel"></param>
 /// <param name="message"></param>
 public void Execute(PrivateMessageSession context, ChannelInfo channel, string message)
 {
     Execute(context.Server, channel, message);
 }
Beispiel #5
0
        private PrivateMessageSession GetPM(User user)
        {
            foreach (var session in PMSessions)
            {
                if (session.User.Equals(user))
                {
                    return session;
                }
            }

            var tmpsession = new PrivateMessageSession(this, user);
            PMSessions.Add(tmpsession);
            PrivateMessageSessionAdded.Fire(this, new PrivateMessageSessionEventArgs(tmpsession));
            return tmpsession;
        }
Beispiel #6
0
 public void Execute(PrivateMessageSession pm, string message)
 {
     pm.Send(message);
 }
Beispiel #7
0
 /// <summary>
 /// Joins you to the specified channel.
 /// </summary>
 public void Execute(PrivateMessageSession context, ChannelInfo channelToJoin)
 {
     Execute(context.Server, channelToJoin);
 }
Beispiel #8
0
 public PrivateMessageSessionEventArgs(PrivateMessageSession pmsession)
 {
     PrivateMessageSession = pmsession;
 }