// Constructor public MainPage() { InitializeComponent(); addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler<AddressResult>(addressTask_Completed); }
// Constructor public MainPage() { InitializeComponent(); act = new AddressChooserTask(); act.Completed += new EventHandler <AddressResult>(act_Completed); cct = new CameraCaptureTask(); cct.Completed += new EventHandler <PhotoResult>(cct_Completed); eact = new EmailAddressChooserTask(); eact.Completed += new EventHandler <EmailResult>(eact_Completed); git = new GameInviteTask(); git.Completed += new EventHandler <TaskEventArgs>(git_Completed); pct = new PhotoChooserTask(); pct.Completed += new EventHandler <PhotoResult>(pct_Completed); pnct = new PhoneNumberChooserTask(); pnct.Completed += new EventHandler <PhoneNumberResult>(pnct_Completed); seat = new SaveEmailAddressTask(); seat.Completed += new EventHandler <TaskEventArgs>(seat_Completed); srt = new SaveRingtoneTask(); srt.Completed += new EventHandler <TaskEventArgs>(srt_Completed); spnt = new SavePhoneNumberTask(); spnt.Completed += new EventHandler <TaskEventArgs>(spnt_Completed); }
void contacts_SearchCompleted(object sender, ContactsSearchEventArgs e) { addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler<AddressResult>(addressTask_Completed); foreach (var result in e.Results) { //this.tbdisplayName.Text = "Name: " + result.DisplayName; //this.tbEmail.Text = "E-mail address: " + result.EmailAddresses.FirstOrDefault().EmailAddress; //this.tbPhone.Text = "Phone Number: " + result.PhoneNumbers.FirstOrDefault(); //this.tbPhysicalAddress.Text = "Address: " + result.Addresses.FirstOrDefault().PhysicalAddress.AddressLine1; //this.tbWebsite.Text = "Website: " + result.Websites.FirstOrDefault(); _cePersonViewModel.ThePerson = new Person(); _cePersonViewModel.ThePerson.FirstName = result.DisplayName; _cePersonViewModel.ThePerson.PhoneNumber = result.PhoneNumbers.FirstOrDefault().PhoneNumber; _cePersonViewModel.ThePerson.Email = result.EmailAddresses.FirstOrDefault().EmailAddress; if (result.GetPicture() != null) { BitmapImage bmp = new BitmapImage(); bmp.SetSource(result.GetPicture()); Image img = new Image(); img.Source = bmp; this.ContentPanel.Children.Add(img); } } }
private void addEmail_Tap(object sender, System.Windows.Input.GestureEventArgs e) { AddressChooserTask addressTask = new AddressChooserTask(); addressTask.Completed += addressTask_Completed; addressTask.Show(); }
public NewGroup() { InitializeComponent(); numberTask = new PhoneNumberChooserTask(); numberTask.Completed += new EventHandler<PhoneNumberResult>(numberTask_Completed); addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler<AddressResult>(addressTask_Completed); }
// Constructor public MainPage() { InitializeComponent(); chooser = new AddressChooserTask(); chooser.Completed += new EventHandler <AddressResult>(chooser_Completed); chooser.Show(); }
public ImportContactView() { this.DataContext = new ImportContactViewModel(this); InitializeComponent(); this.SubClassPage = this; addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler <AddressResult>(addressTask_Completed); }
private void webBrowser_ScriptNotify(object sender, NotifyEventArgs e) { if (e.Value == "chooseAddress") { var task = new AddressChooserTask(); task.Completed += task_Completed; task.Show(); } }
private void webBrowser_ScriptNotify(object sender, NotifyEventArgs e) { if (e.Value == "chooseAddress") { var task = new AddressChooserTask(); task.Completed += task_Completed; task.Show(); } }
public ImportContactView() { this.DataContext = new ImportContactViewModel(this); InitializeComponent(); this.SubClassPage = this; addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler<AddressResult>(addressTask_Completed); }
private void Button_Click(object sender, RoutedEventArgs e) { AddressChooserTask task = new AddressChooserTask(); task.Completed += (s, a) => { if (a.TaskResult == TaskResult.OK) MessageBox.Show(a.Address, a.DisplayName, MessageBoxButton.OK); }; task.Show(); }
private void addressChooser_Click(object sender, EventArgs e) { // with a local task, the completed event will be called when returning from dormant, // but WILL NOT be called when returning from tombstone. AddressChooserTask task = new AddressChooserTask(); task.Completed += (object sender2, AddressResult e2) => { if (e2.Error == null && e2.TaskResult == TaskResult.OK) System.Diagnostics.Debug.WriteLine("{0}: {1}", e2.DisplayName, e2.Address); }; task.Show(); }
private void addressChooser_Click(object sender, EventArgs e) { // with a local task, the completed event will be called when returning from dormant, // but WILL NOT be called when returning from tombstone. AddressChooserTask task = new AddressChooserTask(); task.Completed += (object sender2, AddressResult e2) => { if (e2.Error == null && e2.TaskResult == TaskResult.OK) { System.Diagnostics.Debug.WriteLine("{0}: {1}", e2.DisplayName, e2.Address); } }; task.Show(); }
/// <summary> /// Address Chooser /// </summary> /// <param name="parameters"></param> public void chooseContact(string parameters) { // WP8 does not allow the editing of the contact. Just return NOT AVAILABLE IN WINDOES PHONE 8 message string js = "javascript: var e = document.createEvent('Events');" + "e.initEvent('intel.xdk.contacts.choose',true,true);e.success=false;" + "e.error='NOT AVAILABLE IN WINDOES PHONE 8';document.dispatchEvent(e);"; //InjectJS("javascript:" + js); InvokeCustomScript(new ScriptCallback("eval", new string[] { js }), true); return; try { if (busy == true) { js = "javascript: var e = document.createEvent('Events');" + "e.initEvent('intel.xdk.contacts.busy',true,true);e.success=false;" + "e.message='busy';document.dispatchEvent(e);"; //InjectJS("javascript:" + js); InvokeCustomScript(new ScriptCallback("eval", new string[] { js }), true); return; } busy = true; addressChooserTask = new AddressChooserTask(); addressChooserTask.Completed += new EventHandler <AddressResult>(addressChooserTask_Completed); addressChooserTask.Show(); } catch (Exception e) { js = string.Format(" var e = document.createEvent('Events');" + "e.initEvent('intel.xdk.contacts.choose',true,true);" + "e.success=false;e.error='{0}';document.dispatchEvent(e);", "There was a problem choosing a contact."); //InjectJS("javascript:" + js); InvokeCustomScript(new ScriptCallback("eval", new string[] { js }), true); } }
private void GetContactAddressButtonTap(object sender, System.Windows.Input.GestureEventArgs e) { var addressChooserTask = new AddressChooserTask(); addressChooserTask.Completed += (s, r) => { if (r.TaskResult == TaskResult.OK) { if (((Button)sender).Tag.Equals("start")) { this.startingInput.Text = r.Address; } else { this.endingInput.Text = r.Address; } } }; addressChooserTask.Show(); }
private void addEmail_Tap(object sender, System.Windows.Input.GestureEventArgs e) { AddressChooserTask addressTask = new AddressChooserTask(); addressTask.Completed += addressTask_Completed; addressTask.Show(); }
private void Import_Click(object sender, EventArgs e) { addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler <AddressResult>(addressTask_Completed); addressTask.Show(); }
public static void SelectContactAddress(Action<string, Exception> addressSelected) { var task = new AddressChooserTask(); task.Completed += (s, e) => addressSelected.ExecuteIfNotNull(e.Address, e.Error); task.Show(); }
private void Import_Click(object sender, EventArgs e) { addressTask = new AddressChooserTask(); addressTask.Completed += new EventHandler<AddressResult>(addressTask_Completed); addressTask.Show(); }
private void Contact_Click(object sender, EventArgs e) { addressChooserTask = new AddressChooserTask(); addressChooserTask.Completed += new EventHandler <AddressResult>(ContactSearch_Completed); addressChooserTask.Show(); }
private void EscolherEndereco_Click(object sender, RoutedEventArgs e) { addressChooserTask = new AddressChooserTask(); addressChooserTask.Completed += AddressChooserTask_Completed; addressChooserTask.Show(); }