Ejemplo n.º 1
0
        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[] { });
        }