/// <summary>
        /// The function of moving to the previous window.
        /// </summary>
        private void buttonPrevious_Click(object sender, RoutedEventArgs e)
        {
            WindowFormSurname secondForm = new WindowFormSurname(_person);

            secondForm.Show();
            this.Close();
        }
 /// <summary>
 /// The function of moving to the next window or displaying error information.
 /// </summary>
 private void buttonNext_Click(object sender, RoutedEventArgs e)
 {
     if (isCorrectFormatName(textBoxName.Text))
     {
         _person.Name = textBoxName.Text;
         WindowFormSurname secondForm = new WindowFormSurname(_person);
         secondForm.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Wymagany format: \r\n- Imię musi zaczynać sie od wielkiej litery.\r\n- Maksymalna długość imienia to 100 znaków.", "Nieporawny format!");
     }
 }