Exemplo n.º 1
0
 protected internal override EventFilter_FilterAction AcceptWindow(Window w)
 {
     // application- and toolkit-excluded windows are blocked by
     // document-modal dialogs from their child hierarchy
     if (w.IsModalExcluded(Dialog.ModalExclusionType.APPLICATION_EXCLUDE))
     {
         Window w1 = ModalDialog_Renamed.Owner;
         while (w1 != null)
         {
             if (w1 == w)
             {
                 return(EventFilter_FilterAction.REJECT);
             }
             w1 = w1.Owner;
         }
         return(EventFilter_FilterAction.ACCEPT);
     }
     while (w != null)
     {
         if (w == ModalDialog_Renamed)
         {
             return(EventFilter_FilterAction.ACCEPT_IMMEDIATELY);
         }
         if (w == DocumentRoot)
         {
             return(EventFilter_FilterAction.REJECT);
         }
         w = w.Owner;
     }
     return(EventFilter_FilterAction.ACCEPT);
 }
Exemplo n.º 2
0
 protected internal override EventFilter_FilterAction AcceptWindow(Window w)
 {
     if (w.IsModalExcluded(Dialog.ModalExclusionType.APPLICATION_EXCLUDE))
     {
         return(EventFilter_FilterAction.ACCEPT);
     }
     if (w.AppContext == AppContext)
     {
         while (w != null)
         {
             if (w == ModalDialog_Renamed)
             {
                 return(EventFilter_FilterAction.ACCEPT_IMMEDIATELY);
             }
             w = w.Owner;
         }
         return(EventFilter_FilterAction.REJECT);
     }
     return(EventFilter_FilterAction.ACCEPT);
 }