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); }
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); }
public static DialogOpener instance; // Assuming the last one will always be the one we need, not using a constructor void Awake() { instance = this; }