public void Addview()
        {
            int xPos, yPos;
            int index=0;
            for (int i = 0; i < aantalRijen; i++)
            {

                //huidigeGridView.Location = new Point(0, yPos);
                for (int j = 0; j < aantalKolommen; j++)
                {
                    GridController huidigeGridController = new GridController();
                    GridView huidigeGridView = huidigeGridController.getView();
                    yPos = huidigeGridView.Height * i;
                    xPos = huidigeGridView.Width * j;
                    huidigeGridView.Location = new Point(xPos, yPos);
                   huidigeGridController._model.TheList.Add(huidigeGridController);

                   huidigeGridController._model.TheList[index]._view.myIndex = index;
                   huidigeGridController._model.TheList[index]._model.WaardeButton = index * 500;

                    index++;
                    panel1.Controls.Add(huidigeGridView);

                    //Controls.Add(huidigeGridView);

                }

            }
        }
        public GridView(GridController controller)
        {
            _controller = controller;

            InitializeComponent();
            //Console.WriteLine("opvragen gridview methode");
        }
        public void BuyMarket(int getIndexMarket  )
        {
            _gridController1 = new GridController();
            //Console.WriteLine(_moneyController._model.Money);

            if (MainGame._MoneyController._model.Money >= Int32.Parse(_model.MarketData[getIndexMarket, 1]))
            {

                _gridController1._model.TheList[_model.Index]._view.GridView_Update(_model.MarketData[getIndexMarket, 0]);
                MainGame._MoneyController._model.Money -= Int32.Parse(_model.MarketData[getIndexMarket, 1]);

                MainGame._MoneyController._view.moneyUpdate();
                Market.ActiveForm.Close();
                _gridController1._model.TheList[_model.Index]._model.IsBuilt = true;
                _gridController1._model.TheList[_model.Index]._model.SellPrice = Int32.Parse(_model.MarketData[getIndexMarket, 3]);

            }
        }