Пример #1
0
        /// //////////////////////////////////////////
        protected override CResultAErreur MAJ_Champs()
        {
            CResultAErreur result = base.MAJ_Champs();

            if (!result)
            {
                return(result);
            }
            if (!(m_comboVariableListe.SelectedValue is CVariableDynamique))
            {
                result.EmpileErreur(I.T("Select the list to browse|30042"));
                return(result);
            }
            ActionForEach.VariableListe = (CVariableDynamique)m_comboVariableListe.SelectedValue;
            if (!(m_comboVariable.SelectedValue is CVariableDynamique))
            {
                result.EmpileErreur(I.T("Select the browsing variable|30043"));
                return(result);
            }
            CVariableDynamique variable = (CVariableDynamique)m_comboVariable.SelectedValue;

            if (variable.IdVariable == "")
            {
                m_variableNew     = new CVariableProcessTypeComplexe(ActionForEach.Process);
                m_variableNew.Nom = variable.Nom;
                m_variableNew.SetTypeDonnee(ActionForEach.VariableListe.TypeDonnee.GetTypeElements());
                ActionForEach.Process.AddVariable(m_variableNew);
                variable = m_variableNew;
            }
            ActionForEach.VariableElementEnCours = variable;
            return(result);
        }
Пример #2
0
        /// //////////////////////////////////////////
        protected override sc2i.common.CResultAErreur MAJ_Champs()
        {
            CResultAErreur result = base.MAJ_Champs();

            if (!result)
            {
                return(result);
            }
            if (!(m_comboBoxVariables.SelectedValue is CVariableDynamique) && !ActionFonction.VariableRetourCanBeNull)
            {
                result.EmpileErreur(I.T("Select a variable to store the action value|30012"));
                return(result);
            }
            if (m_comboBoxVariables.SelectedValue is CVariableDynamique)
            {
                CVariableDynamique variable = (CVariableDynamique)m_comboBoxVariables.SelectedValue;
                if (variable.IdVariable == "")
                {
                    m_variableNew     = new CVariableProcessTypeComplexe(ActionFonction.Process);
                    m_variableNew.Nom = variable.Nom;
                    m_variableNew.SetTypeDonnee(ActionFonction.TypeResultat);
                    ActionFonction.Process.AddVariable(m_variableNew);
                    variable = m_variableNew;
                    FillListeVariables();
                    m_comboBoxVariables.SelectedValue = m_variableNew;
                }
                ActionFonction.VariableResultat = variable;
            }
            else
            {
                ActionFonction.VariableResultat = null;
            }
            return(result);
        }
Пример #3
0
        /// ////////////////////////////////////////
        private void m_lnkNouvelleVariable_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            string strNom = "";

            if (!(m_comboVariableListe.SelectedValue is CVariableDynamique))
            {
                CFormAlerte.Afficher(I.T("Select list variable first|30055"), EFormAlerteType.Exclamation);
                return;
            }
            CVariableDynamique      variable = (CVariableDynamique)m_comboVariableListe.SelectedValue;
            CTypeResultatExpression type     = variable.TypeDonnee.GetTypeElements();
            CDbKey dbKey = null;

            if (CFormEditNomVariable.EditeNomVariable(ref strNom, ref type, ref dbKey, false))
            {
                if (m_variableNew == null)
                {
                    m_variableNew = new CVariableProcessTypeComplexe();
                    m_variableNew.SetTypeDonnee(type);
                }
                m_variableNew.Nom = strNom;
                FillListeVariables();
                m_comboVariable.SelectedValue = m_variableNew;
            }
        }
Пример #4
0
        /// //////////////////////////////////////////
        protected override sc2i.common.CResultAErreur MAJ_Champs()
        {
            CResultAErreur result = base.MAJ_Champs();
            CContexteAnalyse2iExpression   contexte  = new CContexteAnalyse2iExpression(ObjetEdite.Process, typeof(CProcess));
            CAnalyseurSyntaxiqueExpression analyseur = new CAnalyseurSyntaxiqueExpression(contexte);

            result = analyseur.AnalyseChaine(m_txtFormuleFileName.Text);
            if (!result)
            {
                return(result);
            }
            ActionOuvrirFichier.FormuleFichier = (C2iExpression)result.Data;

            result = analyseur.AnalyseChaine(m_txtFormuleArguments.Text);
            if (!result)
            {
                return(result);
            }
            ActionOuvrirFichier.FormuleArguments = (C2iExpression)result.Data;

            if (m_comboBoxVariables.SelectedValue is CVariableDynamique)
            {
                CVariableDynamique variable = (CVariableDynamique)m_comboBoxVariables.SelectedValue;
                if (variable.IdVariable == "")
                {
                    m_variableNew     = new CVariableProcessTypeComplexe(ActionOuvrirFichier.Process);
                    m_variableNew.Nom = variable.Nom;
                    m_variableNew.SetTypeDonnee(new CTypeResultatExpression(typeof(int), false));
                    ActionOuvrirFichier.Process.AddVariable(m_variableNew);
                    variable = m_variableNew;
                    FillListeVariables();
                    m_comboBoxVariables.SelectedValue = m_variableNew;
                }
                ActionOuvrirFichier.VariableResultat = variable;
            }
            else
            {
                ActionOuvrirFichier.VariableResultat = null;
            }

            ActionOuvrirFichier.WaitForExit = m_chkWaitForExit.Checked;
            ActionOuvrirFichier.SurServeur  = m_chkSurServeur.Checked;

            return(result);
        }
Пример #5
0
        private void m_lnkNouvelleVariable_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string strNom = "";
            CTypeResultatExpression type = new CTypeResultatExpression(typeof(int), false);
            CDbKey dbKey = null;

            if (CFormEditNomVariable.EditeNomVariable(ref strNom, ref type, ref dbKey, false))
            {
                if (m_variableNew == null)
                {
                    m_variableNew = new CVariableProcessTypeComplexe();
                    m_variableNew.SetTypeDonnee(type);
                }
                m_variableNew.Nom = strNom;
                FillListeVariables();
                m_comboBoxVariables.SelectedValue = m_variableNew;
            }
        }