コード例 #1
0
 protected void OnRatingValueChanged(RatingValueEventArgs ev)
 {
     if (OnRatingValueChangedEvent != null)
     {
         OnRatingValueChangedEvent(ev);
     }
 }
コード例 #2
0
ファイル: RatingControl.xaml.cs プロジェクト: dizzydezz/jmm
		protected void OnRatingValueChanged(RatingValueEventArgs ev)
		{
			if (OnRatingValueChangedEvent != null)
			{
				OnRatingValueChangedEvent(ev);
			}
		}
コード例 #3
0
        void cRating_OnRatingValueChangedEvent(RatingValueEventArgs ev)
        {
            AnimeSeriesVM ser = this.DataContext as AnimeSeriesVM;

            if (ser == null)
            {
                return;
            }

            try
            {
                decimal rating = (decimal)ev.RatingValue;

                int voteType = 1;
                if (ser.AniDB_Anime.FinishedAiring)
                {
                    voteType = 2;
                }

                JMMServerVM.Instance.VoteAnime(ser.AniDB_ID, rating, voteType);

                // refresh the data
                MainListHelperVM.Instance.UpdateHeirarchy(ser);
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
コード例 #4
0
        void cRating_OnRatingValueChangedEvent(RatingValueEventArgs ev)
        {
            AnimeSeriesVM ser = this.DataContext as AnimeSeriesVM;
            if (ser == null) return;

            try
            {
                decimal rating = (decimal)ev.RatingValue;

                int voteType = 1;
                if (cboVoteType.SelectedItem.ToString() == Properties.Resources.VoteTypeAnimeTemporary) voteType = 2;
                if (cboVoteType.SelectedItem.ToString() == Properties.Resources.VoteTypeAnimePermanent) voteType = 1;

                JMMServerVM.Instance.VoteAnime(ser.AniDB_ID, rating, voteType);

                // refresh the data
                MainListHelperVM.Instance.UpdateHeirarchy(ser);
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
コード例 #5
0
        void cRating_OnRatingValueChangedEvent(RatingValueEventArgs ev)
        {
            AnimeSeriesVM ser = this.DataContext as AnimeSeriesVM;
            if (ser == null) return;

            try
            {
                decimal rating = (decimal)ev.RatingValue;

                int voteType = 1;
                if (ser.AniDB_Anime.FinishedAiring) voteType = 2;

                JMMServerVM.Instance.VoteAnime(ser.AniDB_ID, rating, voteType);

                // refresh the data
                MainListHelperVM.Instance.UpdateHeirarchy(ser);
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }