示例#1
0
        /// <summary>
        /// Fires a given event and passes it with the correct arguments to the registered event handlers. It returns the <see cref="RecordEventArgs"/> structure it created and that the event handlers might have modified.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="handler">The event to fire.</param>
        /// <param name="record">The record to pass to the event handlers (may be null).</param>
        /// <returns>A new instance of the <see cref="RecordEventArgs"/> class that has been passed to every event handler and might have been modified.</returns>
        public static RecordEventArgs Fire(Control sender, RecordEventHandler handler, IEditableDbRecord record) {
            var args = new RecordEventArgs() {
                Record = record,
                Continue = true
            };

            if (handler == null)
                return args;

            handler(sender, args);

            return args;
        }
示例#2
0
 public override void RegisterCallback(RecordEventHandler handler)
 {
     doHandleDel += handler;
 }
示例#3
0
 public abstract void RegisterCallback(RecordEventHandler handler);
示例#4
0
		public override void RegisterCallback(RecordEventHandler handler)
		{
			doHandleDel += handler;
		}
示例#5
0
 public abstract void RegisterCallback(RecordEventHandler handler);