本文整理汇总了C#中IrcMessageEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# IrcMessageEventArgs类的具体用法?C# IrcMessageEventArgs怎么用?C# IrcMessageEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IrcMessageEventArgs类属于命名空间,在下文中一共展示了IrcMessageEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNickInUse
/// <summary>
/// Raises the NickCollision event.
/// </summary>
protected internal void OnNickInUse(IrcMessageEventArgs<NickInUseMessage> e)
{
if (this.NickInUse != null)
{
this.NickInUse(this, e);
}
}
示例2: ClientIsOnReply
private void ClientIsOnReply(object sender, IrcMessageEventArgs<IsOnReplyMessage> e)
{
foreach (string onlineNick in e.Message.Nicks)
{
if (this._waitingOnNicks.Contains(onlineNick))
{
this._waitingOnNicks.Remove(onlineNick);
}
User knownUser;
if (this.Contacts.Users.TryGetValue(onlineNick, out knownUser))
{
knownUser.Online = true;
}
else if (this._trackedNicks.Contains(onlineNick))
{
this._trackedNicks.Remove(onlineNick);
}
}
foreach (var offlineUser in this._waitingOnNicks.Select(nick => this.Contacts.Users[nick]))
{
offlineUser.Online = false;
}
this._waitingOnNicks.Clear();
}
示例3: OnNickCollision
/// <summary>
/// Raises the NickCollision event.
/// </summary>
protected internal void OnNickCollision(IrcMessageEventArgs<NickCollisionMessage> e)
{
if (this.NickCollision != null)
{
this.NickCollision(this, e);
}
}
示例4: OnErroneusNick
/// <summary>
/// Raises the ErroneusNick event.
/// </summary>
protected internal void OnErroneusNick(IrcMessageEventArgs<ErroneusNickMessage> e)
{
if (this.ErroneusNick != null)
{
this.ErroneusNick(this, e);
}
}
示例5: OnGenericErrorMessage
/// <summary>
/// Raises the GenericErrorMessage event.
/// </summary>
protected internal void OnGenericErrorMessage(IrcMessageEventArgs<GenericErrorMessage> e)
{
if (this.GenericErrorMessage != null)
{
this.GenericErrorMessage(this, e);
}
}
示例6: client_IsOnReply
void client_IsOnReply( object sender, IrcMessageEventArgs<IsOnReplyMessage> e )
{
foreach ( String onlineNick in e.Message.Nicks )
{
if ( waitingOnNicks.Contains( onlineNick ) )
{
waitingOnNicks.Remove( onlineNick );
}
User knownUser = Contacts.Users.Find( onlineNick );
if ( knownUser != null && knownUser.OnlineStatus == UserOnlineStatus.Offline )
{
knownUser.OnlineStatus = UserOnlineStatus.Online;
}
if ( knownUser == null && trackedNicks.Contains( onlineNick ) )
{
trackedNicks.Remove( onlineNick );
}
}
foreach ( String nick in waitingOnNicks )
{
User offlineUser = Contacts.Users.Find( nick );
offlineUser.OnlineStatus = UserOnlineStatus.Offline;
waitingOnNicks.Remove( nick );
}
}
示例7: client_WatchedUserOnline
void client_WatchedUserOnline( object sender, IrcMessageEventArgs<WatchedUserOnlineMessage> e )
{
User knownUser = Contacts.Users.Find( e.Message.WatchedUser.Nick );
if ( knownUser != null && knownUser.OnlineStatus == UserOnlineStatus.Offline )
{
knownUser.OnlineStatus = UserOnlineStatus.Online;
}
}
示例8: client_MonitoredUserOffline
void client_MonitoredUserOffline( object sender, IrcMessageEventArgs<MonitoredUserOfflineMessage> e )
{
foreach ( String offlineNick in e.Message.Nicks )
{
User knownUser = this.Contacts.Users.Find( offlineNick );
if ( knownUser != null )
{
knownUser.OnlineStatus = UserOnlineStatus.Offline;
}
}
}
示例9: ClientMonitoredUserOffline
private void ClientMonitoredUserOffline(object sender, IrcMessageEventArgs<MonitoredUserOfflineMessage> e)
{
foreach (var offlineNick in e.Message.Nicks)
{
User knownUser;
if (this.Contacts.Users.TryGetValue(offlineNick, out knownUser))
{
knownUser.Online = false;
}
}
}
示例10: ClientMonitoredUserOnline
private void ClientMonitoredUserOnline(object sender, IrcMessageEventArgs<MonitoredUserOnlineMessage> e)
{
foreach (var onlineUser in e.Message.Users.Values)
{
User knownUser;
if (this.Contacts.Users.TryGetValue(onlineUser.Nickname, out knownUser))
{
knownUser.CopyFrom(onlineUser);
knownUser.Online = true;
}
}
}
示例11: client_MonitoredUserOnline
void client_MonitoredUserOnline( object sender, IrcMessageEventArgs<MonitoredUserOnlineMessage> e )
{
foreach ( User onlineUser in e.Message.Users )
{
User knownUser = this.Contacts.Users.Find( onlineUser.Nick );
if ( knownUser != null )
{
knownUser.MergeWith( onlineUser );
if ( knownUser.OnlineStatus == UserOnlineStatus.Offline )
{
knownUser.OnlineStatus = UserOnlineStatus.Online;
}
}
}
}
示例12: IrcClient_LocalUser_MessageReceived
private void IrcClient_LocalUser_MessageReceived(object sender, IrcMessageEventArgs e)
{
var localUser = (IrcLocalUser)sender;
if (e.Source is IrcUser)
{
// Read message and process if it is chat command.
if (ReadChatCommand(localUser.Client, e))
return;
}
OnLocalUserMessageReceived(localUser, e);
}
示例13: IrcClient_Channel_NoticeReceived
private void IrcClient_Channel_NoticeReceived(object sender, IrcMessageEventArgs e)
{
var channel = (IrcChannel)sender;
OnChannelNoticeReceived(channel, e);
}
示例14: IrcClient_Channel_MessageReceived
private void IrcClient_Channel_MessageReceived(object sender, IrcMessageEventArgs e)
{
var channel = (IrcChannel)sender;
if (e.Source is IrcUser)
{
// Read message and process if it is chat command.
if (ReadChatCommand(channel.Client, e))
return;
}
OnChannelMessageReceived(channel, e);
}
示例15: OnLocalUserNoticeReceived
protected abstract void OnLocalUserNoticeReceived(IrcLocalUser localUser, IrcMessageEventArgs e);