Esempio n. 1
0
        private void ReadAllevents()
        {
            _logger.Info($"Reading all events from DB started.");

            //create reader instance
            SystemEventReader reader = new SystemEventReader(_realmProvider);

            //read values
            List <SystemEventGUImodel> models = reader.GetAllEvents();

            //populate list view
            PopulateListViewWithEvents(models);
        }
Esempio n. 2
0
        private void ReadFilteredEvents()
        {
            _logger.Info($"Reading filtered events from DB started.");

            //create reader instance
            SystemEventReader reader = new SystemEventReader(_realmProvider);

            //read values
            List <SystemEventGUImodel> models = reader.GetFilteredEvents(_startDate, _endDate, _permittedEntries);

            //populate list view
            PopulateListViewWithEvents(models);
        }
Esempio n. 3
0
        private void GetListOfLast100Events()
        {
            if (!EventsUpdatingpdatingDisabled)
            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();

                //create reader instance
                SystemEventReader          reader = new SystemEventReader(_realmProvider);
                List <SystemEventGUImodel> data   = reader.GetLast100Events();

                //translate data to bindable collection
                EventsList = new BindableCollection <SystemEventGUImodel>();
                foreach (var item in data)
                {
                    EventsList.Add(item);
                }

                TimeOfReadingTheEvents = stopwatch.ElapsedMilliseconds;
            }
        }