コード例 #1
0
 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;
             }
         }
     }
 }
コード例 #2
0
 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();
 }