string GetNodeImageUrl (string shape, ImageStyle imageStyle)
{
if (ShowLines) {
if (!String.IsNullOrEmpty (LineImagesFolder))
return ResolveClientUrl (LineImagesFolder + "/" + shape + ".gif");
} else {
if (imageStyle != null) {
if (shape == "plus") {
if (!String.IsNullOrEmpty (imageStyle.Expand))
return GetNodeIconUrl (imageStyle.Expand);
} else if (shape == "minus") {
if (!String.IsNullOrEmpty (imageStyle.Collapse))
return GetNodeIconUrl (imageStyle.Collapse);
} else if (shape == "noexpand") {
if (!String.IsNullOrEmpty (imageStyle.NoExpand))
return GetNodeIconUrl (imageStyle.NoExpand);
}
} else {
if (shape == "plus") {
if (!String.IsNullOrEmpty (ExpandImageUrl))
return ResolveClientUrl (ExpandImageUrl);
} else if (shape == "minus") {
if (!String.IsNullOrEmpty (CollapseImageUrl))
return ResolveClientUrl (CollapseImageUrl);
} else if (shape == "noexpand") {
if (!String.IsNullOrEmpty (NoExpandImageUrl))
return ResolveClientUrl (NoExpandImageUrl);
}
}
if (!String.IsNullOrEmpty (LineImagesFolder))
return ResolveClientUrl (LineImagesFolder + "/" + shape + ".gif");
}
return Page.ClientScript.GetWebResourceUrl (typeof (TreeView), "TreeView_" + shape + ".gif");
}