Exemplo n.º 1
0
        //---------------------------------------------
        protected override void MyAppliqueRestriction(
            CRestrictionUtilisateurSurType restrictionSurObjetEdite,
            CListeRestrictionsUtilisateurSurType listeRestrictions,
            IGestionnaireReadOnlySysteme gestionnaireReadOnly)
        {
            if (EditedElement != null && m_textBoxNumerique != null)
            {
                ERestriction        rest   = restrictionSurObjetEdite.RestrictionGlobale;
                C2iWndTextBoxEntier wndTxt = WndAssociee as C2iWndTextBoxEntier;
                if (wndTxt != null)
                {
                    CDefinitionProprieteDynamique def = wndTxt.Property;
                    if (def != null)
                    {
                        rest = def.GetRestrictionAAppliquer(restrictionSurObjetEdite);
                    }
                }

                switch (rest)
                {
                case ERestriction.ReadOnly:
                case ERestriction.Hide:
                {
                    gestionnaireReadOnly.SetReadOnly(m_textBoxNumerique, true);
                    break;
                }

                default: break;
                }
            }
        }
Exemplo n.º 2
0
        private void CWndFor2iTextBoxEntier_TextChanged(object sender, EventArgs e)
        {
            C2iWndTextBoxEntier txt = WndAssociee as C2iWndTextBoxEntier;

            if (txt != null && txt.AutoSetValue)
            {
                MajChamps(false);
            }
            if (m_gridView != null)
            {
                m_gridView.NotifyCurrentCellDirty(true);
            }
            CUtilControlesWnd.DeclencheEvenement(C2iWndTextBoxEntier.c_strIdEvenementValueChanged, this);
        }