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