Ejemplo n.º 1
0
    public void ShowZapOSD(TVHome.ChannelErrorInfo errorInfo)
    {
      if (!_zapOsdVisible)
      {
        GUIMessage msg;
        // Show zap OSD
        msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, _zapWindow.GetID, 0, 0,
                                        GetID, 0, null);
        if (errorInfo != null)
        {
          _zapWindow.LastError = errorInfo;
        }
        _zapWindow.OnMessage(msg);
        Log.Debug("ZAP OSD:ON");
        _zapTimeOutTimer = DateTime.Now;
        _zapOsdVisible = true;
        // now even if main OSD is visible it won't be rendered

        if (_isOsdVisible) 
        {
          // hide main OSD
          msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT, _osdWindow.GetID, 0, 0,
                               GetID, 0, null);
          _osdWindow.OnMessage(msg); // Send a de-init msg to the OSD
          GUIWindowManager.IsOsdVisible = false; // do we need this?
        }
        //GUIWindowManager.VisibleOsd = Window.WINDOW_TVZAPOSD;
      }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// On action
 /// </summary>
 /// <param name="action"></param>
 public override void OnAction(Action action)
 {
   TVHome _tvHome = new TVHome();
   switch (action.wID)
   {
     case Action.ActionType.ACTION_CONTEXT_MENU:
       //_running = false;
       PageDestroy();
       return;
     case Action.ActionType.ACTION_PREVIOUS_MENU:
       //_running = false;
       _canceled = true;
       PageDestroy();
       return;
     case Action.ActionType.ACTION_MOVE_LEFT:
     case Action.ActionType.ACTION_TVGUIDE_PREV_GROUP:
       // switch group
       if (TVHome.OnUnlockChannelGroup())
       {
         _tvHome.OnSelectChannel();
       }
       else
       {
         spinGroup.MoveUp();
       }
       return;
     case Action.ActionType.ACTION_MOVE_RIGHT:
     case Action.ActionType.ACTION_TVGUIDE_NEXT_GROUP:
       // switch group
       if (TVHome.OnUnlockChannelGroup())
       {
         _tvHome.OnSelectChannel();
       }
       else
       {
         spinGroup.MoveDown();
       }
       return;
   }
   base.OnAction(action);
 }