Ejemplo n.º 1
0
        public void popupEnchere(int index)
        {
            model.Property ppt = GameManager.GetInstance.boardManager.getBoard()[index].getProperty();

            Popup_carte popup = null;

            switch (ppt.getType())
            {
            case model.Property.PropType.PRIVATE:
                popup = new Popup_carte(ppt, "PROPRIETE", ppt.getName(), false, Color.FromName(((model.PrivateProperty)ppt).getColor()), CURRENCY, ppt.getRent()[0], ppt.getRent()[1], ppt.getRent()[2], ppt.getRent()[3], ppt.getRent()[4], ppt.getRent()[5], ((model.PrivateProperty)ppt).getHouseCost(), ppt.getPrice() / 2, true);
                break;

            case model.Property.PropType.RAILROAD:
                popup = new Popup_carte(ppt, "GARE", ppt.getName(), false, CURRENCY, ppt.getRent()[0], ppt.getRent()[1], ppt.getRent()[2], ppt.getRent()[3], new Bitmap(".\\Resources\\train.png"), true);
                break;

            case model.Property.PropType.UTILITY:
                Bitmap btmp;
                if (index == 12)
                {
                    btmp = new Bitmap(".\\Resources\\electric.png");
                }
                else
                {
                    btmp = new Bitmap(".\\Resources\\water.png");
                }
                popup = new Popup_carte(ppt, "ENTREPRISE", ppt.getName(), false, btmp, true);
                break;
            }
            Popup_enchere enchere = new Popup_enchere(controller.GameManager.GetInstance.playerManager.getPlayers(), popup);

            enchere.ShowDialog(this);
            popup.Dispose();
            enchere.Dispose();
        }
        public Popup_enchere(List <Player> j, Popup_carte carte)
        {
            carte.Show(this);
            InitializeComponent();

            this.StartPosition = FormStartPosition.Manual;
            //MessageBox.Show(carte.Location.Y.ToString());
            this.Location = new Point(carte.Location.X + carte.Width, carte.Location.Y);

            popupCarte = carte;

            joueurs = j;

            nextIndex();
        }