private void BackToGallery(object o) { IsChatWindowClosing = true; CloseChatWindow?.Invoke(); DrawingService.LeaveCanvas(); UserMode = UserModes.Gallery; }
private void LeaveDrawing() { if (UserMode == UserModes.Offline) { UserMode = UserModes.Login; } else { IsChatWindowClosing = true; CloseChatWindow?.Invoke(); UserMode = UserModes.Gallery; } }
private void JoinCanvasRoom(AccessCanvasResponse response) { if (UserMode != UserModes.Drawing && AccessingCanvas) { if (response.isPasswordValid) { DrawingService.JoinCanvasRoomServer(response.canvasName, ""); if (UserMode == UserModes.Gallery) { IsChatWindowClosing = true; CloseChatWindow?.Invoke(); } if (!ConnectionService.hasUserDoneTutorial) { UserMode = UserModes.Tutorial; } else { if (UserMode != UserModes.Drawing) { UserMode = UserModes.Drawing; DrawingService.DrawCanvas(SelectedCanvas); } } DrawingService.UpdateCanvasName(response.canvasName); } else { Application.Current?.Dispatcher?.Invoke(new Action(() => { PopupMessageOnGalleryView("You entered the wrong password"); }), DispatcherPriority.ContextIdle); //dialogService.ShowNotification("You entered the wrong password"); } AccessingCanvas = false; } }
private void Closing(object o) { CloseChatWindow?.Invoke(); }
private void GoToTutorial() { IsChatWindowClosing = true; CloseChatWindow?.Invoke(); UserMode = UserModes.Tutorial; }