Example #1
0
        private LibraryItem CreateFolderLibraryItem(string folder)
        {
            var libraryItem = new LibraryItem {
                ItemType = ItemType.Folder, Name = folder.Replace(_rootFolder, "")
            };

            ItemParsed?.Invoke(this, new ItemParsedEventArgs(libraryItem.ToString()));
            return(libraryItem);
        }
Example #2
0
        private LibraryItem CreateFileLibraryItem(string file)
        {
            var itemType = GetItemType(file);

            if (_includeScope == Scope.MusicOnly && itemType != ItemType.MusicFile)
            {
                return(null);
            }
            var libraryItem = new LibraryItem {
                ItemType = itemType, Name = file.Replace(_rootFolder, ""), Size = (_includeSize)?GetItemSize(file):0
            };

            ItemParsed?.Invoke(this, new ItemParsedEventArgs(libraryItem.ToString()));
            return(libraryItem);
        }
Example #3
0
 /// <summary>
 /// Обработчик добавления Stead.
 /// </summary>
 /// <param name="s">Отправитель</param>
 /// <param name="item">Обработанный документ</param>
 protected virtual void OnItemParsed(object s, House item)
 {
     ItemParsed?.Invoke(s, new HouseEventArgs(item, Count));
 }
Example #4
0
 /// <summary>
 /// Обработчик добавления Stead.
 /// </summary>
 /// <param name="s">Отправитель</param>
 /// <param name="item">Обработанный документ</param>
 protected virtual void OnItemParsed(object s, Room item)
 {
     ItemParsed?.Invoke(s, new RoomEventArgs(item, Count));
 }