public void ShowDialog(DateTime defaultEffectiveDate) { this.dialogCorrelationId = Guid.NewGuid(); EffectiveFrom = defaultEffectiveDate; var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Budget, this, ShellDialogType.SaveCancel) { CorrelationId = this.dialogCorrelationId, Title = "Create new Budget based on current", HelpAvailable = true }; MessengerInstance.Send(dialogRequest); }
public void Show(LedgerEntryLine line, bool isNew) { LedgerEntryLine = line; Remarks = LedgerEntryLine.Remarks; IsReadOnly = !isNew; this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, ShellDialogType.Ok) { Title = "Ledger Entry Remarks", CorrelationId = this.dialogCorrelationId }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(IEnumerable<LedgerBucket> ledgerBuckets) { Reset(); TransferFundsDto = new TransferFundsCommand(); LedgerBuckets = ledgerBuckets.ToList(); this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, ShellDialogType.SaveCancel) { CorrelationId = this.dialogCorrelationId, Title = "Transfer Funds" }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog([NotNull] LedgerEntryLine ledgerLine) { if (ledgerLine == null) { throw new ArgumentNullException(nameof(ledgerLine)); } SurplusBalances = new ObservableCollection<BankBalance>(ledgerLine.SurplusBalances); this.ledgerEntryLine = ledgerLine; var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, ShellDialogType.Ok) { CorrelationId = Guid.NewGuid(), Title = "Surplus Balances in all Accounts" }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(BudgetAnalyserFeature source, Guid? correlationId = null) { this.dialogCorrelationId = correlationId ?? Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(source, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = "Create new surprise regular payment monitor", HelpAvailable = true }; MessengerInstance.Send(dialogRequest); }
public void PromptUserForAccountType() { this.filterMode = FilterMode.AccountType; List<AccountType> accountTypeList = this.accountTypeRepository.ListCurrentlyUsedAccountTypes().ToList(); accountTypeList.Insert(0, null); AccountTypes = accountTypeList; SelectedAccountType = Criteria.AccountType; this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Dashboard, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = "Global Filters - Account Type", }; RaisePropertyChanged(() => IsAccountFilterView); RaisePropertyChanged(() => IsDateFilterView); MessengerInstance.Send(dialogRequest); }
private void ShowDialogCommon(bool isNew) { IsReadOnly = !isNew; this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, IsReadOnly ? ShellDialogType.Ok : ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = Title, }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(BudgetAnalyserFeature source, string title, Guid? correlationId = null, bool showBankAccountSelector = false) { this.dialogCorrelationId = correlationId ?? Guid.NewGuid(); ShowBankAccount = showBankAccountSelector; var dialogRequest = new ShellDialogRequestMessage(source, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = title }; MessengerInstance.Send(dialogRequest); }
private void OnDetailsCommandExecute() { var popUpRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Budget, CurrentBudget, ShellDialogType.Ok); MessengerInstance.Send(popUpRequest); }
private void SelectOtherBudget() { this.dialogCorrelationId = Guid.NewGuid(); var popUpRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Budget, new BudgetSelectionViewModel(Budgets), ShellDialogType.Ok) { CorrelationId = this.dialogCorrelationId }; MessengerInstance.Send(popUpRequest); }
private Task RequestUserInputCommomPreparation() { FileName = null; ExistingAccountNames = this.accountTypeRepository.ListCurrentlyUsedAccountTypes().ToList(); SelectedExistingAccountName = ExistingAccountNames.First(a => a.IsSalaryAccount); this.dialogCorrelationId = Guid.NewGuid(); var popRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Transactions, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = Title }; this.fileSelectionTask?.Dispose(); this.fileSelectionTask = new Task(() => { }); MessengerInstance.Send(popRequest); return this.fileSelectionTask; }
private Task RequestUserInputCommomPreparation() { UseExistingAccountName = true; UseNewAccountName = false; FileName = null; AccountName = null; List<string> listOfNames = PrepareAccountNames(); ExistingAccountNames = listOfNames; SelectedExistingAccountName = listOfNames.First(); this.dialogCorrelationId = Guid.NewGuid(); var popRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Transactions, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = Title }; if (this.fileSelectionTask != null) { this.fileSelectionTask.Dispose(); } this.fileSelectionTask = new Task(() => { }); MessengerInstance.Send(popRequest); return this.fileSelectionTask; }
public void PromptUserForDates() { this.filterMode = FilterMode.Dates; this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Dashboard, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = "Global Filters - Date Range", }; RaisePropertyChanged(() => IsAccountFilterView); RaisePropertyChanged(() => IsDateFilterView); MessengerInstance.Send(dialogRequest); }
private void OnDialogRequested(ShellDialogRequestMessage message) { ShellDialogController dialogController; switch (message.Location) { case BudgetAnalyserFeature.LedgerBook: dialogController = LedgerBookDialog; break; case BudgetAnalyserFeature.Dashboard: dialogController = DashboardDialog; break; case BudgetAnalyserFeature.Budget: dialogController = BudgetDialog; break; case BudgetAnalyserFeature.Transactions: dialogController = TransactionsDialog; break; case BudgetAnalyserFeature.Reports: dialogController = ReportsDialog; break; default: throw new NotSupportedException("The requested shell dialog location is not supported: " + message.Location); } dialogController.Title = message.Title; dialogController.Content = message.Content; dialogController.DialogType = message.DialogType; dialogController.CorrelationId = message.CorrelationId; dialogController.HelpButtonVisible = message.HelpAvailable; }
public void ShowDialog(IEnumerable<MatchingRule> allRules) { SimilarRules = allRules.Select(r => new SimilarMatchedRule(this.bucketRepo, r)).ToList(); UpdateSimilarRules(); this.shellDialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Transactions, this, ShellDialogType.SaveCancel) { CorrelationId = this.shellDialogCorrelationId, Title = Title }; MessengerInstance.Send(dialogRequest); }
public void PromptUserForDates() { this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Dashboard, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = "Global Date Filter" }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(BudgetAnalyserFeature source, string title, Guid? correlationId = null) { if (correlationId == null) { this.dialogCorrelationId = Guid.NewGuid(); } else { this.dialogCorrelationId = correlationId.Value; } var dialogRequest = new ShellDialogRequestMessage(source, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = title, }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(Transaction originalTransaction, Guid correlationId) { BudgetBuckets = this.bucketRepo.Buckets; this.dialogCorrelationId = correlationId; OriginalTransaction = originalTransaction; SplinterAmount1 = OriginalTransaction.Amount; SplinterAmount2 = 0M; SplinterBucket2 = SplinterBucket1 = OriginalTransaction.BudgetBucket; var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Transactions, this, ShellDialogType.SaveCancel) { CorrelationId = correlationId, Title = "Split Transaction" }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog(IEnumerable<MatchingRule> allRules) { SimilarRules = new List<object>( allRules.Select(rule => new { rule.Amount, rule.Description, rule.Reference1, rule.Reference2, rule.Reference3, this.budgetBucketRepository.Buckets.Single(b => b.Code == rule.Bucket.Code).Code, rule.TransactionType })); UpdateSimilarRules(); this.shellDialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.Transactions, this, ShellDialogType.SaveCancel) { CorrelationId = this.shellDialogCorrelationId, Title = Title, }; MessengerInstance.Send(dialogRequest); }
private void ShowDialogCommon(string title) { Canceled = false; List<Account> accountsToShow = this.accountTypeRepository.ListCurrentlyUsedAccountTypes().ToList(); BankAccounts = accountsToShow.OrderBy(a => a.Name); SelectedBankAccount = null; this.dialogCorrelationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, ShellDialogType.OkCancel) { CorrelationId = this.dialogCorrelationId, Title = title, HelpAvailable = CreateMode }; MessengerInstance.Send(dialogRequest); }
public void ShowDialog([NotNull] Engine.Ledger.LedgerBook parentLedgerBook, [NotNull] LedgerBucket ledgerBucket, [NotNull] BudgetModel budgetModel) { if (parentLedgerBook == null) { throw new ArgumentNullException(nameof(parentLedgerBook)); } if (ledgerBucket == null) { throw new ArgumentNullException(nameof(ledgerBucket)); } if (budgetModel == null) { throw new ArgumentNullException(nameof(budgetModel)); } if (LedgerBucketHistoryAnalysis == null) { LedgerBucketHistoryAnalysis = CreateBucketHistoryAnalyser(); } LedgerBucketHistoryAnalysis.Analyse(ledgerBucket, parentLedgerBook); this.ledger = ledgerBucket; BankAccounts = new ObservableCollection<Account>(this.accountRepo.ListCurrentlyUsedAccountTypes()); BucketBeingTracked = ledgerBucket.BudgetBucket; StoredInAccount = ledgerBucket.StoredInAccount; MonthlyBudgetAmount = budgetModel.Expenses.Single(e => e.Bucket == BucketBeingTracked).Amount; this.correlationId = Guid.NewGuid(); var dialogRequest = new ShellDialogRequestMessage(BudgetAnalyserFeature.LedgerBook, this, ShellDialogType.OkCancel) { CorrelationId = this.correlationId, Title = "Ledger - " + BucketBeingTracked, HelpAvailable = true }; MessengerInstance.Send(dialogRequest); }