///<summary>This can add a title, subtitle, grid lines, and page nums to the report using defaults. If the parameters are blank or false the object will not be added. ///Set showProgress false to hide the progress window from showing up when generating the report.</summary> public ReportComplex(bool hasGridLines, bool isLandscape, bool showProgress = true) { if (showProgress) { _actionCloseReportProgress = ODProgress.Show(ODEventType.ReportComplex , typeof(ReportComplexEvent) , startingMessage: Lan.g("ReportComplex", "Running Report Query...") , hasHistory: PrefC.GetBool(PrefName.ReportsShowHistory)); } _grfx = Graphics.FromImage(new Bitmap(1, 1)); _isLandscape = isLandscape; if (hasGridLines) { AddGridLines(); } if (_sections[AreaSectionType.ReportHeader] == null) { _sections.Add(new Section(AreaSectionType.ReportHeader, 0)); } if (_sections[AreaSectionType.PageHeader] == null) { _sections.Add(new Section(AreaSectionType.PageHeader, 0)); } if (_sections[AreaSectionType.PageFooter] == null) { _sections.Add(new Section(AreaSectionType.PageFooter, 0)); } if (_sections[AreaSectionType.ReportFooter] == null) { _sections.Add(new Section(AreaSectionType.ReportFooter, 0)); } }
public void ODProgress_Show_RaceCondition() { //Show a progress window and then immediately tell it to close. This is the quickest possible "long computation". Action actionClose = ODProgress.Show(); actionClose(); //Invoking this action right away was causing progress windows to stay "stuck open". Assert.IsTrue(true); //This unit test would never finish if a race condition was present. }