Guest User

Untitled

a guest
Dec 5th, 2017
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. : void ULogin::Login()
  2. {
  3.  
  4. FString username = T_Username->GetText().ToString();
  5. FString password= T_PASSWORD->GetText().ToString();
  6.  
  7. if (username.IsEmpty() & password.IsEmpty()) {
  8. MessageBoxA(NULL, "Username and Password Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
  9. return;
  10. }
  11. else if (username.IsEmpty()) {
  12. MessageBoxA(NULL, "Username Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
  13. return;
  14. }
  15. else if (password.IsEmpty()) {
  16. MessageBoxA(NULL, "Password Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
  17. return;
  18. }
  19. else {
  20. GameSparks::Core::GS& gs = UGameSparksModule::GetModulePtr()->GetGSInstance();
  21. GameSparks::Api::Requests::AuthenticationRequest authRequest(gs);
  22. authRequest.SetUserName(std::string(TCHAR_TO_UTF8(username)));
  23. authRequest.SetPassword(std::string(TCHAR_TO_UTF8(password)));
  24.  
  25. authRequest.Send(AuthenticationRequest_Response);
  26.  
  27. }
  28.  
  29.  
  30. }(editado)
Add Comment
Please, Sign In to add comment