private void grid_5_Tapped(object sender, TappedRoutedEventArgs e) { if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI("02324335155", "İzmir Bisim"); } }
private async void RequestCaregiverNo() { object api = settings.Values["api"]; object id = settings.Values["userid"]; if (api != null && id != null) { try { HttpClient httpClient = new HttpClient(); var response = await httpClient.GetAsync(common.getIP() + "api/elderly/caregiverno/" + api.ToString() + "/" + id.ToString()); if (response.IsSuccessStatusCode) { string content = await response.Content.ReadAsStringAsync(); List <UserModel> a = JsonConvert.DeserializeObject <List <UserModel> >(content); Random rnd = new Random(); int num = rnd.Next(a.Count); PhoneCallManager.ShowPhoneCallUI(a[num].usercontact, a[num].userfullname); } else { Debug.WriteLine("error."); } } catch { Debug.WriteLine("catch."); } } }
private async void PhoneButton_Click(object sender, RoutedEventArgs e) { var Item = this.DefaultViewModel[Restaurant] as Restaurant; string Telephone = Item.Telephone; if (Telephone != null) { Telephone = Regex.Replace(Telephone, "[^0-9]", ""); if (Telephone.Length == 10) { PhoneCallManager.ShowPhoneCallUI(Telephone, Item.Label); } else if (Telephone.Length == 12) { Telephone = "+" + Telephone; PhoneCallManager.ShowPhoneCallUI(Telephone, Item.Label); } else { await ShowErrorAsync(); } } else { this.PhoneButton.IsEnabled = false; } }
public void Call() { if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Calls.PhoneCallManager")) { PhoneCallManager.ShowPhoneCallUI(User.PhoneNumber, User.FullName); } }
private void callButton_Click(object sender, RoutedEventArgs e) { if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI(bakkal.Phone, bakkal.Name); } }
public void MakeCall(string phoneNumber) { if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Calls.PhoneCallManager")) { PhoneCallManager.ShowPhoneCallUI(phoneNumber, phoneNumber); } }
private void grid_6_Tapped(object sender, TappedRoutedEventArgs e) { if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI("4441141", "Kocaeli Çağrı Merkezi"); } }
private async void InfoScreen(string adress, string phone, string header) { try { MessageDialog dialog = new MessageDialog(adress + "\n" + phone, header); var button_OK = new UICommand("Ara"); var button_CANCEL = new UICommand("Vazgeç"); dialog.Commands.Add(button_OK); dialog.Commands.Add(button_CANCEL); IUICommand result = await dialog.ShowAsync(); if (result != null && result.Label == "Ara") { if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI(phone.Trim(), header); } } } catch (Exception) { } }
private void GenerateActions() { ProfileCommands = new ObservableCollection <ProfileCommand>(); //Mise en place des champs de commande //Commande pour appeler if (!_userModel.numeroPortable.Equals("")) { Action command; //Si on peut appeler if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { command = new Action(() => { PhoneCallManager.ShowPhoneCallUI(_userModel.numeroPortable, Username); }); } //Si le device ne peut passer d'appel else { command = new Action(async() => { string errMsg = "Désolé, les appels ne sont pas disponnibles sur votre appareil"; MessageDialog dialog = new MessageDialog(errMsg); await dialog.ShowAsync(); }); } ProfileCommands.Add(new ProfileCommand("Appeler", _userModel.numeroPortable, command)); } //Commande pour naviguer vers if (!_userModel.adresse.Equals("")) { Action command = new Action(async() => { var locFinderResult = await MapLocationFinder.FindLocationsAsync(_userModel.adresse, new Geopoint(new BasicGeoposition())); if (locFinderResult.Locations[0] == null) { string errMsg = "Désolé, impossible de trouver où " + _userModel.prenom + " habite"; MessageDialog dialog = new MessageDialog(errMsg); await dialog.ShowAsync(); return; } var geoPos = locFinderResult.Locations[0].Point.Position; var driveToUri = new Uri(String.Format( "ms-drive-to:?destination.latitude={0}&destination.longitude={1}&destination.name={2}", geoPos.Latitude, geoPos.Longitude, _userModel.prenom + " " + _userModel.nom)); await Windows.System.Launcher.LaunchUriAsync(driveToUri); }); ProfileCommands.Add(new ProfileCommand("Obtenir un itinéraire", _userModel.adresse, command)); RaisePropertyChanged("ProfileCommands"); } }
private void TextBlock_Tapped(object sender, TappedRoutedEventArgs e) { TextBlock txtBlock = sender as TextBlock; string num = txtBlock.Text; string name = this.txtTitle.Text; PhoneCallManager.ShowPhoneCallUI(num, name); }
public void Phone(string number, string name) { //if(!CanPhone) //{ // throw new System.Exception("Sarac"); //} PhoneCallManager.ShowPhoneCallUI(number, name); }
private void list_SelectionChanged(object sender, SelectionChangedEventArgs e) { var value = (Card)list.SelectedItem; if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI(value.PhoneNumber, value.Name); } }
private void CallExecute() { PhoneCallManager.ShowPhoneCallUI(Post.PhoneNumber, "@" + Post.User); _insightsService.TrackEvent("ContactCall", new Dictionary <string, string> { { "PostId", Post.Id } }); }
private void Dial_Click(object sender, RoutedEventArgs e) { try { PhoneCallManager.ShowPhoneCallUI(PhoneNumberTextBox.Text, "Jon Doe"); } catch (Exception ex) { ErrorMessage.Text = ex.ToString(); } }
/// <summary> /// Method invoked when the user clicks on Richiama button. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AppBarButton_Tapped_2(object sender, TappedRoutedEventArgs e) { FrameworkElement element = (FrameworkElement)sender; Message message = (Message)element.DataContext; try { PhoneCallManager.ShowPhoneCallUI(message.Sender, message.Sender); } catch (Exception ex) { ShellPage.Current.HandleExceptionNotification(ex); } }
//打电话 public static void CallFunc() { try { PhoneCallManager.ShowPhoneCallUI(18317722768.ToString(), "hippieZhou"); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
public virtual Task ShowAsync(string phoneNumber, string displayName) { if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.ApplicationModel.Calls.PhoneCallManager")) { PhoneCallManager.ShowPhoneCallUI(phoneNumber, displayName); return(Task.CompletedTask); } return(CallByUri(phoneNumber, displayName)); }
public void MakePhoneCall(string number, string name = null) { if (string.IsNullOrWhiteSpace(number)) { throw new ArgumentNullException("number"); } if (CanMakePhoneCall) { PhoneCallManager.ShowPhoneCallUI(number, name ?? ""); } }
private void listBox1_ItemClick(object sender, ItemClickEventArgs e) { string l = e.ClickedItem.ToString(); //ans.Text = l; string[] line = new string[10]; line = l.Split(','); // ans.Text = line[0]; //ans.Text = l; line[2] = line[2].Replace("\"", string.Empty); PhoneCallManager.ShowPhoneCallUI(line[0], line[2]); }
public void ShowPhoneCallUI(string phoneNumber, string displayName) { if (phoneNumber == null) { throw new ArgumentNullException(nameof(phoneNumber)); } if (displayName == null) { throw new ArgumentNullException(nameof(displayName)); } PhoneCallManager.ShowPhoneCallUI(phoneNumber, displayName); }
private void lista_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { string SelectedContactId = "0"; string callnome; if (lista.SelectedIndex != -1) { ContactsDataModel listitem = lista.SelectedItem as ContactsDataModel; SelectedContactId = Convert.ToString(listitem.Model.C_telemovel); callnome = listitem.Model.C_nome; PhoneCallManager.ShowPhoneCallUI("+351" + SelectedContactId, callnome); } }
/// <summary> /// Shows the Phone application, using the specified phone number and display name. /// </summary> /// <param name="phoneNumber">The phone number.</param> /// <param name="displayName">The display name.</param> public void Show(string phoneNumber, string displayName) { #if WINDOWS_PHONE new PhoneCallTask() { PhoneNumber = phoneNumber, DisplayName = displayName }.Show(); #elif WINDOWS_PHONE_APP PhoneCallManager.ShowPhoneCallUI(phoneNumber, displayName); #else var phoneCallUrl = "tel:" + Uri.EscapeDataString(phoneNumber); Launcher.LaunchUriAsync(new Uri(phoneCallUrl, UriKind.Absolute)); #endif }
private void SystemCallExecute() { var user = Item as TLUser; if (user != null) { if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Calls.PhoneCallManager")) { PhoneCallManager.ShowPhoneCallUI($"+{user.Phone}", user.FullName); } else { // TODO } } }
private async void BtnCall_Click(object sender, RoutedEventArgs e) { if (ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract", 1, 0)) { PhoneCallManager.ShowPhoneCallUI("+48 000-000-000", "Marcin Jamro"); } else { ContentDialog dialog = new ContentDialog() { Content = "We are sorry, but the device does not support calling.", PrimaryButtonText = "OK" }; await dialog.ShowAsync(); } }
public virtual Task MakePhoneCall(string recipient, string displayName = null) { if (string.IsNullOrWhiteSpace(recipient)) { throw new ArgumentNullException("recipient", "Supplied argument 'recipient' is null, whitespace or empty."); } if (!CanMakePhoneCall) { throw new FeatureNotAvailableException(); } PhoneCallManager.ShowPhoneCallUI(recipient, displayName); return(Task.FromResult(true)); }
private void PlacePhone_Click(object sender, TappedRoutedEventArgs e) { PhoneCallManager.ShowPhoneCallUI(PlacePhone.Text, PlaceName.Text); }
public bool Dial(string number) { PhoneCallManager.ShowPhoneCallUI(number, "Phoneword"); return(true); }
public void Show() { PhoneCallManager.ShowPhoneCallUI(PhoneNumber, DisplayName); }
public static void Open(string number) { ValidateOpen(number); PhoneCallManager.ShowPhoneCallUI(number, string.Empty); }
private void Action_Call(String Name, String Number) { PhoneCallManager.ShowPhoneCallUI(Number, Name); }