コード例 #1
0
        private void OnCallRequestDenied(CallControl callControl)
        {
            var request =
                ClientService.Client.PendingCallRequests.FirstOrDefault(
                    r => r.CallerId == callControl.CallRequest.CallerId);

            if (request == null)
            {
                return;
            }
            request.Decline();
            HideCallRequests();
        }
コード例 #2
0
        private void DisplayCallRequest(CallRequest callRequest)
        {
            Dispatcher.Invoke(() =>
            {
                var control       = new CallControl(callRequest);
                control.Accepted += OnCallRequestAccept;
                control.Denied   += OnCallRequestDenied;
                control.Ignored  += OnCallRequestIgnored;

                Grid.SetColumnSpan(control, 99);
                Grid.SetRowSpan(control, 99);

                MainGrid.Children.Add(control);
            });
        }
コード例 #3
0
        private void OnCallRequestAccept(CallControl callControl)
        {
            var request =
                ClientService.Client.PendingCallRequests.FirstOrDefault(
                    r => r.CallerId == callControl.CallRequest.CallerId);

            if (request == null)
            {
                return;
            }
            request.Accept();
            HideCallRequests();

            ActiveConversationService.CurrentActiveConversation = callControl.Conversation;
            StartConversation();
        }
コード例 #4
0
 private void OnCallRequestIgnored(CallControl callControl)
 {
     HideCallRequests();
 }
コード例 #5
0
ファイル: MainPage.xaml.cs プロジェクト: guobin8205/blog
 private void buttonDesktop_Click(object sender, RoutedEventArgs e)
 {
     label1.Text = $"Ringer: {CallControl.GetDefault()?.HasRinger}";
 }