示例#1
0
 private void AddHistory(VMFolder folder)
 {
     if (!isLoadingHistory && folder != null && (history.Count == 0 || history[historyIndex] != folder))
     {
         while (historyIndex < history.Count - 1)
         {
             history.RemoveAt(history.Count - 1);
         }
         history.Add(folder);
         historyIndex = history.Count - 1;
     }
 }
示例#2
0
 internal VMFolder(VMFolder parent, string name)
     : base(parent, name, null)
 {
     if (parent == null)
     {
         _Path = name;
     }
     else
     {
         _Path = System.IO.Path.Combine(parent.Path, name);
     }
 }
示例#3
0
 internal VMFile(VMFolder parent, string name, ulong?fileSize) : this(parent, name)
 {
     if (fileSize.HasValue)
     {
         FileSize = fileSize;
         DiskSize = Convert.ToUInt64(Math.Ceiling((double)fileSize / 4096) * 4096);
     }
     if (parent != null)
     {
         Details = new VMFileDetails(this, DateTime.Now.AddHours(parent.Childs.Count));
     }
 }
示例#4
0
 protected VMFolder(VMFolder parent, string name, string fullPath)
     : base(parent, name)
 {
     FileTotal = null;
     _Path     = fullPath;
 }
示例#5
0
 internal VMFile(VMFolder parent, string name)
 {
     _Name  = name;
     Parent = parent;
 }