public void ExportJobs(string filename) { string[] lines = new string[UnusedIds.Count + 1]; lines[0] = NextId.ToString(); for (int i = 1; i < lines.Length; ++i) { lines[i] = UnusedIds.Pop().ToString(); } File.WriteAllLines(filename, lines); }
public new Page Add(Page item) { var existingItem = this.Where(p => p.label == item.label).FirstOrDefault(); if (existingItem != null) { item = existingItem; } else { item.id = NextId.ToString(); item.x = NextCoordinate; item.y = NextCoordinate; base.Add(item); } return(item); }