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; } }
internal VMFolder(VMFolder parent, string name) : base(parent, name, null) { if (parent == null) { _Path = name; } else { _Path = System.IO.Path.Combine(parent.Path, name); } }
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)); } }
protected VMFolder(VMFolder parent, string name, string fullPath) : base(parent, name) { FileTotal = null; _Path = fullPath; }
internal VMFile(VMFolder parent, string name) { _Name = name; Parent = parent; }