Exemplo n.º 1
0
        public TestViewModelA(
            IEnumerable <ISomeFancyProvider> fancyProviders,
            IMessageBoxProvider messageBoxProvider,
            IPickerAdapter pickerAdapter,
            IDataCache dataCache,
            INavigationManager <PageIndex> navigationManager,
            ICustomDialogsManager <DialogIndex> dialogsManager,
            AppVariables appVariables)
        {
            _fancyProviders     = fancyProviders.ToList();
            _messageBoxProvider = messageBoxProvider;
            _pickerAdapter      = pickerAdapter;
            _navigationManager  = navigationManager;
            _dialogsManager     = dialogsManager;
            _appVariables       = appVariables;

            ShowLastFanciedThingCommand = new RelayCommand(
                async() =>
            {
                var data = await _appVariables.UserResponse.GetAsync();
                await _messageBoxProvider.ShowMessageBoxOkAsync(
                    "The thing you fancy!",
                    $"You fancied: {_appVariables.UserResponse.Value.FancyThing}\nAt {_appVariables.UserResponse.Value.DateTime}",
                    "Yeah, that's fancy.");
            }, () => UserResponse != null);
        }
Exemplo n.º 2
0
 public ChangelogHandler(
     ILogger <ChangelogHandler> logger,
     IDispatcherAdapter dispatcherAdapter,
     ICustomDialogsManager <DialogIndex> dialogsManager)
 {
     _logger            = logger;
     _dispatcherAdapter = dispatcherAdapter;
     _dialogsManager    = dialogsManager;
 }