Exemple #1
0
        public static CParametreFonctionDynamique EditeParametreFonction(CParametreFonctionDynamique parametre)
        {
            if (parametre == null)
            {
                return(null);
            }
            CFormEditVariableFormule form = new CFormEditVariableFormule();

            if (parametre != null)
            {
                form.m_txtNom.Text      = parametre.Nom;
                form.m_txtType.Text     = DynamicClassAttribute.GetNomConvivial(parametre.TypeResultatExpression.TypeDotNetNatif);
                form.m_chkArray.Checked = parametre.TypeResultatExpression.IsArrayOfTypeNatif;
            }
            else
            {
                parametre = new CParametreFonctionDynamique();
            }
            form.m_parametre = parametre;
            CParametreFonctionDynamique retour = null;

            if (form.ShowDialog() == DialogResult.OK)
            {
                retour = form.m_parametre;
            }
            form.Dispose();
            return(retour);
        }
Exemple #2
0
        public static CDefinitionProprieteDynamiqueVariableFormule EditeVariable(CDefinitionProprieteDynamiqueVariableFormule variable)
        {
            CFormEditVariableFormule form = new CFormEditVariableFormule();

            if (variable != null)
            {
                form.m_txtNom.Text      = variable.Nom;
                form.m_txtType.Text     = DynamicClassAttribute.GetNomConvivial(variable.TypeDonnee.TypeDotNetNatif);
                form.m_chkArray.Checked = variable.TypeDonnee.IsArrayOfTypeNatif;
            }
            else
            {
                variable = new CDefinitionProprieteDynamiqueVariableFormule();
            }
            form.m_variable = variable;
            CDefinitionProprieteDynamiqueVariableFormule retour = null;

            if (form.ShowDialog() == DialogResult.OK)
            {
                retour = form.m_variable;
            }
            form.Dispose();
            return(retour);
        }