public ItemForm(EditionType editionType) { _textBoxes = new List <TextBox>(); _editionType = editionType; _saveButtonType = SaveButtonType.Add; InitializeComponent(); switch (_editionType) { case EditionType.Book: AddTextBoxes(6); AddLabel(); break; case EditionType.Magazine: AddTextBoxes(7); AddLabel(); break; } OnChange(); }
public ItemForm(EditionType editionType, int elementIndex) : this(editionType) { _saveButtonType = SaveButtonType.Update; _elementIndex = elementIndex; FillInTextBoxes(MainForm.BookShelf[elementIndex].ToString()); }