Example #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());
        }
Example #2
0
        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());
        }
        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;
            }
        }