/// <summary>
        /// Default constructor
        /// </summary>
        protected ModifyPaymentViewModel(IMediator mediator,
                                         IMapper mapper,
                                         IDialogService dialogService,
                                         INavigationService navigationService)
        {
            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.mediator          = mediator;
            this.mapper            = mapper;

            selectedPayment = new PaymentViewModel();

            MessengerInstance.Register <CategorySelectedMessage>(this, async message => await ReceiveMessageAsync(message));
        }
Exemple #2
0
        protected override async Task Initialize()
        {
            Title           = PaymentTypeHelper.GetViewTitleForType(SelectedPayment.Type, false);
            SelectedPayment = new PaymentViewModel {
                Type = SelectedPayment.Type
            };

            await base.Initialize();

            SelectedPayment.ChargedAccount = ChargedAccounts.FirstOrDefault();

            if (SelectedPayment.IsTransfer)
            {
                SelectedItemChangedCommand.Execute(null);
                SelectedPayment.TargetAccount = TargetAccounts.FirstOrDefault();
            }
        }