protected void HandleNotificationEvent(SHAutomationElement sender, NotificationKind notificationKind,
                                        NotificationProcessing notificationProcessing, string displaystring, string activityId)
 {
     _callAction(sender, notificationKind, notificationProcessing, displaystring, activityId);
 }
Esempio n. 2
0
 public void HandleNotificationEvent(AutomationElement sender, NotificationKind notificationKind,
                                     NotificationProcessing notificationProcessing, string displayString, string activityId)
 {
     throw new NotImplementedException();
 }
        public void HandleNotificationEvent(IUIAutomationElement sender, NotificationKind kind, NotificationProcessing process, string displayString, string activityId)
        {
            var m = EventMessage.GetInstance(this.EventId, sender);

            if (m != null)
            {
                m.Properties = new List <KeyValuePair <string, dynamic> >
                {
                    new KeyValuePair <string, dynamic>("NotificationKind", kind.ToString()),
                    new KeyValuePair <string, dynamic>("NotificationProcessing", process.ToString()),
                    new KeyValuePair <string, dynamic>("Display", displayString),
                    new KeyValuePair <string, dynamic>("ActivityId", activityId),
                };
                this.ListenEventMessage(m);
            }
        }
#pragma warning disable CA1725 // Parameter names should match base declaration
        public void HandleNotificationEvent(IUIAutomationElement sender, NotificationKind notificationKind, NotificationProcessing notificationProcessing, string displayString, string activityId)
#pragma warning restore CA1725 // Parameter names should match base declaration
        {
#pragma warning disable CA2000 // Call IDisposable.Dispose()
            var m = EventMessage.GetInstance(this.EventId, sender);
#pragma warning restore CA2000

            if (m != null)
            {
                m.Properties = new List <KeyValuePair <string, dynamic> >
                {
                    new KeyValuePair <string, dynamic>("NotificationKind", notificationKind.ToString()),
                    new KeyValuePair <string, dynamic>("NotificationProcessing", notificationProcessing.ToString()),
                    new KeyValuePair <string, dynamic>("Display", displayString),
                    new KeyValuePair <string, dynamic>("ActivityId", activityId),
                };
                this.ListenEventMessage(m);
            }
        }