コード例 #1
0
        private void PromptEntryCode()
        {
            SRServiceManager.GetService <IPinEntryService>()
            .ShowPinEntry(Settings.Instance.EntryCode, SRDebugStrings.Current.PinEntryPrompt,
                          entered =>
            {
                if (entered)
                {
                    if (!Settings.Instance.RequireEntryCodeEveryTime)
                    {
                        _hasAuthorised = true;
                    }

                    if (_queuedTab.HasValue)
                    {
                        var t = _queuedTab.Value;

                        _queuedTab = null;
                        ShowDebugPanel(t, false);
                    }
                    else
                    {
                        ShowDebugPanel(false);
                    }
                }

                _queuedTab = null;
            });
        }
コード例 #2
0
        public void ShowDebugPanel(DefaultTabs tab, bool requireEntryCode = true)
        {
            if (requireEntryCode && _entryCodeEnabled && !_hasAuthorised)
            {
                _queuedTab = tab;
                PromptEntryCode();
                return;
            }

            _debugPanelService.IsVisible = true;
            _debugPanelService.OpenTab(tab);
        }
コード例 #3
0
        public bool OpenTab(DefaultTabs tab)
        {
            if (!_hasStarted)
            {
                _activeTab = tab;
                return(true);
            }

            var tabName = tab.ToString();

            foreach (var t in TabController.Tabs)
            {
                if (t.Key == tabName)
                {
                    TabController.ActiveTab = t;
                    return(true);
                }
            }

            return(false);
        }
コード例 #4
0
        public bool OpenTab(DefaultTabs tab)
        {
            if (!_hasStarted)
            {
                _activeTab = tab;
                return true;
            }

            var tabName = tab.ToString();

            foreach (var t in TabController.Tabs)
            {
                if (t.Key == tabName)
                {
                    TabController.ActiveTab = t;
                    return true;
                }
            }

            return false;
        }