コード例 #1
0
        public BisFile(ref OpenFileDialog fileDialog, BisTypes type)
        {
            path      = fileDialog.FileName;
            this.type = type;

            size = (ulong)new FileInfo(path).Length;
        }
コード例 #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}");
            }
        }
コード例 #3
0
 public BisFile(string path, BisTypes type, ulong size)
 {
     this.path = path;
     this.size = size;
     this.type = type;
 }