Пример #1
0
 public static ExampleAssetInfo FromToolboxExample(IToolboxExample example, int index)
 {
     return(new ExampleAssetInfo()
     {
         Index = index,
         DisplayName = example.DisplayName,
         Description = AssetInfoModel.GetDescription(example.GetType()),
         Categories = Enumerable.ToArray <CustomAssetCategoryPath>(AssetTypeHelper.GetCustomAssetCategoryPaths(example.GetType())),
         IsBrowable = AssetTypeHelper.IsTypeBrowsable(example.GetType()),
         SmallIcon = ExampleAssetInfo.CopyStream(example.GetImageStream(new Size(12.0, 12.0))),
         LargeIcon = ExampleAssetInfo.CopyStream(example.GetImageStream(new Size(24.0, 24.0)))
     });
 }