private void TrackItem_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (isRightDown) { MouseRightButtonClick?.Invoke(sender, e); } isRightDown = false; }
private void OnMouseClick(object sender, MouseEventArgs e) { NotifyIconHelper.SetNotifyIconWindowForeground(NotifyIcon); if (e.Button == MouseButtons.Right) { if (NotifyIconHelper.TryGetNotifyIconClickedPoint(NotifyIcon, out Point point)) { MouseRightButtonClick?.Invoke(this, point); } } else { MouseLeftButtonClick?.Invoke(this, null); } }