Пример #1
0
        //Metod zczytująca hasło jako parametr i tranformjąca je z Secure stringa na tekst
        private void LogIn(object parameter)
        {
            string passwordInVm      = null;
            var    passwordContainer = parameter as IHavePassword;

            if (passwordContainer != null)
            {
                var secureString = passwordContainer.Password;
                passwordInVm = PasswordService.ConvertToUnsecureString(secureString);
            }
            Login(Email, passwordInVm);
        }
Пример #2
0
        private void SignUp(object parameter)
        {
            string passwordInVm      = null;
            var    passwordContainer = parameter as IHavePassword;

            if (passwordContainer != null)
            {
                var secureString = passwordContainer.Password;
                passwordInVm = PasswordService.ConvertToUnsecureString(secureString);
            }

            if (Email == RepeatEmail)
            {
                MakeRegisterTask(Email, passwordInVm);
            }
            else
            {
                MessageBox.Show("Adresy e-mail nie są takie same");
            }
        }