Exemplo n.º 1
0
 private void document_HidingWindow(object sender, PopupWindowEventArgs e)
 {
     PopupWindow window = e.Window;
     if (windows.Contains(window))
     {
         windows.Remove(window);
         if (ParentForm != null)
         {
             ParentForm.Controls.Remove(window);
         }
     }
 }
Exemplo n.º 2
0
 private void document_ShowingWindow(object sender, PopupWindowEventArgs e)
 {
     PopupWindow window = e.Window;
     if (!windows.Contains(window))
     {
         windows.Add(window);
         if (ParentForm != null)
         {
             ParentForm.Controls.Add(window);
             Point point = this.PointToScreen(Point.Empty);
             Point absPos = ParentForm.PointToClient(point);
             window.ParentLocation = absPos;
             window.BringToFront();
         }
     }
 }