public FrmMonitor(EventSoftware soft, MainApp.logDelegate logger) : this() { m_Event = soft; m_Logger = logger; m_ModelEvent = new Event(); m_ModelEvent.ClassChanged += new Event.ClassChangedHandler(m_ModelEvent_ClassChanged); m_ModelEvent.RunnerChanged += new Event.RunnerChangedHandler(m_ModelEvent_RunnerChanged); m_Server = new LiveResults.OnlineLib.LiveServer(MainApp.CurrentProject.EventID, MainApp.CurrentProject.Password); m_Server.LogMsg += new LiveResults.OnlineLib.LiveServer.LogMsgHandler(m_Server_LogMsg); }
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); }
public FrmOEMonitor(EventSoftwareOE soft, MainApp.logDelegate logger) : base(soft,logger) { InitializeComponent(); softOE = soft; m_Parser = new OEParser(); m_Parser.OnLogMessage += new MainApp.logDelegate(m_Parser_OnLogMessage); Text = "OE Monitor :: " + soft.Version; fileSystemWatcher1.Filter = "*" + softOE.FileExt; fileSystemWatcher1.Path = softOE.Directory; fileSystemWatcher1.SynchronizingObject = this; fileSystemWatcher1.Changed += new System.IO.FileSystemEventHandler(fileSystemWatcher1_Changed); fileSystemWatcher1.Created += new System.IO.FileSystemEventHandler(fileSystemWatcher1_Changed); fileSystemWatcher1.NotifyFilter = System.IO.NotifyFilters.LastWrite; fileSystemWatcher1.EnableRaisingEvents = true; logger("Started monitoring " + softOE.Directory + ".."); lblCurrentlyMonitoring.Text = "Monitoring " + softOE.Directory + " for changes (filter: " + "*" + softOE.FileExt + ")"; }