Exemple #1
0
 private static void OnOffline(User user)
 {
     EventHandler<MKTwitchEventArgs> handler = OffLine;
     if (handler != null)
     {
         handler.Invoke(null, new MKTwitchEventArgs { User = user});
     }
 }
 private void FillInToast(User user)
 {
     toast.DisplayName = user.Name;
     toast.Game = user.Game;
     toast.Viewers = user.NumViewers;
     toast.StreamCreatedAt = user.StreamCreatedAt;
     toast.IsLive = user.IsStreaming;
     toast.Thumbnail = user.Thumbnail;
     toast.Link = user.Link;
 }
Exemple #3
0
 public static void TriggerOffline(User user)
 {
     OnOnline(user);
 }
 private void FillInToast(User user)
 {
     toast.DisplayName = user.Name;
     toast.Game = user.Game;
     toast.Viewers = user.NumViewers;
     toast.StreamCreatedAt = user.StreamCreatedAt;
     toast.IsLive = user.IsStreaming;
     toast.Thumbnail = user.Thumbnail;
     toast.Link = user.Link;
     toast.Status = user.Status;
     toast.NumberLiveStreaming = MKTwitch.followedUsers.Count(i => i.IsStreaming);
 }
Exemple #5
0
 /// <summary>
 /// Invoked whenever the user UnFollows a streamer
 /// </summary>
 /// <param name="user"></param>
 private static void OnUnfollowed(User user)
 {
     EventHandler<MKTwitchEventArgs> handler = Unfollowed;
     handler?.Invoke(null, new MKTwitchEventArgs() { User = user });
 }
Exemple #6
0
 /// <summary>
 /// Invoked when a streamer changes their Status
 /// </summary>
 /// <param name="user"></param>
 /// <param name="newStatus"></param>
 /// <param name="oldStatus"></param>
 private static void OnStatusChanged(User user, string newStatus, string oldStatus)
 {
     EventHandler<MKTwitchEventArgs> handler = StatusChanged;
     handler?.Invoke(null, new MKTwitchEventArgs() {User = user, NewStatus = newStatus, OldStatus = oldStatus });
 }
Exemple #7
0
 /// <summary>
 /// Invoked when a streamer changes their Game
 /// </summary>
 /// <param name="user"></param>
 /// <param name="newGame"></param>
 private static void OnGameChanged(User user, string newGame, string oldGame)
 {
     EventHandler<MKTwitchEventArgs> handler = GameChanged;
     handler?.Invoke(null, new MKTwitchEventArgs() {User = user, NewGame = newGame, OldGame = oldGame});
 }
Exemple #8
0
 /// <summary>
 /// Invoked when a streamer goes Offline (Stops Streaming)
 /// </summary>
 /// <param name="user"></param>
 /// <param name="displayToast"></param>
 private static void OnOffline(User user,bool displayToast=true)
 {
     EventHandler<MKTwitchEventArgs> handler = OffLine;
     handler?.Invoke(null, new MKTwitchEventArgs{ User = user, DisplayToast = displayToast});
 }