コード例 #1
0
        private void button1_Click_3(object sender, EventArgs e)
        {
            FrmNewRacomComp newRacomComp = new FrmNewRacomComp();

            if (newRacomComp.ShowDialog(this) == DialogResult.OK)
            {
                FrmMonitor monForm = new FrmMonitor();
                monForm.SetParser(new RacomFileSetParser(newRacomComp.txtStartlist.Text, newRacomComp.txtRawSplits.Text, newRacomComp.txtRaceFile.Text,
                                                         newRacomComp.txtDSQFile.Text, newRacomComp.txtRadioControls.Text, newRacomComp.dtZeroTime.Value, newRacomComp.checkBox1.Checked));
                monForm.CompetitionID = int.Parse(newRacomComp.txtCompID.Text);
                monForm.ShowDialog(this);
            }
            //FrmMonitor monForm = new FrmMonitor();
            ////string[] lines = File.ReadAllLines("wocinfo.txt");
            ////int compId = int.Parse(lines[0]);
            //int compId = -50;
            //List<string> urls = new List<string>();
            ///*for (int i = 1; i < lines.Length; i++)
            //    urls.Add(lines[i]);*/
            //urls.Add("http://www.liveresultater.no/includes/individuell/orientering/lister/allelister.php?q=alle&w=alle&s=DESC&c=radiopost.tid&a=439&acc=sek&lang=en&sid=0.3296072955708951");

            //var wp = new LiveResultaterNoParser(urls.ToArray());
            //monForm.SetParser(wp as IExternalSystemResultParser);
            //monForm.CompetitionID = compId;
            //monForm.ShowDialog(this);
        }
コード例 #2
0
        private void FrmNewCompetition_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.R)
            {
                var parser = new RaceTimerParser(new string[]
                {
                    "http://www.racetimer.se/sv/race/resultlist/3647?race_id=3646&layout=racetimer&rc_id=14200&per_page=2500&commit=Visa+resultat+%3E%3E",
                    "http://www.racetimer.se/sv/race/resultlist/3647?race_id=3646&layout=racetimer&rc_id=14417&per_page=2500&commit=Visa+resultat+%3E%3E",
                    "http://www.racetimer.se/sv/race/resultlist/3647?race_id=3646&layout=racetimer&rc_id=14418&per_page=2005&commit=Visa+resultat+%3E%3E",
                    "http://www.racetimer.se/sv/race/resultlist/3647?race_id=3646&layout=racetimer&rc_id=14419&per_page=2500&commit=Visa+resultat+%3E%3E"
                });
                var mon = new FrmMonitor();
                mon.CompetitionID = -112;
                mon.SetParser(parser);
                mon.ShowDialog(this);
            }

            if (e.KeyCode == Keys.W)
            {
                var parser = new TulospalveluParser(new string[]
                {
                    "http://online4.tulospalvelu.fi/tulokset/en/2017_yllassprint/men/smart/1/",
                    "http://online4.tulospalvelu.fi/tulokset/en/2017_yllassprint/women/smart/1/"
                });
                var mon = new FrmMonitor();
                mon.CompetitionID = 13181;
                mon.SetParser(parser);
                mon.ShowDialog(this);
            }
            if (e.KeyCode == Keys.S)
            {
                var frm = new FrmReSimulateEvent();
                frm.ShowDialog(this);
            }
        }
コード例 #3
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);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: otahirs/liveresults
        public static int Main(string[] args)
        {
            var rootCommand = new RootCommand
            {
                new Option <int>("--compId", description: "Competition id from liveresultat.orienteering.se")
                {
                    IsRequired       = true,
                    ArgumentHelpName = "id"
                },
                new Option <DateTime>("--zeroTime", description: "Start 0 time")
                {
                    IsRequired       = true,
                    ArgumentHelpName = "hh:mm"
                },
                new Option <string>("--startFile", description: "path to startlist file")
                {
                    IsRequired       = true,
                    ArgumentHelpName = "path"
                },
                new Option <string>("--finishFile", description: "path to finish/race file")
                {
                    IsRequired       = true,
                    ArgumentHelpName = "path"
                },
                new Option <string>("--rawSplitsFile", description: "path to raw splits file")
                {
                    ArgumentHelpName = "path"
                },
                new Option <string>("--dsqFile", description: "path to disqualified file")
                {
                    ArgumentHelpName = "path"
                },
                new Option <string>("--radioFile", description: "path to radio controls file")
                {
                    ArgumentHelpName = "path"
                },
                new Option <bool>(
                    "--isRelay",
                    description: "set if race is relay"
                    )
            };

            rootCommand.Name        = "EmmaClient";
            rootCommand.Description = "A linux fork of EmmaClient for uploading live results to liveresultat.orienteering.se";
            rootCommand.Handler     = CommandHandler.Create <int, DateTime, string, string, string, string, string, bool>((compId, zeroTime, startFile, finishFile, rawSplitsFile, dsqFile, radioFile, isRelay) =>
            {
                FrmMonitor monForm = new FrmMonitor();
                monForm.SetParser(new RacomFileSetParser(startFile, rawSplitsFile, finishFile, dsqFile, radioFile, zeroTime, isRelay));
                monForm.CompetitionID = compId;
                monForm.Run();
            });

            return(rootCommand.Invoke(args));
        }
コード例 #5
0
ファイル: NewOLAComp.cs プロジェクト: hennings/emmaclient
        private void wizardPage5_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e)
        {
            //start
            FrmMonitor monForm = new FrmMonitor();

            this.Hide();
            OlaParser pars = new OlaParser(GetDBConnection(lstDB.SelectedItem as string), (cmbOLAComp.SelectedItem as OlaComp).Id, (cmbOLAEtapp.SelectedItem as OlaComp).Id);

            monForm.SetParser(pars as IExternalSystemResultParser);
            monForm.CompetitionID = Convert.ToInt32(txtCompID.Text);
            monForm.ShowDialog(this);
        }
コード例 #6
0
        private void wizardPage5_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e)
        {
            StoreSettings();
            //start
            FrmMonitor monForm = new FrmMonitor();

            this.Hide();
            MeOsParser pars = new MeOsParser(GetDBConnection((cmbMeosComp.SelectedItem as MeosComp).NameId), chkCreateRadioControls.Checked, chkIsRelay.Checked);

            monForm.SetParser(pars as IExternalSystemResultParser);
            monForm.CompetitionID = Convert.ToInt32(txtCompID.Text);
            monForm.ShowDialog(this);
        }
コード例 #7
0
        private void wizardPage5_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e)
        {
            StoreSettings();
            //start
            FrmMonitor monForm = new FrmMonitor();

            this.Hide();
            SSFTimingParser pars = new SSFTimingParser(GetDBConnection(lstDB.SelectedItem as string),
                                                       (cmbOLAComp.SelectedItem as OlaComp).Id, chkCreateRadioControls.Checked);

            monForm.SetParser(pars as IExternalSystemResultParser);
            monForm.CompetitionID = Convert.ToInt32(txtCompID.Text);
            monForm.ShowDialog(this);
        }
コード例 #8
0
        private void button1_Click_3(object sender, EventArgs e)
        {
            var monForm = new FrmMonitor();

            using (var frm = new FrmNewRacomComp())
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    var rsP = new RacomFileSetParser(frm.txtStartlist.Text, frm.txtRawSplits.Text, frm.txtRaceFile.Text, frm.txtDSQFile.Text,
                                                     frm.txtRadioControls.Text, frm.dtZeroTime.Value, frm.checkBox1.Checked);

                    monForm.SetParser(rsP);
                    monForm.CompetitionID = int.Parse(frm.txtCompID.Text);
                    monForm.ShowDialog(this);
                }
            }
        }
コード例 #9
0
        private void button1_Click_2(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();
            //string[] lines = File.ReadAllLines("wocinfo.txt");
            //int compId = int.Parse(lines[0]);
            int compId = -127;
            List<string> urls = new List<string>();
            /*for (int i = 1; i < lines.Length; i++)
                urls.Add(lines[i]);*/
            urls.Add("http://www.ori-live.com/special/go-live-eoc2014-6/EOC2014-6-Men%20A.html");
            urls.Add("http://www.ori-live.com/special/go-live-eoc2014-6/EOC2014-6-Woman%20A.html");

            OriLiveParser wp = new OriLiveParser(urls.ToArray());
            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }
コード例 #10
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();
            //string[] lines = File.ReadAllLines("wocinfo.txt");
            //int compId = int.Parse(lines[0]);
            int           compId = 10640;
            List <string> urls   = new List <string>();

            /*for (int i = 1; i < lines.Length; i++)
             *  urls.Add(lines[i]);*/
            urls.Add("http://www.liveresultater.no/includes/individuell/orientering/lister/allelister.php?q=alle&w=alle&s=DESC&c=radiopost.tid&a=350&acc=sek&lang=en_EN&sid=0.7241666284389794");

            LiveResultaterNoParser wp = new LiveResultaterNoParser(urls.ToArray());

            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }
コード例 #11
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);
        }
コード例 #12
0
        private void button1_Click_2(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();
            //string[] lines = File.ReadAllLines("wocinfo.txt");
            //int compId = int.Parse(lines[0]);
            int           compId = -127;
            List <string> urls   = new List <string>();

            /*for (int i = 1; i < lines.Length; i++)
             *  urls.Add(lines[i]);*/
            urls.Add("http://www.ori-live.com/special/go-live-eoc2014-6/EOC2014-6-Men%20A.html");
            urls.Add("http://www.ori-live.com/special/go-live-eoc2014-6/EOC2014-6-Woman%20A.html");

            OriLiveParser wp = new OriLiveParser(urls.ToArray());

            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }
コード例 #13
0
        private void button1_Click(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor(true);

            this.Hide();

            string           totalConnStr;
            SQLiteConnection totalConnection;
            string           totaldb = ConfigurationManager.AppSettings["totalDatabase"];

            totalConnStr    = "DataSource=" + totaldb + ";";
            totalConnection = new SQLiteConnection(totalConnStr);

            TotalParser pars = new TotalParser(totalConnection, Convert.ToInt32(nrStages.Text));

            monForm.SetParser(pars as IExternalSystemResultParser);
            monForm.CompetitionID = Convert.ToInt32(txtCompID.Text);
            monForm.ShowDialog(this);
        }
コード例 #14
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);
 }
コード例 #15
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            FrmMonitor monForm = new FrmMonitor();
            //string[] lines = File.ReadAllLines("wocinfo.txt");
            //int compId = int.Parse(lines[0]);
            int compId = 10640;
            List<string> urls = new List<string>();
            /*for (int i = 1; i < lines.Length; i++)
                urls.Add(lines[i]);*/
            urls.Add("http://www.liveresultater.no/includes/individuell/orientering/lister/allelister.php?q=alle&w=alle&s=DESC&c=radiopost.tid&a=350&acc=sek&lang=en_EN&sid=0.7241666284389794");

            LiveResultaterNoParser wp = new LiveResultaterNoParser(urls.ToArray());
            monForm.SetParser(wp as IExternalSystemResultParser);
            monForm.CompetitionID = compId;
            monForm.ShowDialog(this);
        }
コード例 #16
0
        private void button1_Click_3(object sender, EventArgs e)
        {
            var monForm = new FrmMonitor();

            using (var frm = new FrmNewRacomComp())
            {
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    var rsP = new RacomFileSetParser(frm.txtStartlist.Text, frm.txtRawSplits.Text, frm.txtRaceFile.Text, frm.txtDSQFile.Text,
                        frm.txtRadioControls.Text, frm.dtZeroTime.Value,frm.checkBox1.Checked);

                    monForm.SetParser(rsP);
                    monForm.CompetitionID = int.Parse(frm.txtCompID.Text);
                    monForm.ShowDialog(this);
                }
            }
        }
コード例 #17
0
ファイル: NewOLAComp.cs プロジェクト: xkenia/liveresults
 private void wizardPage5_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e)
 {
     StoreSettings();
     //start
     FrmMonitor monForm = new FrmMonitor();
     this.Hide();
     OlaParser pars = new OlaParser(GetDBConnection(lstDB.SelectedItem as string), (cmbOLAComp.SelectedItem as OlaComp).Id, (cmbOLAEtapp.SelectedItem as OlaComp).Id);
     monForm.SetParser(pars as IExternalSystemResultParser);
     monForm.CompetitionID = Convert.ToInt32(txtCompID.Text);
     monForm.ShowDialog(this);
 }
コード例 #18
0
        private void button1_Click_3(object sender, EventArgs e)
        {
            FrmNewRacomComp newRacomComp = new FrmNewRacomComp();
            if (newRacomComp.ShowDialog(this) == DialogResult.OK)
            {
                FrmMonitor monForm = new FrmMonitor();
                monForm.SetParser(new RacomFileSetParser(newRacomComp.txtStartlist.Text, newRacomComp.txtRawSplits.Text, newRacomComp.txtRaceFile.Text,
                    newRacomComp.txtDSQFile.Text, newRacomComp.txtRadioControls.Text, newRacomComp.dtZeroTime.Value, newRacomComp.checkBox1.Checked));
                monForm.CompetitionID = int.Parse(newRacomComp.txtCompID.Text);
                monForm.ShowDialog(this);
            }
            //FrmMonitor monForm = new FrmMonitor();
            ////string[] lines = File.ReadAllLines("wocinfo.txt");
            ////int compId = int.Parse(lines[0]);
            //int compId = -50;
            //List<string> urls = new List<string>();
            ///*for (int i = 1; i < lines.Length; i++)
            //    urls.Add(lines[i]);*/
            //urls.Add("http://www.liveresultater.no/includes/individuell/orientering/lister/allelister.php?q=alle&w=alle&s=DESC&c=radiopost.tid&a=439&acc=sek&lang=en&sid=0.3296072955708951");

            //var wp = new LiveResultaterNoParser(urls.ToArray());
            //monForm.SetParser(wp as IExternalSystemResultParser);
            //monForm.CompetitionID = compId;
            //monForm.ShowDialog(this);
        }