本文整理汇总了C#中Windows.Storage.Pickers.FileOpenPicker.PickMultipleFilesAndContinue方法的典型用法代码示例。如果您正苦于以下问题:C# FileOpenPicker.PickMultipleFilesAndContinue方法的具体用法?C# FileOpenPicker.PickMultipleFilesAndContinue怎么用?C# FileOpenPicker.PickMultipleFilesAndContinue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Windows.Storage.Pickers.FileOpenPicker
的用法示例。
在下文中一共展示了FileOpenPicker.PickMultipleFilesAndContinue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: image_Click
private void image_Click(object sender, RoutedEventArgs e)
{
isPicure = true;
Config.pictrueType = 1;
image.IsEnabled = false;
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.FileTypeFilter.Add(".jpg");
openPicker.FileTypeFilter.Add(".png");
openPicker.ContinuationData["Operation"] = "ImageWeibo";
openPicker.PickMultipleFilesAndContinue();
}
示例2: PickFilesButton_Click
private void PickFilesButton_Click(object sender, RoutedEventArgs e)
{
// Clear any previously returned files between iterations of this scenario
OutputTextBlock.Text = "";
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.List;
openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
openPicker.FileTypeFilter.Add("*");
openPicker.PickMultipleFilesAndContinue();
}
示例3: LoadMultipleFilesButtonClick
private async void LoadMultipleFilesButtonClick(object sender, RoutedEventArgs e)
{
var picker = new FileOpenPicker
{
ViewMode = PickerViewMode.List,
SuggestedStartLocation = PickerLocationId.Desktop,
FileTypeFilter = { "*" }
};
#if WINDOWS_PHONE_APP
picker.PickMultipleFilesAndContinue();
#elif WINDOWS_APP
IReadOnlyList<StorageFile> files = await picker.PickMultipleFilesAsync();
foreach (var file in files)
{
DisplayFileName(file);
}
#endif
}
示例4: add
async void add()
{
try
{
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.List;
openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
openPicker.FileTypeFilter.Add("*");
openPicker.PickMultipleFilesAndContinue();
// Launch file open picker and caller app is suspended and may be terminated if required
//openPicker.PickSingleFileAndContinue();
}
catch (Exception e)
{
new MessageDialog(e.Message + e.StackTrace).ShowAsync();
}
}
示例5: StartMultipartUpload_Click
private void StartMultipartUpload_Click(object sender, RoutedEventArgs e)
{
// By default 'serverAddressField' is disabled and URI validation is not required. When enabling the text
// box validating the URI is required since it was received from an untrusted source (user input).
// The URI is validated by calling Uri.TryCreate() that will return 'false' for strings that are not valid URIs.
// Note that when enabling the text box users may provide URIs to machines on the intrAnet that require
// the "Home or Work Networking" capability.
Uri uri;
if (!Uri.TryCreate(serverAddressField.Text.Trim(), UriKind.Absolute, out uri))
{
rootPage.NotifyUser("Invalid URI.", NotifyType.ErrorMessage);
return;
}
FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*");
#if WINDOWS_PHONE_APP
picker.ContinuationData.Add("uri", uri.OriginalString);
picker.PickMultipleFilesAndContinue();
#else
StartMultipleFilesUpload(picker, uri);
#endif
}
示例6: AddButtonClick_OnClick
private async void AddButtonClick_OnClick(object sender, RoutedEventArgs e)
{
var picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".jpg");
picker.PickMultipleFilesAndContinue();
}
示例7: PerformAdd
private void PerformAdd()
{
var openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.List;
openPicker.FileTypeFilter.Add(".mp3");
openPicker.PickMultipleFilesAndContinue();
}
示例8: SelectFilesButton_Clicked
private void SelectFilesButton_Clicked(object sender, RoutedEventArgs e)
{
FileOpenPicker folderPicker = new FileOpenPicker();
folderPicker.SuggestedStartLocation = PickerLocationId.Downloads;
folderPicker.FileTypeFilter.Add(DeviceFirmwareUpdateSettingPageViewModel.ZipFile);
folderPicker.PickMultipleFilesAndContinue();
}
示例9: OpenFile
private void OpenFile()
{
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.List;
openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
foreach (string extension in handledExtensions)
{
openPicker.FileTypeFilter.Add(extension);
}
// Store this instance as the last caller of the continuation code
((App)(App.Current)).PickerCaller = this;
// Launch file open picker and caller app is suspended and may be terminated if required
openPicker.PickMultipleFilesAndContinue();
}