public static void Init() { traceText = new TextWriterTraceListener("watchdog " + DateTime.Now.Hour + "." + DateTime.Now.Minute + " " + DateTime.Now.Day + "." + DateTime.Now.Month + "." + DateTime.Now.Year); ConsoleTraceListener consoleTrace = new ConsoleTraceListener(false); Trace.Listeners.Add(traceText); Trace.Listeners.Add(consoleTrace); Trace.WriteLine("Init Socket"); comm.Init(); }
public static void Initialize() { try { comm.Init(); } catch { Console.WriteLine("WATCHDOG COMM ERROR: No Network Detected!"); } comm.GotWatchdogStatusMessage += new EventHandler <WatchdogMessageEventArgs <WatchdogStatusMessage> >(comm_GotWatchdogStatusMessage); }
public frmMain() { InitializeComponent(); PublishManager.Initialize(pubRoot); UpdateLocalPublishes(); UpdateLocalPublishLocations(); //microcontrollerListView1.SetConfig(PublishManager.settings.microcontrollers); //AysncGetSyncPulse(); try { comm.Init(); } catch { MessageBox.Show(this, "No Network Detected!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } comm.GotWatchdogStatusMessage += new EventHandler <WatchdogMessageEventArgs <WatchdogStatusMessage> >(comm_GotWatchdogStatusMessage); comm.GotStartPublishMessageReply += new EventHandler <WatchdogMessageEventArgs <StartStopPublishMessageReply> >(comm_GotStartPublishMessageReply); Trace.Listeners.Add(new DebugTextObject(txtDebug)); }