예제 #1
0
        private void ThumbUpHandle(ImageButton button)
        {
            var song    = (Song)((button).FindParentByName <Grid>("SongItem")).DataContext;
            var spinner = button.FindParent <ContentSpinner>();

            if (_feedbackMap.ContainsKey(song))
            {
                return;
            }

            var otherButton =
                spinner.FindSiblingByName <ContentSpinner>("SpinDown").FindChildByName <ImageButton>("btnThumbDown");

            _feedbackMap.Add(song, new[] { button, otherButton });
            if (song.Loved)
            {
                _player.SongDeleteFeedback(song);
            }
            else
            {
                _player.SongThumbUp(song);
            }

            spinner.StartAnimation();
        }