/// <summary>
        /// Occurs when the value for one of the class property changes.
        /// </summary>
        public void OnRaisePropertyChanged(PropertyChangeTypes types)
        {
            PropertyChanged e = new PropertyChanged(types);
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler handler = RaisePropertyChanged;

            // Event will be null if there are no subscribers
            if (handler != null)
            {
                // Use the () operator to raise the event.
                handler(this, e);
            }
        }
示例#2
0
 /// <summary>
 /// Property value changed on the control.
 /// </summary>
 /// <param name="msg">Integer value indication what type of change.</param>
 public PropertyChanged(PropertyChangeTypes msg) : base()
 {
     _message = msg;
 }
示例#3
0
 private PropertyChanged()
 {
     _message = 0;
 }