public static void DrawLines(CutLineAndSheet cutLineAndSheet, Graphics formGraphics, Color color, int width) { ICutLine line = cutLineAndSheet.Line; var sheetLocation = cutLineAndSheet.Sheet.Location; if (line.LineType == LineType.Horizontal) { Point firstPoint = new Point(0 + sheetLocation.X, line.Value + sheetLocation.Y); Point secondPoint = new Point(2000 + sheetLocation.X, line.Value + sheetLocation.Y); formGraphics.DrawLine(new Pen(color, width), firstPoint, secondPoint); } else if (line.LineType == LineType.Vertical) { Point firstPoint = new Point(line.Value + sheetLocation.X, 0 + sheetLocation.Y); Point secondPoint = new Point(line.Value + sheetLocation.X, 2000 + sheetLocation.Y); formGraphics.DrawLine(new Pen(color, width), firstPoint, secondPoint); } }
public static CutLineAndSheet Create(ICutLine line, Sheet sheet, ISheet[] outputSheets) { return(new CutLineAndSheet(line, sheet, outputSheets)); }
private CutLineAndSheet(ICutLine line, Sheet sheet, ISheet[] outputSheets) { Line = line; Sheet = sheet; OutputSheets = outputSheets; }