Beispiel #1
0
 internal static void PopupShowing(ICodeCompletionWindow popup)
 {
     PopupHookManager.Popups.Add(new PopupWnd(popup, ((CodeCompletionWindow)popup).OwnerControl.FindForm()));
     if (PopupHookManager.mouseHookHandle == IntPtr.Zero)
     {
         PopupHookManager.InstallHook();
     }
 }
Beispiel #2
0
 internal static void PopupClosed(ICodeCompletionWindow popup)
 {
     for (int num1 = PopupHookManager.Popups.Count - 1; num1 >= 0; num1--)
     {
         PopupWnd wnd1 = (PopupWnd)PopupHookManager.Popups[num1];
         if (wnd1.Popup == popup)
         {
             wnd1.Release();
             PopupHookManager.Popups.RemoveAt(num1);
             break;
         }
     }
     if (PopupHookManager.Popups.Count == 0)
     {
         PopupHookManager.RemoveHook();
     }
 }
Beispiel #3
0
 internal static void CheckMouse(Control control, Point mousePos)
 {
     for (int num1 = PopupHookManager.Popups.Count - 1; num1 >= 0; num1--)
     {
         PopupWnd wnd1                 = (PopupWnd)PopupHookManager.Popups[num1];
         Control  control1             = (Control)wnd1.Popup;
         ICodeCompletionWindow window1 = wnd1.Popup;
         if (((window1 != null) && control1.Created) && control1.Visible)
         {
             Control control2 = control1.FindForm();
             if ((((control2 != null) && !control2.Contains(control)) && ((control2 != control) && (control1 != control))) && (!control1.Contains(control) && !control1.Bounds.Contains(mousePos)))
             {
                 window1.CloseDelayed(false);
             }
         }
     }
 }
Beispiel #4
0
 // Methods
 public PopupWnd(ICodeCompletionWindow Popup, Control PopupParent)
 {
     this.popup       = Popup;
     this.popupParent = PopupParent;
     if ((this.popupParent != null) && this.popupParent.IsHandleCreated)
     {
         this.nativeWindow = this.GetNativeWindow(this.popupParent.Handle);
         this.nativeWindow.Add(Popup);
     }
     if ((PopupParent is Form) && ((Form)PopupParent).IsMdiChild)
     {
         Form form1 = ((Form)PopupParent).MdiParent;
         if ((form1 != null) && form1.IsHandleCreated)
         {
             this.mdiNativeWindow = this.GetNativeWindow(form1.Handle);
             this.mdiNativeWindow.Add(Popup);
         }
     }
 }
Beispiel #5
0
 public void Remove(ICodeCompletionWindow Popup)
 {
     this.popups.Remove(Popup);
 }
Beispiel #6
0
 public void Add(ICodeCompletionWindow Popup)
 {
     this.popups.Add(Popup);
 }