Example #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            bool hasrequired = true;

            PShell.psparamtype p = (PShell.psparamtype)pgParams.SelectedObject;
            foreach (PShell.psparameter parm in p.Properties)
            {
                if (parm.Category == "Required" && parm.Value == null && parm.DefaultValue == null)
                {
                    hasrequired = false;
                }
            }

            if (hasrequired)
            {
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show(StringValue.RequireParams);
            }
        }
Example #2
0
 public void SetParameters(PShell.psparamtype p)
 {
     pgParams.SelectedObject = p;
 }