Esempio n. 1
0
 public virtual void Close(bool Accept)
 {
     if (base.Visible)
     {
         PopupHookManager.PopupClosed(this);
         this.DoHide();
         CodeCompletionProvider provider1 = this.provider as CodeCompletionProvider;
         if (provider1 != null)
         {
             provider1.SelIndex = this.GetSelectedIndex();
         }
         if ((this.ClosePopup != null) || ((provider1 != null) && provider1.IsCloseEventAssigned()))
         {
             ClosingEventArgs args1 = new ClosingEventArgs(Accept, provider1);
             if (((provider1 != null) && (provider1.ColumnCount != 0)) && ((provider1.SelIndex >= 0) && (provider1.SelIndex < provider1.Count)))
             {
                 args1.Text = provider1.GetText(provider1.SelIndex);
             }
             else
             {
                 args1.Text = string.Empty;
             }
             if ((provider1 != null) && provider1.IsCloseEventAssigned())
             {
                 provider1.DoClosePopup(this, args1);
             }
             if (this.ClosePopup != null)
             {
                 this.ClosePopup(this, args1);
             }
         }
     }
 }
Esempio n. 2
0
 internal static void FilterMouseMessage(int Msg, IntPtr HWnd, IntPtr WParam, IntPtr LParam)
 {
     if (((Msg >= 0x201) && (Msg <= 520)) || ((Msg >= 0xa1) && (Msg <= 0xa9)))
     {
         Control control1 = Control.FromHandle(HWnd);
         PopupHookManager.CheckMouse(control1, Control.MousePosition);
     }
 }
Esempio n. 3
0
 internal static void PopupShowing(ICodeCompletionWindow popup)
 {
     PopupHookManager.Popups.Add(new PopupWnd(popup, ((CodeCompletionWindow)popup).OwnerControl.FindForm()));
     if (PopupHookManager.mouseHookHandle == IntPtr.Zero)
     {
         PopupHookManager.InstallHook();
     }
 }
Esempio n. 4
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();
     }
 }
Esempio n. 5
0
 public void PopupAt(Point Position)
 {
     this.showing = true;
     try
     {
         if ((this.completionFlags & CodeCompletionFlags.FeetToScreen) > CodeCompletionFlags.None)
         {
             this.EnsureVisible(ref Position);
         }
         PopupHookManager.PopupClosed(this);
         PopupHookManager.PopupShowing(this);
         this.DoShow(Position);
     }
     finally
     {
         this.showing = false;
     }
 }
Esempio n. 6
0
        private static int MouseHook(int ncode, IntPtr wParam, IntPtr lParam)
        {
            if (ncode == 0)
            {
                if (!PopupHookManager.inMouseHook && (lParam != IntPtr.Zero))
                {
                    River.Orqa.Editor.MOUSEHOOKSTRUCT mousehookstruct1 = (River.Orqa.Editor.MOUSEHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(River.Orqa.Editor.MOUSEHOOKSTRUCT));
                    try
                    {
                        PopupHookManager.inMouseHook = true;
                        PopupHookManager.FilterMouseMessage(wParam.ToInt32(), mousehookstruct1.hwnd, IntPtr.Zero, new IntPtr((mousehookstruct1.Pt.X << 0x10) | mousehookstruct1.Pt.Y));
                        goto Label_008B;
                    }
                    finally
                    {
                        PopupHookManager.inMouseHook = false;
                    }
                }
                return(Win32.CallNextHookEx(PopupHookManager.mouseHookHandle, ncode, wParam, lParam));
            }
Label_008B:
            return(Win32.CallNextHookEx(PopupHookManager.mouseHookHandle, ncode, wParam, lParam));
        }
Esempio n. 7
0
 internal static void OnApplicationExit(object sender, EventArgs e)
 {
     PopupHookManager.RemoveHook();
 }