// TODO Are two images on the medium sized widgets still required?

        public DashboardController(
            [NotNull] IUiContext uiContext,
            [NotNull] IDashboardService dashboardService,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (dashboardService == null)
            {
                throw new ArgumentNullException(nameof(dashboardService));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.chooseBudgetBucketController              = uiContext.ChooseBudgetBucketController;
            this.createNewFixedBudgetController            = uiContext.CreateNewFixedBudgetController;
            this.createNewSurprisePaymentMonitorController = uiContext.CreateNewSurprisePaymentMonitorController;
            GlobalFilterController = uiContext.GlobalFilterController;

            this.uiContext        = uiContext;
            this.dashboardService = dashboardService;

            this.chooseBudgetBucketController.Chosen                += OnBudgetBucketChosenForNewBucketMonitor;
            this.createNewFixedBudgetController.Complete            += OnCreateNewFixedProjectComplete;
            this.createNewSurprisePaymentMonitorController.Complete += OnCreateNewSurprisePaymentMonitorComplete;

            CorrelationId = Guid.NewGuid();

            RegisterForMessengerNotifications(uiContext.Messenger);
        }
Esempio n. 2
0
 private static void OnAddNewBucketMonitorWidgetCommandExecute(Guid correlationId)
 {
     ChooseBudgetBucketController.Filter(b => b is ExpenseBucket, "Expense Buckets");
     ChooseBudgetBucketController.ShowDialog(BudgetAnalyserFeature.Dashboard, "New Budget Bucket Monitor Widget", correlationId);
 }