internal void ActivateExistingNode(ViewGroupNode node) { if (GetActiveView() != node.Value) { _viewGroupCollection.Remove(node.List); _viewGroupCollection.AddLast(node.List); } }
private void EnsuresViewHasParentAndMatch(ViewGroupNode node, string expectedParentViewInstanceKey) { var expectedParentView = new View(expectedParentViewInstanceKey); if (node.Previous == null || (node.Previous != null && node.Previous.Value != expectedParentView)) { throw new OnlyNewViewInstanceCanBeStackedException(node.Value.ViewInstanceKey, expectedParentViewInstanceKey); } }
public ViewGroupNode Push(ViewGroupNode newNode) { if (_internalStack.Count > 0) { var previousNode = _internalStack.Peek(); newNode.Previous = previousNode; } newNode.List = this; _internalStack.Push(newNode); return(newNode); }
internal bool TryFindViewNode(string viewInstanceKey, out ViewGroupNode node) { var viewInfo = new View(viewInstanceKey); var q = (from viewGroup in _viewGroupCollection from view in viewGroup where view == viewInfo select viewGroup.Find(view)).ToList(); node = q.FirstOrDefault(); return(q.Any()); }
internal void ActivateNewNode(ViewGroupNode newNode, ViewGroup ownerGroup = null) { if (ownerGroup != null) { ownerGroup.Push(newNode); } else { var newStack = new ViewGroup(); newStack.Push(newNode); _viewGroupCollection.AddLast(newStack); } if (!newNode.Value.IsMessageBox) { _viewCollection.Add(newNode.Value); } }
public ViewGroupNode Push(View view) { var newNode = new ViewGroupNode(this, view); return(Push(newNode)); }