示例#1
0
 private void DrawBox_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         Drawing = true;
         Point startMousePos = new Point(e.X, e.Y);
         Line = new DrawLine(pen.Color, startMousePos, startMousePos, pen.Width);
         ShapePoints.Add(Line);
     }
     else if (e.Button == MouseButtons.Right)
     {
         GetColor.ShowDialog();
         pen.Color = GetColor.Color;
     }
 }