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

C# Library.Action类代码示例

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

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



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

示例1: OnAction

 public override void OnAction(Action action)
 {
   //needRefresh = true;
   if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG ||
       action.wID == Action.ActionType.ACTION_PREVIOUS_MENU)
   {
     m_DefaultStop = false;
     base.OnAction(action);
     return;
   }
   //
   // WARNING: Even if STOP is a semantic NO, as we look from the user point of view, here it's a YES
   //
   // es. "Do you really want to STOP play LiveTv ?" -> YES I want to STOP
   //
   if (action.wID == Action.ActionType.ACTION_STOP || (action.m_key != null) && (action.m_key.KeyChar == 'b'))
   {
     m_bConfirmed = true;
     PageDestroy();
     m_DefaultStop = false;
     return;
   }
   //
   // WARNING: See above comment to understand why PLAY, that is a semantic YES, here is a NO
   //
   if (action.wID == Action.ActionType.ACTION_PLAY || (action.m_key != null) && (action.m_key.KeyChar == 'p'))
   {
     m_bConfirmed = false;
     PageDestroy();
     m_DefaultStop = false;
     return;
   }
   base.OnAction(action);
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:34,代码来源:GUIDialogPlayStop.cs


示例2: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   if (control == btnSearch)
   {
     TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.Title;
     GUIWindowManager.ActivateWindow((int)Window.WINDOW_TV_SEARCH);
     return;
   }
   if (control == btnTvGuide)
   {
     TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.KeyWord;
     GUIWindowManager.ActivateWindow((int)Window.WINDOW_TVGUIDE);
     return;
   }
   if (control == btnQuickRecord)
   {
     OnQuickRecord();
     return;
   }
   if (control == btnAdvancedRecord)
   {
     OnAdvancedRecord();
     return;
   }
   base.OnClicked(controlId, control, actionType);
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:26,代码来源:TvNewScheduleSearchType.cs


示例3: WndProc

    /// <summary>
    /// Broadcast window messages to each input device.
    /// </summary>
    /// <param name="msg"></param>
    /// <param name="action"></param>
    /// <param name="key"></param>
    /// <param name="keyCode"></param>
    /// <returns></returns>
    public static bool WndProc(ref Message msg, out Action action, out char key, out Keys keyCode)
    {
      action = null;
      key = (char)0;
      keyCode = Keys.A;

      foreach (var device in Devices)
      {
        try
        {
          if (device.WndProc(ref msg, out action, out key, out keyCode))
          {
            //First come, first served, stop message propagation then.
            return true;
          }
        }
        catch (Exception ex)
        {
          //Keep on propagating that message even if one of our input device crapped out.
          Log.Error("InputDevices - WndProc - exception caught from InputDevice: {0} {1}", device.ToString(), ex);
        }
      }

      return false;
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:33,代码来源:InputDevices.cs


示例4: OnClicked

        protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
        {
            if (control.GetType() == typeof (GUIButtonControl))
            {
                if (controlId > 100 && controlId <= Settings.LocalPresetsNumber + 100 &&
                    _setting.PresetStations[controlId - 100 - 1] != null &&
                    _setting.PresetStations[controlId - 100 - 1].GuidId != null)
                {
                    DoPlay(_setting.PresetStations[controlId - 100 - 1]);
                    if (_setting.JumpNowPlaying)
                        GUIWindowManager.ActivateWindow(25652);
                }
            }
            if (control == homeButton)
            {
                GUIWindowManager.ActivateWindow(25650);
            }
            else if (control == folderButton)
            {
                var s = GetPresetFolder();
                if (s == noPresetFolders)
                {
                    ErrMessage(Translation.NoPresetFoldersFound);
                    GUIControl.DisableControl(GetID, folderButton.GetID);
                }
                else if (s != null)
                {
                    _setting.FolderId = s;
                    _setting.Save();
                    LoadLocalPresetStations();
                }
            }

            base.OnClicked(controlId, control, actionType);
        }
开发者ID:andrewjswan,项目名称:mediaportal-tunein,代码行数:35,代码来源:PresetsGUI.cs


示例5: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   if (control == this.btnDisableRemote)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnDisableRepeat)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnRepeatDelay)
   {
     this.SaveSettings();
   }
   if (control == this.btnRemoteMapping)
   {
     try
     {
       if (!File.Exists(VLSYS_Mplay.DefaultMappingPath))
       {
         VLSYS_Mplay.AdvancedSettings.CreateDefaultRemoteMapping();
       }
       new InputMappingForm("VLSYS_Mplay").ShowDialog();
     }
     catch (Exception exception)
     {
       Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] {exception});
     }
   }
   base.OnClicked(controlId, control, actionType);
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:33,代码来源:RemoteWindow.cs


示例6: OnAction

 public override void OnAction(Action action)
 {
   /*switch (action.wID)
   {
   }*/
   base.OnAction(action);
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:7,代码来源:TVPriorities.cs


示例7: OnAction

        public override void OnAction(Action action)
        {
            switch (action.wID)
            {
                case Action.ActionType.REMOTE_1:
                    Rated = TraktAPI.TraktRateValue.love;
                    UpdateRating();
                    break;

                case Action.ActionType.REMOTE_2:
                    Rated = TraktAPI.TraktRateValue.hate;
                    UpdateRating();
                    break;

                case Action.ActionType.ACTION_SELECT_ITEM:
                    IsSubmitted = true;
                    PageDestroy();
                    return;

                case Action.ActionType.ACTION_PREVIOUS_MENU:
                case Action.ActionType.ACTION_CLOSE_DIALOG:
                case Action.ActionType.ACTION_CONTEXT_MENU:
                    IsSubmitted = false;
                    PageDestroy();
                    return;
            }

            base.OnAction(action);
        }
开发者ID:Thorsten1982,项目名称:Trakt-for-Mediaportal,代码行数:29,代码来源:GUIRateDialog.cs


示例8: WndProc

    public static bool WndProc(ref Message msg, out Action action, out char key, out Keys keyCode)
    {
      action = null;
      key = (char)0;
      keyCode = Keys.A;

      if (CentareaRemote.WndProc(ref msg))
      {
        return true;
      }

      if (HidListener.WndProc(ref msg, out action, out key, out keyCode))
      {
        return true;
      }

      if (HCWRemote.WndProc(msg))
      {
        return true;
      }

      if (FireDTVRemote.WndProc(ref msg, out action, out key, out keyCode))
      {
        return true;
      }

      if (MCE2005Remote.WndProc(msg))
      {
        return true;
      }

      return false;
    }
开发者ID:Eddie-Jee,项目名称:MediaPortal-1,代码行数:33,代码来源:InputDevices.cs


示例9: OnClicked

    protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
      {
        bIsUsernameButtonPressed = false;
        bIsPasswordButtonPressed = false;

        if (control == btnEnterUsername)
        {
          bIsUsernameButtonPressed = true;
          PageDestroy();
        }

        if (control == btnEnterPassword)
        {
          bIsPasswordButtonPressed = true;
          PageDestroy();
        }

        if (control == btnOK)
        {
          HeadWeb hw = (HeadWeb)GUIWindowManager.GetWindow(HeadWeb.ID);
          HeadWebSettings.Instance.s_cc = new CookieContainer();
          bool loginresult = hw.loginUser(HeadWebSettings.Instance.s_username, HeadWebSettings.Instance.s_password);
          if (loginresult)
          {
            HeadWebSettings.Instance.s_loggedin = true;
            hw.getFavorites(true);
            PageDestroy();
          }
        }

        base.OnClicked(controlId, control, actionType);
      }
开发者ID:pilehave,项目名称:headweb-mp,代码行数:32,代码来源:HeadWebLogin.cs


示例10: OnAction

 public override void OnAction(Action action)
 {
     if (action.wID == Action.ActionType.ACTION_VOLUME_UP ||
         action.wID == Action.ActionType.ACTION_VOLUME_DOWN ||
         action.wID == Action.ActionType.ACTION_VOLUME_MUTE)
     {
         // MediaPortal core sends this message to the Fullscreenwindow, we need to do it ourselves to make the Volume OSD show up
         base.OnAction(new Action(Action.ActionType.ACTION_SHOW_VOLUME, 0, 0));
         return;
     }
     else
     {
         Action translatedAction = new Action();
         if (ActionTranslator.GetAction((int)Window.WINDOW_FULLSCREEN_VIDEO, action.m_key, ref translatedAction))
         {
             if (translatedAction.wID == Action.ActionType.ACTION_SHOW_OSD)
             {
                 base.OnAction(translatedAction);
                 if (GUIWindowManager.VisibleOsd == Window.WINDOW_OSD)
                 {
                     GUIWindowManager.VisibleOsd = (Window)GUIOnlineVideoOSD.WINDOW_ONLINEVIDEOS_OSD;
                 }
                 return;
             }
             if (translatedAction.wID == Action.ActionType.ACTION_ASPECT_RATIO)
             {
                 base.OnAction(translatedAction);
             }
         }
     }
     base.OnAction(action);
 }
开发者ID:pilehave,项目名称:headweb-mp,代码行数:32,代码来源:GUIOnlineVideoFullscreen.cs


示例11: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   if (control == this.btnDisplayVideo)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnDisplayAction)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnDisplayActionTime)
   {
     this.SaveSettings();
   }
   if (control == this.btnDisplayIdle)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnIdleDelay)
   {
     this.SaveSettings();
   }
   base.OnClicked(controlId, control, actionType);
 }
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:27,代码来源:DisplayControlWindow.cs


示例12: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   if (control == this.btnEnableKeyPad)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnEnableCustom)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnKeyPadMapping)
   {
     try
     {
       if (!File.Exists(MatrixMX.DefaultMappingPath))
       {
         MatrixMX.AdvancedSettings.CreateDefaultKeyPadMapping();
       }
       new InputMappingForm("MatrixMX_Keypad").ShowDialog();
     }
     catch (Exception exception)
     {
       Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] {exception});
     }
   }
   base.OnClicked(controlId, control, actionType);
 }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:29,代码来源:GUISettingsMiniDisplay_KeyPadWindow.cs


示例13: OnAction

        public override void OnAction(Action action)
        {
            if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_ITEM || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_CHAPTER)
              {
            if (Youtube2MP.player.CurrentSong > -1)
            {
              Youtube2MP.player.PlayNext();
              return;
            }
            if (Youtube2MP.temp_player.CurrentSong > -1)
            {
              Youtube2MP.temp_player.PlayNext();
              return;
            }
              }

              if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREV_ITEM || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREV_CHAPTER)
              {
            if (Youtube2MP.player.CurrentSong > -1)
            {
              Youtube2MP.player.PlayPrevious();
              return;
            }
            if (Youtube2MP.temp_player.CurrentSong > -1)
            {
              Youtube2MP.temp_player.PlayPrevious();
              return;
            }
              }
              base.OnAction(action);
        }
开发者ID:andrewjswan,项目名称:youtube-fm-for-mediaportal,代码行数:31,代码来源:YouTubeGuiInfoBase.cs


示例14: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   base.OnClicked(controlId, control, actionType);
   if (control == btnClose)
   {
     PageDestroy();
   }
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:8,代码来源:GUIDialogNotify.cs


示例15: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
     if (control == btnCreateMovingPicturesCategories)
         CreateMovingPicturesCategoriesClicked();
     if (control == btnCreateMovingPicturesFilters)
         CreateMovingPicturesFiltersClicked();
     base.OnClicked(controlId, control, actionType);
 }
开发者ID:MichelZ,项目名称:Trakt-for-Mediaportal,代码行数:8,代码来源:GUISettingsGeneral.cs


示例16: OnAction

 public override void OnAction(Action action)
 {
   if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU)
   {
     // User canceled selection, deselect file
     m_iSelectedFile = -1;
   }
   base.OnAction(action);
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:GUIDialogFileStacking.cs


示例17: OnClicked

    protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
      {
        if (control == btnEnterCode)
        {
          bIsSMSCodeButtonPressed = true;
          PageDestroy();
        }
        base.OnClicked(controlId, control, actionType);
      }
开发者ID:pilehave,项目名称:headweb-mp,代码行数:9,代码来源:HeadWebSMSPurchase.cs


示例18: OnClicked

 protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
 {
   if (control == this.btnVolume)
   {
     this.SaveSettings();
   }
   if (control == this.btnProgress)
   {
     this.SaveSettings();
   }
   if (control == this.btnDiskIcon)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnMediaStatus)
   {
     this.SaveSettings();
   }
   if (control == this.btnDiskStatus)
   {
     this.SaveSettings();
   }
   if (control == this.btnCustomFont)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnLargeIcons)
   {
     this.SaveSettings();
     this.SetButtons();
   }
   if (control == this.btnCustomIcons)
   {
     this.SaveSettings();
   }
   if (control == this.btnInvertIcons)
   {
     this.SaveSettings();
   }
   if (control == this.btnFontEditor)
   {
     Form form = new iMONLCDg_FontEdit();
     form.ShowDialog();
     form.Dispose();
   }
   if (control == this.btnIconEditor)
   {
     Form form2 = new iMONLCDg_IconEdit();
     form2.ShowDialog();
     form2.Dispose();
   }
   base.OnClicked(controlId, control, actionType);
 }
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:55,代码来源:DisplayOptionsWindow.cs


示例19: OnClicked

    protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
    {
      base.OnClicked(controlId, control, actionType);
      int iYear, iMonth;
      if (control == spinStartMonth)
      {
        iYear = spinStartYear.Value;
        iMonth = spinStartMonth.Value;
        if (iMonth == 2 && DateTime.IsLeapYear(iYear))
        {
          spinStartDay.SetRange(1, 29);
        }
        else
        {
          spinStartDay.SetRange(1, months[iMonth]);
        }
      }
      if (control == spinEndMonth)
      {
        iYear = spinEndYear.Value;
        iMonth = spinEndMonth.Value;
        if (iMonth == 2 && DateTime.IsLeapYear(iYear))
        {
          spinEndDay.SetRange(1, 29);
        }
        else
        {
          spinEndDay.SetRange(1, months[iMonth]);
        }
      }
      if (control == btnOK)
      {
        int iHour;
        iHour = spinStartHour.Value;
        int iMin;
        iMin = spinStartMinute.Value;
        int iDay;
        iDay = spinStartDay.Value;
        iMonth = spinStartMonth.Value;
        iYear = spinStartYear.Value;
        channel = spinChannel.GetLabel();

        startDateTime = new DateTime(iYear, iMonth, iDay, iHour, iMin, 0, 0);
        iHour = spinEndHour.Value;
        iMin = spinEndMinute.Value;
        iDay = spinEndDay.Value;
        iMonth = spinEndMonth.Value;
        iYear = spinEndYear.Value;
        endDateTime = new DateTime(iYear, iMonth, iDay, iHour, iMin, 0, 0);

        _confirmed = true;
        PageDestroy();
        return;
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:55,代码来源:GUIDialogDateTime.cs


示例20: OnAction

 public override void OnAction(Action action)
 {
   switch (action.wID)
   {
     case Action.ActionType.ACTION_PREVIOUS_MENU:
       {
         GUIWindowManager.ShowPreviousWindow();
         return;
       }
   }
   base.OnAction(action);
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:12,代码来源:GUISettingsSlideShow.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Library.GUIControl类代码示例发布时间:2022-05-26
下一篇:
C# PluginManager.PluginRuntime类代码示例发布时间: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