Exemplo n.º 1
0
        public BisFile(ref OpenFileDialog fileDialog, BisTypes type)
        {
            path      = fileDialog.FileName;
            this.type = type;

            size = (ulong)new FileInfo(path).Length;
        }
Exemplo n.º 2
0
        static public void Validate(BisFile file, BisTypes type)
        {
            if (file == null)
            {
                throw new Exception($"No {type} has been selected!");
            }

            if (!File.Exists(file.path))
            {
                throw new Exception($"Invalid path for {type}");
            }
        }
Exemplo n.º 3
0
 public BisFile(string path, BisTypes type, ulong size)
 {
     this.path = path;
     this.size = size;
     this.type = type;
 }