Exemplo n.º 1
0
        public Auswertung(List <string> namesGirls, List <string> namesBoys, double tischgruppenDreier, double tischgruppenVierer, double tischgruppenFuenfer, double tischgruppenSechser, double freieSitze)
        {
            InitializeComponent();
            var list = new PersonList();


            schuelerListe = namesGirls.Concat(namesBoys);



            #region Get the groups
            for (int i = 0; i < namesBoys.Count(); i++)
            {
                list.AddBoy(namesBoys[i]);
            }

            for (int i = 0; i < namesGirls.Count(); i++)
            {
                list.AddGirl(namesGirls[i]);
            }



            for (int i = 0; i < tischgruppenVierer; i++)
            {
                groupsOfFour     = "4: " + String.Join(", ", list.GetGroup(4)) + "\n";
                TablesFour.Text += groupsOfFour;
            }

            for (int i = 0; i < tischgruppenSechser; i++)
            {
                groupsOfSix     = "6: " + String.Join(", ", list.GetGroup(6)) + "\n";
                TablesSix.Text += groupsOfSix;
            }

            for (int i = 0; i < tischgruppenDreier; i++)
            {
                groupsOfThree     = "3: " + String.Join(", ", list.GetGroup(3)) + "\n";
                TablesThree.Text += groupsOfThree;
            }


            for (int i = 0; i < tischgruppenFuenfer; i++)
            {
                groupsOfFive     = "5: " + String.Join(", ", list.GetGroup(5)) + "\n";
                TablesFive.Text += groupsOfFive;
            }

            var getgroups = list.GetGroup(4);
            var groupOf5  = list.GetGroup(5);

            if (TablesThree.Text == null)
            {
                title3.IsVisible = false;
            }

            if (TablesFour.Text == null)
            {
                title4.IsVisible = false;
            }

            if (TablesFive.Text == null)
            {
                title5.IsVisible = false;
            }

            if (TablesSix.Text == null)
            {
                title6.IsVisible = false;
            }
        }