Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
            }
        }