Provides data for events that specify a name.
상속: System.EventArgs
예제 #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);
            }
        }
예제 #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);
        }
예제 #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);
 }
예제 #4
0
 protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e)
 {
     Console.WriteLine("Quit: {0}",e.Comment);
 }
예제 #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);
 }
예제 #6
0
        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);
            });
        }
예제 #7
0
파일: IrcBot.cs 프로젝트: gkinsman/StatsBot
 protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
예제 #8
0
파일: IrcBot.cs 프로젝트: gkinsman/StatsBot
        protected void IrcClient_LocalUser_Quit(object sender, IrcCommentEventArgs e)
        {
            var user = (IrcLocalUser) sender;

            OnLocalUserQuit(user, e);
        }
예제 #9
0
파일: Command.cs 프로젝트: charla-n/BIRC
        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);
        }