Exemplo n.º 1
0
        private void editParent_Click(object sender, EventArgs e)
        {
            var form3 = new FormParent("Edit Parent");

            form3.setParent(parentList[PARENT_TWO]);
            form3.formIsEditMode(true);
            form3.ShowDialog();

            if (form3.DialogResult != DialogResult.Cancel)
            {
                if (form3.getDeleteMode())
                {
                    form3.isNotDeleteMode();
                    parent2Panel.Visible = false;
                    addParent.Enabled    = true;
                }
                else
                {
                    parentList[PARENT_TWO] = form3.getParentInfo();
                    this.DialogResult      = DialogResult.OK;
                }
                form3.formIsEditMode(false);
            }
            updateParentPanel();
        }
Exemplo n.º 2
0
        private void addParent_Click(object sender, EventArgs e)
        {
            var form3 = new FormParent();

            form3.setParent(new Parent());
            form3.ShowDialog();
            if (form3.DialogResult != DialogResult.Cancel)
            {
                try
                {
                    parent2Panel.Visible   = true;
                    addParent.Enabled      = false;
                    parentList[PARENT_TWO] = form3.getParentInfo();
                    updateParentPanel();
                }
                catch { }
            }
        }