Пример #1
0
        private void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            var s = sender as CheckBox;

            System.Diagnostics.Debug.WriteLine(s.IsChecked);

            var score = s.DataContext as Score;

            System.Diagnostics.Debug.WriteLine("Affichage donnée score my favourite => " + score.Id + " " + score.Title);

            AddDeleteFavourites elem = new AddDeleteFavourites();

            if (s.IsChecked == true)
            {
                elem.addNouveauFavourites(score.Id);
            }
            else
            {
                elem.deleteFavourites(score.Id);
            }
        }