Beispiel #1
0
 private void panel1_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left && !Double.IsNaN(DT.GetBeta(340 - e.Location.Y, e.Location.X)) && !Double.IsNaN(DT.GetAlfa(340 - e.Location.Y, e.Location.X)))
     {
         addPoint(x, y);
         x = e.X;
         y = e.Y;
         g.DrawLine(pen, new Point(x + 1, y + 1), e.Location);
         addPoint(135 - DT.GetAlfa(340 - e.Location.Y, e.Location.X), 135 - DT.GetBeta(340 - e.Location.Y, e.Location.X) + DT.GetAlfa(340 - e.Location.Y, e.Location.X));
         mouseIsDown   = true;
         panel1.Cursor = Cursors.Cross;
     }
 }