<target name="create-resources" depends="init">
<boo>
import System.IO
import System.Resources
import System.Windows.Forms from System.Windows.Forms
import System.Drawing from System.Drawing
def MapPath(path):
return Path.Combine(Project.BaseDirectory, path)
def CreateImageList():
imageList = ImageList()
images = (
"namespace.png",
"class.png",
"interface.png",
"enum.png",
"field.png",
"property.png",
"method.png"
)
for image in images:
fname = MapPath("resources/ClassBrowserIcons/${image}")
imageList.Images.Add(Image.FromFile(fname))
return imageList
using imageList=CreateImageList():
using writer=ResourceWriter(MapPath("build/BooExplorer.DocumentOutline.resources")):
writer.AddResource("_imageList", imageList.ImageStream)
</boo>
</target>