private HighlightFancyButton GenerateFancyButtonForCompetition(AGoCompetition competition) { HighlightFancyButton ret = new HighlightFancyButton(); ret.Size = new Size(240, 120); ret.Obj = competition; ret.ObjectType = OSKernel.Helper.eObjectType.Competition; ret.LabelText = competition.Name; ret.Click += CompetitionFB_Click; return(ret); }
public GoGame(AGoCompetition comp, string groupName, int stage, Player player1, Player player2) { GoCompetition = comp; Stage = stage; Player1 = player1; Player2 = player2; _GameLabel = comp.Name + " " + groupName + " Tur: " + stage.ToString() + " " + player1.Name + " - " + player2.Name; _ShortGameLabel = groupName + " Tur: " + stage.ToString() + " " + player1.Name + " - " + player2.Name; _GroupName = groupName; }
public void InitializeUC(AGoCompetition competition) { _Competition = competition; _Players = competition.Players; flowPanelMain.Controls.Clear(); for (int i = 0; i < _Players.Count(); i++) { flowPanelMain.Controls.Add(GenerateFancyButtonForPlayer(_Players[i])); } }
public static List <GoGame> GetNoHandicapGroupBGames(AGoCompetition goCompetition) { List <GoGame> Games = new List <GoGame>(); string Path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); Path += "\\BGrubuFikstur.txt"; Games = GetGoGames(goCompetition, "B Grubu", Path); return(Games); }
public void InitializeUC(AGoCompetition league) { _Games = league.Games; listboxPlayers.Items.Clear(); for (int i = 0; i < _Games.Count(); i++) { listboxPlayers.Items.Add(_Games[i].ShortGameLabel); } listboxPlayers.SelectedIndex = 0; ucGame1.InitializeUC(_Games[listboxPlayers.SelectedIndex]); SubscribeToEvents(); }
private static List <GoGame> GetGoGames(AGoCompetition goCompetition, string groupName, string Path) { List <GoGame> Games = new List <GoGame>(); using (StreamReader sr = new StreamReader(Path)) { var line = ""; int stage = 1; while (true) { line = sr.ReadLine(); if (line != null) { var split = line.Split(','); if (split.Count() == 1) { stage = Convert.ToInt32(split[0].Replace("Maç ", string.Empty)); } else if (split.Count() == 2) { Player player1 = GetGoPlayerByName(goCompetition.Players, split[0]); Player player2 = GetGoPlayerByName(goCompetition.Players, split[1]); GoGame game = new GoGame(goCompetition, groupName, stage, player1, player2); Games.Add(game); } } else { break; } } } return(Games); }
public void InitializeUC(AGoCompetition tournament) { _Tournament = tournament; }