public override int OnCalculateSize(bool force) { _entryList.Clear(); _entryList._files = Files; _converter = new RSARConverter(); List <string> unusedFolders = new List <string>(); foreach (ResourceNode n in Children) { if (n is RSARFolderNode) { ((RSARFolderNode)n).GetStrings(null, 0, _entryList, ref unusedFolders); } else if (n is RSAREntryNode) { ((RSAREntryNode)n).GetStrings(null, 0, _entryList); } } if (unusedFolders.Count > 0) { MessageBox.Show(_mainForm, String.Format("The following path{0} ha{1} no entries and will be lost:\n" + unusedFolders.Aggregate((current, next) => current + "\n" + next), unusedFolders.Count > 1 ? "s" : "", unusedFolders.Count > 1 ? "ve" : "s"), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } _entryList.SortStrings(); return(_converter.CalculateSize(_entryList, this)); }
public override int OnCalculateSize(bool force) { _entryList.Clear(); _entryList._files = Files; _converter = new RSARConverter(); foreach (ResourceNode n in Children) { if (n is RSARFolderNode) { ((RSARFolderNode)n).GetStrings(null, 0, _entryList); } else if (n is RSAREntryNode) { ((RSAREntryNode)n).GetStrings(null, 0, _entryList); } } _entryList.SortStrings(); _nullGroup._rebuildIndex = _entryList._groups.Count; return(_converter.CalculateSize(_entryList, this)); }