Example #1
0
 public void Append(Window value)
 {
     _history.Remove(value.Id);
     _history.AddFirst(value.Id);
     if (_history.Count > MaxSize)
     {
         _history.RemoveLast();
     }
 }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
 public void Add(GraphItemModel node)
 {
     Future.Clear();
     History.AddFirst(node);
 }