Пример #1
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Min", typeof(object), I.TT(GetType(), "Min(List)\nReturn the smallest element of the list|232"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("List|20066"), new CTypeResultatExpression(typeof(object), true)));
            return(info);
        }
Пример #2
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "ParentCode", typeof(string[]), I.TT(GetType(), "ParentCode( text, size) : returns all parental code relative of a hierarchical code by using the specified size for each level|357"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfo2iDefinitionParametres(typeof(string), typeof(int)));
            return(info);
        }
Пример #3
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Distinct", typeof(object), I.TT(GetType(), "Distinct(list)\nReturn the list without double|242"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("List|20066"), new CTypeResultatExpression(typeof(object), true)));
            return(info);
        }
Пример #4
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "LineFeed", typeof(string), I.TT(GetType(), "LineFeed()\nReturn a character of return line|270"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfo2iDefinitionParametres(new Type[0]));
            return(info);
        }
Пример #5
0
        /// //////////////////////////////////////////
        public override CInfo2iExpression GetInfos()
        {
            CInfo2iExpression info = base.GetInfos();

            if (Parametres.Count == 2)
            {
                CTypeResultatExpression tpParametre0 = Parametres2i[0].TypeDonnee;
                CTypeResultatExpression tpParametre1 = Parametres2i[1].TypeDonnee;

                if (tpParametre0 != null && tpParametre1 != null)
                {
                    Type tp1, tp2;
                    tp1 = tpParametre0.TypeDotNetNatif;
                    tp2 = tpParametre1.TypeDotNetNatif;
                    if (tp1 == tp2)
                    {
                        info.TypeDonnee = new CTypeResultatExpression(tp1, true);
                    }
                    else
                    {
                        info.TypeDonnee = new CTypeResultatExpression(typeof(object), true);
                    }
                }
            }
            return(info);
        }
Пример #6
0
        /// //////////////////////////////////////////
        public override CInfo2iExpression GetInfos()
        {
            CInfo2iExpression info = base.GetInfos();

            if (Parametres.Count >= 2)
            {
                CTypeResultatExpression tpParametre0 = Parametres2i[0].TypeDonnee;
                CTypeResultatExpression tpParametre1 = Parametres2i[1].TypeDonnee;

                if (tpParametre0 != null && tpParametre1 != null)
                {
                    Type tp1, tp2;
                    tp1 = tpParametre0.TypeDotNetNatif;
                    tp2 = tpParametre1.TypeDotNetNatif;
                    if (tp1 == tp2)
                    {
                        info.TypeDonnee = new CTypeResultatExpression(tp1, false);
                    }
                    else if (typeof(int).IsAssignableFrom(tp1) && typeof(int).IsAssignableFrom(tp2))
                    {
                        info.TypeDonnee = new CTypeResultatExpression(typeof(int), false);
                    }
                    else if (typeof(CValeurUnite).IsAssignableFrom(tp1) || typeof(CValeurUnite).IsAssignableFrom(tp2))
                    {
                        info.TypeDonnee = new CTypeResultatExpression(typeof(CValeurUnite), false);
                    }
                    else
                    {
                        info.TypeDonnee = new CTypeResultatExpression(typeof(double), false);
                    }
                }
            }
            return(info);
        }
Пример #7
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Length", typeof(int), I.TT(GetType(), "Length(Text)\nReturn the number of characters in the text|288"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)));
            return(info);
        }
Пример #8
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Indexs", new CTypeResultatExpression(typeof(int), true), I.TT(GetType(), "Indexs(Condition)\nReturn the index list of elements satisfying the condition|239"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfo2iDefinitionParametres(new CTypeResultatExpression(typeof(bool), false)));
            return(info);
        }
Пример #9
0
        public void Init(
            CRepresentationExpressionGraphique expressionGraphique,
            int nNumeroParametre,
            IFournisseurProprietesDynamiques fournisseur,
            CObjetPourSousProprietes objetAnalyse)
        {
            m_fournisseur          = fournisseur;
            m_bIsInitializing      = true;
            m_lblNomParametre.Text = I.T("Parametre @1|20000)", (nNumeroParametre + 1).ToString());
            C2iExpressionAnalysable expAn = expressionGraphique.Formule as C2iExpressionAnalysable;

            if (expAn != null)
            {
                CInfo2iExpression info = expAn.GetInfos();
                m_lblNomParametre.Text = info.GetNomParametre(nNumeroParametre);
                m_toolTip.SetToolTip(m_lblNomParametre, m_lblNomParametre.Text);
            }
            m_expressionGraphique = expressionGraphique;
            m_nNumParametre       = nNumeroParametre;
            m_txtFormule.Init(fournisseur, objetAnalyse);
            CRepresentationExpressionGraphique graf = expressionGraphique.GetExterne(m_nNumParametre);

            if (graf != null)
            {
                m_chkVisible.Checked = true;
            }
            else
            {
                m_chkVisible.Checked = false;
            }
            UpdateWindow();
            m_bIsInitializing = false;
        }
Пример #10
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Not", typeof(Boolean), I.TT(GetType(), "Not(value)\nLogical NOT Function|253"), CInfo2iExpression.c_categorieLogique);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Value|20039"), typeof(bool)));
            return(info);
        }
Пример #11
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "LowerCase", typeof(string), I.TT(GetType(), "LowerCase(String)\nReturn the text in small letters|280"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(object)));
            return(info);
        }
Пример #12
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Trim", typeof(string), I.TT(GetType(), "Trim(Text)\nDelete spaces and returns line in beginning and end of text|289"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(object)));
            return(info);
        }
Пример #13
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Calc", new CTypeResultatExpression(typeof(object), true), I.TT(GetType(), ".Calc(formula)\nCalculate for each element of a list the formula and return the list of the result|243"),
                                                           CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfo2iDefinitionParametres(new CTypeResultatExpression(typeof(object), false)));
            return(info);
        }
Пример #14
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Number", typeof(int), I.TT(GetType(), "Number(List)\nReturn the number of elements in list|230"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("List|20066"), new CTypeResultatExpression(typeof(object), true)));
            //info.AddDefinitionParametres( new CInfo2iDefinitionParametres(typeof(object)) );
            return(info);
        }
Пример #15
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "LastIndexOf", typeof(string), I.TT(GetType(), "LastIndexOf(Text, required text)\nReturn the indec of the last occurence of the required text in the text|292"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Value|20039"), typeof(string)));
            return(info);
        }
Пример #16
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Contains", typeof(bool), I.TT(GetType(), "Contains(String, Search string)\nReturns true if String contains Search string|20008"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Value|20039"), typeof(string)));
            return(info);
        }
Пример #17
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "RemoveCharsExcept", typeof(string), I.TT(GetType(), "RemoveCharsExcept(String, Valid characters)\nReturns the string where all characters not in 'Valid characters' are removed|20147"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Valid characters|20148"), typeof(string)));
            return(info);
        }
Пример #18
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Left", typeof(string), I.TT(GetType(), "Left(Text, length)\nReturn the left part of the text over the length indicated|296"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(object)),
                                         new CInfoUnParametreExpression(I.T("Length|20070"), typeof(int)));
            return(info);
        }
Пример #19
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "ListToText", new CTypeResultatExpression(typeof(string), false),
                                                           I.TT(GetType(), "ListToText(Formula;separator)\nConvert the list in text. For each value of the list, the format is evaluated and added to the resulting string. Each element is separated by the separator|238"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfo2iDefinitionParametres(typeof(string), typeof(string)));
            return(info);
        }
Пример #20
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Average", typeof(double), I.TT(GetType(), "Average(List)\nReturn the elements average of the list|231"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("List|20066"), new CTypeResultatExpression(typeof(object), true)));
            //info.AddDefinitionParametres( new CInfo2iDefinitionParametres(typeof(object)) );
            return(info);
        }
Пример #21
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(4, "and", typeof(bool), I.TT(GetType(), "Logical operator AND|254"), CInfo2iExpression.c_categorieLogique);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Left operand|20042"), typeof(bool)),
                                         new CInfoUnParametreExpression(I.T("Right operand|20043"), typeof(bool)));
            return(info);
        }
Пример #22
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(2, "%", typeof(int), I.TT(GetType(), "Opérator modulo|262"), CInfo2iExpression.c_categorieMathematiques);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Left operand|20042"), typeof(int)),
                                         new CInfoUnParametreExpression(I.T("Right operand|20043"), typeof(int)));
            return(info);
        }
Пример #23
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "ForEach", new CTypeResultatExpression(typeof(string), false),
                                                           I.TT(GetType(), ".ForEach(Action)\nExecute action foreach element in the list|312"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Looped action|20087"),
                                                                        new CTypeResultatExpression(typeof(object), false), true));
            return(info);
        }
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "GetModificationContextId",
                                                           new CTypeResultatExpression(typeof(string), true),
                                                           I.TT(GetType(), "GetModificationContext()\nReturns the current modification context ID(string)|20046"),
                                                           CInfo2iExpression.c_categorieDivers);

            return(info);
        }
Пример #25
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Replace", typeof(string), I.TT(GetType(), "Replace(String, required, replacement)\nReplaces the required value by the replacement value in the string|271"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Replaced text|20074"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Replacing text|20075"), typeof(string)));
            return(info);
        }
Пример #26
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "PadLeft", typeof(string), I.TT(GetType(), "PadLeft(String, Character, length)\nSupplements the string on the left by the character indicated|279"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Character|20073"), typeof(string)),
                                         new CInfoUnParametreExpression(I.T("Length|20070"), typeof(int)));
            return(info);
        }
Пример #27
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "If", typeof(object), I.TT(GetType(), "If(condition;then;if not)\nConditional connection IF|245"), CInfo2iExpression.c_categorieLogique);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Condition|20067"), typeof(bool)),
                                         new CInfoUnParametreExpression(I.T("Action if true|20068"), typeof(object), true),
                                         new CInfoUnParametreExpression(I.T("Action if false|20069"), typeof(object), true));
            return(info);
        }
Пример #28
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "ConcatList", typeof(int), I.TT(GetType(), "ConcatList(List1,List2)\nAdd a list (or an element) to an other|20007"), CInfo2iExpression.c_categorieGroupe);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("List 1|20064"), typeof(object)),
                                         new CInfoUnParametreExpression(I.T("List 2|20065"), typeof(object)));
            //info.AddDefinitionParametres( new CInfo2iDefinitionParametres(typeof(object), typeof(object)) );
            return(info);
        }
Пример #29
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Compile", typeof(C2iExpression), I.TT(GetType(), "Compile(source, formula)\nCompiles formula based on source object and return formula object|296"), CInfo2iExpression.c_categorieDivers);

            info.AddDefinitionParametres(
                new CInfoUnParametreExpression("Source object", typeof(object)),
                new CInfoUnParametreExpression("Formula text", typeof(string)));
            return(info);
        }
Пример #30
0
        /// //////////////////////////////////////////
        protected override CInfo2iExpression GetInfosSansCache()
        {
            CInfo2iExpression info = new CInfo2iExpression(0, "Substring", typeof(string), I.TT(GetType(), "Substring(string, start, length)\nReturn the part of the string from the start character over the length indicated|281"), CInfo2iExpression.c_categorieTexte);

            info.AddDefinitionParametres(new CInfoUnParametreExpression(I.T("Text|20046"), typeof(object)),
                                         new CInfoUnParametreExpression(I.T("Start|20072"), typeof(int)),
                                         new CInfoUnParametreExpression(I.T("Length|20070"), typeof(int)));
            return(info);
        }