//------------------------------------------------------------------------ public void CreateControle(CCreateur2iFormulaireV2 createur, C2iWnd wnd, System.Windows.Forms.Control parent, sc2i.expression.IFournisseurProprietesDynamiques fournisseurProprietes) { C2iWndZoneMultiple zone = wnd as C2iWndZoneMultiple; if (zone != null) { if (zone.UseChildOptimization) { m_controleAlloue = new CWndFor2iZoneMultipleCustomList(); } else { m_controleAlloue = new CWndFor2iZoneMultiple(); } m_controleAlloue.CreateControle(createur, wnd, parent, fournisseurProprietes); } }
//----------------------------------------------- public virtual IControleWndFor2iWnd CreateControle( C2iWnd wnd, Control parent, IFournisseurProprietesDynamiques fournisseurProprietes) { m_fournisseurProprietes = fournisseurProprietes; if (wnd == null) { return(null); } if (m_tooltip == null && m_componentContainer != null) { m_tooltip = new ToolTip(m_componentContainer); } Type tpControle = null; if (!m_dicWndToEditeur.TryGetValue(wnd.GetType(), out tpControle)) { return(null); } object objControle = Activator.CreateInstance(tpControle); IControleWndFor2iWnd ctrl = objControle as IControleWndFor2iWnd; if (ctrl == null) { return(null); } ctrl.CreateControle(this, wnd, parent, fournisseurProprietes); if (ctrl != null && ctrl.Control != null) { if (AfterCreateControl != null) { AfterCreateControl(ctrl.Control, wnd, ElementEdite); } } if (ctrl.Control != null && ctrl.Control.Parent != null) { ctrl.Control.BringToFront(); m_tooltip.SetToolTip(ctrl.Control, wnd.HelpText); } return(ctrl); }