protected override void LoadState(Object param, Dictionary <String, Object> state)
        {
            int            id    = (int)param;
            VideoDataGroup group = VideoDataSource.GetGroup(id);

            DefaultViewModel["Items"] = group.Items;
            pageTitle.Text            = group.Title;
        }
Пример #2
0
 public int AddFile(StorageFile file, int groupID)
 {
     if (file != null && VideoExtensions.Contains(file.FileType))
     {
         IEnumerable <VideoDataItem> matches = VideoDataSource.GetGroup(groupID).Items.Where(itm => itm.Path.Equals(file.Path));
         if (matches.Count() > 0)
         {
             return(matches.First().ID);
         }
         VideoDataItem item = new VideoDataItem(VideoDataSource.NextID(), String.Empty, String.Empty, file);
         VideoDataSource.GetGroup(groupID).Items.Add(item);
         item.SetImage("ms-appx:///Assets/Thumbnail.png");
         AddThumbnail(file, item);
         return(item.ID);
     }
     return(-1);
 }
Пример #3
0
 public void ClearRecentlyUsed()
 {
     StorageApplicationPermissions.MostRecentlyUsedList.Clear();
     VideoDataSource.GetGroup(0).Items.Clear();
 }