private void UpdatePage2()
{
if (currentSection != null && currentSection.Material != null)
{
currentMaterial = currentSection.Material;
nameTextBox.Text = currentSection.Name;
if (!materialComboBox.Items.Contains(currentSection.Material.Name))
materialComboBox.Items.Add(currentSection.Material.Name);
materialComboBox.SelectedItem = currentSection.Material.Name;
if (shapeNames.ContainsKey(currentSection.Shape))
shapeComboBox.SelectedItem = shapeNames[currentSection.Shape];
else
shapeComboBox.SelectedItem = -1;
shapeComboBox.Enabled = false;
}
else
{
UpdateShapeComboBox();
nameTextBox.Text = "";
nextButton2.Enabled = false;
}
}