void CWndFor2iCheckBox_CheckedChanged(object sender, EventArgs e) { C2iWndCheckBox chk = WndAssociee as C2iWndCheckBox; if (chk != null && chk.AutoSetValue) { MajChamps(false); } if (m_gridView != null) { m_gridView.NotifyCurrentCellDirty(true); } CUtilControlesWnd.DeclencheEvenement(C2iWndCheckBox.c_strIdEvenementCheckChanged, this); }
protected override void MyCreateControle( CCreateur2iFormulaireV2 createur, C2iWnd wnd, Control parent, IFournisseurProprietesDynamiques fournisseurProprietes) { C2iWndCheckBox wndCheckBox = wnd as C2iWndCheckBox; if (wndCheckBox != null) { CCreateur2iFormulaireV2.AffecteProprietesCommunes(wndCheckBox, m_checkBox); parent.Controls.Add(m_checkBox); m_checkBox.Text = wndCheckBox.Text; } }
//--------------------------------------------- protected override void MyAppliqueRestriction( CRestrictionUtilisateurSurType restrictionSurObjetEdite, CListeRestrictionsUtilisateurSurType listeRestrictions, IGestionnaireReadOnlySysteme gestionnaireReadOnly) { if (EditedElement != null && m_checkBox != null) { //Chope la restriction sur le champ concerné C2iWndCheckBox chk = WndAssociee as C2iWndCheckBox; ERestriction rest = restrictionSurObjetEdite.RestrictionGlobale; if (chk != null) { CDefinitionProprieteDynamique def = chk.Property; if (def != null) { rest = def.GetRestrictionAAppliquer(restrictionSurObjetEdite); } } switch (rest) { case ERestriction.ReadOnly: { gestionnaireReadOnly.SetReadOnly(m_checkBox, true); break; } case ERestriction.Hide: { gestionnaireReadOnly.SetReadOnly(m_checkBox, true); m_checkBox.Hide(); break; } default: break; } } }