Esempio n. 1
0
        /// <summary>
        /// The function of moving to the previous window.
        /// </summary>
        private void buttonPrevious_Click(object sender, RoutedEventArgs e)
        {
            WindowFormAddress thirdForm = new WindowFormAddress(_person);

            thirdForm.Show();
            this.Close();
        }
Esempio n. 2
0
 /// <summary>
 /// The function of moving to the next window or displaying error information.
 /// </summary>
 private void buttonNext_Click(object sender, RoutedEventArgs e)
 {
     if (isCorrectFormatSurname(textBoxSurname.Text))
     {
         _person.Surname = textBoxSurname.Text;
         WindowFormAddress thirdForm = new WindowFormAddress(_person);
         thirdForm.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Wymagany format: \r\n- Nazwisko musi zaczynać sie od wielkiej litery.\r\n- Nazwisko wieloczłonowe musi być podzielone myślnikami.\r\n- Maksymalna długość nazwiska to 100 znaków.", "Nieporawny format!");
     }
 }