Ejemplo n.º 1
0
 private void C_LiveThreadUpdated(object sender, LiveThreadUpdateEventArgs e)
 {
     try
     {
         Assert.AreNotEqual(e.OldThread.NSFW, e.NewThread.NSFW);
         LiveThreadUpdated = true;
     } catch (AssertFailedException) { }
 }
Ejemplo n.º 2
0
        private void CheckLiveThread()
        {
            LiveThread newThread = About();

            if (Diff(newThread))
            {
                // Event handler to alert the calling app that the object has changed.  --Kris
                LiveThreadUpdateEventArgs args = new LiveThreadUpdateEventArgs
                {
                    OldThread = this,
                    NewThread = newThread
                };
                OnThreadUpdated(args);
            }
        }
Ejemplo n.º 3
0
 protected virtual void OnThreadUpdated(LiveThreadUpdateEventArgs e)
 {
     ThreadUpdated?.Invoke(this, e);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// If automatic monitoring of the thread (not updates or contributors) is enabled, this callback will apply any changes to this instance.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void C_ApplyThreadUpdates(object sender, LiveThreadUpdateEventArgs e)
 {
     Import(e.NewThread.EventData);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// If automatic monitoring of the thread (not updates or contributors) is enabled, this callback will apply any changes to this instance.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void C_ApplyThreadUpdates(object sender, LiveThreadUpdateEventArgs e)
 {
     Import(e.NewThread.Id, e.NewThread.Description, e.NewThread.NSFW, e.NewThread.Resources, e.NewThread.Title, e.NewThread.TotalViews,
            e.NewThread.Created, e.NewThread.Fullname, e.NewThread.WebsocketURL, e.NewThread.AnnouncementURL, e.NewThread.State, e.NewThread.ViewerCount,
            e.NewThread.Icon);
 }