public static ExportConfig LoadFromModels(ModelsEx models) { var res = new ExportConfig(); res.ShowCropBox = models.Display.ShowCropRectangle; res.CropStartX = models.ExportConfig.CropStart.X; res.CropStartY = models.ExportConfig.CropStart.Y; res.CropStartZ = models.ExportConfig.CropStart.Z; res.CropEndX = models.ExportConfig.CropEnd.X; res.CropEndY = models.ExportConfig.CropEnd.Y; res.CropEndZ = models.ExportConfig.CropEnd.Z; res.UseCropping = models.ExportConfig.UseCropping; res.ZoomBox = ZoomBoxConfig.LoadFromModels(models); return(res); }
public static ZoomBoxConfig LoadFromModels(ModelsEx models) { var res = new ZoomBoxConfig(); foreach (var box in models.ZoomBox.Boxes) { res.Boxes.Add(new Box { StartX = box.Start.X, StartY = box.Start.Y, EndX = box.End.X, EndY = box.End.Y, Border = box.Border, Color = box.Color }); } return(res); }