Пример #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();

            string[]      lines  = File.ReadAllLines("wocinfo.txt");
            int           compId = int.Parse(lines[0]);
            List <string> urls   = new List <string>();

            for (int i = 1; i < lines.Length; i++)
            {
                urls.Add(lines[i]);
            }

            /*WocParser wp = new WocParser(new string[] {
             *  "http://www.woc2012.ch/results/live/" + comp + "-women-heat-a.json",
             *  "http://www.woc2012.ch/results/live/" + comp + "-women-heat-b.json",
             *  "http://www.woc2012.ch/results/live/" + comp + "-women-heat-c.json",
             * "http://www.woc2012.ch/results/live/" + comp + "-men-heat-a.json",
             *  "http://www.woc2012.ch/results/live/" + comp + "-men-heat-b.json",
             *  "http://www.woc2012.ch/results/live/" + comp + "-men-heat-c.json"});*/
            WocParser wp = new WocParser(urls.ToArray());

            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }
Пример #2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();

            string[]      lines  = File.ReadAllLines("wocinfo.txt");
            int           compId = int.Parse(lines[0]);
            List <string> urls   = new List <string>();

            for (int i = 1; i < lines.Length; i++)
            {
                urls.Add(lines[i]);
            }
            WocParser wp = new WocParser(urls.ToArray());

            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }