Exemplo n.º 1
0
        public ShellViewModel(
            ISnackbarMessageQueue snackbarMessageQueue,
            IMediator mediator,
            IDialogHostMapper dialogHostMapper,
            ILocalizationService localizationService,
            IWindowManager windowManager,
            ISubscriptionAggregator subscriptionAggregator,
            AboutViewModel aboutViewModel,
            FinCalcViewModel finCalcViewModel)
        {
            this.SbMessageQueue         = snackbarMessageQueue;
            this.mediator               = mediator;
            this.dialogHostMapper       = dialogHostMapper;
            this.localizationService    = localizationService;
            this.windowManager          = windowManager;
            this.subscriptionAggregator = subscriptionAggregator;

            this.aboutViewModel   = aboutViewModel;
            this.finCalcViewModel = finCalcViewModel;

            this.subscriptionAggregator.Subscribe(this);

            this.LoadMenuItems();
            this.LoadLanguages();
            this.TitleBarText = Resources.AppTitleTxt_Text + " - " + Resources.FinCalcItem_Name;
        }
Exemplo n.º 2
0
        public FinCalcViewModel(
            ILocalizationService localizationService,
            IMediator mediator,
            ICommandInvoker calculatorRemote,
            ICalculationCommandReceiver calculator,
            ISubscriptionAggregator subscriptionAggregator)
        {
            this.mediator         = mediator;
            this.calculatorRemote = calculatorRemote;
            this.calculator       = calculator;

            this.calculator.OutputText.TextChanged += this.OnOutputTextChanged;
            this.calculatorRemote.CommandExecuted  += this.OnCommandExecuted;
            this.calculatorRemote.CommandFailed    += this.OnCommandFailed;

            subscriptionAggregator.Subscribe(this);

            this.OnClearPressed();
        }
 public KeyboardEventNotifier(ISubscriptionAggregator subscriptionAggregator)
 {
     this.subscriptionAggregator = subscriptionAggregator;
 }