Adding GHA library icons to the Grasshopper banner
来源:互联网 发布:sql语句中修改表结构 编辑:程序博客网 时间:2024/06/11 18:46
我们来自江河梦小组(Scond Effect Group),工程用到gh,所以必须学习好GH插件,而大部分权威资料都来自国外,所以就组织组员翻译来自GH官方论坛的帖子,以便学习。下面是一篇David的帖子讲解有关GH开启屏面板的开发及应用,由林振华同学翻译。
Adding GHAlibrary icons to the Grasshopper banner
将GHA程序库的目录图标添加到GH横幅中
- Posted by David Rutten on October 2, 2010 at 12:46pm inVB, C# and Python Coding
- 由David Rutten于2010年10月2日下午12:46在VB,C#和Python Coding中发布
· 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 typeGrasshopper.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
- Adding Icons to the System Tray
- Adding Icons to the System Tray
- Jump to Section Overview Usage Floating Action Icons Design Support Library Animating the Floating A
- Adding Controls to the Toolbar
- Adding the PPA to Ubuntu
- Adding Validation to the Model
- Adding a step to the Onepage Checkout
- SSIS: Adding Files To The Miscellaneous Folder
- Adding a step to the Onepage Checkout
- Adding Tracing Support to the Application
- Struts2 - Adding Properties to the pageContext
- Adding Friendly URL Mapping to the Portlet
- Adding new items to the Checklist
- Adding Python Information to the Windows Registry
- Adding a library/JAR to an Eclipse Android project
- Adding a library/JAR to an Eclipse Android project
- Grasshopper And the String
- 1的个数
- linux c 线程设置detached状态
- TiXml使用详解
- How to create a new game
- Visual Assist X的安装路径问题
- Adding GHA library icons to the Grasshopper banner
- python变量赋值不可更改,形参可赋新值
- Codeforces-347B
- win7_64位电脑下锐捷一双击…
- 安装虚拟机后电脑连不上网
- lubuntu如何从图形界面到字符界面…
- 主板电池放电和没电
- 转自----一招克死所有病毒 - mars…
- 特征匹配