internal static void ShowPopup(Rectangle parentRect, UserAccount account) { ClosePopup(); _Form = new UserAccountPopup(account); _Form.Location = new Point(parentRect.Right - _Form.Width - 1, parentRect.Bottom); WinAPI.ShowInactiveTopmostForm(_Form); }
private void _LabelUser_MouseHover(object sender, EventArgs e) { if (_UserAccount == null) { return; } Rectangle rect = this.RectangleToScreen(new Rectangle(Point.Empty, this.Size)); UserAccountPopup.ShowPopup(rect, _UserAccount); }
private void _LabelUser_MouseLeave(object sender, EventArgs e) { UserAccountPopup.ClosePopup(); }