Пример #1
0
        public void TEST_DELETE_DISK()
        {
            Console.WriteLine("Starting to delete disks");

            Title deleteTitle = null;

            foreach (Title title in TitleCollectionManager.GetAllTitles())
            {
                deleteTitle = title;
                break;
            }

            int titleId = deleteTitle.Id;

            TitleCollectionManager.DeleteTitle(deleteTitle);

            Console.WriteLine("Done deleting " + titleId.ToString());
        }
Пример #2
0
 public void DeleteTitle(Library.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 void DeleteTitle(OMLEngine.Title item)
        {
            foreach (Disk d in item.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);
                }
            }
            TitleEventArgs t = new TitleEventArgs(item);

            this.OnTitleDeleted(t);
        }