private void Form1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Point tP = new Point(); tP = coordinateToBd(e.X, e.Y); if (room.running) { return; } if (BoardOfFIR.checkP(tP)) { room.select(tP); Invalidate(); textBox1.Text = room.record.mainvariation.varToString(); if (MenuItemAutoMove.Checked) { room.AI(); } ToolStripAutoRedo.Checked = false; } } if (e.Button == MouseButtons.Right) { if (MenuItemRightBtnUndo.Checked) { room.Undo(); Invalidate(); } else { contextMenuStrip1.Show(e.Location); } } }
private void Form1_MouseMove(object sender, MouseEventArgs e) { Point tP = new Point(); tP = coordinateToBd(e.X, e.Y); if (room.getStatus() == Status.DeleteSel && BoardOfFIR.checkP(tP)) { this.Cursor = Cursors.No; } else { this.Cursor = Cursors.Default; } }