private void btnAddExt_Click(object sender, EventArgs e)
        {
            ExtPropForm extForm = new ExtPropForm();

            extForm.StartPosition = FormStartPosition.CenterParent;
            extForm.Completed    += new EventHandler <ExtEventArg>(extForm_Completed);
            extForm.ShowDialog();
        }
        void extForm_Completed(object sender, ExtEventArg e)
        {
            ExtPropForm extForm = sender as ExtPropForm;

            extForm.Completed -= new EventHandler <ExtEventArg>(extForm_Completed);

            int index = dgExt.Rows.Add();

            dgExt.Rows[index].Cells[dgExtType.Name].Value    = e.ExtType;
            dgExt.Rows[index].Cells[dgExtDisplay.Name].Value = ExtendAuthEditor.GetDisplay(e.Result);
            dgExt.Rows[index].Tag = e.Result;
        }
        private void btnEditExt_Click(object sender, EventArgs e)
        {
            if (dgExt.SelectedRows.Count == 0)
            {
                return;
            }

            DataGridViewRow row = dgExt.SelectedRows[0];
            XmlElement      x   = row.Tag as XmlElement;

            ExtPropForm extEdotForm = new ExtPropForm(x);

            extEdotForm.StartPosition = FormStartPosition.CenterParent;
            extEdotForm.Completed    += new EventHandler <ExtEventArg>(extEdotForm_Completed);
            extEdotForm.ShowDialog();
        }
        private void btnEditExt_Click(object sender, EventArgs e)
        {
            if (dgExt.SelectedRows.Count == 0) return;

            DataGridViewRow row = dgExt.SelectedRows[0];
            XmlElement x = row.Tag as XmlElement;

            ExtPropForm extEdotForm = new ExtPropForm(x);
            extEdotForm.StartPosition = FormStartPosition.CenterParent;
            extEdotForm.Completed += new EventHandler<ExtEventArg>(extEdotForm_Completed);
            extEdotForm.ShowDialog();
        }
 private void btnAddExt_Click(object sender, EventArgs e)
 {
     ExtPropForm extForm = new ExtPropForm();
     extForm.StartPosition = FormStartPosition.CenterParent;
     extForm.Completed += new EventHandler<ExtEventArg>(extForm_Completed);
     extForm.ShowDialog();
 }