private void ProcessLine(String line) { Match match = SystemRegex.Match(line); if (match.Success) { LogMonitorEventArgs args = new LogMonitorEventArgs(); args.Updates.Add("system", match.Groups[1].Value); OnDataUpdated(args); return; } //FindBestIsland:<commander>:<playmode>:<station>:<system> match = PlayerRegex.Match(line); if (match.Success) { LogMonitorEventArgs args = new LogMonitorEventArgs(); var data = match.Groups[1].Value.Split(':'); args.Updates.Add("commander", data[0]); args.Updates.Add("playmode", data[1]); args.Updates.Add("station", data[2]); args.Updates.Add("system", data[3]); OnDataUpdated(args); } }
protected virtual void OnDataUpdated(LogMonitorEventArgs e) { EventHandler <LogMonitorEventArgs> handler = DataUpdated; if (handler != null) { handler(this, e); } }
static void OnNewLogData(object source, LogMonitorEventArgs args) { x52.Updates(args.Updates); }