Provides data for events that specify a name.
Inheritance: System.EventArgs
Esempio n. 1
0
        /// <summary>
        /// Raises the <see cref="Quit"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcCommentEventArgs"/> instance containing the event data.</param>
        protected virtual void OnQuit(IrcCommentEventArgs e)
        {
            var handler = this.Quit;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
        void OnUserQuit(object sender, IrcCommentEventArgs e)
        {
            var ircUser = (IrcUser)sender;
            IrcUsers.Remove(ircUser);

            if (!String.IsNullOrEmpty(Config.IRCQuitMessageFormat))
                TShock.Utils.Broadcast(String.Format(Config.IRCQuitMessageFormat, ircUser.NickName, e.Comment), Color.Yellow);
        }
Esempio n. 3
0
 /// <summary>
 ///     Raises the <see cref="Quit" /> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcCommentEventArgs" /> instance containing the event data.</param>
 protected virtual void OnQuit(IrcCommentEventArgs e)
 {
     var handler = Quit;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 4
0
 protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e)
 {
     Console.WriteLine("Quit: {0}",e.Comment);
 }
Esempio n. 5
0
 /// <summary>
 /// Raises the <see cref="NetworkInformationReceived"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcCommentEventArgs"/> instance containing the event data.</param>
 protected virtual void OnNetworkInformationReceived(IrcCommentEventArgs e)
 {
     var handler = this.NetworkInformationReceived;
     if (handler != null)
         handler(this, e);
 }
        void ircUser_Quit(object sender, IrcCommentEventArgs e)
        {
            IrcUser ircUser = (IrcUser)sender;
            INetwork connection = this.connections[ircUser.Client];
            IUser user = this.users[ircUser];

            DestroyUser(ircUser);

            Application.Current.Dispatcher.InvokeAsync(() =>
            {
                Quit quit = new Quit(connection, null, user, e.Comment);
                connection.Channels.ForEach(c => c.Log.Add(quit));
                this.client.Log.Add(quit);
            });
        }
Esempio n. 7
0
 protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
Esempio n. 8
0
        protected void IrcClient_LocalUser_Quit(object sender, IrcCommentEventArgs e)
        {
            var user = (IrcLocalUser) sender;

            OnLocalUserQuit(user, e);
        }
Esempio n. 9
0
        private void User_Quit(object sender, IrcCommentEventArgs e)
        {
            var user = sender as IrcUser;

            foreach (IrcChannelUser cuser in user.GetChannelUsers())
                cuser.ModesChanged -= User_ModesChanged;
            GUserLeft(user, e.Comment, connection.Channels);
        }