Exemplo n.º 1
0
        //=============================== FUNCTIONALITY ==============================//

        private void CreateNewMap(object sender, RoutedEventArgs args)
        {
            ClearMap();
            UpdateSelectorComboBox(ResourceType.Terrain);
            AvailableObjects.Clear();
            _admin         = new AdminRestrictionsWindow(this);
            Grids["Admin"] = CreateAdminTab();
            ShowGameBoard();
        }
Exemplo n.º 2
0
        //============================== INITIAL WINDOW ==============================//

        private void InitializeProperties(LoginData credentials)
        {
            Credentials      = credentials;
            PlacedObjects    = new List <Placement>();
            AvailableObjects = new List <GameObject>();
            _manager         = new GameMapManager(Credentials);
            _admin           = new AdminRestrictionsWindow(this);

            AccountName.Text += "\t\t" + credentials.name;
            AccountType.Text += "\t" + (credentials.isAdmin ? "WŁADZE MIASTA" : "MIESZKANIEC");
            Mode.Text        += "\t\t" + "WŁADZ MIASTA";
        }
Exemplo n.º 3
0
        private void LoadMap(object sender, RoutedEventArgs args)
        {
            Map map;

            try { map = _manager.LoadMap(out int _); }
            catch (Exception) { return; }

            ClearMap();
            ShowGameBoard();
            UpdateSelectorComboBox(ResourceType.Terrain);
            AvailableObjects    = _gameGridCreator.LoadMapIntoTheGameGrid(this, map);
            _admin              = new AdminRestrictionsWindow(this);
            Grids["Admin"]      = CreateAdminTab();
            SideGrid.Visibility = Visibility.Visible;
        }