private void ResourceValue_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e) { OnObjectChanged("Value", r == null ? null : r.Value, null); }
//------------------------------------------------------------------------------------- void tree_TreeChanged(object sender, ObjectChangeNotifyEventArgs e) { if(e.Action == ChangeNotifyAction.ObjectReset) BuildTree(); }
/// <summary> /// Вызывает событие ObjectChanging. /// </summary> /// <param name="memberName">Имя изменяемого члена класса объекта.</param> /// <param name="oldValue">Старое значение члена класса.</param> /// <param name="newValue">Новое значение изменяемого члена класса.</param> protected virtual ObjectChangeNotifyEventArgs OnObjectChanging(string memberName, object newValue, object oldValue) { var args = new ObjectChangeNotifyEventArgs(this, ChangeNotifyAction.ObjectChange, memberName, newValue, oldValue); OnObjectChanging(args); return args; }
void _tree_CollectionReset(object sender, ObjectChangeNotifyEventArgs e) { if(e.Action == ChangeNotifyAction.ObjectReset) BuildTree(); }
/// <summary> /// Вызывает событие OnObjectChanged. /// </summary> /// <param name="args">Аргументы события</param> protected virtual void OnObjectChanged(ObjectChangeNotifyEventArgs args) { if(args == null) return; if(args.Sender == null) args.Sender = this; lock(SyncRoot) if(_objectChanged != null && IsChangeEventsOff == false) _objectChanged.Raise(this, args); }
/// <summary> /// Вызывает событие ObjectResetted. /// </summary> /// <param name="args">Аргументы события</param> protected virtual void OnObjectResetted(ObjectChangeNotifyEventArgs args) { OnObjectChanged(args); }
/// <summary> /// Вызывает событие ObjectChanged. /// </summary> /// <param name="memberName">Имя измененного члена класса объекта.</param> /// <param name="oldValue">Старое значение члена класса.</param> /// <param name="newValue">Новое значение изменяемого члена класса.</param> protected virtual void OnObjectChanged(string memberName, object newValue, object oldValue) { var args = new ObjectChangeNotifyEventArgs(this, ChangeNotifyAction.ObjectChange, memberName, newValue, oldValue); OnObjectChanged(args); }
/// <summary> /// Вызывает событие ObjectChanging. /// </summary> /// <param name="args">Аргументы события</param> protected virtual void OnObjectChanging(ObjectChangeNotifyEventArgs args) { if(args == null) throw new ArgumentNullException("args"); if(args.Sender == null) args.Sender = this; lock(SyncRoot) if(_objectChanging != null && IsChangeEventsOff == false) _objectChanging.Raise(this, args); }
void SimObjectBinder_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e) { if(e.Action == ChangeNotifyAction.ObjectReset || e.MemberName == null) RaiseNotify("",null); else RaiseNotify(e.MemberName, e.NewValue); }
//void tree_ObjectChanging(object sender, ObjectChangeNotifyEventArgs e) //{ // //if(e.Action == ChangeNotifyAction.ObjectReset && view.RaiseEvents) // // EventsOff(); //} void tree_ListChanged(object sender, ObjectChangeNotifyEventArgs e) { if(e.Action == ChangeNotifyAction.ObjectReset) InitTree(); }
void Person_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e) { Modify = true; }