예제 #1
0
        public static async void ShowPasscode()
        {
            if (_passcodeShown)
            {
                return;
            }

            _passcodeShown = true;

            Window.Current.Content.Visibility = Visibility.Collapsed;

            var dialog = new PasscodePage();
            TypedEventHandler <ContentDialog, ContentDialogClosingEventArgs> handler = null;

            handler = (s, args) =>
            {
                dialog.Closing -= handler;
                Window.Current.Content.Visibility = Visibility.Visible;
            };

            dialog.Closing += handler;
            var result = await dialog.ShowQueuedAsync();

            _passcodeShown = false;
        }
예제 #2
0
        public static async void ShowPasscode()
        {
            if (_passcodeShown)
            {
                return;
            }

            _passcodeShown = true;

            var dialog = new PasscodePage();
            var result = await dialog.ShowQueuedAsync();

            _passcodeShown = false;
        }
예제 #3
0
        public static async void ShowPasscode()
        {
            if (_passcodeShown)
            {
                return;
            }

            _passcodeShown = true;

            // This is a rare case, but it can happen.
            var content = Window.Current.Content;

            if (content != null)
            {
                content.Visibility = Visibility.Collapsed;
            }

            var dialog = new PasscodePage();
            TypedEventHandler <ContentDialog, ContentDialogClosingEventArgs> handler = null;

            handler = (s, args) =>
            {
                dialog.Closing -= handler;

                // This is a rare case, but it can happen.
                var contentInner = Window.Current.Content;
                if (contentInner != null)
                {
                    contentInner.Visibility = Visibility.Visible;
                }
            };

            dialog.Closing += handler;
            var result = await dialog.ShowQueuedAsync();

            _passcodeShown = false;
        }
예제 #4
0
        public static async void ShowPasscode(bool biometrics)
        {
            if (_passcodeShown)
            {
                return;
            }

            _passcodeShown = true;

            // This is a rare case, but it can happen.
            var content = Window.Current.Content;

            if (content != null)
            {
                content.Visibility = Visibility.Collapsed;
            }

            var dialog = new PasscodePage(biometrics);

            void handler(ContentDialog s, ContentDialogClosingEventArgs args)
            {
                dialog.Closing -= handler;

                // This is a rare case, but it can happen.
                var content = Window.Current.Content;

                if (content != null)
                {
                    content.Visibility = Visibility.Visible;
                }
            }

            dialog.Closing += handler;
            var result = await dialog.ShowQueuedAsync();

            _passcodeShown = false;
        }