TraktPlugin.GUI.GUILists.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)
        {
            // wait for any background action to finish
            if (GUIBackgroundTask.Instance.IsBusy) return;

            switch (controlId)
            {
                // Facade
                case (50):
                    if (actionType == Action.ActionType.ACTION_SELECT_ITEM)
                    {
                        GUIListItem selectedItem = this.Facade.SelectedListItem;
                        if (selectedItem == null) return;

                        var selectedList = selectedItem.TVTag as TraktListDetail;
                        if (selectedList == null) return;

                        // Load current selected list
                        GUIListItems.CurrentList = selectedList;
                        GUIListItems.CurrentUser = CurrentUser;
                        GUIWindowManager.ActivateWindow((int)TraktGUIWindows.CustomListItems);
                    }
                    break;

                default:
                    break;
            }
            base.OnClicked(controlId, control, actionType);
        }