コード例 #1
0
        private void OpenExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            // ReSharper disable once StringLiteralTypo
            var filterBuilder = new DialogFilterBuilder("*.msix", "*.appx", "appxmanifest.xml", "*.yaml");

            this.dialogOpener.ShowFileDialog(filterBuilder.BuildFilter());
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: jaelys/MSIX-Hero
        private void OpenExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            // ReSharper disable once StringLiteralTypo
            var filterBuilder = new DialogFilterBuilder("*" + FileConstants.MsixExtension, "*" + FileConstants.AppxExtension, FileConstants.AppxManifestFile, "*" + FileConstants.WingetExtension, "*" + FileConstants.AppInstallerExtension);

            this.dialogOpener.ShowFileDialog(filterBuilder.BuildFilter());
        }
コード例 #3
0
        private void OnShowAppInstallerDialog(object commandParameter)
        {
            if (!(commandParameter is DialogTarget dialogTarget))
            {
                dialogTarget = DialogTarget.Selection;
            }

            switch (dialogTarget)
            {
            case DialogTarget.Empty:
                this.OpenEmptyDialog(
                    ModuleNames.Dialogs.AppInstaller,
                    NavigationPaths.DialogPaths.AppInstallerEditor);
                break;

            case DialogTarget.Ask:

                var filterBuilder = new DialogFilterBuilder("*" + FileConstants.AppInstallerExtension);
                this.OpenBrowseDialog(
                    ModuleNames.Dialogs.AppInstaller,
                    NavigationPaths.DialogPaths.AppInstallerEditor,
                    "file",
                    filterBuilder.BuildFilter());
                break;

            case DialogTarget.Selection:
                this.OpenSelectionDialog(
                    ModuleNames.Dialogs.AppInstaller,
                    NavigationPaths.DialogPaths.AppInstallerEditor);
                break;
            }
        }