public MapBackground GetMapBackground() { if (maps.Contains((String)MapsList.SelectedItem)) { return((MapBackground)maps[(String)MapsList.SelectedItem]); } else { IMGEntry entry = MapEditor.file.Directory.GetIMG("Map/" + (String)MapsList.SelectedItem); if (entry == null) { maps.Add((String)MapsList.SelectedItem, null); return(null); } else { MapBackground bg = new MapBackground(); MapBackground.Object = entry; lock (MapEditor.MapLock) bg.Load(); maps.Add((String)MapsList.SelectedItem, bg); return(bg); } } }
public MapBackground GetMapBackground() { if (maps.Contains((String)MapsList.SelectedItem)) { return (MapBackground)maps[(String)MapsList.SelectedItem]; } else { IMGEntry entry = MapEditor.file.Directory.GetIMG("Map/" + (String)MapsList.SelectedItem); if (entry == null) { maps.Add((String)MapsList.SelectedItem, null); return null; } else { MapBackground bg = new MapBackground(); MapBackground.Object = entry; lock(MapEditor.MapLock) bg.Load(); maps.Add((String)MapsList.SelectedItem, bg); return bg; } } }