Esempio n. 1
0
 public FileDesc(string Name, FileType Type, string Extension, FileSize Size)
 {
     this.Name      = Name;
     this.Type      = Type;
     this.Extension = Extension;
     this.Size      = Size;
 }
Esempio n. 2
0
        private void GetSize(string Size)
        {
            string value = "";
            string units = "";

            for (int i = 0; i < Size.Length; i++)
            {
                if (Char.IsDigit(Size[i]))
                {
                    value += Size[i];
                }
                else
                {
                    units += Size[i];
                }
            }

            SizeUnits tempUnit;

            switch (units)
            {
            case "B":
            case "b":
            case "byte":
                tempUnit = SizeUnits.B;
                break;

            case "MB":
            case "mb":
            case "megabyte":
                tempUnit = SizeUnits.MB;
                break;

            case "GB":
            case "gb":
            case "gigabyte":
                tempUnit = SizeUnits.B;
                break;

            default:
                tempUnit = SizeUnits.MB;
                break;
            }
            this.Size = new FileSize(int.Parse(value), tempUnit);
        }
Esempio n. 3
0
        private void GetSize(string Size)
        {
            string value = "";
            string units = "";

            for (int i = 0; i < Size.Length; i++)
            {
                if (Char.IsDigit(Size[i]))
                {
                    value += Size[i];
                }
                else
                {
                    units += Size[i];
                }
            }
            this.Size = new FileSize(int.Parse(value), units);
        }
Esempio n. 4
0
 public MovieFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Resolution, string Durability)
     : base(Name, Type, Extension, Size, Resolution)
 {
     //this.Durability = Durability;
 }
Esempio n. 5
0
 public ImageFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Resolution)
     : base(Name, Type, Extension, Size)
 {
     GetImageResolution(Resolution);
 }
Esempio n. 6
0
 public TextFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Content)
     : base(Name, Type, Extension, Size)
 {
     this.Content = Content;
 }