Esempio n. 1
0
 public void AddToHistory(NodeHistoryElement nodeHistoryElem)
 {
     //put the last focal node into the history before setting the new one
     if (_history.Count == 0)
     {
         _history.Push(nodeHistoryElem);
     }
     else if (_history.Peek().Node.Id != nodeHistoryElem.Node.Id)
     {
         _history.Push(nodeHistoryElem);
     }
 }
Esempio n. 2
0
 public void AddToHistory(NodeHistoryElement nodeHistoryElem)
 {
     //put the last focal node into the history before setting the new one
     if (_history.Count == 0)
     {
         _history.Push(nodeHistoryElem);
     }
     else if (_history.Peek().Node.Id != nodeHistoryElem.Node.Id)
     {
         _history.Push(nodeHistoryElem);
     }
 }
Esempio n. 3
0
 private void SetHistory(string name, INodeProxy node)
 {
     if (node != null)
     {
         if (name == null)
         {
             name = "Home";
         }
         NodeHistoryElement item = new NodeHistoryElement()
         {
             Name = name, Node = node
         };
         _navHistory.AddToHistory(item);
     }
 }
Esempio n. 4
0
        public Guid GoBack()
        {
            Guid previousNodeId = Guid.Empty;

            if (HasHistory)
            {
                NodeHistoryElement nhe = _history.Pop();
                if (HasHistory)
                {
                    previousNodeId = _history.Peek().Node.Id;
                }
                else
                {
                    previousNodeId = nhe.Node.Id;
                }
            }
            return(previousNodeId);
        }
Esempio n. 5
0
 private void SetHistory(string name, INodeProxy node)
 {
     if (node != null)
     {
         if (name == null)
         {
             name = "Home";
         }
         NodeHistoryElement item = new NodeHistoryElement() { Name = name, Node = node };
         _navHistory.AddToHistory(item);
     }
 }