Exemple #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            frmAddParameter frm = new frmAddParameter();
            int idx = lstParameters.SelectedItems[0].Index;
            ListViewItem lvi = lstParameters.Items[idx];

            frm.Value = parameters[idx];

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                lvi.SubItems[0].Text = frm.Value.ToString();
                lvi.SubItems[1].Text = frm.Value.GetType().ToString();

                parameters[idx] = frm.Value;
            }
        }
Exemple #2
0
        private void cmdAddParam_Click(object sender, EventArgs e)
        {
            frmAddParameter frm = new frmAddParameter();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ListViewItem lvi = new ListViewItem();
                lvi.Text = frm.Value.ToString();
                lvi.SubItems.Add(frm.Value.GetType().ToString());

                lstParameters.Items.Add(lvi);

                parameters.Add(frm.Value);
            }
        }