コード例 #1
0
ファイル: App.xaml.cs プロジェクト: DarthAffe/HikariLauncher
        //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();
        }
コード例 #2
0
 public MainWindowViewModel(HikariApiService apiService, TopBarViewModel topBarViewModel, GamesViewModel gamesViewModel)
 {
     this._apiService     = apiService;
     this.TopBarViewModel = topBarViewModel;
     this.GamesViewModel  = gamesViewModel;
 }
コード例 #3
0
 public MainWindowViewModel(HikariApiService apiService, TopBarViewModel topBarViewModel, GamesViewModel gamesViewModel)
 {
     this._apiService = apiService;
     this.TopBarViewModel = topBarViewModel;
     this.GamesViewModel = gamesViewModel;
 }