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


C# Playlists.PlayListPlayer类代码示例

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


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

示例1: GetNextReturnsFileName

 public void GetNextReturnsFileName()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem("apa", "c:\\apa.mp3");
   playlist.Add(item1);
   Assert.AreEqual("c:\\apa.mp3", player.GetNext());
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:PlayListPlayerTest.cs

示例2: InsertItemButNotStartPlayingGivesNull

 public void InsertItemButNotStartPlayingGivesNull()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   Assert.IsNull(player.GetCurrentItem());
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:9,代码来源:PlayListPlayerTest.cs

示例3: GUIVideoBaseWindow

    public GUIVideoBaseWindow()
    {
      playlistPlayer = PlayListPlayer.SingletonPlayer;

      if (handler == null)
      {
        handler = new VideoViewHandler();
      }

      GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction);
    }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:11,代码来源:GUIVideoBaseWindow.cs

示例4: PlayMovesCurrentToItem

 public void PlayMovesCurrentToItem()
 {
   PlayListPlayer player = new PlayListPlayer();
   player.g_Player = this; //fake g_Player
   player.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC;
   PlayList playlist = player.GetPlaylist(PlayListType.PLAYLIST_MUSIC);
   PlayListItem item1 = new PlayListItem();
   playlist.Add(item1);
   player.PlayNext();
   Assert.AreEqual(item1, player.GetCurrentItem());
   Assert.IsTrue(hasPlayBeenCalled);
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:12,代码来源:PlayListPlayerTest.cs

示例5: GUIVideoOSD

 public GUIVideoOSD()
 {
   GetID = (int)Window.WINDOW_OSD;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIVideoOSD.cs

示例6: GUISlideShow

 public GUISlideShow()
 {
   GetID = (int)Window.WINDOW_SLIDESHOW;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:5,代码来源:GUISlideShow.cs

示例7: GUIVideoFullscreen

 public GUIVideoFullscreen()
 {
   GetID = (int)Window.WINDOW_FULLSCREEN_VIDEO;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:edterbak,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIVideoFullscreen.cs

示例8: GUIMusicBaseWindow

    public GUIMusicBaseWindow()
    {
      if (m_database == null)
      {
        m_database = MusicDatabase.Instance;
      }

      playlistPlayer = PlayListPlayer.SingletonPlayer;

      playlistPlayer.PlaylistChanged += new PlayListPlayer.PlaylistChangedEventHandler(playlistPlayer_PlaylistChanged); 

      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        string playNowJumpTo = xmlreader.GetValueAsString("music", "playnowjumpto", "none");

        switch (playNowJumpTo)
        {
          case "none":
            PlayNowJumpTo = PlayNowJumpToType.None;
            break;

          case "nowPlayingAlways":
            PlayNowJumpTo = PlayNowJumpToType.NowPlayingAlways;
            break;

          case "nowPlayingMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.NowPlayingMultipleItems;
            break;

          case "currentPlaylistAlways":
            PlayNowJumpTo = PlayNowJumpToType.CurrentPlaylistAlways;
            break;

          case "currentPlaylistMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.CurrentPlaylistMultipleItems;
            break;

          case "fullscreenAlways":
            PlayNowJumpTo = PlayNowJumpToType.FullscreenIfVizEnabledAlways;
            break;

          case "fullscreenMultipleItems":
            PlayNowJumpTo = PlayNowJumpToType.FullscreenIfVizEnabledMultipleItems;
            break;

          default:
            PlayNowJumpTo = PlayNowJumpToType.None;
            break;
        }

        _autoShuffleOnLoad = xmlreader.GetValueAsBool("musicfiles", "autoshuffle", false);
      }

      UsingInternalMusicPlayer = BassMusicPlayer.IsDefaultMusicPlayer;
    }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:55,代码来源:GUIMusicBaseWindow.cs

示例9: Init

    /// <summary>
    /// Initialise The Viz Window
    /// </summary>
    private void Init()
    {
      InitializeComponent();
      CheckForIllegalCrossThreadCalls = false;
      PlaylistPlayer = PlayListPlayer.SingletonPlayer;

      g_Player.PlayBackStarted += new g_Player.StartedHandler(OnPlayBackStarted);
      Bass.InternetStreamSongChanged += new BassAudioEngine.InternetStreamSongChangedDelegate(InternetStreamSongChanged);

      //if (GUIGraphicsContext.form != null)
      //    GUIGraphicsContext.form.Resize += new EventHandler(OnAppFormResize);

      GUIGraphicsContext.OnNewAction += new OnActionHandler(OnNewAction);

      SetStyle(ControlStyles.DoubleBuffer, true);
      SetStyle(ControlStyles.AllPaintingInWmPaint, true);
      SetStyle(ControlStyles.UserPaint, true);

      TextStringFormat.Trimming = StringTrimming.Character;
      TextStringFormat.FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.NoClip | StringFormatFlags.FitBlackBox;

      LoadSettings();

      // Soundspectrum Graphics always show the cursor, so let's hide it here
      if (GUIGraphicsContext.Fullscreen && _autoHideMouse)
      {
        Cursor.Hide();
      }
    }
开发者ID:edalex86,项目名称:MediaPortal-1,代码行数:32,代码来源:VisualizationWindow.cs

示例10: GUIMusicFullscreen

 public GUIMusicFullscreen()
 {
   GetID = (int)Window.WINDOW_FULLSCREEN_MUSIC;
   playlistPlayer = PlayListPlayer.SingletonPlayer;
 }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:5,代码来源:GUIMusicFullscreen.cs

示例11: VideoHandler

        public VideoHandler()
        {
            playlistPlayer = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer;

            // Check if External Player is being used
            MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"));
            m_bIsExternalPlayer = !xmlreader.GetValueAsBool("movieplayer", "internal", true);
            m_bIsExternalDVDPlayer = !xmlreader.GetValueAsBool("dvdplayer", "internal", true);
            
			// external player handlers
			Utils.OnStartExternal += new Utils.UtilEventHandler(onStartExternal);
			Utils.OnStopExternal += new Utils.UtilEventHandler(onStopExternal);

            g_Player.PlayBackStopped += new MediaPortal.Player.g_Player.StoppedHandler(OnPlayBackStopped);
            g_Player.PlayBackEnded += new MediaPortal.Player.g_Player.EndedHandler(OnPlayBackEnded);
            g_Player.PlayBackStarted += new MediaPortal.Player.g_Player.StartedHandler(OnPlayBackStarted);
            g_Player.PlayBackChanged += new g_Player.ChangedHandler(OnPlaybackChanged);
            PlayPropertyUpdater.WorkerSupportsCancellation = true;
            PlayPropertyUpdater.DoWork += new DoWorkEventHandler(SetPlayProperties_DoWork);
        }
开发者ID:barneh,项目名称:mptvseries,代码行数:20,代码来源:VideoHandler.cs

示例12: RenderVisualization

    public override int RenderVisualization()
    {
      try
      {
        if (VisualizationWindow == null || !VisualizationWindow.Visible || _visParam.VisHandle == 0)
        {
          return 0;
        }

        // Set Song information, so that the plugin can display it
        if (trackTag != null && Bass != null)
        {
          _playlistPlayer = PlayListPlayer.SingletonPlayer;
          PlayListItem curPlaylistItem = _playlistPlayer.GetCurrentItem();

          _mediaInfo.Position = (int)Bass.CurrentPosition;
          _mediaInfo.Duration = (int)Bass.Duration;
          _mediaInfo.PlaylistLen = 1;
          _mediaInfo.PlaylistPos = _playlistPlayer.CurrentPlaylistPos;
        }
        else
        {
          _mediaInfo.Position = 0;
          _mediaInfo.Duration = 0;
          _mediaInfo.PlaylistLen = 0;
          _mediaInfo.PlaylistPos = 0;
        }
        if (IsPreviewVisualization)
        {
          _mediaInfo.SongTitle = "Mediaportal Preview";
        }
        BassVis.BASSVIS_SetInfo(_visParam, _mediaInfo);

        if (RenderStarted)
        {
          return 1;
        }

        int stream = 0;

        if (Bass != null)
        {
          stream = (int)Bass.GetCurrentVizStream();
        }

        BassVis.BASSVIS_SetPlayState(_visParam, BASSVIS_PLAYSTATE.Play);
        RenderStarted = BassVis.BASSVIS_RenderChannel(_visParam, stream);
      }

      catch (Exception) {}

      return 1;
    }
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:53,代码来源:WinampViz.cs

示例13: Init

 public override bool Init()
 {
   _playlistPlayer = PlayListPlayer.SingletonPlayer;
   g_Player.PlayBackEnded += OnPlayBackEnded;
   g_Player.PlayBackChanged += OnPlayBackChanged;
   g_Player.PlayBackStopped += OnPlayBackStopped;
   var mdb = MusicDatabase.Instance;
   var sessionKey = mdb.GetLastFMSK();
   var currentUser = mdb.GetLastFMUser();
   var a = new LastFMLibrary(sessionKey, currentUser); //TODO this is just making _SK get loaded.   No need to actual instansiate
   return Load(GUIGraphicsContext.GetThemedSkinDirectory(@"\lastFmRadio.xml"));
 }
开发者ID:robyf71,项目名称:MediaPortal-1,代码行数:12,代码来源:GUILastFMRadio.cs

示例14: D3D

    protected static Rectangle         _backupBounds;             // Bounds backup

    #endregion

    #region constructor

    /// <summary>
    /// Constructor
    /// </summary>
    protected D3D()
    {
      _firstTimeWindowDisplayed  = true;
      _firstTimeActivated       = true;
      MinimizeOnStartup         = false;
      MinimizeOnGuiExit         = false;
      MinimizeOnFocusLoss       = false;
      ShuttingDown              = false;
      AutoHideMouse             = true;
      MouseCursor               = true;
      Windowed                  = true;
      Volume                    = -1;
      AppActive                 = false;
      KeyPreview                = true;
      Frames                    = 0;
      FrameStatsLine1           = null;
      FrameStatsLine2           = null;
      Text                      = Resources.D3DApp_NotifyIcon_MediaPortal;
      PlaylistPlayer            = PlayListPlayer.SingletonPlayer;
      MouseTimeOutTimer         = DateTime.Now;
      _lastActiveWindow         = -1;
      IsVisible                 = true;
      IsDisplayTurnedOn         = true;
      IsInAwayMode              = false;
      IsUserPresent             = true;
      _lastMouseCursor          = !MouseCursor;
      _showCursorWhenFullscreen = false;
      _currentPlayListType      = PlayListType.PLAYLIST_NONE;
      _enumerationSettings      = new D3DEnumeration();
      _presentParams            = new PresentParameters();
      _renderTarget             = this;

      using (Settings xmlreader = new MPSettings())
      {
        _useExclusiveDirectXMode = xmlreader.GetValueAsBool("general", "exclusivemode", true);
        UseEnhancedVideoRenderer = xmlreader.GetValueAsBool("general", "useEVRenderer", false);
        _disableMouseEvents      = xmlreader.GetValueAsBool("remote", "CentareaJoystickMap", false);
        AutoHideTaskbar          = xmlreader.GetValueAsBool("general", "hidetaskbar", true);
        _alwaysOnTop             = xmlreader.GetValueAsBool("general", "alwaysontop", false);
        _reduceFrameRate         = xmlreader.GetValueAsBool("gui", "reduceframerate", false);
        _doNotWaitForVSync       = xmlreader.GetValueAsBool("debug", "donotwaitforvsync", false);
      }

      _useExclusiveDirectXMode = !UseEnhancedVideoRenderer && _useExclusiveDirectXMode;
      GUIGraphicsContext.IsVMR9Exclusive = _useExclusiveDirectXMode;
      GUIGraphicsContext.IsEvr = UseEnhancedVideoRenderer;
      
      InitializeComponent();
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:58,代码来源:D3D.cs

示例15: Init

    public override bool Init()
    {
      bool bResult = Load(GUIGraphicsContext.GetThemedSkinFile(@"\MyRadioLastFM.xml"));

      using (Profile.Settings xmlreader = new Profile.MPSettings())
      {
        _configShowTrayIcon = xmlreader.GetValueAsBool("audioscrobbler", "showtrayicon", false);
        _configShowBallonTips = xmlreader.GetValueAsBool("audioscrobbler", "showballontips", false);
        _configDirectSkip = xmlreader.GetValueAsBool("audioscrobbler", "directskip", false);
        _configListEntryCount = xmlreader.GetValueAsInt("audioscrobbler", "listentrycount", 24);
        _configOneClickStart = xmlreader.GetValueAsBool("audioscrobbler", "oneclickstart", false);
      }

      PlaylistPlayer = PlayListPlayer.SingletonPlayer;
      LastFMStation = new StreamControl();
      InfoScrobbler = AudioscrobblerUtils.Instance;
      _usersTopArtists = new List<string>(_configListEntryCount);
      _usersOwnTags = new List<string>(_configListEntryCount);
      _usersFriends = new List<string>(_configListEntryCount);
      _radioTrackList = new List<Song>(5);
      _similarArtistCache = new List<string>(5);
      _trackTagsCache = new List<string>(5);
      _streamSong = new Song();
      _scrobbleUsers = new List<string>(1);

      if (_configShowTrayIcon)
      {
        InitTrayIcon();
      }

      g_Player.PlayBackStarted += new g_Player.StartedHandler(PlayBackStartedHandler);
      g_Player.PlayBackStopped += new g_Player.StoppedHandler(PlayBackStoppedHandler);
      g_Player.PlayBackEnded += new g_Player.EndedHandler(PlayBackEndedHandler);

      LastFMStation.RadioSettingsSuccess += new StreamControl.RadioSettingsLoaded(OnRadioSettingsSuccess);
      LastFMStation.RadioSettingsError += new StreamControl.RadioSettingsFailed(OnRadioSettingsError);
      this.PlaylistUpdateSuccess += new PlaylistUpdated(OnPlaylistUpdateSuccess);
      this.PlaylistUpdateError += new PlaylistEmpty(OnPlaylistUpdateError);

      return bResult;
    }
开发者ID:sekotin,项目名称:MediaPortal-1,代码行数:41,代码来源:GUIRadioLastFM.cs


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