Пример #1
0
        // Give a list of n sensors in a random order
        public List <SystemCard> GenerateSystemList()
        {
            // get all records and convert them to models
            SensorDatabase database = new SensorDatabase();

            database.OpenConnection();
            List <SensorRecord> records = database.RequestAllSensors();
            List <SystemCard>   cards   = new List <SystemCard>();

            foreach (SensorRecord record in records)
            {
                SystemCard holderCard = new SystemCard();
                holderCard.PopulateSystemFromRecord(record);
                cards.Add(holderCard);
            }
            ShuffleSystemCards(cards);
            return(cards);
        }