Ejemplo n.º 1
0
        public override void OnNavigatedTo(Dictionary <string, object> parameters, NavigationMode mode)
        {
            if (_qrScanner != null && !_qrScanner.IsStarted)
            {
                _qrScanner.StartAsync();
            }

            Employee = (Employee)parameters["Employee"];

            if (mode == NavigationMode.Back)
            {
                if (SessionState.ContainsKey("DevicesToTake"))
                {
                    _devicesToTake = (ObservableCollection <Device>)SessionState["DevicesToTake"];
                }
                if (SessionState.ContainsKey("DevicesToReturn"))
                {
                    _devicesToReturn = (ObservableCollection <Device>)SessionState["DevicesToReturn"];
                }

                UpdateDeviceGroups();
            }

            LoadData();

            LogOutService.Restart();
        }
Ejemplo n.º 2
0
        public async void SetCaptureElement(CaptureElement captureElement)
        {
            if (_qrScanner != null)
            {
                return;
            }

            _qrScanner              = new QrCodeScanner(captureElement);
            _qrScanner.CodeScanned += CodeScanned;
            await _qrScanner.StartAsync();
        }