private void listNamespace_DoubleClick(object sender, EventArgs e) { if (listNamespace.SelectedItems.Count != 0) { using (NSEditDlg nSEditDlg = new NSEditDlg(errorReport)) { nSEditDlg.Initialize(listNamespace.SelectedItems[0].SubItems[0].Text, listNamespace.SelectedItems[0].SubItems[1].Text, this); if (nSEditDlg.ShowDialog(this) == DialogResult.OK) { listNamespace.SelectedItems[0].SubItems[0].Text = nSEditDlg.Prefix; listNamespace.SelectedItems[0].SubItems[1].Text = nSEditDlg.Namespace; } } } }
private void btnAddNs_Click(object sender, EventArgs e) { using (NSEditDlg nSEditDlg = new NSEditDlg(errorReport)) { nSEditDlg.Initialize(this); if (nSEditDlg.ShowDialog(this) == DialogResult.OK) { ListViewItem value = new ListViewItem(new string[2] { nSEditDlg.Prefix, nSEditDlg.Namespace }); listNamespace.Items.Add(value); } } UpdateNamespaceGroupStatus(); }