Пример #1
0
        private async void MainButtonClick(object sender)
        {
            bool Birthday = false;

            ShowLoader();
            await Task.Run(() =>
            {
                UpdateTextBoxes();
                Birthday = BirthdayInfo.IsBirthday(ChosenDate);
            });

            HideLoader();
            if (AgeInfo.Length == 0)
            {
                MessageBox.Show("Your entered date of birth is incorrect! The computed age can not be lower or qual to 0 and higher than 135 years old. Try again!");
            }
            else if (Birthday)
            {
                MessageBox.Show("Hey, it`s your birthday today! Congratulations!");
            }
        }