Choose a good image at the start of the window being opened.
This commit is contained in:
@ -8,6 +8,7 @@ using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using System.Resources;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
namespace SpriteLibrary
|
||||
{
|
||||
@ -203,6 +204,25 @@ namespace SpriteLibrary
|
||||
return MyImage;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of the image names in the Properties.Resources
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<string> GetImageNames()
|
||||
{
|
||||
List<string> Names = new List<string>();
|
||||
if (myResourceManager == null) return Names;
|
||||
ResourceSet Rs = myResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
|
||||
foreach (DictionaryEntry entry in Rs)
|
||||
{
|
||||
string resourceKey = entry.Key.ToString(); //The name
|
||||
object resource = entry.Value; //The object itself
|
||||
if (resource is Image) Names.Add(resourceKey);
|
||||
}
|
||||
return Names;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This code is mostly handled by the sprite controller. If the SpriteController has a SpriteDatabase
|
||||
/// registered, then it will automatically ask the SpriteDatabase to create any sprite it does not already
|
||||
|
Reference in New Issue
Block a user