﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ViewModels
{
    public class ClassementUtilisateursVM : ViewModelBase
    {
        private ScoreUtilisateurVM scoreSelectionne;
        public ClassementUtilisateursVM()
        {
            Scores = new ObservableCollection<ScoreUtilisateurVM>();
            SelectionChanged += (s, e) => { };
        }
        public delegate void SelectionChangedEventHandler(object sender, EventArgs e);
        public event SelectionChangedEventHandler SelectionChanged;
        public ObservableCollection<ScoreUtilisateurVM> Scores { get; private set; }
        public ScoreUtilisateurVM ScoreSelectionne
        { 
            get
            {
                return scoreSelectionne;
            }
            set
            {
                if(scoreSelectionne != value)
                {
                    scoreSelectionne = value;
                    RaisePropertyChanged("ScoreSelectionne");
                    SelectionChanged(this, new EventArgs());
                }
            }
        }
        public void SelectionnerScoreMax()
        {

        }
    }
}
