TraktPlugin.GUI.GUIRateDialog.OnClicked C# (CSharp) Méthode

OnClicked() protected méthode

protected OnClicked ( int controlId, GUIControl control, MediaPortal.GUI.Library.Action actionType ) : void
controlId int
control MediaPortal.GUI.Library.GUIControl
actionType MediaPortal.GUI.Library.Action
Résultat void
        protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
        {
            base.OnClicked(controlId, control, actionType);

            if (control == btnUnRate)
            {
                Rated = TraktRateValue.unrate;
                IsSubmitted = true;
                PageDestroy();
                return;
            }

            if (control == btnOneHeart)
            {
                Rated = TraktRateValue.one;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnTwoHeart)
            {
                Rated = TraktRateValue.two;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnThreeHeart)
            {
                Rated = TraktRateValue.three;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnFourHeart)
            {
                Rated = TraktRateValue.four;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnFiveHeart)
            {
                Rated = TraktRateValue.five;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnSixHeart)
            {
                Rated = TraktRateValue.six;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnSevenHeart)
            {
                Rated = TraktRateValue.seven;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnEightHeart)
            {
                Rated = TraktRateValue.eight;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnNineHeart)
            {
                Rated = TraktRateValue.nine;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
            else if (control == btnTenHeart)
            {
                Rated = TraktRateValue.ten;
                IsSubmitted = true;
                PageDestroy();
                return;
            }
        }