Beispiel #1
0
        private void StartLoginProcess()
        {
            bool canAccess = loginValidator.AreAllInputsValid();

            if (canAccess)
            {
                string userData =
                    UserFileUtil.GetUserData(userNameTextBox.Text.Trim(), false);

                UserFileUtil.WriteCurrentUserDataToFile(userData);
                StartSystem();
            }
        }
Beispiel #2
0
        private void StartRegistrationProcess()
        {
            bool canAccess = registrationValidator.AreAllInputsValid();

            if (canAccess)
            {
                List <string> allUserData = UserFileUtil.GetAllUserData();

                AddNewUser(allUserData);

                string encryptedData =
                    UserFileUtil.EncryptAllDataInList(allUserData);

                UserFileUtil.WriteEncryptedDataToFile(encryptedData);

                string currentUserData = UserFileUtil
                                         .GetUserData(RUsernameTextBox.Text.Trim(), false);

                UserFileUtil.WriteCurrentUserDataToFile(currentUserData);

                StartSystem();
            }
        }