BeginUpdateTree() public method

public BeginUpdateTree ( bool refresh ) : void
refresh bool
return void
        private void RefreshTimer_Tick(object sender, EventArgs e)
        {
            RefreshTimer.Enabled = false;

            if (Visible && Model != null)
            {
                Model.BeginUpdateTree(true);
            }

            // start next refrseh a second after the time it took to do the actual refresh
            RefreshTimer.Enabled = AutoRefreshOn;
        }
Example #2
0
        public void NavigateTo(NodeModel node)
        {
            if (node.ObjType == XObjType.Class || node.ObjType == XObjType.Internal)
            {
                SelectedNode               = node;
                FieldFilter                = null;
                SummaryLabel.Text          = node.Name;
                SummaryLabel.ForeColor     = ColorProfile.ClassColor;
                FieldsRadioButton.Visible  = true;
                MethodsRadioButton.Visible = true;
            }
            else if (node.ObjType == XObjType.Field)
            {
                SelectedNode               = node.GetParentClass(false);
                FieldFilter                = node.XNode.UnformattedName;
                SummaryLabel.Text          = node.Name;
                SummaryLabel.ForeColor     = ColorProfile.FieldColor;
                FieldsRadioButton.Visible  = false;
                MethodsRadioButton.Visible = false;
                FieldsRadioButton.Checked  = true;
            }
            else
            {
                SummaryLabel.Text = "";
                return;
            }

            Model = new InstanceModel(SelectedNode.XNode, FieldFilter, GridModel_UpdateTree, GridModel_ExpandedField);

            XRay.UIs[Thread.CurrentThread.ManagedThreadId].CurrentInstance = Model;

            FieldGrid.Nodes.Clear();
            FieldGrid.Columns.Clear();

            if (!Visible)
            {
                return;
            }

            CurrentDisplay = SelectedNode;

            ModelRowMap = new Dictionary <int, FieldRow>();

            Model.BeginUpdateTree(false);

            RefreshSubnodesView();
        }
Example #3
0
        private void RefreshTimer_Tick(object sender, EventArgs e)
        {
            RefreshTimer.Enabled = false;

            if (Visible && Model != null)
            {
                if (SelectedNode != CurrentDisplay) // sometimes vis change wont fire, like clicking link in msil view
                {
                    NavigateTo(SelectedNode);
                }
                else
                {
                    Model.BeginUpdateTree(true);
                }
            }

            // start next refrseh a second after the time it took to do the actual refresh
            RefreshTimer.Enabled = AutoRefreshOn;
        }
        public void NavigateTo(NodeModel node)
        {
            if (node.ObjType == XObjType.Class)
            {
                SelectedNode = node;
                FieldFilter = null;
                SummaryLabel.Text = node.Name;
                SummaryLabel.ForeColor = ColorProfile.ClassColor;
                FieldsRadioButton.Visible = true;
                MethodsRadioButton.Visible = true;
            }
            else if (node.ObjType == XObjType.Field)
            {
                SelectedNode = node.GetParentClass(false);
                FieldFilter = node.XNode.UnformattedName;
                SummaryLabel.Text = node.Name;
                SummaryLabel.ForeColor = ColorProfile.FieldColor;
                FieldsRadioButton.Visible = false;
                MethodsRadioButton.Visible = false;
                FieldsRadioButton.Checked = true;
            }
            else
            {
                SummaryLabel.Text = "";
                return;
            }

            Model = new InstanceModel(SelectedNode.XNode, FieldFilter, GridModel_UpdateTree, GridModel_ExpandedField);

            XRay.UIs[Thread.CurrentThread.ManagedThreadId].CurrentInstance = Model;

            if (!Visible)
                return;

            CurrentDisplay = SelectedNode;

            FieldGrid.Nodes.Clear();
            FieldGrid.Columns.Clear();

            ModelRowMap = new Dictionary<int, FieldRow>();

            Model.BeginUpdateTree(false);

            RefreshSubnodesView();
        }