Exemplo n.º 1
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            EditSoapWebServicePingConfigEntry editSoapWebServicePingConfigEntry = new EditSoapWebServicePingConfigEntry();

            if (editSoapWebServicePingConfigEntry.ShowDialog() == DialogResult.OK)
            {
                ListViewItem lvi = new ListViewItem(editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ServiceBaseURL);
                lvi.SubItems.Add(editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ServiceName);
                lvi.SubItems.Add(editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.MethodName);
                lvi.SubItems.Add(editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ToStringFromParameters());
                lvi.Tag = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry;
                lvwEntries.Items.Add(lvi);
                CheckOKButtonEnable();
            }
        }
Exemplo n.º 2
0
 private void cmdEdit_Click(object sender, EventArgs e)
 {
     if (lvwEntries.SelectedItems.Count > 0)
     {
         EditSoapWebServicePingConfigEntry editSoapWebServicePingConfigEntry = new EditSoapWebServicePingConfigEntry();
         editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry = (SoapWebServicePingConfigEntry)lvwEntries.SelectedItems[0].Tag;
         if (editSoapWebServicePingConfigEntry.ShowDialog() == DialogResult.OK)
         {
             lvwEntries.SelectedItems[0].Text             = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ServiceBaseURL;
             lvwEntries.SelectedItems[0].SubItems[1].Text = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ServiceName;
             lvwEntries.SelectedItems[0].SubItems[2].Text = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.MethodName;
             lvwEntries.SelectedItems[0].SubItems[3].Text = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry.ToStringFromParameters();
             lvwEntries.SelectedItems[0].Tag = editSoapWebServicePingConfigEntry.SelectedSoapWebServicePingConfigEntry;
         }
         CheckOKButtonEnable();
     }
 }