Esempio n. 1
0
        public ContentItem(int ContentNumber, string ContentFolder, string FileName)
        {
            FileInfo fi = new FileInfo(FileName);

            MimeType = fi.Extension;
            string file_name = ContentFolder + ContentNumber.ToString().PadLeft(3, '0') + fi.Extension;

            File.Copy(FileName, file_name);

            if (fi.Extension.ToLower() == ".bmp")
            {
                file_name = Globals.ConvertBmpToPng(file_name);
            }
            this.ContentFile = file_name;
        }