public Bitmap GetPicture(ItemType item)
{
if (item == null) { item = new ItemType(""); }
if (!this._picture.ContainsKey(item.ID)) {
String path = item.ToString();
char sep = System.IO.Path.DirectorySeparatorChar;
string exePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string imgPath = exePath + sep + "Resources" + sep;
try {
Bitmap map = new Bitmap(imgPath + path.ToLower() + ".png");
this._picture.Add(item.ID, map);
}
catch (Exception e) {
return null;
}
}
return this._picture[item.ID];
}