/// <summary> /// For images in slideshow /// </summary> /// <param name="filePathName"></param> /// <param name="height"></param> /// <param name="width"></param> /// <param name="duration"></param> /// <param name="order"></param> /// <param name="inSlideShow"></param> public ImageData(string filePathName, int height, int width, int duration, int order, bool inSlideShow) : base(filePathName) { this.thumbNailImage = HelperMethods.BitmapImageToByte(HelperMethods.BitmapToBitmapImage(MediaPlayerLib.Properties.Resources.ImageThumbNail)); this.height = height; this.width = width; this.duration = duration; base.order = order; if (inSlideShow) { //Update database MediaDataMapper mediaDataDataContent = new MediaDataMapper() { Duration = this.Duration, Description = this.Description, Order = this.Order, FilePathName = this.FilePathName, MediaDataType = MediaDataType.Image, ThumbNailImage = this.ThumbNailImage }; this.id = MediaDataQuery.NewMediaData(mediaDataDataContent); } else { this.id = -1; } }
/// <summary> /// For video in folder /// </summary> /// <param name="filePathName"></param> /// <param name="inSlideShow"></param> public VideoData(string filePathName, bool inSlideShow) : base(filePathName) { this.thumbNailImage = HelperMethods.BitmapImageToByte(HelperMethods.BitmapToBitmapImage(MediaPlayerLib.Properties.Resources.VideoThumbNail)); this.id = -1; }