Exemplo n.º 1
0
 public ScreenSaverController GetScreenSaverController()
 {
   if (_screenSaverController != null)
   {
     ServiceRegistration.Get<ILogger>().Warn("SkinEngine MainForm: ScreenSaverControl is already registered, prevent creation of another ScreenSaverControl");
     return null;
   }
   return _screenSaverController = new ScreenSaverController(() => { _screenSaverController = null; });
 }
 protected void CheckScreenSaver()
 {
   IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>();
   if (workflowManager.IsStateContainedInNavigationStack(Consts.WF_STATE_ID_PARTY_MUSIC_PLAYER))
   {
     if (DisableScreenSaver)
     {
       if (_screenSaverController == null)
       {
         IScreenControl screenControl = ServiceRegistration.Get<IScreenControl>();
         _screenSaverController = screenControl.GetScreenSaverController();
       }
       if (_screenSaverController != null)
         _screenSaverController.IsScreenSaverDisabled = true;
     }
   }
   else
   {
     if (_screenSaverController != null)
     {
       _screenSaverController.Dispose();
       _screenSaverController = null;
     }
   }
 }