public void OnGameTypeChange(CustomBattleGameType gameType) { this.MapSearchResults.Clear(); switch (gameType) { case CustomBattleGameType.Battle: this.IsCurrentMapSiege = false; this._availableMaps = this._battleMaps; break; case CustomBattleGameType.Village: this.IsCurrentMapSiege = false; this._availableMaps = this._villageMaps; break; case CustomBattleGameType.Siege: this.IsCurrentMapSiege = true; this._availableMaps = this._siegeMaps; break; } foreach (MapItemVM availableMap in this._availableMaps) { this.MapSearchResults.Add(availableMap); } this.SelectedMap = this._availableMaps[this._availableMaps.Count - 1]; this._searchText = new TextObject("{=7i1vmgQ9}Select a Map").ToString(); this.OnPropertyChanged("SearchText"); }
private void OnGameTypeChange(CustomBattleGameType gameType) => this.MapSelectionGroup.OnGameTypeChange(gameType);
public GameTypeItemVM(string gameTypeName, CustomBattleGameType gameType) : base(gameTypeName) { this.GameType = gameType; }