Beispiel #1
0
        void OnTranslate(object sender, System.EventArgs e)
        {
            translatedNumber = PhonewordTranslator.ToNumber(EnteredNumber.Text);

            if (translatedNumber != null)
            {
                CallBtn.IsEnabled = true;
                CallBtn.Text      = string.Format("Call {0}", translatedNumber);
            }
            else
            {
                DisplayAlert("Phoneword", "The number entered is unsupported, Please re-enter a number", "OK");
                CallBtn.IsEnabled  = false;
                EnteredNumber.Text = string.Empty;
                CallBtn.Text       = "Call";
                EnteredNumber.Focus();
            }
        }
Beispiel #2
0
 private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
 {
     EnteredNumber.Focus();
 }