void Open(string fileName) { if (String.IsNullOrEmpty(fileName)) { return; } CurrentFileName = fileName; byte[] data; using (var file = File.OpenRead(fileName)) { data = new byte[file.Length]; file.Read(data, 0, data.Length); } TileSet = new TileSetViewModel(MapSerializer.Instance.DeserializeMapTileSet(data)); }
void newBinding_Executed(object sender, ExecutedRoutedEventArgs e) { TileSet = new TileSetViewModel("Новый тайлсет", "Описание нового"); }