private void lstParameters_DoubleClick(object sender, EventArgs e)
        {
            string paramName = lstParameters.SelectedItems[0].SubItems[0].Text;

            Project.ParamInfo currentParam = null;

            foreach (Project.ParamInfo p in CurrentFunction.Parameters)
            {
                if (p.Name == paramName)
                {
                    currentParam = new Project.ParamInfo(p.Name, p.DataType);
                    break;
                }
            }
            frmParameterEdit form = new frmParameterEdit(CurrentFunction, currentParam);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(new string[2] {
                    form.CurrentParameter.Name, form.CurrentParameter.DataType.Name
                });
                lstParameters.Items[lstParameters.SelectedItems[0].Index] = item;
                //lstParameters.Items.Add(item);
                return;
            }
        }
        private bool AddParameter()
        {
            frmParameterEdit form = new frmParameterEdit(CurrentFunction);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(new string[2] {
                    form.CurrentParameter.Name, form.CurrentParameter.DataType.Name
                });
                item.Tag = form.CurrentParameter.DataType;
                lstParameters.Items.Add(item);
                return(true);
            }
            else
            {
                return(false);
            }
        }
        private void lstParameters_DoubleClick(object sender, EventArgs e)
        {
            string paramName = lstParameters.SelectedItems[0].SubItems[0].Text;
            Project.ParamInfo currentParam = null;

            foreach (Project.ParamInfo p in CurrentFunction.Parameters)
            {
                if (p.Name == paramName)
                {
                    currentParam = new Project.ParamInfo(p.Name, p.DataType);
                    break;
                }
            }
            frmParameterEdit form = new frmParameterEdit(CurrentFunction, currentParam);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(new string[2] { form.CurrentParameter.Name, form.CurrentParameter.DataType.Name });
                lstParameters.Items[lstParameters.SelectedItems[0].Index] = item;
                //lstParameters.Items.Add(item);
                return;
            }
        }
        private bool AddParameter()
        {
            frmParameterEdit form = new frmParameterEdit(CurrentFunction);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ListViewItem item = new ListViewItem(new string[2] { form.CurrentParameter.Name, form.CurrentParameter.DataType.Name });
                item.Tag = form.CurrentParameter.DataType;
                lstParameters.Items.Add(item);
                return true;
            }
            else
            {
                return false;
            }
        }