Пример #1
0
        /// <summary>
        /// Weight calculated.
        /// </summary>
        /// <returns></returns>
        private async Task <bool> IsWeightEntered()
        {
            if (string.IsNullOrWhiteSpace(TxtWeight.Text))
            {
                await DisplayAlert("Fail", "Uhh, you forgot to enter in your weight.\n\nThis is the only error check.\n\nIf you fail to enter any other information this app will crash or give you the wrong results. That's completely on you if you're starving or gain weight due to following incorrectly calculated macros.\n\nDon't be a bad end-user, finish filling in the form.", "Aww Shoot!");

                TxtWeight.Focus();
                return(false);
            }
            return(true);
        }
Пример #2
0
 private void BtnAddNew_OnClick(object sender, RoutedEventArgs e)
 {
     TxtWeight.Focus();
 }
Пример #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     TxtWeight.Focus();
 }
Пример #4
0
 public MainPage()
 {
     InitializeComponent();
     Appearing += (object sender, EventArgs e) => TxtWeight.Focus();
 }