PurplePen.EventDB.FixPrintAreas C# (CSharp) Method

FixPrintAreas() private method

private FixPrintAreas ( ) : void
return void
        void FixPrintAreas()
        {
            Event eventDB = GetEvent();
            float mapScale = eventDB.mapScale;

            float scale, dpi;
            Size bitmapSize;
            RectangleF mapBounds;
            MapType mapType;
            string errorMessageText;

            // If this failes, mapBounds will be empty rectangle, which is what we want to pass to GetDefaultPageSize;
            MapUtil.ValidateMapFile(eventDB.mapFileName, out scale, out dpi, out bitmapSize, out mapBounds, out mapType, out errorMessageText);

            eventDB.printArea.UpdateUnknownPageSize(mapBounds, mapScale);

            foreach (Id<Course> courseId in AllCourseIds) {
                Course course = GetCourse(courseId);
                course.UpdateUnknownPageSizes(mapBounds, mapScale);
            }
        }