示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }