protected virtual void OnUserChangedChannnel(ChannelChangedEventArgs e) { var result = this.UserChangedChannel; if (result != null) { result(this, e); } }
protected virtual void OnUserChangedChannnel(ChannelChangedEventArgs e) { var result = this.UserChangedChannel; if (result != null) result (this, e); }
private void UsersUserChangedChannel (object sender, ChannelChangedEventArgs e) { if (e.User.Equals (gablarski.CurrentUser)) { if (musicSource != null) { gablarski.Audio.EndCapture (musicSource); gablarski.Audio.BeginCapture (musicSource, e.TargetChannel); } else if (voiceSource != null && !Settings.UsePushToTalk) { gablarski.Audio.EndCapture (voiceSource); gablarski.Audio.BeginCapture (voiceSource, e.TargetChannel); } } this.users.RemoveUser (e.User); this.users.AddUser (e.User, gablarski.Sources[e.User]); }
private void OnUserChangedChannel(object sender, ChannelChangedEventArgs e) { if (e.User.Equals (client.CurrentUser)) Notify (NotificationType.SwitchedChannel, "Switched to channel " + e.TargetChannel.Name + "."); else if (e.TargetChannel.Equals (client.CurrentChannel)) Notify (NotificationType.UserJoinedChannel, "{0} joined the channel.", e.User.Nickname, e.User.Phonetic); else if (e.PreviousChannel.Equals (client.CurrentChannel)) Notify (NotificationType.UserLeftChannel, "{0} left the channel.", e.User.Nickname, e.User.Phonetic); }