Пример #1
0
        public MediaListItem CreateListItem(
            string pMediaListItemType,
            object pKey,
            MediaListItemType pMediaItemType,
            int pSpecificItemType,
            string pDisplayString)
        {
            switch (pMediaListItemType.ToUpper())
            {
            case "FILESYSTEMITEM":
                return(new FileSystemItem(pDisplayString, (FileSystemItemType)pSpecificItemType, (string)pKey));;

            case "DIGITALMEDIAITEM":
                return(new DigitalMediaItem(pDisplayString, (DigitalMediaItemType)pSpecificItemType, Convert.ToInt32(pKey)));

            case "ROOTITEM":
                return(new RootItem(pDisplayString, (RootItemType)pSpecificItemType));

            default:
                break;
            }
            return(null);
        }
Пример #2
0
 public DigitalMediaItem(string pDisplayString, MediaListItemType pMediaItemType, string pKey, int pSpecificType)
     : base(pDisplayString, pMediaItemType)
 {
     ItemType = (DigitalMediaItemType)pSpecificType;
     TargetId = Convert.ToInt32(pKey);
 }
Пример #3
0
 public FileSystemItem(string pDisplayString, MediaListItemType pMediaItemType, string pKey, int pSpecificType)
     : base(pDisplayString, pMediaItemType)
 {
     ItemType = (FileSystemItemType)pSpecificType;
     FullPath = pKey;
 }
Пример #4
0
 protected MediaListItem(string pDisplayString, MediaListItemType pListItemType)
     : base(pDisplayString)
 {
     MediaType = pListItemType;
 }