private void OnMiddleClosed(T2 middle) { OpenedLeaf = null; var e = new OpeningEventArgs <I>(middle, OpeningAction.Close); OnOpenedChanged(e); }
private void OnRootClosed(T1 root) { OpenedMiddle = null; var e = new OpeningEventArgs <I>(root, OpeningAction.Close); OnOpenedChanged(e); }
protected virtual void OnOpenedChanged(OpeningEventArgs <I> e) { var h = OpenedChanged; if (h != null) { h(this, e); } }
private void OnLeafOpened(T3 leaf) { Contract.Requires(OpenedMiddle == middleOf(leaf)); var e = new OpeningEventArgs <I>(leaf, OpeningAction.Open); OnOpenedChanged(e); middleLeafMap[OpenedMiddle] = leaf; }
private void OnRootOpened(T1 root) { var e = new OpeningEventArgs <I>(root, OpeningAction.Open); OnOpenedChanged(e); rootsOpenOrder.Add(root); if (AutoOpenChild) { T2 middle = GetLastOpenedFor(root); OpenedMiddle = middle ?? middlesOf(root).LastOrDefault(); } }
private void OnMiddleOpened(T2 middle) { Contract.Requires(OpenedRoot == rootOf(middle)); var e = new OpeningEventArgs <I>(middle, OpeningAction.Open); OnOpenedChanged(e); rootMiddleMap[OpenedRoot] = middle; if (AutoOpenChild) { T3 leaf = GetLastOpenedFor(middle); OpenedLeaf = leaf ?? leavesOf(middle).LastOrDefault(); } }
private void viewer_OpenedChanged(object sender, OpeningEventArgs <I> e) { logger.DebugFormat("{0} {1} {2}", e.action, e.entity.GetType().Name, e.entity); var node = e.entity; if (e.action == OpeningAction.Open) { lastOpened = node; node.PropertyChanged += node_PropertyChanged; } else { node.PropertyChanged -= node_PropertyChanged; } }
private void OnLeafClosed(T3 leaf) { var e = new OpeningEventArgs <I>(leaf, OpeningAction.Close); OnOpenedChanged(e); }