void HitIfBbNodeIsNotNull(MouseEventArgs args) { if (gViewer.DGraph != null && gViewer.BbNode != null) { gViewer.Hit(args); } }
void ProcessPan(MouseEventArgs args) { if (ClientRectangle.Contains(args.X, args.Y)) { if (args.Button == MouseButtons.Left) { gViewer.Transform[0, 2] = mouseDownTransform[0, 2] + args.X - mouseDownPoint.X; gViewer.Transform[1, 2] = mouseDownTransform[1, 2] + args.Y - mouseDownPoint.Y; gViewer.Invalidate(); } else { GViewer.Hit(args); } } }
private void ProcessPan(MouseEventArgs args) { if (ClientRectangle.Contains(args.X, args.Y)) { if (args.Button == System.Windows.Forms.MouseButtons.Left) { double dx = (double)(args.X - mouseDownPoint.X); double dy = (double)(args.Y - mouseDownPoint.Y); dx /= gViewer.LocalScale; dy /= gViewer.LocalScale; //map it to real coord int dh = gViewer.ScaleFromSrcXToScroll(dx); int dv = gViewer.ScaleFromSrcYToScroll(dy); gViewer.HVal = mouseDownHVal - dh; gViewer.VVal = mouseDownVVal + dv; gViewer.Invalidate(); } else { GViewer.Hit(args); } } }