我们来自江河梦小组(Scond Effect Group),工程用到gh,所以必须学习好GH插件,而大部分权威资料都来自国外,所以就组织组员翻译来自GH官方论坛的帖子,以便学习。下面是一篇David的帖子讲解有关GH开启屏面板的开发及应用,由林振华同学翻译。

Adding GHAlibrary icons to the Grasshopper banner

将GHA程序库的目录图标添加到GH横幅中

·       Send MessageView Discussions

Dear GHA developers,

亲爱的GHA 开发者们

as you may have noticed, Grasshopper 0.7 now support loaded library iconson the banner:

或许正如你所注意到的,GH0.7现在已经支持加载程序库中的图标横幅了(支持将图标加载到声明面板上)

In order to haveyour GHA library participate with this, you must declare a public class in yourproject (make sure you supply a constructorwith no arguments!) of type Grasshopper.Kernel.GH_AssemblyInfo

为了你的GHA 程序库参与进去,你必须声明一个公共类在你的Grasshopper.Kernel.GH_AssemblyInfo这个项目里(确保你能提供一个不带参数的构造函数)

为让你的GHA程序库使用这个面板,你必须在工程中声明一个Grasshopper.Kernel.GH_AssemblyInfo的公共类。

This is an abstractclass with a bunch of overridable readonly properties. If you override all thefields (especially AssemblyName and AssemblyIcon) your project will be includedon the banner. You should supply a 24 x24 pixel image.

这是一种带有一堆改变了只读属性的抽象类。如果你覆盖了所有的你将要包含在横幅里的项目的领域(特别是AssemblyName 和 AssemblyIcon)。你应该提供一个24 x24像素的图像里

这是一个带有很多可重载的只读属性的抽象类。如果你重载了所有字段,你的工程将出现在面板上面。

Here's a typicalVB.NET implementation:

下面是一个典型的VB.NET的实现(对接口的实现)

<code>PublicClass GH_GrasshopperLibraryInfo

Inherits GH_AssemblyInfo

Public OverridesReadOnly Property AssemblyName() As String

Get

Return"MyGHALibrary"

End Get

End Property

Public OverridesReadOnly Property AssemblyDescription() As String

Get

Return "MyTools for Grasshopper"

End Get

End Property

Public OverridesReadOnly Property AssemblyVersion() As String

Get

Return"1.0.0.0"

End Get

End Property

Public OverridesReadOnly Property AssemblyLicense() As GH_LibraryLicense

Get

ReturnGH_LibraryLicense.beta

End Get

End Property

Public OverridesReadOnly Property AssemblyIcon() As System.Drawing.Bitmap

Get

ReturnMy.Resources.MyLibraryIcon

End Get

End Property

Public OverridesReadOnly Property AuthorName() As String

Get

Return "MyCompany inc."

End Get

End Property

Public OverridesReadOnly Property AuthorContact() As String

Get

Return"http://www.MyGrasshopperTools.com"

End Get

End Property

EndClass</code>

The AuthorContactfield support multi-line strings, so feel free to add addresses, emails, phonenumbers etc. etc.

支持多行字符串的AuthorContact字段,所以您可以随意添加地址、电子邮件、电话号码等等

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Tags: Banner, Developer, GHA, Icon, Project

ShareTwitterFacebookFacebook

Views: 214

窗体顶端

▼ Reply to This

{#aria.rich_text_area}

{#advanced.toolbar}

Link

Image

Media

Paste as Plain Text

Bold

Italic

Strikethrough

Underline

Left

Center

Right

Blockquote

Unordered list

Ordered list

HTML Editor

Upload Files

Attach files (limit: 5MB)

§

§

§

Follow – Email me whenpeople reply

窗体底端

Replies to ThisDiscussion

Permalink Reply by Luis Fraguada on October 12,2010 at 6:09pm

Hey David, I will try to implementthis...one question, until now I only see a + character on the splash screen.Am I supposed to press that to see the icons? Is there a toggle somewhere?

嘿,大卫,我试着实现这个接口,…有一个问题,直到现在我在开启屏幕只看到了一个+字符。我应该点击它去看图标吗?是否在某个地方有个按钮控制这玩意?

窗体顶端

► Reply

Upload Files

Attach files (limit: 5MB)

窗体底端

§

Permalink Reply by taz on October 12,2010 at 7:18pm

Try Help > About... > togglethe "+" sign and gaze away!

§

窗体顶端

► Reply

Upload Files

Attach files (limit: 5MB)

窗体底端

§

Permalink Reply by Luis Fraguada on October 17,2010 at 8:27am

Nice!

§

窗体顶端

► Reply

窗体底端

Adding GHA library icons to the Grasshopper banner相关推荐

  1. banner中居中的page显示完全,其余显示百分之20--仿网易云首页轮播图

    效果图 导入依赖 //BannerViewPagerimplementation 'com.github.lzjin:ViewPagerGallery:1.3' UI布局 <com.lzj.ga ...

  2. 打开浏览器的包 node_如何发布可在浏览器和Node中使用的软件包

    打开浏览器的包 node When you create a package for others to use, you have to consider where your user will ...

  3. abortonerror_离线打包白屏

    同样的问题,gradle文件如下: android { compileSdkVersion 29 defaultConfig { multiDexEnabled true applicationId ...

  4. ios pusher使用_如何使用JavaScript和Pusher构建实时图

    ios pusher使用 by Rahat Khanna 通过拉哈特·汉娜 如何使用JavaScript和Pusher构建实时图 (How to build a Realtime Graph usin ...

  5. 【转】Win32 SDK 实现带图片的 Button 控件BM_SETIMAGE(Disable时图片不显示)

    在编写对话框程序时,希望能在按钮控件里显示一个小插图,如图所示 最初使用的方法是使用 BM_SETIMAGE 消息,但却不能达到满意的效果,在网上查了一通资料,最后终于实现了,现在把实现的方法记下来. ...

  6. uniapp延迟执行_uni-app android 调试运行首页一直卡在加载中

    参考官方文档,新建 uni-app android 工程后,按官方文档做完 从android studio 运行 app , 模拟器一直卡在如下页面 请问是为什么呢? 该如何排查问题呢? log: 0 ...

  7. Android中实现简单的仿京东详情页面

    前言: 之前做过一个商城项目,实现了类似京东的详情页,采用Coordinatorlatout+Appbarlayout+toolbar实现,实现的效果主要是沉浸式状态栏和标题栏,当图片滑动时标题栏和按 ...

  8. 一步一步实现一款实用的Android广告栏

     源码: BannerLayoutDemo 有图有真相: bannerLayoutDemo 开源界有一句很有名的话叫"不要重复发明轮子",当然,我今天的观点不是要反驳这句话,轮 ...

  9. Android一步一步实现一款实用的Android广告栏

    源码:BannerLayoutDemo 有图有真相: bannerLayoutDemo 开源界有一句很有名的话叫"不要重复发明轮子",当然,我今天的观点不是要反驳这句话,轮子理论给 ...

最新文章

  1. ashx页面中context.Session[xxx]获取不到值的解决办法
  2. 【自动驾驶】27.相机畸变_相机内参标定 整理
  3. 亲自己主动手从源代码 构建 Groovy 2.3.8 公布包
  4. EOS 帐户权限操作--你找不到的干货 (原创) 续集-EOS 3.0
  5. SAP在Kubernetes上打造的Kyma到底是个什么东东
  6. 软件构造学习笔记-第三周
  7. CSS中盒子模型、嵌套盒子中垂直外边距塌陷问题解决方案、标准盒模型、怪异盒模型
  8. DOM中Property与Attribute的区别
  9. Linux全攻略--Squid服务器配置与管理
  10. HTML5 — 知识总结篇《VIII》【媒体元素】
  11. PHP爬虫抓取网页数据
  12. 从项目中学习Django 天天生鲜---------前台首页分析
  13. 插入缺失InDel insertion deletion
  14. JdbcTemplate数据库连接耗尽问题排查
  15. 2012年寒假假期总结
  16. linux内核源码漫游,Linux内核源代码漫游
  17. 美国队长的工资 python代码-Python入门必学,用Python练习画个美队盾牌
  18. 陈艾盐:《春燕》百集访谈节目第三十九集
  19. 乔布斯对于flash的看法
  20. 《缠中说禅108课》85:逗庄家玩的一些杂史 3

热门文章

  1. 一个牛肉面加盟馆的生意经
  2. springboot报Invalid bound statement (not found):
  3. 北京交通大学计算机系英语,北京交通大学计算机专业排名,英语专业
  4. wegame登录cf显示服务器人数已满,《永恒之塔》Wegame区火爆 老端游焕发新生
  5. uniapp单页面背景音乐
  6. AHOI 2002 黑白瓷砖
  7. linux 日历 农历
  8. Python-Django毕业设计安卓仿网易云音乐客户端APP(程序+LW)
  9. 微信开发SDK支持小程序 ,Jeewx-Api 1.3.1 版本发布
  10. python画美国国旗,小白画法