Esempio n. 1
0
        public FormSelectBoardSize(MyBoardGame myBoardGame)
        {
            InitializeComponent();
            this.myBoardGame = myBoardGame;  //

            // add event to DGV.
            dataGridViewLoadBoard.CellClick += new DataGridViewCellEventHandler(dataGridViewLoadBoard_CellClick);
            dataGridViewLoadSave             = new DataGridViewLoadSave(dataGridViewLoadBoard); // put accual object DGV to class.
            dataGridViewLoadSave.setupDataGridViewLoadBoard();                                  // setup default detail in DGV.
            dataGridViewLoadSave.loadToDataGridViewLoadBoard("boardatorMoreMap");               // Load xml to dataGridView.

            // Create PreviewBoard. // myboardgame parameter for get image item dynamic.
            previewBoard = new PreviewBoard(panel_previewBoard, myBoardGame); // put accual object Panel to PreviewBoard object.
            previewBoard.createPanelPreviewBoard();                           // create section all.
            previewBoard.setFolderXML("boardatorMoreMap");
            previewBoard.refreshColorBoard();                                 // put colour in Preview board.


            setupButtonPreviewColor();

            if (dataGridViewLoadBoard.RowCount > 0)            // not empty  save file.
            {
                dataGridViewLoadBoard.Rows[0].Selected = true; // row 0 selected , in start.
                dataGridViewLoadBoard_CellClick(dataGridViewLoadBoard, null);
            }

            //MetroFramework.MetroMessageBox.Show(this, "Hello", "...", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        private void setupContent()
        {
            // add event to DGV.
            dataGridViewLoadBoard.CellClick += new DataGridViewCellEventHandler(dataGridViewLoadBoard_CellClick);
            dataGridViewLoadSave             = new DataGridViewLoadSave(dataGridViewLoadBoard); // put accual object DGV to class.
            dataGridViewLoadSave.setupDataGridViewLoadBoard();                                  // setup default detail in DGV.
            dataGridViewLoadSave.loadToDataGridViewLoadBoard("boardator");                      // Load xml to dataGridView.

            // Create PreviewBoard.
            previewBoard = new PreviewBoard(panel_previewBoard); // put accual object Panel to PreviewBoard object.
            previewBoard.createPanelPreviewBoard();              // create section all.
            previewBoard.setFolderXML("boardator");
            previewBoard.refreshColorBoard();                    // put colour in Preview board.

            if (dataGridViewLoadBoard.RowCount > 0)              // not empty  save file.
            {
                dataGridViewLoadBoard.Rows[0].Selected = true;   // row 0 selected , in start.
                dataGridViewLoadBoard_CellClick(dataGridViewLoadBoard, null);
            }
        }
Esempio n. 3
0
        public FormMoreMap(MyBoardGame myBoardGame)
        {
            InitializeComponent();
            this.myBoardGame = myBoardGame;

            // add event to DGV.
            dataGridViewLoadBoard.CellClick += new DataGridViewCellEventHandler(dataGridViewLoadBoard2_CellClick);
            dataGridViewLoadSave             = new DataGridViewLoadSave(dataGridViewLoadBoard); // put accual object DGV to class.
            dataGridViewLoadSave.setupDataGridViewLoadBoard();                                  // setup default detail in DGV.
            dataGridViewLoadSave.loadToDataGridViewLoadBoard("boardatorMoreMap");               // Load xml to dataGridView.

            // Create PreviewBoard.
            previewBoard = new PreviewBoard(panel_previewBoard, myBoardGame); // put accual object Panel to PreviewBoard object.
            previewBoard.createPanelPreviewBoard();                           // create section all.
            previewBoard.setFolderXML("boardatorMoreMap");
            previewBoard.refreshColorBoard();                                 // put colour in Preview board.

            if (dataGridViewLoadBoard.RowCount > 0)                           // not empty  save file.
            {
                dataGridViewLoadBoard.Rows[0].Selected = true;                // row 0 selected , in start.
                dataGridViewLoadBoard2_CellClick(dataGridViewLoadBoard, null);
            }
        }