|
|
|
@ -11,13 +11,26 @@ namespace GBase.Api |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public abstract class NotifyGBaseEntryChanged : INotifyGBaseEntryChanged //TODO: Rename to GBaseValueChanged or EntryUpdated? |
|
|
|
public abstract class NotifyGBaseEntryChanged : INotifyGBaseEntryChanged //TODO: Rename to GBaseValueChanged or EntryUpdated? |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Notify the GBase that an entry has changed |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
public event EventHandler<GBaseEntryChangedEventArgs> GBaseEntryChanged; |
|
|
|
public event EventHandler<GBaseEntryChangedEventArgs> GBaseEntryChanged; |
|
|
|
|
|
|
|
|
|
|
|
protected void RaiseGBaseEntryChanged(object sender, string propertyName, object value) |
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Raise the <see cref="GBaseEntryChanged"/> event |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="sender">The sender</param> |
|
|
|
|
|
|
|
/// <param name="columnName">The name of the IGBaseColumn</param> |
|
|
|
|
|
|
|
/// <param name="value">The new value</param> |
|
|
|
|
|
|
|
protected void RaiseGBaseEntryChanged(object sender, string columnName, object value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GBaseEntryChanged?.BeginInvoke(sender, new GBaseEntryChangedEventArgs(propertyName, value), GBaseEntryChangedCallback, null); |
|
|
|
GBaseEntryChanged?.BeginInvoke(sender, new GBaseEntryChangedEventArgs(columnName, value), GBaseEntryChangedCallback, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Callback for the <see cref="GBaseEntryChanged"/> event |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="asyncResult">The <see cref="IAsyncResult"/></param> |
|
|
|
private void GBaseEntryChangedCallback(IAsyncResult asyncResult) |
|
|
|
private void GBaseEntryChangedCallback(IAsyncResult asyncResult) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GBaseEntryChanged?.EndInvoke(asyncResult); //TestMe: Does this work? Or is there something to be done with the asyncResult |
|
|
|
GBaseEntryChanged?.EndInvoke(asyncResult); //TestMe: Does this work? Or is there something to be done with the asyncResult |
|
|
|
|