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); }
public DigitalMediaItem(string pDisplayString, MediaListItemType pMediaItemType, string pKey, int pSpecificType) : base(pDisplayString, pMediaItemType) { ItemType = (DigitalMediaItemType)pSpecificType; TargetId = Convert.ToInt32(pKey); }
public FileSystemItem(string pDisplayString, MediaListItemType pMediaItemType, string pKey, int pSpecificType) : base(pDisplayString, pMediaItemType) { ItemType = (FileSystemItemType)pSpecificType; FullPath = pKey; }
protected MediaListItem(string pDisplayString, MediaListItemType pListItemType) : base(pDisplayString) { MediaType = pListItemType; }