Example #1
0
        private HighlightFancyButton GenerateFancyButtonForPlayer(Player player)
        {
            HighlightFancyButton ret = new HighlightFancyButton();

            ret.Size       = new Size(400, 50);
            ret.Obj        = player;
            ret.ObjectType = OSKernel.Helper.eObjectType.Player;
            ret.LabelText  = player.Name;
            ret.Click     += CompetitionFB_Click;
            return(ret);
        }
Example #2
0
        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);
        }
Example #3
0
        private void CompetitionFB_Click(object sender, EventArgs e)
        {
            Label lbl = (Label)sender;
            HighlightFancyButton hf = (HighlightFancyButton)lbl.Parent;

            fLPanelCompetitions.SendToBack();
            ucTournament ucTournament = new ucTournament();

            ucTournament.InitializeUC((AGoCompetition)hf.Obj);
            ucTournament.Dock = DockStyle.Fill;
            this.Controls.Add(ucTournament);
            ucTournament.BringToFront();
        }
Example #4
0
        private void CompetitionFB_Click(object sender, EventArgs e)
        {
            Label lbl = (Label)sender;
            HighlightFancyButton hf = (HighlightFancyButton)lbl.Parent;

            flowPanelMain.SendToBack();
            Player        selectedPlayer = (Player)hf.Obj;
            List <GoGame> games          = _Competition.Games.Where((x) => x.Player1.Name == selectedPlayer.Name || x.Player2.Name == selectedPlayer.Name).ToList();
            ucGames       ucGms          = new ucGames();

            ucGms.InitializeUC(games);
            ucGms.Dock = DockStyle.Fill;
            this.Controls.Add(ucGms);
            ucGms.BringToFront();
        }