Exemplo n.º 1
0
        //--------------------------------------------------------------------------
        private void m_menuVariableCalculée_Click(object sender, EventArgs e)
        {
            CVariableDynamiqueCalculee variable = new CVariableDynamiqueCalculee(m_mapDatabaseGenerator);

            if (EditeVariable(variable))
            {
                m_mapDatabaseGenerator.AddVariable(variable);
                RefillListeVariables();
            }
        }
        /// ////////////////////////////////////////////////////////////////////////////
        private void m_menuVariableCalculée_Click(object sender, System.EventArgs e)
        {
            CVariableDynamiqueCalculee variable = new CVariableDynamiqueCalculee(m_filtre);

            if (CFormEditVariableFiltreCalculee.EditeVariable(variable, m_filtre))
            {
                m_filtre.AddVariable(variable);
                m_wndAide.RefillChamps();
            }
        }
Exemplo n.º 3
0
        private void m_menuNewVariableCalculée_Click(object sender, EventArgs e)
        {
            CVariableDynamiqueCalculee variable = new CVariableDynamiqueCalculee(m_macro);

            if (EditeVariable(variable))
            {
                m_macro.AddVariable(variable);
                RefillListeVariables();
            }
        }
        /// /////////////////////////////////////////////////////////////
        private void m_menuVariableCalculée_Click(object sender, System.EventArgs e)
        {
            CVariableDynamiqueCalculee variable = new CVariableDynamiqueCalculee(m_elementAVariables);

            if (CFormEditVariableFiltreCalculee.EditeVariable(variable, m_elementAVariables))
            {
                m_elementAVariables.AddVariable(variable);
                FillListe();
            }
        }
Exemplo n.º 5
0
        /// //////////////////////////////////////////////////////
        public static bool EditeVariable(CVariableDynamiqueCalculee variable, IElementAVariablesDynamiquesBase element)
        {
            CFormEditVariableFiltreCalculee form = new CFormEditVariableFiltreCalculee();

            form.Init(variable, element);
            Boolean bOk = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bOk);
        }
Exemplo n.º 6
0
        /// /////////////////////////////////////////////
        public object GetValeurChamp(IVariableDynamique variable)
        {
            if (variable == null)
            {
                return(null);
            }

            object valRetour = null;

            if (variable is CVariableDynamiqueCalculee)
            {
                CVariableDynamiqueCalculee variableCalculee = (CVariableDynamiqueCalculee)variable;
                return(variableCalculee.GetValeur(this));
            }
            else
            {
                object val = m_tableValeursChamps[variable.IdVariable];
                if (val == null && variable is CVariableDynamiqueSaisie)
                {
                    if (ProcessParent != null)
                    {
                        return(ProcessParent.GetValeurChamp(variable));
                    }
                    else
                    {
                        m_tableValeursChamps[variable.IdVariable] = ((CVariableDynamiqueSaisie)variable).GetValeurParDefaut();
                    }
                }
                if (val == null && variable is CVariableProcessTypeComplexe)
                {
                    if (ProcessParent != null)
                    {
                        return(ProcessParent.GetValeurChamp(variable));
                    }
                    else
                    {
                        m_tableValeursChamps[variable.IdVariable] = ((CVariableProcessTypeComplexe)variable).GetValeurParDefaut(ContexteDonnee);
                    }
                }

                return(m_tableValeursChamps[variable.IdVariable]);
            }
        }
Exemplo n.º 7
0
 /// //////////////////////////////////////////////////////
 private void Init(CVariableDynamiqueCalculee variable, IElementAVariablesDynamiquesBase filtre)
 {
     m_variable          = variable;
     m_elementAVariables = filtre;
 }