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(); } }
private async void CommunicationService_HubConnectionConnecting(object sender, HubConnectionConnectingEventArgs e) { Player.Source = MediaSource.CreateFromUri(new Uri("ms-appx:///Assets/Windows Proximity Connection.wav")); Player.IsLoopingEnabled = true; Player.Play(); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { ProgressRing_Information.IsActive = true; TextBlock_Message.Text = "서버에 연결중입니다"; OnConnectingStoryboard.Begin(); NotificationStoryboard.RepeatBehavior = RepeatBehavior.Forever; NotificationStoryboard.Begin(); Button_Connect.IsEnabled = true; }); }
private async void CommunicationService_HubConnectionDisconnected(object sender, HubConnectionDisconnectedEventArgs e) { Player.Pause(); Player.Source = MediaSource.CreateFromUri(new Uri("ms-appx:///Assets/Windows Device Connection Removed.wav")); Player.IsLoopingEnabled = false; Player.Play(); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { ProgressRing_Information.IsActive = false; OnDisconnectedStoryboard.Begin(); TextBlock_Message.Text = "GGT 서버와의 연결이 끊어졌습니다"; NotificationStoryboard.RepeatBehavior = new RepeatBehavior(1); NotificationStoryboard.Begin(); }); }