Beispiel #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;
     }
 }
Beispiel #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);
     }
 }
Beispiel #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));
     }
 }
Beispiel #4
0
 protected VMFolder(VMFolder parent, string name, string fullPath)
     : base(parent, name)
 {
     FileTotal = null;
     _Path     = fullPath;
 }
Beispiel #5
0
 internal VMFile(VMFolder parent, string name)
 {
     _Name  = name;
     Parent = parent;
 }