public MainWindow() { InitializeComponent(); #region Tracing + Trace-Parameters trace = new TraceListener_String(txt_TraceLog, true); trace.Logname = "ECC"; Trace.Listeners.Add(trace); try { trace.IsLogging = Convert.ToBoolean(settings.CreateOrGetValue("ECC", "TraceActive", "TRUE"));; trace.EraseMode = TraceEraseMode.Time; trace.EraseParameter = 10; } catch (Exception) { } trace.eraseLogFiles(); Trace.WriteLine("EUTECT CognexCleanup (ECC) started, Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); #endregion }