예제 #1
0
 public SCoordsWorkRequest(TransformType transformType, SCoords sCoords, CanvasSize canvasSize, MapSection mapSection, int jobId)
 {
     TransformType = transformType;
     SCoords       = sCoords ?? throw new ArgumentNullException(nameof(sCoords));
     CanvasSize    = canvasSize ?? throw new ArgumentNullException(nameof(canvasSize));
     MapSection    = mapSection ?? throw new ArgumentNullException(nameof(mapSection));
     JobId         = jobId;
 }
예제 #2
0
 private SCoordsWorkRequest()
 {
     TransformType = TransformType.In;
     SCoords       = null;
     CanvasSize    = new CanvasSize(0, 0);
     MapSection    = new MapSection(new Point(0, 0), new CanvasSize(0, 0));
     JobId         = -1;
 }
예제 #3
0
 public SMapWorkRequest(string name, SCoords sCoords, CanvasSize canvasSize, MapSection area, int maxIterations, string connectionId)
 {
     Name          = name ?? throw new ArgumentNullException(nameof(name));
     SCoords       = sCoords ?? throw new ArgumentNullException(nameof(sCoords));
     CanvasSize    = canvasSize ?? throw new ArgumentNullException(nameof(canvasSize));
     Area          = area ?? throw new ArgumentNullException(nameof(area));
     MaxIterations = maxIterations;
     ConnectionId  = connectionId ?? throw new ArgumentNullException(nameof(connectionId));
 }
예제 #4
0
 private SMapWorkRequest()
 {
     Name         = null;
     SCoords      = null;
     CanvasSize   = new CanvasSize(0, 0);
     Area         = new MapSection(new Point(0, 0), new CanvasSize(0, 0));
     ConnectionId = null;
     JobId        = -1;
 }
예제 #5
0
 public static bool TryGetFromSCoords(SCoords sCoords, out Coords coords)
 {
     if (DPoint.TryGetFromSPoint(sCoords.LeftBot, out DPoint leftBot))
     {
         if (DPoint.TryGetFromSPoint(sCoords.RightTop, out DPoint rightTop))
         {
             coords = new Coords(leftBot, rightTop);
             return(true);
         }
         else
         {
             coords = new Coords();
             return(false);
         }
     }
     else
     {
         coords = new Coords();
         return(false);
     }
 }