Beispiel #1
0
        /// <summary>
        /// Shows a new <see cref="OpenMultipleFilesDialog" />.
        /// </summary>
        /// <param name="dialogHost">The <see cref="DialogHost" /></param>
        /// <param name="args">The arguments for the dialog initialization</param>
        /// <returns></returns>
        public static async Task <OpenMultipleFilesDialogResult> ShowDialogAsync(DialogHost dialogHost, OpenMultipleFilesDialogArguments args)
        {
            OpenMultipleFilesDialog dialog = InitDialog(
                args.Width,
                args.Height,
                args.CurrentDirectory,
                args.Filters,
                args.FilterIndex,
                args.ShowHiddenFilesAndDirectories,
                args.ShowSystemFilesAndDirectories
                );

            return(await dialogHost.ShowDialog(dialog, args.OpenedHandler, args.ClosingHandler) as OpenMultipleFilesDialogResult);
        }
        /// <summary>
        /// Shows a new <see cref="OpenMultipleFilesDialog" />.
        /// </summary>
        /// <param name="dialogHostName">The name of the <see cref="DialogHost" /></param>
        /// <param name="args">The arguments for the dialog initialization</param>
        /// <returns></returns>
        public static async Task <OpenMultipleFilesDialogResult> ShowDialogAsync(string dialogHostName, OpenMultipleFilesDialogArguments args)
        {
            OpenMultipleFilesDialog dialog = InitDialog(
                args.Width,
                args.Height,
                args.CurrentDirectory,
                args.Filters,
                args.FilterIndex,
                args.ShowHiddenFilesAndDirectories,
                args.ShowSystemFilesAndDirectories,
                args.SwitchPathPartsAsButtonsEnabled,
                args.PathPartsAsButtons
                );

            return(await DialogHost.Show(dialog, dialogHostName, args.OpenedHandler, args.ClosingHandler) as OpenMultipleFilesDialogResult);
        }