private void SetTileset(Tileset tileset) { _tileset = tileset; if (_tileset != null) { _observedTiles = new ObservableCollection <Tile>(_tileset); _observedProperties = new ObservableCollection <TileProperties>(_tileset.Properties); if (_tileset.Any()) { ChangeTile(_tileset.First()); } else { ChangeTile(null); } if (!File.Exists(_tileset.SheetPath.Absolute)) { ChangeSheet(); } ((App)App.Current).AnimateTileset(_tileset); } else { _observedTiles = new ObservableCollection <Tile>(); _observedProperties = new ObservableCollection <TileProperties>(); ChangeTile(null); } OnPropertyChanged("Tiles"); OnPropertyChanged("TileProperties"); OnPropertyChanged("SheetPath"); OnPropertyChanged("RelSheetPath"); }
private void SetTileset(Tileset tileset) { _tileset = tileset; if (_tileset != null) { _observedTiles = new ObservableCollection<Tile>(_tileset); _observedProperties = new ObservableCollection<TileProperties>(_tileset.Properties); if (_tileset.Any()) ChangeTile(_tileset.First()); else ChangeTile(null); if (!File.Exists(_tileset.SheetPath.Absolute)) { ChangeSheet(); } ((App)App.Current).AnimateTileset(_tileset); } else { _observedTiles = new ObservableCollection<Tile>(); _observedProperties = new ObservableCollection<TileProperties>(); ChangeTile(null); } OnPropertyChanged("Tiles"); OnPropertyChanged("TileProperties"); OnPropertyChanged("SheetPath"); OnPropertyChanged("RelSheetPath"); }