Esempio n. 1
0
 private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
 {
     if (plotEngagedWithMouse != null)
     {
         plotEngagedWithMouse.MouseUp(upLocation: e.Location);
         if (e.Button == MouseButtons.Middle)
         {
             plotEngagedWithMouse.AutoAxis();
             Render();
         }
         plotEngagedWithMouse = null;
     }
 }
Esempio n. 2
0
        private void UserControl_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var position = e.GetPosition(this);

            System.Drawing.Point location = new System.Drawing.Point((int)(position.X * scaleFactor), (int)(position.Y * scaleFactor));

            if (plotEngagedWithMouse != null)
            {
                plotEngagedWithMouse.MouseUp(upLocation: location);
                if (e.ChangedButton == MouseButton.Middle)
                {
                    plotEngagedWithMouse.AutoAxis();
                    Render();
                }
                plotEngagedWithMouse = null;
            }
            ReleaseMouseCapture();
        }