static CustomControllersFactory() { gameStorage = new GameStorage(); gameEndChecker = new GameEndChecker(); easyOpponent = new EasyOpponentAi(); hardOpponent = new HardOpponentAi(); gameIdProvider = new GameIdProvider(); }
public LikedGamesViewModel() { gamesStorage = DependencyService.Get <IGamesStorage>(); if (gamesStorage != null) { MyLikedGames = new ObservableCollection <Result>(gamesStorage.GetAllGames()); test(); } Getinfo_command = new Command <Result>(GetInfo); //MessagingCenter.Subscribe<SearchPageViewModel, Result>(this, "game_details", async (sender, message) => //{ // MyLikedGames.Add(message); // test(); //}); }
public GameDetailsViewModel() { gamesStorage = DependencyService.Get <IGamesStorage>(); Add_to_liked_command = new Command(AddMethod); gamesApiClient = DependencyService.Get <IGamesApiClient>(); MessagingCenter.Subscribe <SearchPageViewModel, Result>(this, "game_details", (sender, message) => { SearchID = message.id; Message = message; Get(); }); MessagingCenter.Subscribe <LikedGamesViewModel, Result>(this, "game_details", (sender, message) => { SearchID = message.id; Message = message; Get(); }); Share_command = new Command(ShareGame); Buy_command = new Command(Buy); }
public SettingsViewModel() { gamesStorage = DependencyService.Get <IGamesStorage>(); Clearcache_command = new Command(Clear); }