Beispiel #1
0
 private void FileEventManager_BeginGlobalRename(object sender, BeginGlobalRenameEventArgs e)
 {
     // If we're doing a global rename on a Pixmap, schedule affected Tilemaps
     // for an automatic recompile as soon as we're done with the rename.
     if (e.IsResource && e.Content.Is <Pixmap>())
     {
         List <Tileset> affectedTilesets = new List <Tileset>();
         affectedTilesets.AddRange(this.GetRecompileTilesets(e.OldContent.As <Pixmap>()));
         affectedTilesets.AddRange(this.GetRecompileTilesets(e.Content.As <Pixmap>()));
         foreach (Tileset tileset in affectedTilesets)
         {
             this.recompileOnChange.Add(tileset);
         }
     }
 }
Beispiel #2
0
 private void FileEventManager_BeginGlobalRename(object sender, BeginGlobalRenameEventArgs e)
 {
     // If we're doing a global rename on a Pixmap, schedule affected Tilemaps
     // for an automatic recompile as soon as we're done with the rename.
     // This will deal with cases where renaming an unrelated Pixmap into one
     // that is referenced by a Tileset, but missing, so the Tileset updates.
     if (!e.IsDirectory && e.Content.Is <Pixmap>())
     {
         List <Tileset> affectedTilesets = new List <Tileset>();
         affectedTilesets.AddRange(this.GetRecompileTilesets(e.OldContent.As <Pixmap>()));
         affectedTilesets.AddRange(this.GetRecompileTilesets(e.Content.As <Pixmap>()));
         foreach (Tileset tileset in affectedTilesets)
         {
             this.recompileOnChange.Add(tileset);
         }
     }
 }