Ejemplo n.º 1
0
        /// <summary>
        /// Constructor used to restore from database
        /// </summary>
        /// <param name="id"></param>
        public VideoData(int id)
        {
            MediaDataMapper mediaDataDataContent = MediaDataQuery.GetMediaData(id);

            this.id             = id;
            this.filePathName   = mediaDataDataContent.FilePathName;
            this.order          = mediaDataDataContent.Order;
            this.description    = mediaDataDataContent.Description;
            this.thumbNailImage = mediaDataDataContent.ThumbNailImage;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor used to restore from database
        /// </summary>
        /// <param name="id"></param>
        public ImageData(int id)
        {
            MediaDataMapper mediaDataDataContent = MediaDataQuery.GetMediaData(id);

            base.id                   = id;
            this.filePathName         = mediaDataDataContent.FilePathName;
            this.order                = mediaDataDataContent.Order;
            this.description          = mediaDataDataContent.Description;
            this.thumbNailImage       = mediaDataDataContent.ThumbNailImage;
            this.duration             = mediaDataDataContent.Duration;
            this.thumbNailImageLoaded = true;
            try {
                Image image = Image.FromFile(this.filePathName);
                this.width  = image.Width;
                this.height = image.Height;
            } catch {
                this.width  = 0;
                this.height = 0;
            }
        }