Пример #1
0
 private void drawBox_onMousedown(object sender, MouseEventArgs e)
 {
     if (!backgroundWorker.IsBusy)
     {
         this.Invoke((Action)(() =>
         {
             var point = drawBox.PointToClient(Cursor.Position);
             int x = point.X / (drawBox.Width / grid.Width + 1);
             int y = point.Y / (drawBox.Height / grid.Height + 1);
             grid.flipPoint(x, y);
             DrawGrid();
         }));
     }
 }