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();
}