public void Unlock()
 {
     // just kick off the enter pin page - it will call our function when complete
     pinCallback = UnlockPinEntered;
     customPIN   = Config.Instance.ParentalPIN; // use global pin
     Logger.ReportInfo("Request to unlock PC");
     PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINDial"));
 }
 public void EnterNewPIN()
 {
     //now present pin screen - it will call our callback after finished
     pinCallback = NewPinEntered;
     customPIN   = Config.Instance.ParentalPIN; // use global pin
     Logger.ReportInfo("Request to change PIN");
     PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterCurrentPINDial"));
 }
 private void PromptForPin(ParentalPromptCompletedCallback pe, string prompt)
 {
     gettingNewPIN = false;
     if (!Microsoft.MediaCenter.UI.Application.IsApplicationThread)
     {
         Microsoft.MediaCenter.UI.Application.DeferredInvoke(Application.CurrentInstance.OpenSecurityPage, prompt);
     }
     else
     {
         Application.CurrentInstance.OpenSecurityPage(prompt);
     }
 }
        public void PlayProtected(PlayableItem playable)
        {
            //save parameters where we can get at them after pin entry
            this.playable = playable;

            //now present pin screen - it will call our callback after finished
            pinCallback = PlayPinEntered;
            if (!string.IsNullOrEmpty(playable.ParentalControlPin))
            {
                customPIN = playable.ParentalControlPin; // use custom pin for this item
            }
            else
            {
                customPIN = Config.Instance.ParentalPIN; // use global pin
            }
            Logger.ReportInfo("Request to play protected content");
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial"));
        }
        public void PlayUnwatchedProtected(Item folder)
        {
            //save parameters where we can get at them after pin entry
            this.anItem = folder;

            //now present pin screen - it will call our callback after finished
            pinCallback = UnwatchedPinEntered;
            if (folder.BaseItem.CustomPIN != "" && folder.BaseItem.CustomPIN != null)
            {
                customPIN = folder.BaseItem.CustomPIN; // use custom pin for this item
            }
            else
            {
                customPIN = Config.Instance.ParentalPIN; // use global pin
            }
            Logger.ReportInfo("Request to play protected content " + folder.Name);
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial"));
        }
        public void PlayProtected(Item item, bool resume, bool queue)
        {
            //save parameters where we can get at them after pin entry
            this.anItem = item;
            this.resume = resume;
            this.queue  = queue;

            //now present pin screen - it will call our callback after finished
            pinCallback = PlayPinEntered;
            if (item.BaseItem.CustomPIN != "" && item.BaseItem.CustomPIN != null)
            {
                customPIN = item.BaseItem.CustomPIN; // use custom pin for this item
            }
            else
            {
                customPIN = Config.Instance.ParentalPIN; // use global pin
            }
            Logger.ReportInfo("Request to play protected content");
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial"));
        }
 private void PromptForPin(ParentalPromptCompletedCallback pe)
 {
     PromptForPin(pe, "");
 }
 private void PromptForPin(ParentalPromptCompletedCallback pe, string prompt)
 {
     gettingNewPIN = false;
     if (!Microsoft.MediaCenter.UI.Application.IsApplicationThread)
         Microsoft.MediaCenter.UI.Application.DeferredInvoke(Application.CurrentInstance.OpenSecurityPage, prompt);
     else
         Application.CurrentInstance.OpenSecurityPage(prompt);
 }
 private void PromptForPin(ParentalPromptCompletedCallback pe)
 {
     PromptForPin(pe, "");
 }
 public void Unlock()
 {
     // just kick off the enter pin page - it will call our function when complete
     pinCallback = UnlockPinEntered;
     customPIN = Config.Instance.ParentalPIN; // use global pin
     Logger.ReportInfo("Request to unlock PC");
     PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINDial"));
 }
        public void PlayProtected(PlayableItem playable)
        {
            //save parameters where we can get at them after pin entry
            this.playable = playable;

            //now present pin screen - it will call our callback after finished
            pinCallback = PlayPinEntered;
            if (!string.IsNullOrEmpty(playable.ParentalControlPin))
                customPIN = playable.ParentalControlPin; // use custom pin for this item
            else
                customPIN = Config.Instance.ParentalPIN; // use global pin
            Logger.ReportInfo("Request to play protected content");
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial"));
        }
        public void NavigateProtected(FolderModel folder)
        {
            //save parameters where we can get at them after pin entry
            this.anItem = folder;

            //now present pin screen - it will call our callback after finished
            pinCallback = NavPinEntered;
            if (folder.BaseItem.CustomPIN != "" && folder.BaseItem.CustomPIN != null)
                customPIN = folder.BaseItem.CustomPIN; // use custom pin for this item
            else
                customPIN = Config.Instance.ParentalPIN; // use global pin
            Logger.ReportInfo("Request to open protected content " + folder.Name);
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToViewDial"));
        }
 public void EnterNewPIN()
 {
     //now present pin screen - it will call our callback after finished
     pinCallback = NewPinEntered;
     customPIN = Config.Instance.ParentalPIN; // use global pin
     Logger.ReportInfo("Request to change PIN");
     PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterCurrentPINDial"));
 }
        public void PlayProtected(Item item, bool resume, bool queue)
        {
            //save parameters where we can get at them after pin entry
            this.anItem = item;
            this.resume = resume;
            this.queue = queue;

            //now present pin screen - it will call our callback after finished
            pinCallback = PlayPinEntered;
            if (item.BaseItem.CustomPIN != "" && item.BaseItem.CustomPIN != null)
                customPIN = item.BaseItem.CustomPIN; // use custom pin for this item
            else
                customPIN = Config.Instance.ParentalPIN; // use global pin
            Logger.ReportInfo("Request to play protected content");
            PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial"));
        }