Пример #1
0
        public override async void OnWindowFocusChanged(bool hasFocus)
        {
            base.OnWindowFocusChanged(hasFocus);

            _lockUnfocusedDialogs = !hasFocus;

            if (hasFocus &&
                await _viewModel.IsEnabled() &&
                (!_permissionUtils.IsBluetoothEnabled() ||
                 !_permissionUtils.IsLocationEnabled()))
            {
                ShowPermissionsDialogIfTheyHavChangedWhileInIdle();
            }

            UpdateUI();
        }
Пример #2
0
        public override async void OnWindowFocusChanged(bool hasFocus)
        {
            base.OnWindowFocusChanged(hasFocus);

            _lockUnfocusedDialogs = !hasFocus;

            if (hasFocus &&
                await _viewModel.IsEnabled() &&
                (!_permissionUtils.IsBluetoothEnabled() ||
                 !_permissionUtils.IsLocationEnabled()))
            {
                ShowPermissionsDialogIfTheyHavChangedWhileInIdle();
            }

            if (!(_positiveButton is null))
            {
                AdjustLines(_dontShowButton, _positiveButton, _negativeButton);
            }

            UpdateUI();
        }