private void OnCallRequestDenied(CallControl callControl) { var request = ClientService.Client.PendingCallRequests.FirstOrDefault( r => r.CallerId == callControl.CallRequest.CallerId); if (request == null) { return; } request.Decline(); HideCallRequests(); }
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); }); }
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(); }
private void OnCallRequestIgnored(CallControl callControl) { HideCallRequests(); }
private void buttonDesktop_Click(object sender, RoutedEventArgs e) { label1.Text = $"Ringer: {CallControl.GetDefault()?.HasRinger}"; }