private void TournoiLoaded(object sender, RoutedEventArgs e) { // Initialisation des Tournois BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager(); IList <EntitiesLayer.Tournoi> tournois = jtm.getTournois(); ViewModel.Tournament.TournamentsViewModel tvm = new ViewModel.Tournament.TournamentsViewModel(tournois); ucTournoi.DataContext = tvm; }
private void TournoiUnloaded(object sender, RoutedEventArgs e) { BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager(); ViewModel.Tournament.TournamentsViewModel tvm = ucTournoi.DataContext as ViewModel.Tournament.TournamentsViewModel; List <EntitiesLayer.Tournoi> tournois = new List <EntitiesLayer.Tournoi>(); foreach (ViewModel.Tournament.TournamentViewModel t in tvm.Tournaments) { if (t.Name != "") { tournois.Add(t.Tournament); } } jtm.updateTournois(tournois); }
private void WindowLoaded(object sender, EventArgs args) { BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager(); // Gestion des Tournois IList<EntitiesLayer.Tournoi> tournaments = jtm.getTournois(); ViewModel.Tournament.TournamentsViewModel tvm = new ViewModel.Tournament.TournamentsViewModel(tournaments); usrCtrlTournoiCombo.DataContext = tvm; BusinessLayer.PartieManager.startNewGame(); usrCtrlTournoiCombo.cbTournoi.DropDownClosed += SetDetails; lastSelect = usrSolo; usrSolo.Margin = new System.Windows.Thickness(5); usrSolo.Opacity = 1; usrSolo.MouseDown += fixeSelection; usrMulti.MouseDown += fixeSelection; usrPariSolo.MouseDown += fixeSelection; usrPariMulti.MouseDown += fixeSelection; }
private void WindowLoaded(object sender, EventArgs args) { BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager(); // Gestion des Tournois IList <EntitiesLayer.Tournoi> tournaments = jtm.getTournois(); ViewModel.Tournament.TournamentsViewModel tvm = new ViewModel.Tournament.TournamentsViewModel(tournaments); usrCtrlTournoiCombo.DataContext = tvm; BusinessLayer.PartieManager.startNewGame(); usrCtrlTournoiCombo.cbTournoi.DropDownClosed += SetDetails; lastSelect = usrSolo; usrSolo.Margin = new System.Windows.Thickness(5); usrSolo.Opacity = 1; usrSolo.MouseDown += fixeSelection; usrMulti.MouseDown += fixeSelection; usrPariSolo.MouseDown += fixeSelection; usrPariMulti.MouseDown += fixeSelection; }
private void TournoiLoaded(object sender, RoutedEventArgs e) { // Initialisation des Tournois BusinessLayer.JediTournamentManager jtm = new BusinessLayer.JediTournamentManager(); IList<EntitiesLayer.Tournoi> tournois = jtm.getTournois(); ViewModel.Tournament.TournamentsViewModel tvm = new ViewModel.Tournament.TournamentsViewModel(tournois); ucTournoi.DataContext = tvm; }