Esempio n. 1
0
        private void OnMiddleClosed(T2 middle)
        {
            OpenedLeaf = null;

            var e = new OpeningEventArgs <I>(middle, OpeningAction.Close);

            OnOpenedChanged(e);
        }
Esempio n. 2
0
        private void OnRootClosed(T1 root)
        {
            OpenedMiddle = null;

            var e = new OpeningEventArgs <I>(root, OpeningAction.Close);

            OnOpenedChanged(e);
        }
Esempio n. 3
0
        protected virtual void OnOpenedChanged(OpeningEventArgs <I> e)
        {
            var h = OpenedChanged;

            if (h != null)
            {
                h(this, e);
            }
        }
Esempio n. 4
0
        private void OnLeafOpened(T3 leaf)
        {
            Contract.Requires(OpenedMiddle == middleOf(leaf));

            var e = new OpeningEventArgs <I>(leaf, OpeningAction.Open);

            OnOpenedChanged(e);

            middleLeafMap[OpenedMiddle] = leaf;
        }
Esempio n. 5
0
        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();
            }
        }
Esempio n. 6
0
        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();
            }
        }
Esempio n. 7
0
        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;
            }
        }
Esempio n. 8
0
        private void OnLeafClosed(T3 leaf)
        {
            var e = new OpeningEventArgs <I>(leaf, OpeningAction.Close);

            OnOpenedChanged(e);
        }