public Zone Create() { Zone z = new Zone(); //defaults z.Size = new Size(500,500); z.Location = new Point(100, 100); zones.Add(z); z.Delete += new EventHandler(zone_Delete); z.StartEditMode(); return z; }
private bool MouseInZone(Zone z) { Rectangle mouseRect = new Rectangle(inputState.MouseX, inputState.MouseY, 1, 1); return z.Rectangle.IntersectsWith(mouseRect); }
public void SnapWindow(IntPtr hwnd, Zone zone) { this.zone = zone; this.windowToSnap = hwnd; timer.Start(); }