This commit is contained in:
parent
ef2ad6965b
commit
1395d93fbc
@ -1,4 +1,5 @@
|
||||
using Exceptionless;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Myra.Graphics2D.Brushes;
|
||||
using Myra.Graphics2D.UI;
|
||||
@ -285,17 +286,17 @@ namespace Sledgemapper.UI
|
||||
return;
|
||||
}
|
||||
|
||||
if (_communicationManager.Connection.State != HubConnectionState.Connected)
|
||||
if (CommunicationManager.Connection.State != HubConnectionState.Connected)
|
||||
{
|
||||
_mainWidget.lblConnectionStatus.Text = "Connecting";
|
||||
await _communicationManager.Connection.StartAsync();
|
||||
UpdateConnectionState(_communicationManager.Connection);
|
||||
await CommunicationManager.Connection.StartAsync();
|
||||
UpdateConnectionState(CommunicationManager.Connection);
|
||||
}
|
||||
|
||||
var successful = false;
|
||||
try
|
||||
{
|
||||
var result = await _communicationManager.Api.NewSession(_state.CampaignName, localContent.Content.TxtSession.Text);
|
||||
var result = await CommunicationManager.Api.NewSession(_state.CampaignName, localContent.Content.TxtSession.Text);
|
||||
|
||||
if (result)
|
||||
{
|
||||
@ -306,7 +307,7 @@ namespace Sledgemapper.UI
|
||||
_sessionData.MapEntityDeleted += OnMapEntityDeleted;
|
||||
}
|
||||
successful = result;
|
||||
var result2 = await _communicationManager.Connection?.InvokeAsync<Session>("JoinSession", localContent.Content.TxtSession.Text);
|
||||
var result2 = await CommunicationManager.Connection?.InvokeAsync<Session>("JoinSession", localContent.Content.TxtSession.Text);
|
||||
_sessionData.SessionId = result2.SessionId;
|
||||
_sessionData.SessionName = localContent.Content.TxtSession.Text;
|
||||
}
|
||||
@ -318,12 +319,12 @@ namespace Sledgemapper.UI
|
||||
if (successful)
|
||||
{
|
||||
_sessionData.SessionName = localContent.Content.TxtSession.Text;
|
||||
_communicationManager.SessionData.Map = _sessionData.Map;
|
||||
_communicationManager.SessionData.Overlays = _sessionData.Overlays;
|
||||
_communicationManager.SessionData.Walls = _sessionData.Walls;
|
||||
_mainWidget.lblSessionName.Text = _sessionData.SessionName;
|
||||
_mainWidget.MenuConnectSync.Enabled = true;
|
||||
_mainWidget.MenuConnectUpload.Enabled = true;
|
||||
CommunicationManager.SessionData.Map = _sessionData.Map;
|
||||
CommunicationManager.SessionData.Overlays = _sessionData.Overlays;
|
||||
CommunicationManager.SessionData.Walls = _sessionData.Walls;
|
||||
lblSessionName.Text = _sessionData.SessionName;
|
||||
MenuConnectSync.Enabled = true;
|
||||
MenuConnectUpload.Enabled = true;
|
||||
localContent.Window.Close();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user