private bool OnPowerEventHandler(PowerEventType powerStatus) { Log.Debug("OnPowerEventHandler: PowerStatus: {0}", powerStatus); switch (powerStatus) { case PowerEventType.StandBy: case PowerEventType.Suspend: _controller.OnSuspend(); return(true); case PowerEventType.QuerySuspend: case PowerEventType.QueryStandBy: if (_controller != null) { if (_controller.CanSuspend) { //OnStop(); return(true); } return(false); } return(true); case PowerEventType.QuerySuspendFailed: case PowerEventType.QueryStandByFailed: if (!_controller.EpgGrabberEnabled) { _controller.EpgGrabberEnabled = true; } return(true); case PowerEventType.ResumeAutomatic: case PowerEventType.ResumeCritical: case PowerEventType.ResumeSuspend: _controller.OnResume(); return(true); } return(true); }