Beispiel #1
0
        //TODO DarthAffe 06.01.2016: This is a somehow weird design ...
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            this.DispatcherUnhandledException += OnDispatcherUnhandledException;

            _apiService = new HikariApiService();
            _configService = new ConfigService();
            _patchService = new PatchService(_apiService, UpdateStatusFunc);

            _topBarViewModel = new TopBarViewModel(_configService);
            _gamesViewModel = new GamesViewModel(_configService, _patchService);
            _mainWindowViewModel = new MainWindowViewModel(_apiService, _topBarViewModel, _gamesViewModel);

            new MainWindow { DataContext = _mainWindowViewModel }.Show();
        }
        public GamesViewModel(ConfigService configService, PatchService patchService)
        {
            this._patchService = patchService;

            _config = configService.Config;
        }
 public TopBarViewModel(ConfigService configService)
 {
     Config = configService.Config;
 }