Exemplo n.º 1
0
 private static void OnOffline(User user)
 {
     EventHandler<MKTwitchEventArgs> handler = OffLine;
     if (handler != null)
     {
         handler.Invoke(null, new MKTwitchEventArgs { User = user});
     }
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public static void TriggerOffline(User user)
 {
     OnOnline(user);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 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 });
 }
Exemplo n.º 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 });
 }
Exemplo n.º 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});
 }
Exemplo n.º 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});
 }