public TextureSetFile(FormattingMetaData?md = null) { properties = new Dictionary <string, string>(); Collections = new ObservableCollection <TileTextureCollection>(); Collections.CollectionChanged += OnCollectionChanged; FormattingMetaData = md ?? new FormattingMetaData(); IncludeFiles = new ObservableCollection <TextureSetFile>(); IncludeFiles.CollectionChanged += OnIncludesChanged; Level = new BulkChangeObservableCollection <object>(); }
public TextureGrid(FormattingMetaData?md = null, TextureTileFormattingMetaData?tmd = null, TileTextureCollection?parent = null) { Parent = parent; Tiles = new BulkChangeObservableCollection <TextureTile>(); Tiles.CollectionChanged += OnTilesChanged; FormattingMetaData = md ?? new FormattingMetaData(); FormattingMetaData.PropertyChanged += OnFormattingDataChanged; TextureTileFormattingMetaData = tmd ?? new TextureTileFormattingMetaData(); TextureTileFormattingMetaData.PropertyChanged += OnFormattingDataChanged; CellMappings = new BulkChangeObservableCollection <CellMappingDeclaration>(); CellMappings.CollectionChanged += OnCellMappingsChanged; AddCellMappingCommand = ReactiveCommand.Create(OnAddCellMapping); RemoveCellMappingCommand = ReactiveCommand.Create <CellMappingDeclaration>(OnRemoveCellMapping); cellMappingsByKey = new Dictionary <string, CellMappingDeclaration>(); cellMappingsByKeyDirty = true; }