Ejemplo n.º 1
0
 internal void RiseEvent2(string dataName, object oldData, object newData)
 {
     try
     {
         DataChangeEventArgs args = new DataChangeEventArgs(dataName, oldData, newData);
         if (OnDataChanged != null)//value has been changed
         {
             OnDataChanged(this, args);
         }
     }
     catch { }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// return true if data changed accepted
 /// </summary>
 internal bool RiseEvent1(string dataName, object oldData, object newData)
 {
     try
     {
         if (oldData == newData)
         {
             return(false);
         }
         DataChangeEventArgs args = new DataChangeEventArgs(dataName, oldData, newData);
         if (OnDataChanging != null) //begin change value
         {
             OnDataChanging(this, args);
         }
         return(!args.CancelEdit);
     }
     catch { return(false); }
 }