Exemplo n.º 1
0
        public FrmOlaMonitor(EventSoftwareOLA soft, MainApp.logDelegate logger)
            : base(soft, logger)
        {
            softOLA = soft;
            logger("Started monitoring " + softOLA.ConnectionType + "..");
            lblCurrentlyMonitoring.Text = "Monitoring OLA-DB at " + softOLA.ConnectionSettings + " for changes";

            m_Parser = new OlaParser(softOLA.GetDBConnection(), softOLA.EventID, softOLA.RaceID, softOLA.ConnectionType);
            m_Parser.OnResult += new ResultDelegate(m_Parser_OnResult);
            m_Parser.OnClass += new ClassDelegate(m_Parser_OnClass);
            m_Parser.OnLogMessage += new MainApp.logDelegate(m_Parser_OnLogMessage);
            m_Parser.Start();

            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmOlaMonitor_FormClosing);
        }
Exemplo n.º 2
0
 private EventSoftwareOLA GetOlaEventSoftware()
 {
     EventSoftwareOLA ola = new EventSoftwareOLA() { ConnectionType = (cmbOlaType.SelectedItem as OlaParser.OlaListItem).ConnectionType };
     if (ola.ConnectionType == OlaParser.OLA_CONNECTION_TYPE.OLA5_INTERNAL_DB)
         ola.ConnectionSettings = txtOlaDBLoc.Text;
     else if (ola.ConnectionType == OlaParser.OLA_CONNECTION_TYPE.OLA5_SQLSERVER)
         ola.ConnectionSettings = txtSQLHost.Text + ";" + txtSQLUser.Text + ";" + txtSQLPort.Text + ";" + txtSQLPassword.Text;
     return ola;
 }
Exemplo n.º 3
0
        private void wizardPageOLASelRace_CloseFromNext(object sender, Gui.Wizard.PageEventArgs e)
        {
            BroadCastProject pr = new BroadCastProject();
            Competition c = cmbOnlineEvent.SelectedItem as Competition;
            pr.EventDate = c.Date;
            pr.EventID = c.Id;
            pr.EventName = c.Name;
            pr.Password = txtOnlinePassword.Text;

            EventSoftwareOLA ola = new EventSoftwareOLA();
            ola.ConnectionType = (cmbOlaType.SelectedItem as OlaParser.OlaListItem).ConnectionType;
            ola.EventID = (cmbOlaEvent.SelectedItem as OlaComp).Id;
            ola.RaceID = (cmbOlaRace.SelectedItem as OlaComp).Id;
            pr.EventSoftwareType = ola;
            if (ola.ConnectionType == OlaParser.OLA_CONNECTION_TYPE.OLA5_INTERNAL_DB)
            {
                ola.ConnectionSettings = txtOlaDBLoc.Text;
            }
            else
            {
                ola.ConnectionSettings = txtSQLHost.Text + ";" + txtSQLUser.Text + ";" + txtSQLPort.Text + ";" + txtSQLPassword.Text;
            }

            MainApp.CurrentProject = pr;
            MainApp.LastProjects.Insert(0, pr);
            MainApp.SaveRecentProjects();
        }