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