Nexus.Client.ModManagement.Scripting.XmlScript.ConditionStateManager.GetImage C# (CSharp) Method

GetImage() public method

Gets the specified image from the mod against which the script is running.
public GetImage ( string p_strPath ) : Image
p_strPath string The path to the image in the mod to retrieve.
return Image
		public Image GetImage(string p_strPath)
		{
			if (String.IsNullOrEmpty(p_strPath))
				return null;
			if (!m_dicImageCache.ContainsKey(p_strPath))
			{
				try
				{
					m_dicImageCache[p_strPath] = new ExtendedImage(Mod.GetFile(p_strPath));
				}
				catch (FileNotFoundException)
				{
					return Properties.Resources.notFoundJPG;
				}
			}
			return m_dicImageCache[p_strPath];
		}
	}