/// /////////////////////////////////////////////////////////////
        private void m_menuVariableSaisie_Click(object sender, System.EventArgs e)
        {
            CVariableDynamiqueSaisie variable = new CVariableDynamiqueSaisie(m_elementAVariables);

            if (CFormEditVariableDynamiqueSaisie.EditeVariable(variable, m_elementAVariables))
            {
                m_elementAVariables.AddVariable(variable);
                FillListe();
            }
        }
Esempio n. 2
0
        //-------------------------------------------------------------------------
        void itemNewVariable_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;
            Type tp = item != null ? item.Tag as Type : null;

            if (tp != null)
            {
                IVariableDynamique variable = null;
                try
                {
                    variable = Activator.CreateInstance(tp, new object[] { m_elementAVariables }) as IVariableDynamique;
                }
                catch (Exception ex)
                {
                    CResultAErreur result = CResultAErreur.True;
                    result.EmpileErreur(new CErreurException(ex));
                    CFormAlerte.Afficher(result.Erreur);
                    return;
                }
                if (variable != null && EditeVariable(variable))
                {
                    ListViewItem lvItem = new ListViewItem();
                    FillItem(lvItem, variable);
                    m_wndListeVariables.Items.Add(lvItem);
                    m_elementAVariables.AddVariable(variable);
                }
            }
        }
Esempio n. 3
0
 //---------------------------------------------------------------------------
 public void AddVariable(IVariableDynamique variable)
 {
     if (m_elementAVariablesExternes != null)
     {
         m_elementAVariablesExternes.AddVariable(variable);
         return;
     }
     if (variable is CVariableDynamique)
     {
         m_listeVariables.Add(variable as CVariableDynamique);
     }
 }
 //-----------------------------------------------------------------------------
 public void AddVariable(IVariableDynamique variable)
 {
     m_eltAVariables.AddVariable(variable);
 }