/*
* Namespace Summary
* Copyright (C) 2005+ Bogdan Damian Constantin
* E-Mail: damianbcpetro@gmail.com
* WEB: http://www.sourceforge.net/projects/dataholder
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License 2.1 or later, as
* published by the Free Software Foundation. See the included License.txt
* or http://www.gnu.org/copyleft/lesser.html for details.
*
*/
using System;
using DataHolder.Containers.Property;
namespace DataHolder.Containers{
public enum GenericDataCollectionEventType{Added = 1, Modified = 2, Deleted = 3, SubCollectionModified = 4, Clear = 5, Reset = 6};
public delegate void GenericDataCollectionModified(GenericData ge, GenericDataCollectionEventType evType, int index);
public delegate void GenericDataPropertyModified(GenericData ge, GEChangeEventArgs args);
public class GEChangeEventArgs
{
public enum ChangeEventType {None = 0, FieldChange = 1, CancelEdit = 2, RejectChanges = 3, RenewData = 4, Delete = 5, DetachedFieldAdded = 6};
private GenericDataProperty lgeProp;
private ChangeEventType lEventType;
public GEChangeEventArgs(GenericDataProperty ge, ChangeEventType evType)
{
lgeProp = ge;
lEventType = evType;
}
public GEChangeEventArgs(ChangeEventType evType)
{
lEventType = evType;
}
public GenericDataProperty Property
{
get
{
return lgeProp;
}
}
public ChangeEventType EventType
{
get
{
return lEventType;
}
}
}
public class GECollectionChangeEventArgs
{
private GenericDataProperty lgeProp;
public GECollectionChangeEventArgs(GenericDataProperty ge, int Position)
{
lgeProp = ge;
}
GenericDataProperty Property
{
get
{
return lgeProp;
}
}
}
}
|