Exemplo n.º 1
0
 public Controle(Jeu jeu, int x, int y, string texte, SpriteFont police)
 {
     _jeu         = jeu;
     _x           = x;
     _y           = y;
     _texte       = texte;
     _police      = police;
     _tailleTexte = _police.MeasureString(texte);
     _w           = (int)_tailleTexte.X + MARGE * 2;
     _h           = (int)_tailleTexte.Y + MARGE * 2;
     _click       = null;
     _userData    = 0;
 }
Exemplo n.º 2
0
        // Create the OnPropertyChanged method to raise the event
        public void OnPropertyChanged(string name, bool dirty = true)
        {
            PropertyChangedEventHandler handler = PropertyChanged;

            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
                if (dirty)
                {
                    IsDirty = true;
                }

                CustomClick?.Invoke(name, null);
            }
        }
 public void RaiseCustomClick() =>
 CustomClick?.Invoke(this, EventArgs.Empty);