public void Append(Window value) { _history.Remove(value.Id); _history.AddFirst(value.Id); if (_history.Count > MaxSize) { _history.RemoveLast(); } }
public GraphItemModel Previous() { if (!History.Any()) { throw new InvalidOperationException("ViewHistory has not any history."); } GraphItemModel n = Future.First(); Future.RemoveFirst(); History.AddFirst(n); return(n); }
private XElement RenderHistory() { var title = new XElement("p", new XElement("code", new XElement("u", "ʜɪsᴛᴏʀʏ"))); if (History == null || !History.Elements().Any()) { return(PageDocument.BuildBody( title, BuildNotAvailable())); } History.Elements().First().Remove(); History.AddFirst(title); return(History); }
public void Add(GraphItemModel node) { Future.Clear(); History.AddFirst(node); }