Пример #1
0
 private static void HandleStructureChangedEventClient(ProxySimple el, IntPtr hwnd, int eventId)
 {
     if (eventId == NativeMethods.EventObjectCreate)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent (el, new StructureChangedEventArgs (StructureChangeType.ChildAdded, el.MakeRuntimeId()));
     }
     else if (eventId == NativeMethods.EventObjectDestroy)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent( el, new StructureChangedEventArgs( StructureChangeType.ChildRemoved, el.MakeRuntimeId() ) );
     }
     else if ( eventId == NativeMethods.EventObjectReorder )
     {
         IGridProvider grid = el.GetPatternProvider(GridPattern.Pattern) as IGridProvider;
         if ( grid == null )
             return;
         AutomationInteropProvider.RaiseStructureChangedEvent( el, new StructureChangedEventArgs( StructureChangeType.ChildrenInvalidated, el.MakeRuntimeId() ) );
     }
 }
Пример #2
0
 private static void HandleStructureChangedEventClient(ProxySimple el, IntPtr hwnd, int eventId)
 {
     if (eventId == NativeMethods.EventObjectCreate)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent(el, new StructureChangedEventArgs(StructureChangeType.ChildAdded, el.MakeRuntimeId()));
     }
     else if (eventId == NativeMethods.EventObjectDestroy)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent(el, new StructureChangedEventArgs(StructureChangeType.ChildRemoved, el.MakeRuntimeId()));
     }
     else if (eventId == NativeMethods.EventObjectReorder)
     {
         IGridProvider grid = el.GetPatternProvider(GridPattern.Pattern) as IGridProvider;
         if (grid == null)
         {
             return;
         }
         AutomationInteropProvider.RaiseStructureChangedEvent(el, new StructureChangedEventArgs(StructureChangeType.ChildrenInvalidated, el.MakeRuntimeId()));
     }
 }
Пример #3
0
 private static void HandleStructureChangedEventWindow(ProxySimple el, IntPtr hwnd, int eventId)
 {
     if (eventId == NativeMethods.EventObjectReorder)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent( el, new StructureChangedEventArgs( StructureChangeType.ChildrenReordered, el.MakeRuntimeId() ) );
     }
 }
Пример #4
0
 private static void HandleStructureChangedEventWindow(ProxySimple el, IntPtr hwnd, int eventId)
 {
     if (eventId == NativeMethods.EventObjectReorder)
     {
         AutomationInteropProvider.RaiseStructureChangedEvent(el, new StructureChangedEventArgs(StructureChangeType.ChildrenReordered, el.MakeRuntimeId()));
     }
 }