Ejemplo n.º 1
0
        public void LoadHost()
        {
            string       file  = ConfigurationManager.AppSettings.Get("AdminLocation");
            int          sheet = Convert.ToInt32(ConfigurationManager.AppSettings.Get("HostSheet"));
            ExcelManager em    = new ExcelManager();

            Host = new Player("host", "zb", em.ReadGroupPhase(file, sheet, new ExcelReadSettings()), em.readKnockout(file, sheet, new ExcelReadSettings()), em.readBonus(file, sheet));
        }
Ejemplo n.º 2
0
        private void btnFile_Click(object sender, EventArgs e)
        {
            string            file     = tbFile.Text;
            ExcelManager      em       = new ExcelManager();
            ExcelReadSettings settings = new ExcelReadSettings();
            Player            player   = new Player(tbName.Text, tbTown.Text, em.ReadGroupPhase(file, 1, settings), em.readKnockout(file, 1, settings), em.readBonus(file, 1));

            MessageBox.Show("player sucesfully created!");
            loadPlayer(player);
        }
Ejemplo n.º 3
0
        private void btnRanking_Click(object sender, EventArgs e)
        {
            proBarRanking.Maximum = manager.Players.Count();
            proBarRanking.Value   = 0;
            ExcelManager m = new ExcelManager();

            foreach (int i in m.ExportPlayersToExcel(ConfigurationManager.AppSettings.Get("AdminLocation"), Convert.ToInt32(ConfigurationManager.AppSettings.Get("RankingSheet")), manager.Players))
            {
                proBarRanking.Value = (i - 2);
            }
            MessageBox.Show("Players have been exported succesfully!");
        }
Ejemplo n.º 4
0
 public void checkAllPlayers(Player host)
 {
     if (host != null)
     {
         ExcelManager em = new ExcelManager();
         var          s  = em.readGoalScorers(ConfigurationManager.AppSettings.Get("AdminLocation"), Convert.ToInt32(ConfigurationManager.AppSettings.Get("GoalScorersSheet")));
         foreach (Player player in Players)
         {
             if (player.Name != "Host")
             {
                 player.Check(host, s);
             }
         }
         SavePlayers();
     }
 }