Exemplo n.º 1
0
        /// <summary>
        /// 往某个类别的访问列表里添加项
        /// </summary>
        /// <param name="folder">要添加到访问列表的文件夹</param>
        /// <param name="groupTitle">添加到的类别</param>
        /// <returns>新添加 AccessItem </returns>
        public MPathAccessItem AppendAccessLocation(StorageFolder folder, string groupTitle)
        {
            var token = Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.Add(folder);

            var destGroup = _rootObject.groupList.First(p => p.Title == groupTitle);
            var newItem   = new MPathAccessItem {
                token = token, displayPath = folder.Name
            };

            if (destGroup.itemLists == null)
            {
                destGroup.itemLists = new List <MPathAccessItem>();
            }
            destGroup.itemLists.Add(newItem);

            isModify = true;

            return(newItem);
        }
Exemplo n.º 2
0
 public void SetLostLocation(MPathAccessItem item)
 {
     throw new NotImplementedException();
 }