Esempio n. 1
0
        public static string GetFactorExplanation(Visual.VisualContender cont, Visual.VisualBracket vb)
        {
            double finalgrade;

            Visual.VisualLeagueEvent.IsSutibleForBracket(cont, vb, out finalgrade);

            return(GetFactorExplanation(finalgrade));
        }
Esempio n. 2
0
        public void CreateVisualBrackets()
        {
            Visual.VisualLeagueEvent.FormObj = this;
            try
            {
                Cursor.Hide();

                // sort by Bracket Size
                Brackets.BracketsList = Brackets.BracketsList.AsEnumerable().OrderByDescending(x => x.NumberOfContenders).ToList();

                foreach (MartialArts.Bracket b in Brackets.BracketsList)
                {
                    Visual.VisualBracket br = new Visual.VisualBracket(b);
                    br.Init();
                    Visual.VisualLeagueEvent.AddVisualBracket(br);
                    // add to GUI
                    BracktsFPanel.Controls.Add(br.Vbracket);
                }

                // add uselesess and unplaced contenders

                // unplaced
                foreach (Contenders.Contender c in Brackets.ContendersList)
                {
                    Visual.VisualContender visualcont = new Visual.VisualContender(c);
                    visualcont.Init();
                    Visual.VisualLeagueEvent.AddUnplacedContender(visualcont);
                    UnPlacedFpanel.Controls.Add(visualcont.Vcontender);
                }

                // Uselesses
                foreach (Contenders.Contender c in Brackets.UselessContenders)
                {
                    Visual.VisualContender visualcont = new Visual.VisualContender(c);
                    visualcont.Init();
                    Visual.VisualLeagueEvent.AddUnplacedContender(visualcont);
                    UnPlacedFpanel.Controls.Add(visualcont.Vcontender);
                }

                // must merge all contenders in LeagueEvent instance
                Visual.VisualLeagueEvent.MergeListsForSearch();
                UpdateClocks();

                System.Threading.Thread.Sleep(1000);
                tabControl1.SelectedTab = tabPage2;
            }
            catch (Exception ex)
            {
            }
            finally
            {
                Cursor.Show();
                MoveCursor();
            }
        }
Esempio n. 3
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     foreach (MartialArts.Bracket b in Brackets.BracketsList)
     {
         foreach (Contenders.Contender c in b.ContendersList)
         {
             Visual.VisualContender f = new Visual.VisualContender(c);
             f.Init();
             BracktsFPanel.Controls.Add(f.Vcontender);
         }
         Label l = new Label();
         l.Size = new Size(507, 36);
         BracktsFPanel.Controls.Add(l);
     }
 }