public UploadMobileDataController(
            [NotNull] IUiContext uiContext,
            [NotNull] IMobileDataExporter dataExporter,
            [NotNull] IMobileDataUploader uploader,
            [NotNull] IApplicationDatabaseService appDbService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }
            if (dataExporter == null)
            {
                throw new ArgumentNullException(nameof(dataExporter));
            }
            if (uploader == null)
            {
                throw new ArgumentNullException(nameof(uploader));
            }
            if (appDbService == null)
            {
                throw new ArgumentNullException(nameof(appDbService));
            }
            this.dataExporter      = dataExporter;
            this.uploader          = uploader;
            this.appDbService      = appDbService;
            MessengerInstance      = uiContext.Messenger;
            this.messageBoxService = uiContext.UserPrompts.MessageBox;
            this.logger            = uiContext.Logger;

            MessengerInstance.Register <WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnShellDialogMessageReceived);
        }
예제 #2
0
        public PersistenceOperations(
            [NotNull] IApplicationDatabaseService applicationDatabaseService,
            [NotNull] DemoFileHelper demoFileHelper,
            [NotNull] IUiContext uiContext)
        {
            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

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

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

            this.uiContext = uiContext;
            this.applicationDatabaseService = applicationDatabaseService;
            this.demoFileHelper             = demoFileHelper;

            this.uiContext.Messenger.Register <PasswordSetMessage>(this, OnPasswordSetMessageReceived);
        }
        public PersistenceOperations(
            [NotNull] IApplicationDatabaseService applicationDatabaseService,
            [NotNull] DemoFileHelper demoFileHelper,
            [NotNull] IUiContext uiContext)
        {
            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

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

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

            this.uiContext = uiContext;
            this.applicationDatabaseService = applicationDatabaseService;
            this.demoFileHelper = demoFileHelper;

            this.uiContext.Messenger.Register<PasswordSetMessage>(this, OnPasswordSetMessageReceived);
        }
예제 #4
0
        public RulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;

            this.questionBox = uiContext.UserPrompts.YesNoBox;
            NewRuleController = uiContext.NewRuleController;
            MessengerInstance = uiContext.Messenger;

            this.ruleService.Closed += OnClosedNotificationReceived;
            this.ruleService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
예제 #5
0
        public RulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;

            this.questionBox  = uiContext.UserPrompts.YesNoBox;
            NewRuleController = uiContext.NewRuleController;
            MessengerInstance = uiContext.Messenger;

            this.ruleService.Closed += OnClosedNotificationReceived;
            this.ruleService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
예제 #6
0
        public ReconciliationToDoListController([NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.applicationDatabaseService = applicationDatabaseService;
        }
        public ReconciliationToDoListController([NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.applicationDatabaseService = applicationDatabaseService;
        }
        public EncryptFileController([NotNull] IUiContext uiContext, [NotNull] IApplicationDatabaseService appDbService)
        {
            this.appDbService = appDbService;
            if (uiContext == null) throw new ArgumentNullException(nameof(uiContext));
            if (appDbService == null) throw new ArgumentNullException(nameof(appDbService));
            this.questionService = uiContext.UserPrompts.YesNoBox;
            this.messageService = uiContext.UserPrompts.MessageBox;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register<WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDiaglogResponseMessageReceived);
        }
        public DisusedRulesController(IMessenger messenger, ITransactionRuleService ruleService, IApplicationDatabaseService dbService)
        {
            this.ruleService = ruleService;
            this.dbService = dbService;
            if (messenger == null) throw new ArgumentNullException(nameof(messenger));
            if (ruleService == null) throw new ArgumentNullException(nameof(ruleService));
            if (dbService == null) throw new ArgumentNullException(nameof(dbService));

            MessengerInstance = messenger;
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
            MessengerInstance.Register<WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
        }
예제 #10
0
        public StatementViewModel([NotNull] IUiContext uiContext, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

            this.doNotUseSortByDate         = true;
            this.uiContext                  = uiContext;
            this.applicationDatabaseService = applicationDatabaseService;
        }
예제 #11
0
        public StatementViewModel([NotNull] IUiContext uiContext, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

            this.doNotUseSortByDate = true;
            this.uiContext = uiContext;
            this.applicationDatabaseService = applicationDatabaseService;
        }
        public EncryptFileController([NotNull] IUiContext uiContext, [NotNull] IApplicationDatabaseService appDbService)
        {
            this.appDbService = appDbService;
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }
            if (appDbService == null)
            {
                throw new ArgumentNullException(nameof(appDbService));
            }
            this.questionService = uiContext.UserPrompts.YesNoBox;
            this.messageService  = uiContext.UserPrompts.MessageBox;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register <WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnShellDiaglogResponseMessageReceived);
        }
        public LedgerBookControllerFileOperations(
            [NotNull] IMessenger messenger,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (messenger == null)
            {
                throw new ArgumentNullException(nameof(messenger));
            }

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

            this.applicationDatabaseService = applicationDatabaseService;
            MessengerInstance = messenger;

            ViewModel = new LedgerBookViewModel();
        }
예제 #14
0
        public LedgerBookControllerFileOperations(
            [NotNull] IMessenger messenger,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (messenger == null)
            {
                throw new ArgumentNullException(nameof(messenger));
            }

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

            this.applicationDatabaseService = applicationDatabaseService;
            MessengerInstance = messenger;

            ViewModel = new LedgerBookViewModel();
        }
        public UploadMobileDataController(
            [NotNull] IUiContext uiContext,
            [NotNull] IMobileDataExporter dataExporter,
            [NotNull] IMobileDataUploader uploader,
            [NotNull] IApplicationDatabaseService appDbService)
        {
            if (uiContext == null) throw new ArgumentNullException(nameof(uiContext));
            if (dataExporter == null) throw new ArgumentNullException(nameof(dataExporter));
            if (uploader == null) throw new ArgumentNullException(nameof(uploader));
            if (appDbService == null) throw new ArgumentNullException(nameof(appDbService));
            this.dataExporter = dataExporter;
            this.uploader = uploader;
            this.appDbService = appDbService;
            MessengerInstance = uiContext.Messenger;
            this.messageBoxService = uiContext.UserPrompts.MessageBox;
            this.logger = uiContext.Logger;

            MessengerInstance.Register<WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDialogMessageReceived);
        }
예제 #16
0
        public DisusedRulesController(IMessenger messenger, ITransactionRuleService ruleService, IApplicationDatabaseService dbService)
        {
            this.ruleService = ruleService;
            this.dbService   = dbService;
            if (messenger == null)
            {
                throw new ArgumentNullException(nameof(messenger));
            }
            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }
            if (dbService == null)
            {
                throw new ArgumentNullException(nameof(dbService));
            }

            MessengerInstance = messenger;
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
            MessengerInstance.Register <WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
        }
예제 #17
0
        public BudgetController(
            [NotNull] UiContext uiContext,
            [NotNull] IBudgetMaintenanceService maintenanceService,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            this.maintenanceService = maintenanceService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.questionBox = uiContext.UserPrompts.YesNoBox;
            this.messageBox = uiContext.UserPrompts.MessageBox;
            this.inputBox = uiContext.UserPrompts.InputBox;
            BudgetPieController = uiContext.BudgetPieController;
            NewBudgetController = uiContext.NewBudgetModelController;
            NewBudgetController.Ready += OnAddNewBudgetReady;
            Shown = false;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnPopUpResponseReceived);
            this.maintenanceService.Closed += OnClosedNotificationReceived;
            this.maintenanceService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.maintenanceService.Saving += OnSavingNotificationReceived;
            this.maintenanceService.Validating += OnValidatingNotificationReceived;
            this.maintenanceService.Saved += OnSavedNotificationReceived;

            CurrentBudget = new BudgetCurrencyContext(this.maintenanceService.Budgets, this.maintenanceService.Budgets.CurrentActiveBudget);
        }
예제 #18
0
        public BudgetController(
            [NotNull] UiContext uiContext,
            [NotNull] IBudgetMaintenanceService maintenanceService,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            this.maintenanceService         = maintenanceService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.questionBox           = uiContext.UserPrompts.YesNoBox;
            this.messageBox            = uiContext.UserPrompts.MessageBox;
            this.inputBox              = uiContext.UserPrompts.InputBox;
            BudgetPieController        = uiContext.BudgetPieController;
            NewBudgetController        = uiContext.NewBudgetModelController;
            NewBudgetController.Ready += OnAddNewBudgetReady;
            Shown = false;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnPopUpResponseReceived);
            this.maintenanceService.Closed += OnClosedNotificationReceived;
            this.maintenanceService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.maintenanceService.Saving     += OnSavingNotificationReceived;
            this.maintenanceService.Validating += OnValidatingNotificationReceived;
            this.maintenanceService.Saved      += OnSavedNotificationReceived;

            CurrentBudget = new BudgetCurrencyContext(this.maintenanceService.Budgets, this.maintenanceService.Budgets.CurrentActiveBudget);
        }
예제 #19
0
        public AppliedRulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            RulesController  = uiContext.RulesController;
            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.statementController        = uiContext.StatementController;
            this.messageBox         = uiContext.UserPrompts.MessageBox;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
        public StatementControllerFileOperations(
            [NotNull] IUiContext uiContext,
            [NotNull] LoadFileController loadFileController,
            [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            this.messageBox         = uiContext.UserPrompts.MessageBox;
            this.loadFileController = loadFileController;
            ViewModel = new StatementViewModel(uiContext, applicationDatabaseService);
        }
        public AppliedRulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            RulesController = uiContext.RulesController;
            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.statementController = uiContext.StatementController;
            this.messageBox = uiContext.UserPrompts.MessageBox;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
        // 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);
        }