/// <summary> /// Loads a specified report file. /// </summary> /// <param name="fileName">File to load.</param> public void LoadFile(string fileName) { ReportTab reportTab = null; if (Designer.MdiMode) { // check if file is already opened if (!String.IsNullOrEmpty(fileName)) { foreach (DocumentWindow c in Designer.Documents) { if (c is ReportTab && String.Compare((c as ReportTab).Report.FileName, fileName, true) == 0) { c.Activate(); return; } } } Report report = new Report(); report.Designer = Designer; reportTab = Designer.CreateReportTab(report); } else { reportTab = ActiveReportTab; } if (reportTab.LoadFile(fileName)) { if (Designer.MdiMode) { Designer.AddReportTab(reportTab); } } else if (Designer.MdiMode) { reportTab.Dispose(); } }
public UndoRedo(ReportTab tab) { FOwner = tab; FUndo = new List <UndoRedoInfo>(); FRedo = new List <UndoRedoInfo>(); }