public event EventHandler <EventArgs> ObjectChanged; //Об'єкт змінився - подія public void RaiseChanged() //Об'єкт змінився - пробудити подію { if (ObjectChanged != null) { ObjectChanged.Invoke(this, new EventArgs()); } }
private void OnObjectChanged(Object obj) { ObjectChanged?.Invoke(obj); //========================= Thickness RealCM_Margin = MarginCM(); MarginCM_Change.Invoke(RealCM_Margin); }
private void btn_Save_Click(object sender, EventArgs e) { if (objectIsNew) { DataSource.Add(editObject); } StopEditMode(); ObjectChanged?.Invoke(this, editObject); }
public void SetValue(object value) { Property.SetValue(Instance.ProxiedObject, value); ObjectChanged?.Invoke(new ObjectChangedEventArgs { Object = Instance.ProxiedObject, PropertyName = Property.Name }); Instance.RaisePropertyChanged(string.Empty); }
internal void DoObjectChanged(TabularObject obj, string propertyName, object oldValue, object newValue) { if (_disableUpdates) { return; } var e = new ObjectChangedEventArgs(obj, propertyName, oldValue, newValue); ObjectChanged?.Invoke(this, e); }
public void Save <T>(T reference, Predicate <T> predicate) where T : Sprite, new() { if (reference == null) { return; } var obj = Query(predicate); obj = reference; ObjectChanged?.Invoke(obj); }
public void SetObject(T value) { if (!ReferenceEquals(_obj, value)) { object old = _obj; if (_obj != null) { _obj.PropertyChanged -= _obj_PropertyChanged; } _obj = value; if (_obj != null) { _obj.PropertyChanged += _obj_PropertyChanged; } ObjectChanged?.Invoke(this, new ObjectChangedEventArgs(old)); ObjectPropertyChanged?.Invoke(this, new PropertyChangedEventArgs(null)); } }
/// <summary> /// Raises an ObjectChanged event. /// </summary> private void OnObjectChanged(object changeArgument) { ObjectChanged?.Invoke(this, new ObjectChangedEventArgs(commandConfig, changeArgument)); }
/// <summary> /// Вызвать событие ObjectChanged /// </summary> private void OnObjectChanged(object changeArgument) { ObjectChanged?.Invoke(this, new ObjectChangedEventArgs(modbusCmd, changeArgument)); }
private void _NotifyObservers() { ObjectChanged.Invoke(this, null); }
/// <summary> /// Raises an ObjectChanged event. /// </summary> private void OnObjectChanged(object changeArgument) { ObjectChanged?.Invoke(this, new ObjectChangedEventArgs(subscriptionConfig, changeArgument)); }
/// <summary> /// Вызвать событие ObjectChanged /// </summary> private void OnObjectChanged(object changeArgument) { ObjectChanged?.Invoke(this, new ObjectChangedEventArgs(elemInfo, changeArgument)); }
private void OnObjectChanged(ObjectChangedEventArgs args) { ObjectChanged?.Invoke(this, args); }
public void RaiseObjectChanged(CustomEventArgs <object> args) { ObjectChanged?.Invoke(this, args); }
/// <summary> /// Raises the <see cref="ObjectChanged"/> event for the specified <paramref name="propertyName"/>. /// </summary> /// <param name="propertyName">Name of the changed property</param> protected virtual void RaiseObjectChanged(string propertyName) { ObjectChanged?.Invoke(this, propertyName); }
internal void DoObjectChanged(TabularObject obj, string propertyName, object oldValue, object newValue) { var e = new ObjectChangedEventArgs(obj, propertyName, oldValue, newValue); ObjectChanged?.Invoke(this, e); }