broken build, removing some session shit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f12132009f
commit
6a75126068
6 changed files with 79 additions and 79 deletions
|
@ -37,7 +37,7 @@ namespace Sledgemapper.UI
|
|||
MenuFileSettings.Selected += OneMenuFileSettingsSelected;
|
||||
//MenuConnectLogin.Selected += OnMenuConnectLoginSelected;
|
||||
//MenuConnectNew.Selected += OnMenuConnectNewSelected;
|
||||
MenuConnectJoin.Selected += OnMenuConnectJoinSelected;
|
||||
//MenuConnectJoin.Selected += OnMenuConnectJoinSelected;
|
||||
MenuConnectUpload.Selected += OnMenuConnectUploadSelected;
|
||||
MenuViewCenterOnSelection.Selected += OnMenuViewCenterOnSelectionSelected;
|
||||
MenuViewShowCellNUmbers.Selected += OnMenuViewShowCellNUmbersSelected;
|
||||
|
@ -235,7 +235,7 @@ namespace Sledgemapper.UI
|
|||
return;
|
||||
}
|
||||
|
||||
await CommunicationManager.Api.SaveSnapshot(CommunicationManager.SessionData, CommunicationManager.SessionData.SessionName);
|
||||
await CommunicationManager.Api.SaveSnapshot(CommunicationManager.SessionData, State.Instance.MapId);
|
||||
}
|
||||
|
||||
private void OnMenuFileSaveSelected(object sender, EventArgs e)
|
||||
|
@ -392,56 +392,56 @@ namespace Sledgemapper.UI
|
|||
content.ShowInModalWindow(Desktop, "Maps");
|
||||
}
|
||||
|
||||
private async void OnButtonJoinSessionClicked(object sender, EventArgs e)
|
||||
{
|
||||
var localContent = ((TextButton)sender).GetParentContentInWindow<SessionWindow>();
|
||||
//private async void OnButtonJoinSessionClicked(object sender, EventArgs e)
|
||||
//{
|
||||
// var localContent = ((TextButton)sender).GetParentContentInWindow<SessionWindow>();
|
||||
|
||||
var isValid = localContent.Content.TxtSession.ValidateTextbox();
|
||||
if (!isValid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// var isValid = localContent.Content.TxtSession.ValidateTextbox();
|
||||
// if (!isValid)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (CommunicationManager.Connection.State != HubConnectionState.Connected)
|
||||
{
|
||||
lblConnectionStatus.Text = "Connecting";
|
||||
await CommunicationManager.Connection.StartAsync();
|
||||
UpdateConnectionState(CommunicationManager.Connection);
|
||||
}
|
||||
// if (CommunicationManager.Connection.State != HubConnectionState.Connected)
|
||||
// {
|
||||
// lblConnectionStatus.Text = "Connecting";
|
||||
// await CommunicationManager.Connection.StartAsync();
|
||||
// UpdateConnectionState(CommunicationManager.Connection);
|
||||
// }
|
||||
|
||||
var successful = false;
|
||||
try
|
||||
{
|
||||
var result = await CommunicationManager.Connection?.InvokeAsync<Session>("JoinSession", localContent.Content.TxtSession.Text);
|
||||
if (result != null)
|
||||
{
|
||||
CommunicationManager.SessionData.Map = result.Map;
|
||||
CommunicationManager.SessionData.Walls = result.Walls;
|
||||
CommunicationManager.SessionData.Overlays = result.Overlays;
|
||||
// var successful = false;
|
||||
// try
|
||||
// {
|
||||
// var result = await CommunicationManager.Connection?.InvokeAsync<Session>("JoinSession", localContent.Content.TxtSession.Text);
|
||||
// if (result != null)
|
||||
// {
|
||||
// CommunicationManager.SessionData.Map = result.Map;
|
||||
// CommunicationManager.SessionData.Walls = result.Walls;
|
||||
// CommunicationManager.SessionData.Overlays = result.Overlays;
|
||||
|
||||
CommunicationManager.SessionData.MapEntityAdded -= OnMapEntityAdded;
|
||||
CommunicationManager.SessionData.MapEntityDeleted -= OnMapEntityDeleted;
|
||||
CommunicationManager.SessionData.MapEntityAdded += OnMapEntityAdded;
|
||||
CommunicationManager.SessionData.MapEntityDeleted += OnMapEntityDeleted;
|
||||
CommunicationManager.SessionData.SessionId = result.SessionId;
|
||||
CommunicationManager.SessionData.SessionName = result.SessionName;
|
||||
}
|
||||
successful = result != null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
// CommunicationManager.SessionData.MapEntityAdded -= OnMapEntityAdded;
|
||||
// CommunicationManager.SessionData.MapEntityDeleted -= OnMapEntityDeleted;
|
||||
// CommunicationManager.SessionData.MapEntityAdded += OnMapEntityAdded;
|
||||
// CommunicationManager.SessionData.MapEntityDeleted += OnMapEntityDeleted;
|
||||
// //CommunicationManager.SessionData.SessionId = result.SessionId;
|
||||
// //CommunicationManager.SessionData.SessionName = result.SessionName;
|
||||
// }
|
||||
// successful = result != null;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Console.WriteLine(ex.Message);
|
||||
// }
|
||||
|
||||
if (successful)
|
||||
{
|
||||
CommunicationManager.SessionData.SessionName = localContent.Content.TxtSession.Text;
|
||||
lblMap.Text = CommunicationManager.SessionData.SessionName;
|
||||
MenuConnectSync.Enabled = true;
|
||||
MenuConnectUpload.Enabled = true;
|
||||
localContent.Window.Close();
|
||||
}
|
||||
}
|
||||
// if (successful)
|
||||
// {
|
||||
// CommunicationManager.SessionData.SessionName = localContent.Content.TxtSession.Text;
|
||||
// lblMap.Text = CommunicationManager.SessionData.SessionName;
|
||||
// MenuConnectSync.Enabled = true;
|
||||
// MenuConnectUpload.Enabled = true;
|
||||
// localContent.Window.Close();
|
||||
// }
|
||||
//}
|
||||
private void OnBtnToolbarRoomClicked(object sender, EventArgs e)
|
||||
{
|
||||
State.Instance.InsertMode = InsertMode.NewRoom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue