Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length > 0)
            {
                openDemoFile = new FileInfo(textBox1.Text);
            }

            if (!openDemoFile.Exists)
            {
                MessageBox.Show("File does not exist\n\n" + textBox1.Text, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            var prop = Properties.Settings.Default;

            prop.fileName = textBox1.Text;
            prop.Save();

            Q3HuffmanMapper.init();

            var cfg = Q3DemoParser.getFriendlyConfig(openDemoFile.FullName);

            if (cfg == null)
            {
                MessageBox.Show("ERROR");
            }
            else
            {
                MessageBox.Show(cfg.ToString());
            }
        }
Exemplo n.º 2
0
        public static Dictionary <short, string> getRawConfigStrings(string file_name)
        {
            Q3DemoParser p = new Q3DemoParser(file_name);

            return(p.parseConfig());
        }
Exemplo n.º 3
0
        public static int countDemoMessages(string file_name)
        {
            Q3DemoParser p = new Q3DemoParser(file_name);

            return(p.countMessages());
        }