public static void Show()
        {
            var ctrl = new ForgotPasswordControl();

            ctrl.ShowPopup(dlg =>
            {
                dlg.IsCancelVisible = true;
                dlg.Completed      += (a, s) =>
                {
                    if (s.PopUpResult == PopUpResult.Ok && !string.IsNullOrEmpty(ctrl.UserNameOrEmail))
                    {
                        //var service = ApplicationState.CreateService();
                        //service.AccountOperationAsync(ctrl.UserNameOrEmail, AccountOperationType.RestorePassword);
                        //BAMessageBox.ShowInfo(ApplicationStrings.ForgotPasswordControl_PasswordHasBeenSent);

                        var m = new ServiceManager <GetImageCompletedEventArgs>(delegate(BodyArchitectAccessServiceClient client1, EventHandler <GetImageCompletedEventArgs> operationCompleted)
                        {
                            client1.AccountOperationAsync(ctrl.UserNameOrEmail, AccountOperationType.RestorePassword);
                            BAMessageBox.ShowInfo(ApplicationStrings.ForgotPasswordControl_PasswordHasBeenSent);
                        });

                        m.Run(true);
                    }
                };
            });
        }
Exemple #2
0
 void forgotPassword_Click(object sender, EventArgs e)
 {
     ForgotPasswordControl.Show();
 }