Ejemplo n.º 1
0
        private void OnUpdateAll(object theSource, object theEvent)
        {
            // Disable drawing of the session tree.
            _SessionTreeView.BeginUpdate();

            UpdateAll theUpdateAllEvent = (UpdateAll)theEvent;

            UpdateSessionTreeView();

            if (theUpdateAllEvent._RestoreSessionTreeState)
            {
                foreach (TreeNode theTreeNode in _SessionTreeView.Nodes)
                {
                    _NodesInformation.RestoreExpandInformation(theTreeNode);
                }

                _NodesInformation.RemoveAllExpandInformation();

                _NodesInformation.RestoreSelectedNode(_SessionTreeView);
            }
            else
            {
                if (_SessionTreeView.Nodes.Count > 0)
                {
                    _SessionTreeView.SelectedNode = _SessionTreeView.Nodes[0];
                }
            }

            // Enable drawing of the session tree.
            _SessionTreeView.EndUpdate();

            SessionTreeViewSelectionChange theSessionTreeViewSelectionChange = new SessionTreeViewSelectionChange(GetSelectedNode());
            Notify(theSessionTreeViewSelectionChange);
        }
Ejemplo n.º 2
0
 public void NotifySessionTreeViewSelectionChange(TreeNode theTreeNode)
 {
     SessionTreeViewSelectionChange theSessionTreeViewSelectionChange;
     theSessionTreeViewSelectionChange= new SessionTreeViewSelectionChange(theTreeNode);
     Notify(theSessionTreeViewSelectionChange);
 }
Ejemplo n.º 3
0
        private void OnClearAll(object theSource, object theEvent)
        {
            ClearAll theClearAllEvent = (ClearAll)theEvent;

            if (theClearAllEvent._StoreSessionTreeState)
            {
                foreach (TreeNode theTreeNode in _SessionTreeView.Nodes)
                {
                    _NodesInformation.StoreExpandInformation(theTreeNode);
                }

                _NodesInformation.StoreSelectedNode(_SessionTreeView);

            }

            ClearSessionTreeView();

            SessionTreeViewSelectionChange theSessionTreeViewSelectionChange = new SessionTreeViewSelectionChange(GetSelectedNode());
            Notify(theSessionTreeViewSelectionChange);
        }