public HomeViewModel() { GamelistViewModel = new GamelistViewModel(); ProfileViewModel = new ProfileViewModel(); Setup(); }
private void goToGameListView(object obj) { if (LobbyViewModel != null) { LobbyViewModel.Dispose(); LobbyViewModel = null; } if (GameViewModel != null) { GameViewModel.Dispose(); GameViewModel = null; } IsInGame = false; GamelistViewModel.SubscribeLobbyNotif(); GamelistViewModel.getLobbies(); SwitchView = Views.Gamelist; IsNotInLobby = true; Application.Current.Dispatcher.Invoke(delegate { FetchChannels(); }); }