public void UpdatePage2()
{
if (material != null)
{
material.Name = material.Name; // Checks that material name is valid
nameTextBox.Text = material.Name;
densityTextBox.Text = material.Density.ToString();
densityLabel.Text = Culture.Get("Density") + " (" + Canguro.Model.Model.Instance.UnitSystem.UnitName(Canguro.Model.UnitSystem.Units.Density) + ")";
MaterialTypeProps typeProps = material.TypeProperties;
MaterialDesignProps designProps = material.DesignProperties;
for (int i = 0; i < typeList.Count; i++)
if (typeList[i].ToString().Equals(typeProps.ToString()))
typeComboBox.SelectedIndex = i;
typePropertyGrid.SelectedObject = typeProps;
for (int i = 0; i < designPropList.Count; i++)
if (designPropList[i].ToString().Equals(designProps.ToString()))
designComboBox.SelectedIndex = i;
designPropertyGrid.SelectedObject = designProps;
}
else
wizardControl.SelectTab(0);
}