Esempio n. 1
0
        private void panel_canvas_MouseUp(object sender, MouseEventArgs e)
        {
            if (isRect)
            {
                List <Point> list = new List <Point>();
                list.Add(new Point(rect.X + rect.Width, rect.Y));
                list.Add(new Point(rect.X + rect.Width, rect.Y + rect.Height));
                list.Add(new Point(rect.X, rect.Y + rect.Height));
                list.Add(new Point(rect.X, rect.Y));

                RoomMaker.PushRectangle(list);

                isRect = false;
                rect   = new Rectangle(0, 0, 0, 0);
            }
            isDraw = false;

            if (isCreateMenu == 3 && isMove)
            {
                moveEndPoint = new Point(e.X, e.Y);
                selected_room.MoveRoom(moveStartPoint, moveEndPoint);
                RoomMaker.SnapRectangleRoom(selected_room);
                isMove        = false;
                selected_room = null;
                isMovingDraw  = false;
            }
        }