コード例 #1
0
 private String GetNameForItem(BaseItem item)
 {
     if (item == null)
     {
         return("");
     }
     if (item is TypeItem)
     {
         TypeItem ti = (TypeItem)item;
         return(ti.GetParentAssemblyID() + "\r\n" + item.Name + "\r\n\r\n" + GetTextWithParent(ti.FullName));
     }
     return(item.Name);
 }
コード例 #2
0
        private Color GetColorForNode(BaseItem _item, Color _defcolor)
        {
            Color    color = _defcolor;
            TypeItem ti    = _item as TypeItem;

            if (ti != null)
            {
                String sname = ti.GetParentAssemblyID();
                uint   crc32 = CRC32Class.obj.GetCrc24ForString(sname);
                color = Color.FromArgb((int)crc32);
                color = Color.FromArgb(color.R % 200 + 50, color.G % 200 + 50, color.B % 200 + 50);
            }

            return(color);
        }