public override void GetDataFromComponents(CosmeticProduct currentProduct, Control.ControlCollection controls) { base.GetDataFromComponents(currentProduct, controls); Control[] controlList = GetComponentsForInput(controls); LipPencil currentLipPencil = (LipPencil)currentProduct; ComboBox temp = (ComboBox)controlList[typeOfPencilIndex]; currentLipPencil.PencilDevice = (LipPencil.TypeOfPencil)Enum.Parse(typeof(LipPencil.TypeOfPencil), temp.SelectedValue.ToString()); temp = (ComboBox)controlList[textureTypeIndex]; currentLipPencil.PencilTexture = (LipPencil.TypeOfTexture)Enum.Parse(typeof(LipPencil.TypeOfTexture), temp.SelectedValue.ToString()); }
public override void LoadDataToComponets(CosmeticProduct currentProduct, Control.ControlCollection controls) { base.LoadDataToComponets(currentProduct, controls); Control[] controlList = GetComponentsForInput(controls); LipPencil currentLipPencil = (LipPencil)currentProduct; ComboBox tempComboBox = (ComboBox)controlList[typeOfPencilIndex]; tempComboBox.SelectedValue = Enum.GetName(typeof(LipPencil.TypeOfPencil), currentLipPencil.PencilDevice); tempComboBox = (ComboBox)controlList[textureTypeIndex]; tempComboBox.SelectedValue = Enum.GetName(typeof(LipPencil.TypeOfTexture), currentLipPencil.PencilTexture); }