Example #1
0
 protected void AddFile(IRealFile pFile)
 {
     if (null != pFile)
     {
         this.childFiles.Add(pFile);
     }
 }
Example #2
0
        public IEnumerable <RealFolder> GetDrives(IRealFile parent)
        {
            List <RealFolder> lst = new List <RealFolder>();

            foreach (DriveInfo driveInfo in DriveInfo.GetDrives())
            {
                FileTypes fileType = FileTypes.Disk;

                switch (driveInfo.DriveType)
                {
                case DriveType.Removable:
                    if (driveInfo.Name.StartsWith("A:") || driveInfo.Name.StartsWith("B:"))
                    {
                        fileType = FileTypes.Floppy;
                    }
                    else
                    {
                        fileType = FileTypes.Disk;
                    }
                    break;

                case DriveType.CDRom:
                    fileType = FileTypes.DVD;
                    break;

                default:
                    fileType = FileTypes.Disk;
                    break;
                }

                lst.Add(new RealFolder(driveInfo.Name, parent, driveInfo.Name, fileType));
            }

            return(lst);
        }
Example #3
0
 internal RealFile(String name, IRealFile parent, String fullPath, FileTypes fileType)
 {
     this.parent = parent;
     this.name = name;
     this.fullPath = fullPath;
     this.fileType = fileType;
 }
Example #4
0
 internal RealFile(String name, IRealFile parent, String fullPath, FileTypes fileType)
 {
     this.parent   = parent;
     this.name     = name;
     this.fullPath = fullPath;
     this.fileType = fileType;
 }
Example #5
0
 protected void AddFile(IRealFile pFile)
 {
     if (null != pFile)
     {
         this.childFiles.Add(pFile);
     }
 }
Example #6
0
        public IEnumerable <RealFolder> GetDrives(IRealFile parent)
        {
            List <RealFolder> lst = new List <RealFolder>();

            lst.Add(new RealFolder("T:\\", parent, "T:\\", FileTypes.Disk));
            lst.Add(new RealFolder("GAME:\\", parent, "GAME:\\", FileTypes.Disk));

            return(lst);
        }
Example #7
0
        public IEnumerable<RealFolder> GetDrives(IRealFile parent)
        {
            List<RealFolder> lst = new List<RealFolder>();

            lst.Add(new RealFolder("T:\\", parent, "T:\\", FileTypes.Disk));
            lst.Add(new RealFolder("GAME:\\", parent, "GAME:\\", FileTypes.Disk));

            return lst;
        }
Example #8
0
 public IEnumerable<RealFolder> GetDrives(IRealFile parent)
 {
     return new List<RealFolder>();
 }
Example #9
0
 internal RealMyComputer(IRealFile desktop) : base("My Computer", desktop, "", FileTypes.MyComputer)
 {
 }
Example #10
0
 public IEnumerable<RealFolder> GetDrives(IRealFile parent)
 {
     throw new NotImplementedException();
 }
Example #11
0
 internal RealComputer(String name, IRealFile domain) : base(name, domain, "\\\\" + name, FileTypes.Server)
 {
 }
Example #12
0
 internal RealNetwork(IRealFile desktop) : base("Network", desktop, "", FileTypes.Network)
 {
 }
Example #13
0
 internal RealFolder(String name, IRealFile parent, String fullPath, FileTypes fileType)
     : base(name, parent, fullPath, fileType)
 {
 }
Example #14
0
 internal RealComputer(String name, IRealFile domain)
     : base(name, domain, "\\\\" + name, FileTypes.Server)
 {
 }
Example #15
0
 internal RealDomain(String name, IRealFile network) : base(name, network, "", FileTypes.Domain)
 {
 }
Example #16
0
 internal RealNetwork(IRealFile desktop)
     : base("Network", desktop, "", FileTypes.Network)
 {
 }
Example #17
0
        public IEnumerable<RealFolder> GetDrives(IRealFile parent)
        {
            List<RealFolder> lst = new List<RealFolder>();

            foreach (DriveInfo driveInfo in DriveInfo.GetDrives())
            {
                FileTypes fileType = FileTypes.Disk;

                switch (driveInfo.DriveType)
                {
                    case DriveType.Removable:
                        if (driveInfo.Name.StartsWith("A:") || driveInfo.Name.StartsWith("B:"))
                        {
                            fileType = FileTypes.Floppy;
                        }
                        else
                        {
                            fileType = FileTypes.Disk;
                        }
                        break;
                    case DriveType.CDRom:
                        fileType = FileTypes.DVD;
                        break;
                    default:
                        fileType = FileTypes.Disk;
                        break;
                }

                lst.Add(new RealFolder(driveInfo.Name, parent, driveInfo.Name, fileType));
            }

            return lst;
        }
Example #18
0
 internal RealFolder(String name, IRealFile parent, String fullPath, FileTypes fileType) : base(name, parent, fullPath, fileType)
 {
 }
Example #19
0
 public IEnumerable <RealFolder> GetDrives(IRealFile parent)
 {
     return(new List <RealFolder>());
 }
Example #20
0
 public IEnumerable <RealFolder> GetDrives(IRealFile parent)
 {
     throw new NotImplementedException();
 }
Example #21
0
 internal RealMyComputer(IRealFile desktop)
     : base("My Computer", desktop, "", FileTypes.MyComputer)
 {
 }
Example #22
0
 internal RealDomain(String name, IRealFile network)
     : base(name, network, "", FileTypes.Domain)
 {
 }