Beispiel #1
0
        private void btnEditEndpoint_Click(object sender, EventArgs e)
        {
            ListViewItem     lvi = lvwEndpoints.SelectedItems[0];
            EndpointInputBox eib = new EndpointInputBox();

            eib.Text = "Edit Endpoint";
            eib.txtInstanceName.Text = lvi.SubItems[0].Text;

            if (lvi.SubItems.Count >= 2)
            {
                eib.txtHost.Text       = lvi.SubItems[1].Text;
                eib.txtPort.Text       = lvi.SubItems[2].Text;
                eib.chkConnect.Checked = true;
            }

            if (eib.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            lvwEndpoints.Items.Remove(lvi);

            ListViewItem lvi2 = new ListViewItem();

            lvi2.Text = eib.txtInstanceName.Text;

            if (eib.chkConnect.Checked)
            {
                lvi2.SubItems.Add(eib.txtHost.Text);
                lvi2.SubItems.Add(eib.txtPort.Text);
            }

            lvwEndpoints.Items.Add(lvi2);
        }
Beispiel #2
0
        private void btnAddEndpoint_Click(object sender, EventArgs e)
        {
            EndpointInputBox eib = new EndpointInputBox();

            if (eib.ShowDialog(this) == DialogResult.Cancel)
                return;

            ListViewItem lvi = new ListViewItem();
            lvi.Text = eib.txtInstanceName.Text;

            if (eib.chkConnect.Checked) {
                lvi.SubItems.Add(eib.txtHost.Text);
                lvi.SubItems.Add(eib.txtPort.Text);
            }

            lvwEndpoints.Items.Add(lvi);
        }
Beispiel #3
0
        private void btnAddEndpoint_Click(object sender, EventArgs e)
        {
            EndpointInputBox eib = new EndpointInputBox();

            if (eib.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            ListViewItem lvi = new ListViewItem();

            lvi.Text = eib.txtInstanceName.Text;

            if (eib.chkConnect.Checked)
            {
                lvi.SubItems.Add(eib.txtHost.Text);
                lvi.SubItems.Add(eib.txtPort.Text);
            }

            lvwEndpoints.Items.Add(lvi);
        }