private Point GetPosForAppWidget(DragEventArgs dragevent) { Point clientTop = PointToScreen(new Point(0, 0)); Point appWidgetPos = new Point(dragevent.X - clientTop.X, (int)aggAppWidget.height() - (dragevent.Y - clientTop.Y)); return(appWidgetPos); }
MatterHackers.Agg.UI.MouseEventArgs ConvertWindowsMouseEventToAggMouseEvent(System.Windows.Forms.MouseEventArgs windowsMouseEvent) { // we invert the y as we are bottom left coordinate system and windows is top left. int Y = windowsMouseEvent.Y; Y = (int)widgetToSendTo.height() - Y; return(new MatterHackers.Agg.UI.MouseEventArgs((MatterHackers.Agg.UI.MouseButtons)windowsMouseEvent.Button, windowsMouseEvent.Clicks, windowsMouseEvent.X, Y, windowsMouseEvent.Delta)); }