Beispiel #1
0
        public string ReadFromBox(int number)
        {
            var box = Boxes.FirstOrDefault(n => n.Number == number);

            if (box == null)
            {
                return(string.Empty);
            }

            return(box.Message);
        }
Beispiel #2
0
        public async Task <Box> FindBox(QRCodeWrapper oQRCode)
        {
            CurrentBox = Boxes.FirstOrDefault(oBox => oBox.QRCode == oQRCode);
            if (CurrentBox == null)
            {
                CurrentBox = new Box(this, oQRCode);
                await MoveFolder.CreateFolderAsync(CurrentBox.ImageFolder);

                Boxes.Add(CurrentBox);
            }

            return(CurrentBox);
        }
Beispiel #3
0
        public Box GetBox(int number)
        {
            var targetBox = Boxes.FirstOrDefault(n => n.Number == number);

            if (targetBox != null)
            {
                return(targetBox);
            }

            Boxes.Add(new Box {
                Number = number
            });
            SaveChanges();
            return(Boxes.FirstOrDefault(n => n.Number == number));
        }