示例#1
0
 private void BackToGallery(object o)
 {
     IsChatWindowClosing = true;
     CloseChatWindow?.Invoke();
     DrawingService.LeaveCanvas();
     UserMode = UserModes.Gallery;
 }
示例#2
0
 private void LeaveDrawing()
 {
     if (UserMode == UserModes.Offline)
     {
         UserMode = UserModes.Login;
     }
     else
     {
         IsChatWindowClosing = true;
         CloseChatWindow?.Invoke();
         UserMode = UserModes.Gallery;
     }
 }
示例#3
0
        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;
            }
        }
示例#4
0
 private void Closing(object o)
 {
     CloseChatWindow?.Invoke();
 }
示例#5
0
 private void GoToTutorial()
 {
     IsChatWindowClosing = true;
     CloseChatWindow?.Invoke();
     UserMode = UserModes.Tutorial;
 }