public static string GetFactorExplanation(Visual.VisualContender cont, Visual.VisualBracket vb) { double finalgrade; Visual.VisualLeagueEvent.IsSutibleForBracket(cont, vb, out finalgrade); return(GetFactorExplanation(finalgrade)); }
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(); } }