Exemplo n.º 1
0
        public Audiobook(DirectoryInfo path)
        {
            pathToDirectoryAudiobook = path;
            nameAudiobook            = pathToDirectoryAudiobook.Name;
            pathToBookmarks          = Path.Combine(pathToDirectoryAudiobook.FullName, "bookmarks.sabp.xml");
            bookmarks = new Bookmarks(pathToBookmarks);

            GetAudiofiles();
            durationAudiobook       = GetDurationAudiobook();
            pathToFileInfoAudiobook = Path.Combine(pathToDirectoryAudiobook.FullName, "infoAudiobook.txt");
            currentPosition         = GetInfoAboutAudiobook();

            audiobookPlaying = false;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Функция инициализация закладок в выпадающее меню
        /// </summary>
        private void InitilizeSelecterBookmarks()
        {
            dictionaryBookmark = new Dictionary <int, Bookmark>();

            Bookmarks bookmarks = currentAudiobook.bookmarks;

            //Очищаем список перед записью
            cmbBxBookmark.Items.Clear();

            foreach (var bookmark in bookmarks.bookmarks)
            {
                int index = cmbBxBookmark.Items.Add(bookmark.title);

                dictionaryBookmark.Add(index, bookmark);
            }
        }