private void SavePhoneNumberTask_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { SavePhoneNumberTask savePhoneNumberTask = new SavePhoneNumberTask(); savePhoneNumberTask.Completed += new EventHandler <TaskEventArgs>(savePhoneNumberTask_Completed); savePhoneNumberTask.PhoneNumber = "555-555-5555"; MessageBox.Show("Saving this phone number: " + savePhoneNumberTask.PhoneNumber); savePhoneNumberTask.Show(); }
private void btnSalvar_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Deseja salvar o contato?", "Atenção", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { SavePhoneNumberTask _phone = new SavePhoneNumberTask() { PhoneNumber = txtTelefone.Text }; _phone.Show(); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { //设置文本框为数字输入模式 tbxPhoneNo.InputScope = new InputScope() { Names = { new InputScopeName() { NameValue = InputScopeNameValue.TelephoneNumber } } }; spn = new SavePhoneNumberTask(); spn.Completed += new EventHandler <TaskEventArgs>(spn_Completed); spn.PhoneNumber = tbxPhoneNo.Text; spn.Show(); }
private void buttonSalvar_Click(object sender, RoutedEventArgs e) { if(textBoxNome.Text != null && !String.Empty.Equals(textBoxNome.Text.Trim())) { SaveContactTask contact = new SaveContactTask() { FirstName = textBoxNome.Text, MobilePhone = textBoxTelefone.Text }; contact.Show(); } else { SavePhoneNumberTask number = new SavePhoneNumberTask() { PhoneNumber = textBoxTelefone.Text }; number.Show(); } }
private void SecondListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { switch ((e.AddedItems[0] as ListBoxItem).Name) { case "iCameraCaptureTask": MessageBox.Show("See recipe 7-1 for CameraCaptureTask chooser explanation."); break; case "iPhotoChooserTask": MessageBox.Show("See recipe 7-2 for PhotoChooserTask chooser explanation."); break; case "iEmailAddressChooserTask": EmailAddressChooserTask eact = new EmailAddressChooserTask(); eact.Completed += new EventHandler <EmailResult>(EmailAddressChooserTask_Completed); eact.Show(); break; case "iPhoneNumberChooserTask": PhoneNumberChooserTask pnct = new PhoneNumberChooserTask(); pnct.Completed += new EventHandler <PhoneNumberResult>(PhoneNumberChooserTask_Completed); pnct.Show(); break; case "iSaveEmailAddressTask": SaveEmailAddressTask seat = new SaveEmailAddressTask(); seat.Completed += new EventHandler <TaskEventArgs>(SaveEmailAddressTask_Completed); seat.Email = "*****@*****.**"; seat.Show(); break; case "iSavePhoneNumberTask": SavePhoneNumberTask spnt = new SavePhoneNumberTask(); spnt.PhoneNumber = "55512345678"; spnt.Completed += new EventHandler <TaskEventArgs>(SavePhoneNumberTask_Completed); spnt.Show(); break; } }
private void button1_Click(object sender, RoutedEventArgs e) { spn.PhoneNumber = txtPhoneNo.Text; spn.Show(); }
private void SavePhone_Click(object sender, RoutedEventArgs e) { savePhoneNumberTask.PhoneNumber = (string)supportPhoneLink.Content; savePhoneNumberTask.Show(); }
private void btnSavePhoneNumber_Click(object sender, RoutedEventArgs e) { SavePhoneNumberTask task = new SavePhoneNumberTask(); task.PhoneNumber = "1234567890"; task.Show(); }
private void SavePhoneNumber_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { spnt.PhoneNumber = "(614) 327-5066"; spnt.Show(); }