Exemplo n.º 1
0
        private Task <bool> EnsureLoggedOn()
        {
            Task <bool> task;

            if (this.morphicSession.User == null)
            {
                TaskCompletionSource <bool> completionSource = new TaskCompletionSource <bool>();
                task = completionSource.Task;

                LoginPanel loginPanel = this.StepFrame.PushPanel <LoginPanel>();
                loginPanel.Completed += (sender, args) =>
                {
                    completionSource.SetResult(true);
                };
            }
            else
            {
                task = Task.FromResult(false);
            }

            return(task);
        }
Exemplo n.º 2
0
 private void ShowLoginPanel()
 {
     LoginPanel loginPanel = this.StepFrame.PushPanel <LoginPanel>();
 }
        /// <summary>
        /// Handler for when the user clicks on the "Already have an Account?" button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnAlreadyHaveAccount(object?sender, RoutedEventArgs e)
        {
            LoginPanel loginPanel = this.StepFrame.PushPanel <LoginPanel>();

            loginPanel.ApplyPreferencesAfterLogin = this.ApplyPreferencesAfterLogin;
        }