Esempio n. 1
0
		private void ResourceValue_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e)
		{
			OnObjectChanged("Value", r == null ? null : r.Value, null);
		}
Esempio n. 2
0
		//-------------------------------------------------------------------------------------
		void tree_TreeChanged(object sender, ObjectChangeNotifyEventArgs e)
		{
		 if(e.Action == ChangeNotifyAction.ObjectReset)
			 BuildTree();
		}
Esempio n. 3
0
		/// <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;
		}
Esempio n. 4
0
		void _tree_CollectionReset(object sender, ObjectChangeNotifyEventArgs e)
		{
		 if(e.Action == ChangeNotifyAction.ObjectReset)
			 BuildTree();
		}
Esempio n. 5
0
		/// <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);
		} 
Esempio n. 6
0
		/// <summary>
		/// Вызывает событие ObjectResetted.
		/// </summary>
		/// <param name="args">Аргументы события</param>
		protected virtual void OnObjectResetted(ObjectChangeNotifyEventArgs args)
		{
			OnObjectChanged(args);
		}
Esempio n. 7
0
		/// <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);
		}
Esempio n. 8
0
		/// <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);
		} 
Esempio n. 9
0
 void SimObjectBinder_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e)
 {
  if(e.Action == ChangeNotifyAction.ObjectReset || e.MemberName == null)
   RaiseNotify("",null);
  else 
   RaiseNotify(e.MemberName, e.NewValue);
 }
Esempio n. 10
0
		//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();
		}
Esempio n. 11
0
		void Person_ObjectChanged(object sender, ObjectChangeNotifyEventArgs e)
		{
			Modify = true;
		}