public static string ComponentOpenReporter(string id, string ropenId, string componentIdPattern = "^.*") { if (!String.IsNullOrWhiteSpace(id)) { Shell s = Shell.GetShell(id); if (s != null) { if (s.MainControl.Dispatcher.CheckAccess()) { if (!EventReporters.ContainsKey(ropenId)) { EventReporter d = new EventReporter(componentIdPattern, s.Interrupter); LinkManager.Manager.AddListener(s, d.ComponentEventListener); EventReporters.TryAdd(ropenId, d); } return(ropenId); } else { return(s.MainControl.Dispatcher.Invoke(new Func <String>(() => { return ComponentOpenReporter(s.ShellId, ropenId, componentIdPattern); }))); } } } return(""); }
public void Clear() { lock (ManagerLock) { Devices.Clear(); ManagerListeners.Clear(); EventReporter.Clear(); } }
public static string ComponentEventReport(string ropenId) { string s = null; EventReporter d = null; if (ropenId != null) { EventReporters.TryGetValue(ropenId, out d); } if (d != null && d.EventReportQueue.TryTake(out s, -1, d.Interrupt.GetToken)) { return(s); } return("Error: Unknown ropen Id."); }
public static void CloseProject() { Manager.Close(); EventReporter.CloseProject(); }
public static void StartProject() { EventReporter.StartProject(); }
public static void ConfigProject() { Manager.Clear(); EventReporter.ConfigProject(); }