예제 #1
0
        private void RefreshTransferListPanel()
        {
            spTransferList.Children.Clear();
            foreach (Club c in Session.Instance.Game.club.Championship.rounds[0].clubs)
            {
                CityClub cc = c as CityClub;
                if (cc != null)
                {
                    foreach (ContractOffer co in cc.clubTransfersManagement.offersHistory)
                    {
                        StackPanel spT = new StackPanel();
                        spT.Orientation = Orientation.Horizontal;
                        Label lbPlayer = ViewUtils.CreateLabel(co.Player.lastName, "StyleLabel2", 8, 40);
                        lbPlayer.MouseLeftButtonUp += (object sender, System.Windows.Input.MouseButtonEventArgs e) =>
                        { Windows_Joueur wj = new Windows_Joueur(co.Player); wj.Show(); };
                        spT.Children.Add(lbPlayer);
                        string from = "Libre";
                        if (co.Origin != null)
                        {
                            from = co.Origin.shortName;
                        }
                        spT.Children.Add(ViewUtils.CreateLabel(from, "StyleLabel2", 8, 55));
                        Label labelClub = ViewUtils.CreateLabel(cc.shortName, "StyleLabel2", 8, 55);
                        labelClub.MouseLeftButtonUp += (object sender, System.Windows.Input.MouseButtonEventArgs e) =>
                        { Windows_Club wc = new Windows_Club(cc); wc.Show(); };
                        spT.Children.Add(labelClub);
                        spT.Children.Add(ViewUtils.CreateLabel(co.TransferIndemnity + "€", "StyleLabel2", 8, 60));


                        spT.Children.Add(ViewUtils.CreateLabel(co.Result.ToString(), "StyleLabel2", 8, 60));
                        spTransferList.Children.Add(spT);
                    }
                }
            }
        }
        private void playerNameClick(Player p)
        {
            Windows_Joueur wj = new Windows_Joueur(p);

            wj.Show();
        }