Ejemplo n.º 1
0
 /// <summary>
 ///     Handles the IStorageProvider's OnTvShowRemoved event.
 /// </summary>
 /// <param name="sender">
 ///     The sender of the event.
 /// </param>
 /// <param name="e">
 ///     The arguments of the event.
 /// </param>
 private void OnTvShowRemoved(object sender, TvShowEventArgs e)
 {
     if (TvShowRemoved != null)
     {
         TvShowRemoved(sender, e);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Handles a TV show being removed.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The arguments of the event.</param>
 private void TvShowRemoved(object sender, TvShowEventArgs e)
 {
     if (tvShows.Contains(e.TvShow))
     {
         tvShows.Remove(e.TvShow);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Handles the controller's ShowChanged event.
 /// </summary>
 /// <param name="sender">
 ///     The sender of the event.
 /// </param>
 /// <param name="e">
 ///     The arguments of the event.
 /// </param>
 private void ShowChanged(object sender, TvShowEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new Action(() => ShowChanged(sender, e)));
     }
     else
     {
         tvShowsList.Refresh();
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Handles the controller's ShowChanged event.
 /// </summary>
 /// <param name="sender">
 /// The sender of the evetn.
 /// </param>
 /// <param name="e">
 /// The arguments of the event.
 /// </param>
 private void ShowChanged(object sender, TvShowEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action(() => this.ShowChanged(sender, e)));
     }
     else
     {
         this.tvShowsList.Refresh();
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Handles the TVShow's OnTvShowRemoved event.
 /// </summary>
 /// <param name="sender">
 /// The sender of the event.
 /// </param>
 /// <param name="e">
 /// The arguments of the event.
 /// </param>
 private void OnTvShowRemoved(object sender, TvShowEventArgs e)
 {
     this.Shows.Remove(e.TvShow);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Handles the TVShow's OnTvShowChanged event.
        /// </summary>
        /// <param name="sender">
        /// The sender of the event.
        /// </param>
        /// <param name="e">
        /// The arguments of the event.
        /// </param>
        private void OnTvShowChanged(object sender, TvShowEventArgs e)
        {
            int index = this.Shows.IndexOf(e.TvShow);
            if (index != -1)
            {
                this.Shows[index] = e.TvShow;
                if (e.TvShow.Equals(this.SelectedShow))
                {
                    this.SelectedShow = e.TvShow;
                }
            }
            else
            {
                this.Shows.Add(e.TvShow);
            }

            if (this.ShowChanged != null)
            {
                this.ShowChanged(sender, e);
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Handles the TVShow's OnTvShowAdded event.
 /// </summary>
 /// <param name="sender">
 /// The sender of the event.
 /// </param>
 /// <param name="e">
 /// The arguments of the event.
 /// </param>
 private void OnTvShowAdded(object sender, TvShowEventArgs e)
 {
     this.Shows.Add(e.TvShow);
 }
Ejemplo n.º 8
0
 /// <summary>
 ///     Handles a TV show being added.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The arguments of the event.</param>
 private void TvShowAdded(object sender, TvShowEventArgs e)
 {
     tvShows.Add(e.TvShow);
 }