private void AnalyzeFile(String fileName) { try { LogParser parser = new LogParser(); parser.OnAnalyze += new LogParser.AnalyzeEventHandler(parser_OnAnalyze); FileStream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); StreamReader reader = new StreamReader(stream); while (!reader.EndOfStream) { String line = reader.ReadLine(); parser.ParseLine(line); } } catch (Exception ex) { MessageBox.Show("Error: Could not analyze the file: " + ex.Message); } }
public MainForm() { InitializeComponent(); font = new Font("Verdana", 18); NewMap(); LoadConfig(); if (players.Count == 0) players.Add(new Player()); foreach (Player player in players) { LogParser parser = new LogParser(player); parser.OnAnalyze += new LogParser.AnalyzeEventHandler(parser_OnAnalyze); parser.Start(); } Application.AddMessageFilter(this); gridControl1.MouseWheel += new MouseEventHandler(gridControl1_MouseWheel); }
public MainForm() { InitializeComponent(); font = new Font("Verdana", 18); NewMap(); LoadConfig(); if (players.Count == 0) { players.Add(new Player()); } foreach (Player player in players) { LogParser parser = new LogParser(player); parser.OnAnalyze += new LogParser.AnalyzeEventHandler(parser_OnAnalyze); parser.Start(); } Application.AddMessageFilter(this); gridControl1.MouseWheel += new MouseEventHandler(gridControl1_MouseWheel); }