Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public ItemForm(EditionType editionType, int elementIndex) : this(editionType)
 {
     _saveButtonType = SaveButtonType.Update;
     _elementIndex   = elementIndex;
     FillInTextBoxes(MainForm.BookShelf[elementIndex].ToString());
 }