//----------------------------------------------------------- public void Init(CChampCustom champ) { m_panelForChamp.ClearAndDisposeControls(); m_controleChamp = null; m_champ = champ; if (m_champ != null) { Control ctrl = CAllocateurControlChampCustom.GetNewControle(champ.TypeDonneeChamp.TypeDonnee); m_controleChamp = ctrl as IControlChampCustom; if (m_controleChamp != null) { m_panelForChamp.Controls.Add(ctrl); ctrl.Dock = DockStyle.Fill; m_controleChamp.ChampCustom = champ; m_controleChamp.OnValueChanged += new EventHandler(OnControlValueChanged); m_extModeEdition.SetModeEdition(m_controleChamp, TypeModeEdition.EnableSurEdition); } m_lblNomChamp.Text = champ.Nom; } }
//----------------------------------------------------------- public static void Autoexec() { CAllocateurControlChampCustom.RegisterControle(TypeDonnee.tString, typeof(CControleChampTexte)); }