private async void AbbSelect_Click(object sender, RoutedEventArgs e)
        {
            switch (picking.Type)
            {
            case FileSystemPickType.Folder:
                picking.SetResult(pcView.CurrentFolder?.FullPath);
                Frame.GoBack();
                break;

            case FileSystemPickType.FileSave:
                picking.SuggestedStartLocation = pcView.CurrentFolder?.FullPath;

                NamePicking namePicking = NamePicking.ForFile(picking.Api,
                                                              pcView.CurrentFolder?.FullPath, picking.SuggestedFileName);
                Frame.Navigate(typeof(NamePickerPage), namePicking);

                string name = await namePicking.Task;

                if (!namePicking.Task.IsCompleted)
                {
                    return;
                }

                string path = Utils.JoinPaths(pcView.CurrentFolder?.FullPath, name);
                picking.SetResult(path);
                Frame.GoBack();
                break;
            }
        }
Ejemplo n.º 2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            picking = (NamePicking)e.Parameter;

            if (!string.IsNullOrWhiteSpace(picking.Suggestion))
            {
                tbxName.Text = picking.Suggestion;
            }
        }