Ejemplo n.º 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();
     }
 }