public FileDesc(string Name, FileType Type, string Extension, FileSize Size) { this.Name = Name; this.Type = Type; this.Extension = Extension; this.Size = Size; }
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); }
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); }
public MovieFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Resolution, string Durability) : base(Name, Type, Extension, Size, Resolution) { //this.Durability = Durability; }
public ImageFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Resolution) : base(Name, Type, Extension, Size) { GetImageResolution(Resolution); }
public TextFileDesc(string Name, FileType Type, string Extension, FileSize Size, string Content) : base(Name, Type, Extension, Size) { this.Content = Content; }