public static IParamControl GetParamControl(IParam param)
        {
            IParamControl con = null;

            if (param is CoOrdinatesParam)
            {
                con = new CoOrdinatesControl((CoOrdinatesParam)param);
            }
            else if (param is NumberParam)
            {
                con = new NumberControl((NumberParam)param);
            }
            else if (param is TextParam)
            {
                con = new TextControl((TextParam)param);
            }
            else if (param is BoolParam)
            {
                con = new BoolControl((BoolParam)param);
            }
            else if (param is KeyValueParam)
            {
                KeyValueParam kvp = (KeyValueParam)param;
                con = new KeyValueControl();// (GetComboBox(key, kvp.KeyValuePairs, kvp.KeyString, kvp.ValueString));
            }

            return(con);
        }
Exemple #2
0
 private void AddParameterControls(IParam[] parameters)
 {
     if (parameters != null)
     {
         for (int i = 0; i < parameters.Length; i++)
         {
             IParam        param   = parameters[i];
             IParamControl control = ParamsControlFactory.GetParamControl(param);
             flowLayoutPanelParameters.Controls.Add(control.GetControl());
         }
     }
 }