private void RecurseHighlightExtensions(Rgba32Color *bitmap, FileItemBase parent, Rgba32Color color, string extension)
        {
            List <FileItemBase> children = parent.Children;
            int count = children.Count;

            for (int i = 0; i < count; i++)
            {
                FileItemBase child = children[i];
                Rectangle2S  rc    = child.Rectangle;
                if (rc.Width > 0 && rc.Height > 0)
                {
                    if (child.IsLeaf)
                    {
                        if (child.Extension == extension)
                        {
                            HighlightRectangle(bitmap, rc, color);
                        }
                    }
                    else
                    {
                        RecurseHighlightExtensions(bitmap, child, color, extension);
                    }
                }
            }
        }
Example #2
0
 /// <summary>Casts the <see cref="Rectangle2S"/> to a <see cref="WpfRect"/>.</summary>
 public static WpfRect ToWpfRect(this Rectangle2S rect)
 {
     return(new WpfRect(rect.X, rect.Y, rect.Width, rect.Height));
 }