rectoring

This commit is contained in:
Michele Scandura 2020-11-13 21:38:36 +00:00
parent 628fab2146
commit 1ae0ee5a8a
16 changed files with 135 additions and 62 deletions

View file

@ -243,7 +243,8 @@ namespace Sledgemapper
{
return;
}
GraphicsDevice.Clear(new Color(24,118,157));
//GraphicsDevice.Clear(new Color(24,118,157));
GraphicsDevice.Clear(Color.LightGray);
var visibleTilesX = GraphicsDevice.Viewport.Width / _state._tileSize + 1;
var visibleTilesY = GraphicsDevice.Viewport.Height / _state._tileSize + 1;
@ -518,20 +519,8 @@ namespace Sledgemapper
var successful = false;
try
{
var httpClientHandler = new HttpClientHandler();
#if DEBUG
httpClientHandler.ServerCertificateCustomValidationCallback =
(message, certificate, chain, sslPolicyErrors) => true;
#endif
var identiyApi = RestService.For<IIdentityApi>(
new HttpClient(httpClientHandler)
{
BaseAddress = new Uri("http://localhost:4000")
});
_authResponse = await identiyApi.Authenticate(new AuthenticateModel
_authResponse = await _communicationManager.Login(new AuthenticateModel
{
Username = localContent.TxtEmail.Text,
Password = localContent.TxtPassword.Text
@ -577,19 +566,7 @@ namespace Sledgemapper
var successful = false;
try
{
var httpClientHandler = new HttpClientHandler();
#if DEBUG
httpClientHandler.ServerCertificateCustomValidationCallback =
(message, certificate, chain, sslPolicyErrors) => true;
#endif
var identiyApi = RestService.For<IIdentityApi>(
new HttpClient(httpClientHandler)
{
BaseAddress = new Uri("http://localhost:4000")
});
var result = await identiyApi.Register(new RegisterModel
var result = await _communicationManager.Register(new RegisterModel
{
Username = localContent.TxtEmail.Text,
Password = localContent.TxtPassword.Text,
@ -597,9 +574,9 @@ namespace Sledgemapper
LastName = localContent.TxtLastname.Text,
Initials = localContent.TxtInitials.Text
});
if (result.IsSuccessStatusCode)
if (result)
{
_authResponse = await identiyApi.Authenticate(new AuthenticateModel
_authResponse = await _communicationManager.Login(new AuthenticateModel
{
Username = localContent.TxtEmail.Text,
Password = localContent.TxtPassword.Text