public void LoadConfiguration(DataTable dt) { Loading = true; loading = true; configurationTable = dt; List <Event> genEvents = GetGeneratedEvents(dt); if (genEvents.Count > 0) { DisplayEvents = true; } else { DisplayEvents = false; } CreateGeneratedEvents(genEvents); GeneratedEvents.Clear(); foreach (Event e in genEvents) { Dispatcher.BeginInvoke(new Action(() => { GeneratedEvents.Add(e); }), System.Windows.Threading.DispatcherPriority.Background, new object[] { }); } // Load MTConnect DataItems using Probe Data if (!Loaded) { LoadCollectedItems(probeData); } loading = false; Dispatcher.BeginInvoke(new Action(() => { Loading = false; }), System.Windows.Threading.DispatcherPriority.Background, new object[] { }); }
private void AddEvent_Clicked(TrakHound_UI.Button bt) { Event e = new Event(); e.name = "EVENT"; e.Default = new Result(); e.Default.value = "DEFAULT"; GeneratedEvents.Add(e); AddEvent(e, true); DisplayEvents = true; ChangeSetting(null, null, null); }