当前位置: 首页>>代码示例>>C#>>正文


C# Library.GUIMessage类代码示例

本文整理汇总了C#中MediaPortal.GUI.Library.GUIMessage的典型用法代码示例。如果您正苦于以下问题:C# GUIMessage类的具体用法?C# GUIMessage怎么用?C# GUIMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GUIMessage类属于MediaPortal.GUI.Library命名空间,在下文中一共展示了GUIMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnMessage

 public override bool OnMessage(GUIMessage message)
 {
   switch (message.Message)
   {
     case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
       {
         base.OnMessage(message);
         Update();
         return true;
       }
     case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
       {
         if (m_pTexture != null)
         {
           m_pTexture.Dispose();
         }
         m_pTexture = null;
         base.OnMessage(message);
         // Fix for Mantis issue: 0001709: Background not correct after viewing pictures properties twice
         Restore();
         return true;
       }
   }
   return base.OnMessage(message);
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:25,代码来源:GUIDialogExif.cs

示例2: OnMessage

        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
                case GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED:
                    {
                        int iControl = message.SenderControlId;

                        if (iControl == (int)m_Facade.GetID)
                        {
                            GUIListItem item = m_Facade.SelectedListItem;

                            if (item == null || item.TVTag == null || !(item.TVTag is AniDB_CharacterVM))
                                return true;

                            AniDB_CharacterVM aniChar = item.TVTag as AniDB_CharacterVM;
                            if (aniChar == null) return true;

                            SetCharacterProperties(aniChar);
                        }
                    }

                    return true;

                default:
                    return base.OnMessage(message);
            }
        }
开发者ID:dizzydezz,项目名称:jmm,代码行数:28,代码来源:ActorWindow.cs

示例3: DoModal

        public void DoModal(int dwParentId)
        {
            //Log.Debug("TvMiniGuide: DoModal");
              _parentWindowID = dwParentId;
              _parentWindow = GUIWindowManager.GetWindow(_parentWindowID);
              if (null == _parentWindow)
              {
            //Log.Debug("TvMiniGuide: parentwindow = null");
            _parentWindowID = 0;
            return;
              }

              GUIWindowManager.IsSwitchingToNewWindow = true;
              GUIWindowManager.RouteToWindow(GetID);

              // activate this window...
              GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, -1, 0, null);
              OnMessage(msg);

              GUIWindowManager.IsSwitchingToNewWindow = false;
              _running = true;
              GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Dialog);
              while (_running && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
              {
            GUIWindowManager.Process();
              }

              Close();
        }
开发者ID:puenktchen,项目名称:RadioTime,代码行数:29,代码来源:MiniGuide.cs

示例4: PageLoad

    public virtual void PageLoad(int ParentID)
    {
      CloseRoutedWindow();

      _parentWindowID = ParentID;
      _parentWindow = GUIWindowManager.GetWindow(_parentWindowID);
      if (_parentWindow == null)
      {
        _parentWindowID = 0;
        return;
      }
      GUIWindowManager.IsSwitchingToNewWindow = true;
      lock (thisLock)
      {
        GUIWindowManager.RouteToWindow(GetID);
        GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, _parentWindowID, 0,
                                        null);
        OnMessage(msg);
        _running = true;
      }
      GUIWindowManager.IsSwitchingToNewWindow = false;

      while (IsAnimating(AnimationType.WindowOpen) &&
             GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
      {
        GUIWindowManager.Process();
      }
    }
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:28,代码来源:GUIDialogWindow.cs

示例5: SelectedFacadeItem

 protected int SelectedFacadeItem()
 {
   if (facadeLayout == null) return -1;
   GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, facadeLayout.GetID, 0, 0, null);
   OnMessage(msg);
   int iItem = (int)msg.Param1;
   return iItem;
 }
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:8,代码来源:WindowPluginBase.cs

示例6: HandleAction

 /// <summary>
 /// Handle actions which are available on this dialog
 /// </summary>
 /// <param name="action">Action to execute</param>
 /// <param name="index">Index (e.g. needed for lists)</param>
 public override void HandleAction(String action, int index)
 {
     base.HandleAction(action, index);
     if (action.Equals("ok"))
     {
         GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_CLICKED, 0, 10, 10, 0, 0, null);
         dialogMenu.OnMessage(msg);
     }
 }
开发者ID:johanj,项目名称:WifiRemote,代码行数:14,代码来源:MpDialogOk.cs

示例7: OnMessage

        public override bool OnMessage(GUIMessage message)
        {
            //Log.Error(" PresetsGUI OnMessage: " + message.Message.ToString());

              if (message.Message == GUIMessage.MessageType.GUI_MSG_SETFOCUS && message.TargetControlId > 100 && message.TargetControlId<=Settings.LOCAL_PRESETS_NUMBER+100)
              {
            if (_setting.PresetStations.Count >= message.TargetControlId - 100)
              UpdateSelectedLabels(_setting.PresetStations[message.TargetControlId - 100 - 1]);
              }
              return base.OnMessage(message);
        }
开发者ID:puenktchen,项目名称:RadioTime,代码行数:11,代码来源:PresetsGUI.cs

示例8: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
          {
            SetControlLabel(GetID, 1, string.Empty);
            base.OnMessage(message);
            return true;
          }

        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            m_bConfirmed = false;
            base.OnMessage(message);
            if (m_DefaultStop)
            {
              GUIControl.FocusControl(GetID, btnStop.GetID);
            }
          }
          return true;

        case GUIMessage.MessageType.GUI_MSG_CLICKED:
          {
            int iControl = message.SenderControlId;

            if (btnStop == null)
            {
              m_bConfirmed = true;
              PageDestroy();
              m_DefaultStop = false;
              return true;
            }
            if (iControl == btnPlay.GetID)
            {
              m_bConfirmed = false;
              PageDestroy();
              m_DefaultStop = false;
              return true;
            }
            if (iControl == btnStop.GetID)
            {
              m_bConfirmed = true;
              PageDestroy();
              m_DefaultStop = false;
              return true;
            }
          }
          break;
      }

      return base.OnMessage(message);
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:53,代码来源:GUIDialogPlayStop.cs

示例9: OnMessage

        public override bool OnMessage(GUIMessage message)
        {
            bool result = base.OnMessage(message);

            if (message.Message == GUIMessage.MessageType.GUI_MSG_WINDOW_INIT)
            {
                GUIVideoOSD osd = (GUIVideoOSD)GUIWindowManager.GetWindow(GUIOnlineVideoOSD.WINDOW_ONLINEVIDEOS_OSD);
                typeof(GUIVideoFullscreen).InvokeMember("_osdWindow", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.SetField, null, this, new object[] { osd });
            }

            return result;
        }
开发者ID:pilehave,项目名称:headweb-mp,代码行数:12,代码来源:GUIOnlineVideoFullscreen.cs

示例10: HandleAction

        /// <summary>
        /// Handle actions which are available on this dialog
        /// </summary>
        /// <param name="action">Action to execute</param>
        /// <param name="index">Index (e.g. needed for lists)</param>
        public override void HandleAction(String action, int index)
        {
            base.HandleAction(action, index);
            if (action.Equals("yes"))
            {
                GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_CLICKED, 0, 11, 11, 0, 0, null);
                mpDialog.OnMessage(msg);
            }

            if (action.Equals("setrating"))
            {
                SetRating(index);
            }
        }
开发者ID:johanj,项目名称:WifiRemote,代码行数:19,代码来源:MpDialogRating.cs

示例11: OnMessage

 public override bool OnMessage(GUIMessage message)
 {
   if (!base.OnMessage(message))
   {
     return false;
   }
   switch (message.Message)
   {
     case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
       SetButtons();
       break;
   }
   return true;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:14,代码来源:GUISettingsMiniDisplay_MainMenuWindow.cs

示例12: Close

        public virtual void Close()
        {
            if (m_bRunning == false) return;
            m_bRunning = false;
            GUIWindowManager.IsSwitchingToNewWindow = true;
            lock (this) {
                GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT, GetID, 0, 0, 0, 0, null);
                base.OnMessage(msg);

                GUIWindowManager.UnRoute();
                m_bRunning = false;
            }
            GUIWindowManager.IsSwitchingToNewWindow = false;
        }
开发者ID:oetspoker,项目名称:subcentral,代码行数:14,代码来源:GUIDialogMultiSelect.cs

示例13: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            base.OnMessage(message);
            LoadSettings();
            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE);
            for (int i = 1; i <= 100; ++i)
            {
              GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE, i.ToString());
            }

            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY);
            for (int i = 1; i <= 100; ++i)
            {
              GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, i.ToString());
            }

            GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE, _watchedPercentage - 1);
            GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, _videoAudioDelay - 1);

            return true;
          }

        case GUIMessage.MessageType.GUI_MSG_CLICKED:
          {
            int iControl = message.SenderControlId;
            if (iControl == (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE)
            {
              string strLabel = message.Label;
              _watchedPercentage = Int32.Parse(strLabel);
            }
            if (iControl == (int)Controls.CONTROL_VIDEOAUDIODELAY)
            {
              string strLabel = message.Label;
              if (Int32.Parse(strLabel) < 10)
              {
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, 9);
                _videoAudioDelay = 10;
                break;
              }
              _videoAudioDelay = Int32.Parse(strLabel);
            }
          }
          break;
      }
      return base.OnMessage(message);
    }
开发者ID:hkjensen,项目名称:MediaPortal-1,代码行数:50,代码来源:GUISettingsMyVideos_OtherSettings.cs

示例14: OnMessage

 public override bool OnMessage(GUIMessage message)
 {
     if (message.Message == GUIMessage.MessageType.GUI_MSG_WINDOW_INIT)
       {
     GUIPropertyManager.SetProperty("#currentmodule", GetModuleName());
     AllocResources();
     // if (g_application.m_pPlayer) g_application.m_pPlayer.ShowOSD(false);
     // ResetAllControls(); // make sure the controls are positioned relevant to the OSD Y offset
     FocusControl(GetID, 213, 0); // set focus to play button by default when window is shown
     QueueAnimation(AnimationType.WindowOpen);
     ToggleButton(213, g_Player.Paused);
     return true;
       }
       return base.OnMessage(message);
 }
开发者ID:GuzziMP,项目名称:my-films,代码行数:15,代码来源:MyFilmsTrailerGUIOSD.cs

示例15: OpenWindow

        /// <summary>
        /// Open a window (for example Moving Pictures, MP-TV Series, etc.), 
        /// invoke on GUI thread if called from a different
        /// thread than UI thread
        /// </summary>
        /// <param name="windowId"></param>
        public static void OpenWindow(int windowId)
        {
            if (GUIGraphicsContext.form.InvokeRequired)
            {
                OpenWindowDelegate d = OpenWindow;
                GUIGraphicsContext.form.Invoke(d, new object[] { windowId });
            }
            else
            {
                GUIGraphicsContext.ResetLastActivity();
                GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, windowId, 0, null);

                GUIWindowManager.SendThreadMessage(msg);
            }
        }
开发者ID:johanj,项目名称:WifiRemote,代码行数:21,代码来源:WindowPluginHelper.cs


注:本文中的MediaPortal.GUI.Library.GUIMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。