private void butEditParameter_Click(object sender, EventArgs e) { frmAddParameter EditParam; if (tabParams.SelectedIndex == 0) { if (lstFormParameters.SelectedIndices.Count == 0) { MessageBox.Show("Please select a parameter to edit"); return; } EditParam = new frmAddParameter(EditParameter, lstFormParameters.SelectedItems[0].SubItems[0].Text, lstFormParameters.SelectedItems[0].SubItems[1].Text, Convert.ToBoolean(lstFormParameters.SelectedItems[0].SubItems[2].Text), Convert.ToBoolean(lstFormParameters.SelectedItems[0].SubItems[3].Text)); lstFormParameters.Items.Remove(lstFormParameters.SelectedItems[0]); } else { if (lstCookies.SelectedIndices.Count == 0) { MessageBox.Show("Please select a cookie to edit"); return; } EditParam = new frmAddParameter(EditCookie, lstCookies.SelectedItems[0].SubItems[0].Text, lstCookies.SelectedItems[0].SubItems[1].Text, Convert.ToBoolean(lstCookies.SelectedItems[0].SubItems[2].Text), Convert.ToBoolean(lstCookies.SelectedItems[0].SubItems[3].Text)); lstCookies.Items.Remove(lstCookies.SelectedItems[0]); } EditParam.ShowDialog(); }
private void butAddParameter_Click(object sender, EventArgs e) { frmAddParameter AddParam; if (tabParams.SelectedIndex == 0) { AddParam = new frmAddParameter(AddParameter); } else { AddParam = new frmAddParameter(AddCookie); } AddParam.ShowDialog(); }
private void butAddParameter_Click(object sender, EventArgs e) { frmAddParameter AddParam; if (tabParams.SelectedIndex == 0) AddParam = new frmAddParameter(AddParameter); else AddParam = new frmAddParameter(AddCookie); AddParam.ShowDialog(); }