/// <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); } } }
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); } } }
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); } }
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; } }