예제 #1
0
		private void RunEventLogger (string fileName)
		{
			/*
			using (var provider = ProfilingDataSQLiteProvider.FromFile("ProfilingSession.sdps")){
				var functions = provider.GetFunctions(0, provider.DataSets.Count - 1);
				foreach (CallTreeNode n in functions) {
					Console.WriteLine("{0}: {1} calls, {2:f2}ms", n.Name, n.CallCount, n.TimeSpent);
				}
				
			}
			*/
			Cursor.Current = Cursors.WaitCursor;
			EventLogger eLog = new EventLogger(fileName);
			Cursor.Current = Cursors.Default;

			this.imageList = eLog.Images;
			
			ReportModel model = ReportEngine.LoadReportModel(fileName);
			IDataManager dataManager = DataManager.CreateInstance(eLog.EventLog,model.ReportSettings);
			
//			this.previewControl1.SectionRendering += PushPrinting;
			
			this.previewControl1.PreviewLayoutChanged += delegate (object sender, EventArgs e)
		
			{
				this.previewControl1.RunReport(model,dataManager);
			};
			this.previewControl1.RunReport(model,dataManager);
		}
예제 #2
0
		private void RunEventLogger_Pdf (string fileName)
		{
			Cursor.Current = Cursors.WaitCursor;
			EventLogger eventLogger = new EventLogger(fileName);
			Cursor.Current = Cursors.Default;

			this.imageList = eventLogger.Images;
			
			ReportModel model = ReportEngine.LoadReportModel(fileName);
			IReportCreator creator = ReportEngine.CreatePageBuilder(model,eventLogger.EventLog,null);
			creator.SectionRendering += PushPrinting;
			creator.BuildExportList();
			using (PdfRenderer pdfRenderer = PdfRenderer.CreateInstance(creator,SelectFilename(),true))
			{
				pdfRenderer.Start();
				pdfRenderer.RenderOutput();
				pdfRenderer.End();
			}
		}