コード例 #1
0
 public void PlayAllDisks(Library.Code.V3.MovieItem item)
 {
     if (this.Enabled)
     {
         string itemRating = item.TitleObject.ParentalRating.ToUpperInvariant().Replace("-", "");
         if (!string.IsNullOrEmpty(itemRating) && itemRating != "UNRATED")
         {
             if (MCMovieRatings.ContainsKey(itemRating) && MCMovieRatings[itemRating] > this.MaxAllowed)
             {
                 controls.PromptForPin(delegate(bool goodPin)
                 {
                     if (goodPin)
                     {
                         item.PlayAllDisks();
                     }
                 });
             }
             else
             {
                 item.PlayAllDisks();
             }
         }
         else
         {
             if (this.BlockUnrated)
             {
                 controls.PromptForPin(delegate(bool goodPin)
                 {
                     if (goodPin)
                     {
                         item.PlayAllDisks();
                     }
                 });
             }
             else
             {
                 item.PlayAllDisks();
             }
         }
     }
     else
     {
         item.PlayAllDisks();
     }
 }
コード例 #2
0
 public void DeleteTitle(Library.Code.V3.MovieItem item)
 {
     foreach (Disk d in item.TitleObject.Disks)
     {
         string status = deleteDisk(d);
         if (!string.IsNullOrEmpty(status))
         {
             this.MediaCenterEnvironment.Dialog(
                 string.Format("Unable to delete this movie: {0}", status),
                 "Failed", DialogButtons.Ok, 5, false);
             return;
         }
         else
         {
             TitleCollectionManager.DeleteTitle(item.TitleObject);
         }
     }
 }
コード例 #3
0
 public bool ItemIsAllowed(Library.Code.V3.MovieItem item)
 {
     if (this.Enabled)
     {
         string itemRating = item.TitleObject.ParentalRating.ToUpperInvariant();
         if (string.IsNullOrEmpty(itemRating))
         {
             if (MCMovieRatings[itemRating] <= this.MaxAllowed)
             {
                 return(true);
             }
         }
         else
         {
             if (this.BlockUnrated)
             {
                 return(false);
             }
         }
     }
     return(true);
 }