Canguro.Commands.Forms.SectionsGUI.UpdatePage1 C# (CSharp) Method

UpdatePage1() private method

private UpdatePage1 ( ) : void
return void
        private void UpdatePage1()
        {
            if (sectionsTreeView.TopNode != Canguro.Model.Model.Instance.Sections.Tree)
            {
                sectionsTreeView.Nodes.Clear();
                sectionsTreeView.Nodes.Add(Canguro.Model.Model.Instance.Sections.Tree);
            }
            sectionsTreeView.ExpandAll();
            currentSection = (sectionsTreeView.SelectedNode != null) ? (FrameSection)sectionsTreeView.SelectedNode.Tag : null;
            if (currentSection != null)
            {
                editButton.Enabled = true;
                deleteButton.Enabled = true;
                propertiesButton.Enabled = true;
            }
            else
            {
                editButton.Enabled = false;
                deleteButton.Enabled = false;
                propertiesButton.Enabled = false;
            }
            addButton.Enabled = true;
            sectionsTreeView.Update();
        }