public GridViewEventInfo( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode) { this = new GridViewEventInfo(id, type, dispatchMode, false); }
public WeakEventHandler(object sender, IWeakEventListener listener, KnownEvents knownEvent) { this.eventListener = new WeakReference(listener); this.eventSender = new WeakReference(sender); this.knownEvent = knownEvent; this.Update(sender, true); }
public bool IsEventSuspended(KnownEvents eventId) { if (this.suspendedEvents.ContainsKey(eventId)) { return(this.suspendedEvents[eventId] > 0); } return(false); }
public static void ResumeEvent(GridViewTemplate template, KnownEvents eventId) { if (template == null) { throw new ArgumentNullException("Template"); } template.MasterTemplate?.SynchronizationService.ResumeEvent(eventId); }
public GridViewEventInfo( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode, bool critical) { this.id = id; this.type = type; this.dispatchMode = dispatchMode; this.critical = critical; }
public void SuspendEvent(KnownEvents eventId) { if (!this.suspendedEvents.ContainsKey(eventId)) { this.suspendedEvents.Add(eventId, 0); } Dictionary <KnownEvents, int> suspendedEvents; KnownEvents index; (suspendedEvents = this.suspendedEvents)[index = eventId] = suspendedEvents[index] + 1; }
public static bool IsEventSuspended(GridViewTemplate template, KnownEvents eventId) { if (template == null) { throw new ArgumentNullException("Template"); } MasterGridViewTemplate masterTemplate = template.MasterTemplate; if (masterTemplate != null) { return(masterTemplate.SynchronizationService.IsEventSuspended(eventId)); } return(false); }
protected virtual void DispatchEvent( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode, object originator, object[] arguments) { if (this.ViewTemplate == null) { return; } GridViewEventInfo eventInfo = new GridViewEventInfo(id, type, dispatchMode); GridViewSynchronizationService.DispatchEvent(this.ViewTemplate, new GridViewEvent((object)this, originator, arguments, eventInfo), false); }
public void ResumeEvent(KnownEvents eventId) { if (!this.suspendedEvents.ContainsKey(eventId)) { return; } int suspendedEvent = this.suspendedEvents[eventId]; if (suspendedEvent == 0) { return; } int num = suspendedEvent - 1; this.suspendedEvents[eventId] = num; }
public static void DispatchEvent( GridViewTemplate template, GridViewEvent eventData, bool postUI) { if (template == null) { throw new ArgumentNullException("Template"); } MasterGridViewTemplate masterTemplate = template.MasterTemplate; if (masterTemplate == null) { return; } GridViewSynchronizationService synchronizationService = masterTemplate.SynchronizationService; if (synchronizationService == null) { return; } if (eventData.Info.Type == GridEventType.Both && postUI) { KnownEvents id = eventData.Info.Id; bool critical = eventData.Info.Critical; object[] arguments = eventData.Arguments; object sender = eventData.Sender; object originator = eventData.Originator; GridViewEventInfo eventInfo1 = new GridViewEventInfo(id, GridEventType.Data, GridEventDispatchMode.Send, critical); GridViewEvent gridEvent1 = new GridViewEvent(sender, originator, arguments, eventInfo1); GridViewEventInfo eventInfo2 = new GridViewEventInfo(id, GridEventType.UI, GridEventDispatchMode.Post, critical); GridViewEvent gridEvent2 = new GridViewEvent(sender, originator, arguments, eventInfo2); synchronizationService.DispatchEvent(gridEvent1); synchronizationService.DispatchEvent(gridEvent2); } else { synchronizationService.DispatchEvent(eventData); } }
public WeakEventHandlerList(IWeakEventListener listener, KnownEvents knownEvent) { this.eventListener = new WeakReference <IWeakEventListener>(listener); this.knownEvent = knownEvent; }