コード例 #1
0
        public DashboardViewModel(
            IEventAggregator eventAggregator,
            IInteractionService interactionService,
            IDialogService dialogService,
            IModuleManager moduleManager)
        {
            this.dialogOpener = new DialogOpener(moduleManager, dialogService, interactionService);

            this.interactionService = interactionService;
            this.dialogService      = dialogService;
            this.moduleManager      = moduleManager;

            this.ShowAppAttachDialog    = new DelegateCommand(this.OnShowAppAttachDialog);
            this.ShowAppInstallerDialog = new DelegateCommand <object>(this.OnShowAppInstallerDialog);
            this.ShowWingetDialog       = new DelegateCommand <object>(this.OnShowWingetDialog);

            this.ShowPackDialog  = new DelegateCommand(this.OnShowPackDialog);
            this.ShowNamesDialog = new DelegateCommand(this.OnShowNamesDialog);
            this.ShowModificationPackageDialog = new DelegateCommand(this.OnShowModificationPackageDialog);
            this.ShowUnpackDialog             = new DelegateCommand(this.OnShowUnpackDialog);
            this.ShowUpdateImpactDialog       = new DelegateCommand(this.OnShowUpdateImpactDialog);
            this.ShowDependencyGraphDialog    = new DelegateCommand(this.OnShowDependencyGraphDialog);
            this.ShowNewSelfSignedDialog      = new DelegateCommand(this.OnShowNewSelfSignedDialog);
            this.ShowExtractCertificateDialog = new DelegateCommand(this.OnShowExtractCertificateDialog);
            this.ShowSignPackageDialog        = new DelegateCommand(this.OnShowSignPackageDialog);
            this.OpenFileDialog         = new DelegateCommand(this.OnOpenFileDialog);
            this.OpenMsixDialog         = new DelegateCommand(this.OnOpenMsixDialog);
            this.OpenCertificateManager = new DelegateCommand <object>(param => this.OnOpenCertificateManager(param is bool boolParam && boolParam));
            this.OpenAppsFeatures       = new DelegateCommand(this.OnOpenAppsFeatures);
            this.OpenDevSettings        = new DelegateCommand(this.OnOpenDevSettings);

            eventAggregator.GetEvent <UiExecutedEvent <SetToolFilterCommand> >().Subscribe(this.OnSetToolFilterCommand);
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: jaelys/MSIX-Hero
 public MainWindow(IModuleManager moduleManager, IDialogService dialogService, IInteractionService interactionService)
 {
     this.moduleManager = moduleManager;
     this.dialogService = dialogService;
     InitializeComponent();
     this.Loaded      += OnLoaded;
     this.dialogOpener = new DialogOpener(moduleManager, dialogService, interactionService);
 }
コード例 #3
0
    public static DialogOpener instance; // Assuming the last one will always be the one we need, not using a constructor

    void Awake()
    {
        instance = this;
    }