예제 #1
0
        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            tours = new Tournament(nameTournament.Text, nameTown.Text, DateTimeParsing.DateTimeParse(startDate.Text), DateTimeParsing.DateTimeParse(endDate.Text));

            tournaments.Add(tours);
            listView1.Items.Add(tours);

            //RefreshListView();
        }
예제 #2
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            Athlete athlete = new Athlete(firtsName.Text, lastname.Text, int.Parse(number.Text), DateTimeParsing.DateTimeParse(dateOfBirth.Text), team.Text, results.Text, finalResult.Text, record.Text, Sex.Male, null, Position.Text);

            ListAthlete.Items.Add(athlete);
            athletesInTour.Add(athlete);

            //DisciplineWithAthletes.Add(athlete);
        }
예제 #3
0
        private void addButton_ClickAthlete(object sender, RoutedEventArgs e)
        {
            //var factoryAthlete = new MakeAthlete();
            //var createFactoryAthlete = factoryAthlete.MakePerson(firstNameAthlete.Text, SecondNameAthlete.Text, int.Parse(uniqueNumberAthlete.Text), DateTimeParsing.DateTimeParse(dateOfBirthAthlete.Text));

            Athlete    athlete   = new Athlete(firstNameAthlete.Text, SecondNameAthlete.Text, int.Parse(uniqueNumberAthlete.Text), DateTimeParsing.DateTimeParse(dateOfBirthAthlete.Text));
            AgeCounter age       = new AgeCounter(athlete.DateOfBirth, DateTime.Now);
            string     athletAge = age.ToString();

            athlete.Age = athletAge;
            atlets.Add(athlete);
            listViewAthlete.Items.Add(athlete);
        }