コード例 #1
0
        public async Task ReloadFoldersAsync()
        {
            ShowTreeViewLoadingIndicator();
            Directories.Clear();

            var data = await FolderManagerService.GetAllFolders();

            foreach (var item in data)
            {
                Directories.Add(item);
            }

            // wait for treeview to load data
            if (Directories.Count == 1)
            {
                await Task.Delay(500);

                treeView.Expand(treeView.RootNodes[0]);
            }

            foreach (var item in Directories)
            {
                PreviouslyAccessedDirectories.Add(item);
            }

            loadingTextBlock.Visibility = Visibility.Collapsed;
            HideTreeViewLoadingIndicator();
        }
コード例 #2
0
        private async void ImportImagesButton_Click(object sender, RoutedEventArgs e)
        {
            FolderItem folder = null;

            if (GetSelectedFolder() != null)
            {
                folder = GetSelectedFolder();
            }
            else
            {
                folder = await CreateFolderWithSelectedAsParentAsync("Imported images");
            }

            await FolderManagerService.PickAndImportImagesToFolder(folder);
        }
コード例 #3
0
 private async void TreeViewItemMenuFlyout_ImportImages(object sender, RoutedEventArgs e)
 {
     await FolderManagerService.PickAndImportImagesToFolder(GetSelectedFolder());
 }