示例#1
0
        private async void CommunicationService_Packet0004Received(object sender, Packet0004ReceivedEventArgs e)
        {
            if (e.IsLogoutSuccess)
            {
                ProgressRing_Information.IsActive     = false;
                TextBlock_Message.Text                = "로그아웃에 성공하였습니다";
                NotificationStoryboard.RepeatBehavior = new RepeatBehavior(1);
                NotificationStoryboard.Begin();
                OnLogoutSuccessStoryboard.Begin();
            }
            else
            {
                OnLogoutFailedStoryboard.Begin();
                ContentDialog dialog = new ContentDialog()
                {
                    Title           = "로그아웃 실패",
                    Content         = $"{e.Message}",
                    CloseButtonText = "닫기",
                    DefaultButton   = ContentDialogButton.Close
                };
                dialog.Loading += async(send, args) => await this.Blur(value : 5, duration : 1000, delay : 0).StartAsync();

                dialog.Closing += async(send, args) => await this.Blur(value : 0, duration : 500, delay : 0).StartAsync();

                await dialog.ShowAsync();
            }
        }
示例#2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("WaitingRoomToInitTextBlockConnectedAnimation");

            if (animation != null)
            {
                animation.TryStart(TextBlock_UserName);
            }
            if (e.NavigationMode == NavigationMode.Back)
            {
                OnLogoutFailedStoryboard.Begin();
                ViewModel.LogoutEnable = true;
            }
            RegisterEvent();
        }
示例#3
0
        private async void CommunicationService_Packet0006Received(object sender, Packet0006ReceivedEventArgs e)
        {
            if (e.IsMoved)
            {
                if (e.SendFrom.Equals(ViewModel.UserName))
                {
                    if (e.NewGroupName.Equals(CurrentLocation.WaitingRoom.ToString()))
                    {
                        UnregisterEvent();
                        this.Frame.Navigate(typeof(WaitingRoomPage), new UserInfo()
                        {
                            UserId = ViewModel.UserID, UserPassword = ViewModel.UserPassword, UserName = ViewModel.UserName
                        }, new EntranceNavigationTransitionInfo());
                    }
                }
            }
            else
            {
                if (e.SendFrom.Equals(ViewModel.UserName))
                {
                    if (e.Request.NewGroupName.Equals(CurrentLocation.Init.ToString()) & e.Request.ExpectedOldGroupName.Equals(CurrentLocation.None.ToString()))
                    {
                    }
                    else
                    {
                        OnLogoutFailedStoryboard.Begin();
                        ContentDialog dialog = new ContentDialog()
                        {
                            Title           = "입장 실패",
                            Content         = $"{e.Message}",
                            CloseButtonText = "닫기",
                            DefaultButton   = ContentDialogButton.Close
                        };
                        dialog.Loading += async(send, args) => await this.Blur(value : 5, duration : 1000, delay : 0).StartAsync();

                        dialog.Closing += async(send, args) => await this.Blur(value : 0, duration : 500, delay : 0).StartAsync();

                        await dialog.ShowAsync();
                    }
                }
            }
        }