static void Main() { // Create instance of EventLogInfoReader to read from event logs. EventLogInfoReader eventLog = new EventLogInfoReader(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Main(eventLog)); }
public Main(EventLogInfoReader eL) { this.eventLog = eL; InitializeComponent(); Random rnd = new Random(); this.data = eL.ReadEventLogData(); cbxBoots.SelectedIndex = 0; this.printPreviewDialog = new PrintPreviewDialog(); this.printDocument = new PrintDocument(); this.pageSetupDialog = new PageSetupDialog(); printDocument.PrintPage += new PrintPageEventHandler(printDocument_PrintPage); }