Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var form = new Forms.EditParameter();

            if (form.ShowDialog() == DialogResult.OK)
            {
                Parameters[form.Key] = form.Value;
                UpdateList();
            }
        }
Example #2
0
        private void listParameters_DoubleClick(object sender, EventArgs e)
        {
            var item = listParameters.FocusedItem;

            if (item == null || !tools.Visible)
            {
                return;
            }

            var form = new Forms.EditParameter(item.Text, item.SubItems[1].Text);

            if (form.ShowDialog() == DialogResult.OK)
            {
                // Update the parameter
                if (form.Key != item.Text)
                {
                    Parameters.Remove(item.Text);
                }

                Parameters[form.Key] = form.Value;
                UpdateList();
            }
        }