// Render the given course id (0 = all controls) and kind to a map, and compare it to the saved version. internal void CheckRenderMapStandardChange(string filename, Id <Course> id, DescriptionKind kind, string newDescStandard) { SymbolDB symbolDB = new SymbolDB(Util.GetFileInAppDirectory("symbols.xml")); UndoMgr undomgr = new UndoMgr(5); EventDB eventDB = new EventDB(undomgr); CourseView courseView; eventDB.Load(filename); symbolDB.Standard = eventDB.GetEvent().descriptionStandard; eventDB.Validate(); courseView = CourseView.CreateViewingCourseView(eventDB, DesignatorFromCourseId(eventDB, id)); DescriptionFormatter descFormatter = new DescriptionFormatter(courseView, symbolDB, DescriptionFormatter.Purpose.ForPrinting); DescriptionLine[] description = descFormatter.CreateDescription(kind == DescriptionKind.Symbols); Bitmap bmNew = RenderToMapThenToBitmap(symbolDB, description, kind, 1); TestUtil.CheckBitmapsBase(bmNew, DescriptionBrowser.GetBitmapFileName(eventDB, id, "_std_default", kind)); undomgr.BeginCommand(71231, "change standard"); symbolDB.Standard = newDescStandard; ChangeEvent.UpdateDescriptionToMatchStandard(eventDB, symbolDB); undomgr.EndCommand(71231); description = descFormatter.CreateDescription(kind == DescriptionKind.Symbols); bmNew = RenderToMapThenToBitmap(symbolDB, description, kind, 1); TestUtil.CheckBitmapsBase(bmNew, DescriptionBrowser.GetBitmapFileName(eventDB, id, "_std_" + newDescStandard, kind)); }