Ejemplo n.º 1
0
        public AlarmSettingsViewModel(NavigationServiceWithToken navigationService, IScreenshotManager screenshotManager)
            : base(navigationService)
        {
            _screenshotManager = screenshotManager;

            ResourceLoader.GetForCurrentView("Resources");
        }
Ejemplo n.º 2
0
        public PresetsViewModel(
            IConfigurationManager <AppSettings> configurationManager,
            IDialogService dialogService,
            IEventAggregator eventAggregator,
            IGameService gameService,
            IPresetManager presetManager,
            IScreenshotManager screenshotManager)
            : base(eventAggregator)
        {
            _configurationManager = configurationManager;
            _dialogService        = dialogService;
            _eventAggregator      = eventAggregator;
            _gameService          = gameService;
            _presetManager        = presetManager;
            _screenshotManager    = screenshotManager;

            ActivatePresetCommand    = new DelegateCommand <Preset>(async(x) => await OnActivatePresetCommand(x));
            RenamePresetCommand      = new DelegateCommand <Preset>(async(x) => await OnRenamePresetCommand(x));
            DeletePresetCommand      = new DelegateCommand <Preset>(async(x) => await OnDeletePresetCommand(x));
            SaveCurrentPresetCommand = new DelegateCommand(async() => await OnSaveCurrentPresetCommand());
            AddPresetCommand         = new DelegateCommand(async() => await OnAddPresetCommand());
            ViewFilesCommand         = new DelegateCommand <Preset>(OnViewFilesCommand);

            _listPresetView = _configurationManager.Settings.DefaultPresetView;
            _gridPresetView = !_listPresetView;
        }
Ejemplo n.º 3
0
        public ScreenshotViewModel(
            IConfigurationManager <AppSettings> configurationManager,
            IEventAggregator eventAggregator,
            IScreenshotManager screenshotManager,
            IScreenshotWatcher screenshotWatcher)
            : base(eventAggregator)
        {
            _configurationManager = configurationManager;
            _eventAggregator      = eventAggregator;
            _screenshotManager    = screenshotManager;
            _screenshotWatcher    = screenshotWatcher;

            _eventAggregator.GetEvent <ScreenshotsStatusChangedExternalEvent>().Subscribe((x) => EnableScreenshots = x);

            LoadedCommand        = new DelegateCommand(OnLoadedCommand);
            GoToDirectoryCommand = new DelegateCommand(OnGoToDirectoryCommand, () => SelectedCategory?.Screenshots?.Count > 0);
        }
Ejemplo n.º 4
0
        public DashboardViewModel(
            ConfigurationManager <AppSettings> configurationManager,
            IEventAggregator eventAggregator,
            IGameService gameService,
            IPresetManager presetManager,
            IScreenshotManager screenshotManager)
            : base(eventAggregator)
        {
            _configurationManager = configurationManager;
            _eventAggregator      = eventAggregator;
            _gameService          = gameService;
            _presetManager        = presetManager;
            _screenshotManager    = screenshotManager;

            RemoveNotificationCommand = new DelegateCommand <Notification>(OnRemoveNotificationCommand);
            LoadedCommand             = new DelegateCommand(async() => await OnLoadedCommand());
        }