void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.gofield = ((MonopolyWPFApp.BigField)(target));
                return;

            case 2:
                this.prison = ((MonopolyWPFApp.BigField)(target));
                return;

            case 3:
                this.freeParking = ((MonopolyWPFApp.BigField)(target));
                return;

            case 4:
                this.goToJail = ((MonopolyWPFApp.BigField)(target));
                return;

            case 5:
                this.row0 = ((MonopolyWPFApp.FieldRow)(target));
                return;

            case 6:
                this.row1 = ((MonopolyWPFApp.FieldRow)(target));
                return;

            case 7:
                this.row2 = ((MonopolyWPFApp.FieldRow)(target));
                return;

            case 8:
                this.row3 = ((MonopolyWPFApp.FieldRow)(target));
                return;

            case 9:
                this.playerDataRow = ((MonopolyWPFApp.PlayerDataRow)(target));
                return;

            case 10:
                this.actionRow = ((MonopolyWPFApp.ActionRow)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
        private void SetPlayersOnBigField(BigField bigField, int position)
        {
            if (_game.PlayerPos.Count() >= 1 && _game.PlayerPos[_game.Players[0]] == position)
            {
                bigField.Player1.Visibility = Visibility.Visible;
            }
            else
            {
                bigField.Player1.Visibility = Visibility.Hidden;
            }

            if (_game.PlayerPos.Count() >= 2 && _game.PlayerPos[_game.Players[1]] == position)
            {
                bigField.Player2.Visibility = Visibility.Visible;
            }
            else
            {
                bigField.Player2.Visibility = Visibility.Hidden;
            }

            if (_game.PlayerPos.Count() >= 3 && _game.PlayerPos[_game.Players[2]] == position)
            {
                bigField.Player3.Visibility = Visibility.Visible;
            }
            else
            {
                bigField.Player3.Visibility = Visibility.Hidden;
            }

            if (_game.PlayerPos.Count() >= 4 && _game.PlayerPos[_game.Players[3]] == position)
            {
                bigField.Player4.Visibility = Visibility.Visible;
            }
            else
            {
                bigField.Player4.Visibility = Visibility.Hidden;
            }
        }