Exemplo n.º 1
0
 /// <summary>
 /// Show this window relative to another window, will only do something if this window
 /// is not visible.
 /// </summary>
 /// <param name="previous">The previous window.</param>
 /// <param name="alignment">The alignment relative to the previous window.</param>
 public void showRelativeTo(MDIWindow previous, WindowAlignment alignment)
 {
     if (!window.Visible)
     {
         ensureVisible();
         doChangeVisibility(true);
         onShown(EventArgs.Empty);
         if (MDIManager != null)
         {
             MDIManager.showWindow(this, previous, alignment);
         }
     }
 }
Exemplo n.º 2
0
 protected internal override void restoreToMDILayout(MDIWindow mdiWindow, WindowAlignment windowAlignment)
 {
     if (!window.Visible)
     {
         ensureVisible();
         doChangeVisibility(true);
         onShown(EventArgs.Empty);
         if (MDIManager != null)
         {
             MDIManager.showWindow(this, mdiWindow, windowAlignment);
         }
     }
 }
Exemplo n.º 3
0
 protected virtual void onClosed(EventArgs args)
 {
     if (Closed != null)
     {
         Closed.Invoke(this, args);
     }
     try
     {
         if (MDIManager != null)
         {
             MDIManager.closeWindow(this);
         }
     }
     catch (MDIException e)
     {
         Log.Warning(e.Message);
     }
 }
Exemplo n.º 4
0
        void InputManager_MouseButtonPressed(int x, int y, MouseButtonCode button)
        {
            int left   = window.AbsoluteLeft;
            int top    = window.AbsoluteTop;
            int right  = left + window.Width;
            int bottom = top + window.Height;

            if ((x < left || x > right || y < top || y > bottom) && !(MDIManager != null && MDIManager.isControlWidgetAtPosition(x, y) || keepOpenFromPoint(x, y)))
            {
                Visible = false;
            }
        }