• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Library.GUIMessage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            base.OnMessage(message);
            return true;
          }

        case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: {}
          break;
      }
      return base.OnMessage(message);
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:15,代码来源:GUISettingsGUI_ScreenSetup.cs


示例17: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      //      needRefresh = true;
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
          {
            SetControlLabel(GetID, (int)Controls.CONTROL_HEADING, string.Empty);
            base.OnMessage(message);
            return true;
          }

        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            base.OnMessage(message);
            ClearControl(GetID, (int)Controls.CONTROL_LIST);

            for (int i = 0; i < m_vecList.Count; i++)
            {
              GUIListItem pItem = (GUIListItem)m_vecList[i];
              AddListItemControl(GetID, (int)Controls.CONTROL_LIST, pItem);
            }

            if (_selectedLabel >= 0)
            {
              GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECT, GetID, 0,
                                              (int)Controls.CONTROL_LIST, _selectedLabel, 0, null);
              OnMessage(msg);
            }
            _selectedLabel = -1;
          }
          return true;

        case GUIMessage.MessageType.GUI_MSG_CLICKED:
          {
            int iControl = message.SenderControlId;
            if ((int)Controls.CONTROL_LIST == iControl)
            {
              _selectedLabel = GetSelectedItemNo();
              m_strSelected = GetSelectedItem().Label;
              PageDestroy();
            }
          }
          break;
      }

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


示例18: ProcessDoModal

 public override bool ProcessDoModal()
 {
   bool result = base.ProcessDoModal();
   TimeSpan timeElapsed = DateTime.Now - timeStart;
   if (TimeOut > 0)
   {
     if (timeElapsed.TotalSeconds >= TimeOut)
     {
       GUIMessage msgConfirm = new GUIMessage();
       msgConfirm.Message = GUIMessage.MessageType.GUI_MSG_CLICKED;
       msgConfirm.SenderControlId = m_DefaultYes ? btnYes.GetID : btnNo.GetID;
       OnMessage(msgConfirm);
       return false;
     }
   }
   return result;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:17,代码来源:GUIDialogYesNo.cs


示例19: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            base.OnMessage(message);
            btnMiniDisplay.Visible = MiniDisplayHelper.IsSetupAvailable();
            btnTV.Visible = Util.Utils.UsingTvServer;
            return true;
          }

        case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: {}
          break;
      }
      return base.OnMessage(message);
    }
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:17,代码来源:GUISettings.cs


示例20: OnMessage

    public override bool OnMessage(GUIMessage message)
    {
      switch (message.Message)
      {
        case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
          {
            base.OnMessage(message);
            if (imgLogo != null)
            {
              SetImage(logoUrl);
            }
          }
          return true;
      }

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Library.TransformMatrix类代码示例发布时间:2022-05-26
下一篇:
C# Library.GUIListItem类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap