Exemplo n.º 1
0
 public BookmarkSubItem(PlaylistItem parent, Bookmark bookmark)
     : base(bookmark.Title, parent)
 {
     _bookmark = bookmark;
     _hint     = new BookmarkStartHint(bookmark);
 }
Exemplo n.º 2
0
 public BookmarkSubItem(PlaylistItem parent, Bookmark bookmark)
     : base(bookmark.Title, parent)
 {
     _bookmark = bookmark;
     _hint = new BookmarkStartHint(bookmark);
 }
Exemplo n.º 3
0
        public override void Save()
        {
            lock (_saveLock)
            {
                if (_tag != null && _tagModified)
                {
                    double resumePosition = -1;
                    if (this.Equals(MediaRenderer.DefaultInstance.RenderedMediaInfo))
                    {
                        MediaRenderer.DefaultInstance.PauseRenderer();
                        resumePosition = MediaRenderer.DefaultInstance.MediaPosition;
                        MediaRenderer.DefaultInstance.StopRenderer();
                        Thread.Sleep(100);
                    }

                    if (IsEmpty)
                    {
                        af.RemoveTags(TagTypes.AllTags);
                    }

                    af.Save();
                    _tagModified = false;

                    if (resumePosition > 0)
                    {
                        BookmarkStartHint hint = new BookmarkStartHint(
                            new Bookmark("default", (int)resumePosition));

                        MediaRenderer.DefaultInstance.StartRendererWithHint(hint);
                        MediaRenderer.DefaultInstance.AudioVolume = ProTONEConfig.LastVolume;
                    }
                }
            }
        }