public LogListener() { m_StopRequest = false; this.m_ListenerThead = new Thread(new ThreadStart(this.Execute)); OnNewEntry = null; OnStart = null; OnStop = null; m_StationId = ""; }
public void LogLineColor(string text, Color color) { try { InvokeAsyncOnUiThread(() => { logtext += text + Environment.NewLine; // keep this, may be the only log showing OnNewLogEntry?.Invoke(text + Environment.NewLine, color); }); } catch { System.Diagnostics.Debug.WriteLine("******* Exception trying to write to ui thread log"); } }
public LogListenersContainer() { this.OnNewEntry = null; this.m_Configuration = new LogListenerContainerConfiguration(); this.m_LogListeners = new ArrayList(); this.m_Log = new ArrayList(); this.m_Connection = null; //m_ConnectionString = String.Format("server={0};user id={1};password={2}; database={3};pooling=true;ConnectTimeout=30","192.168.1.10", "billing", "billing", "billing"); this.m_Configuration.LoadConfiguration(); this.m_StopRequest = false; this.m_IsRunning = false; m_ContainerThread = new Thread(new ThreadStart(this.Execute)); m_NextLogFlushTick = Environment.TickCount + 5000; }