Exemple #1
0
        private void subfolder_click(object sender, DoubleTappedRoutedEventArgs e)
        {
            FolderContent subfolder = (FolderContent)listView.SelectedItem;

            if (folder_handler.SubfolderSearch(subfolder))
            {
                folder_handler.PopulateViewList();
                listView.ItemsSource = folder_handler.ViewContentList;
            }
        }
Exemple #2
0
 internal bool SubfolderSearch(FolderContent fc)
 {
     foreach (StorageFolder folder in folderList)
     {
         if (folder.Name == fc.Name)
         {
             root_folder = folder;
             return(true);
         }
     }
     return(false);
 }
Exemple #3
0
        private async void delete_click(object sender, RoutedEventArgs e)
        {
            try
            {
                FolderContent subfolder = (FolderContent)(e.OriginalSource as FrameworkElement).DataContext;
                if (subfolder.FileType == "Folder")
                {
                    StorageFolder folder = await folder_handler.Root().GetFolderAsync(subfolder.Name);

                    await folder.DeleteAsync();

                    folder_handler.PopulateViewList();
                    listView.ItemsSource = folder_handler.ViewContentList;
                    Error_tb.Text        = "";
                }
            }
            catch (Exception)
            {
                Error_tb.Text = "Can't delete folder.";
            }
        }