//----------------------------------------------------------- protected override void MyCreateControle(CCreateur2iFormulaireV2 createur, sc2i.formulaire.C2iWnd wnd, System.Windows.Forms.Control parent, sc2i.expression.IFournisseurProprietesDynamiques fournisseurProprietes) { if (WndVariable == null | WndVariable.Variable == null) { return; } IVariableDynamique variable = WndVariable.Variable; if (variable.IsChoixParmis()) { if ((variable is CVariableDynamiqueSelectionObjetDonnee && ((CVariableDynamiqueSelectionObjetDonnee)variable).UtiliserRechercheRapide) || (variable is CChampCustom && typeof(CObjetDonneeAIdNumerique).IsAssignableFrom(variable.TypeDonnee.TypeDotNetNatif) && WndVariable is C2iWndChampCustom && !((C2iWndChampCustom)WndVariable).UtiliserUneCombo) ) { m_controleForVariable = GetControle <CControleForVariableRechercheRapide>(); } else { m_controleForVariable = GetControle <CControleForVariableComboBox>(); } } else if (variable.TypeDonnee.TypeDotNetNatif == typeof(bool)) { m_controleForVariable = GetControle <CControleForVariableCheckBox>(); } else if (variable.TypeDonnee.TypeDotNetNatif == typeof(string)) { m_controleForVariable = GetControle <CControleForVariableTextBox>(); } else if (variable.TypeDonnee.TypeDotNetNatif == typeof(int)) { m_controleForVariable = GetControle <CControleForVariableTextBoxEntier>(); } else if (variable.TypeDonnee.TypeDotNetNatif == typeof(double)) { if (variable.ClasseUnite != null) { m_controleForVariable = GetControle <CControleForVariableTextBoxAvecUnite>(); } else { m_controleForVariable = GetControle <CControleForVariableTextBoxDouble>(); } } else if (variable.TypeDonnee.TypeDotNetNatif == typeof(DateTime)) { m_controleForVariable = GetControle <CControleForVariableDateTimePicker>(); } if (m_controleForVariable != null) { m_controleForVariable.SetVariable(variable); System.Windows.Forms.Control ctrl = m_controleForVariable.Control; m_controleForVariable.WndFor2iVariable = this; if (ctrl != null) { parent.Controls.Add(ctrl); m_controleForVariable.FillFrom2iWnd(wnd); CCreateur2iFormulaireV2.AffecteProprietesCommunes(WndVariable, ctrl); m_controleForVariable.LockEdition = LockEdition; } m_controleForVariable.ValueChanged += new EventHandler(m_controleForVariable_ValueChanged); } }