private void btnConfigParams_Click(object sender, EventArgs e)
 {
     ConfigurationParametersForm confparams = new ConfigurationParametersForm(currentObj);
     if (confparams.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     foreach (var param in confparams.SelectedTemplates)
     {
         try
         {
             CyPhy.Parameter cyphyparam = param.Create(currentObj);
             ((BindingList<ComponentParameterItem>)dgvParameters.DataSource).Add(new ComponentParameterItem((MgaFCO)cyphyparam.Impl));
         }
         catch (Exception)
         {
             // Log something here
         }
     }
 }
Esempio n. 2
0
        private void btnConfigParams_Click(object sender, EventArgs e)
        {
            ConfigurationParametersForm confparams = new ConfigurationParametersForm(currentObj);

            if (confparams.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                foreach (var param in confparams.SelectedTemplates)
                {
                    try
                    {
                        CyPhy.Parameter cyphyparam = param.Create(currentObj);
                        ((BindingList <ComponentParameterItem>)dgvParameters.DataSource).Add(new ComponentParameterItem((MgaFCO)cyphyparam.Impl));
                    }
                    catch (Exception)
                    {
                        // Log something here
                    }
                }
            }
        }