public static void DrawRectangle(MRectangle rec, CColor color) { SetCursor(rec.From); for (int i = 0; i <= rec.Height; ++i) { DrawStringInPoint(LastPoint(), color, "".PadLeft(rec.Width + 1)); SetCursor(MoveCursorFromLastY(1)); } }
public static void DrawRectangleBorder(MRectangle rec, CColor color) { SetCursor(rec.From); MPoint leftBottom = MoveCursorFromLastY(rec.Height); MPoint rightTop = MoveCursorFromLastX(rec.Width); DrawStringInPoint(rec.From, color, "".PadLeft(rec.Width)); DrawStringInPoint(leftBottom, color, "".PadLeft(rec.Width)); DrawLine(rec.From, leftBottom, color); DrawLine(rec.To, rightTop, color); }