示例#1
0
        public override GridItemBase GetGridItem(IXenObject o)
        {
            if (o is Folder)
            {
                return(NewStringItem(String.Empty));  // CA-28300.5
            }
            GridItemBase item;

            if (CheckVMTools(o, out item))
            {
                return(item);
            }

            if (PropertyAccessors.Get(property)(o) == null)
            {
                return(NewStringItem(new PropertyWrapper(textProperty, o)));
            }

            return(NewBarItem(
                       new PropertyWrapper(textProperty, o),
                       new ImageDelegate(delegate()
            {
                int?i = (int?)PropertyAccessors.Get(rankProperty)(o);
                if (i == null)
                {
                    return null;
                }

                return HelpersGUI.GetProgressImage(i.Value);
            })));
        }