private void Form1_MouseDown(object sender, MouseEventArgs e) { Cell c= p.CheckMouse(e.X, e.Y); if (c == null) return; c1 = c; this.Cursor = Cursors.Hand; }
private void Form1_MouseUp(object sender, MouseEventArgs e) { this.Cursor = Cursors.Arrow; if (c1 == null) return; Cell c = p.CheckMouse(e.X, e.Y); if (c == null) { c1 = null; return; } c2 = c; p.Swap(new Action(c1, c2), true); }
public Action(Cell lh,Cell rh) { LH = lh; RH = rh; }