private void OnRefresh(object sender, EventArgs e) { if (SelectedViewModel.GetType() == typeof(ViewAccueilViewModel) || SelectedViewModel.GetType() == typeof(ViewSerieViewModel) || SelectedViewModel.GetType() == typeof(ViewRechercheViewModel)) { SelectedViewModel = new ViewAccueilViewModel(); OpenInfoSerieEvent.GetInstance().Handler += OnOpenInfoSerie; RetourWindowAccueilEvent.GetInstance().Handler += OnRetourAccueil; } if (SelectedViewModel.GetType() == typeof(ViewProfilViewModel)) { SelectedViewModel = new ViewProfilViewModel(); OpenInfoSerieEvent.GetInstance().Handler += OnOpenInfoSerie; } }
/// <summary> /// Affiche le usercontrol Profil /// </summary> /// <param name="obj"></param> private void OnOuvrirProfil(object obj) { IsVisible = false; SelectedViewModel = new ViewProfilViewModel(); OpenInfoSerieEvent.GetInstance().Handler += OnOpenInfoSerie; }