Microsoft Visual Studio 2005 Unleashed翻译请教【2】
2007-03-27 22:35
591 查看
(You edit macro code using the code editor just as you would to edit any other document with Visual Studio.) To rework this macro, you can start by establishing a recursive helper routine that takes in a UIHierarchyItem object, toggles its Expanded property to True, and calls itself for each sub item found in the UIHierarchyItems collection:
(
For Each subNode As UIHierarchyItem In node.UIHirerarchyItems
ExpandNodes(subNode)
Next
node.UIHierarchyItems.Expanded = True
)
【说明】括号中为辅助理解。文中并没有给出递归程序的签名,但是很容易猜出应该是:Sub ExpandNodes(UIHierarchyItem node)。
【难点】如何组织成符合汉语习惯的语序。
【目前翻译】(使用宏代码编辑器编辑宏和在Visual Studio中编辑其他文档的方式没什么两样。)回到刚才的宏,首先你可以创建一个递归的助手(工具??)程序,在这个程序以UIHierarchyItem对象为参数(后面未贴出的部分代码中显示确实将UIHierarchyItem作为参数,这里作者使用take in,也暗示了这一点),把它的Expanded属性(译者注:实际上是它的子项的集合UIHierarchyItems的属性)设置为True,并且对其子项集合UIHierarchyItems中的每一项(译者注:也是UIHierarchyItem)递归的调用这个程序。
Then, to kick things off, you need a parent, controlling routing that instantiates a window object (representing the Solution Explorer) and grabs the root-level UIHierarchy object from the window.
【说明】继续讨论上一段中的递归程序。
【难点】仍然是语言习惯问题。
【目前翻译】所以,我们需要一个控制程序来启动这个递归程序,一方面我们需要从这个控制程序获得窗口对象(即解决方案资源管理器),同时我们还需要从这个窗口中获得UIHierarchy对象的根节点。
(
For Each subNode As UIHierarchyItem In node.UIHirerarchyItems
ExpandNodes(subNode)
Next
node.UIHierarchyItems.Expanded = True
)
【说明】括号中为辅助理解。文中并没有给出递归程序的签名,但是很容易猜出应该是:Sub ExpandNodes(UIHierarchyItem node)。
【难点】如何组织成符合汉语习惯的语序。
【目前翻译】(使用宏代码编辑器编辑宏和在Visual Studio中编辑其他文档的方式没什么两样。)回到刚才的宏,首先你可以创建一个递归的助手(工具??)程序,在这个程序以UIHierarchyItem对象为参数(后面未贴出的部分代码中显示确实将UIHierarchyItem作为参数,这里作者使用take in,也暗示了这一点),把它的Expanded属性(译者注:实际上是它的子项的集合UIHierarchyItems的属性)设置为True,并且对其子项集合UIHierarchyItems中的每一项(译者注:也是UIHierarchyItem)递归的调用这个程序。
Then, to kick things off, you need a parent, controlling routing that instantiates a window object (representing the Solution Explorer) and grabs the root-level UIHierarchy object from the window.
【说明】继续讨论上一段中的递归程序。
【难点】仍然是语言习惯问题。
【目前翻译】所以,我们需要一个控制程序来启动这个递归程序,一方面我们需要从这个控制程序获得窗口对象(即解决方案资源管理器),同时我们还需要从这个窗口中获得UIHierarchy对象的根节点。
相关文章推荐
- Microsoft Visual Studio 2005 Unleashed翻译请教【3】
- Microsoft Visual Studio 2005 Unleashed翻译请教【1】
- Microsoft Visual Studio 2005 Unleashed开始翻译,并征集中文版书名
- Microsoft Visual Studio 2005 Unleashed
- Microsoft Visual Studio 2005 Unleashed
- Microsoft Visual Studio .NET 2005的更新
- 在Microsoft Visual Studio 2005上安装.net 3.0开发环境(含开发环境下载地址)
- Microsoft Visual Studio 2005 简体中文专业版含MSDN2005(DVD)[ISO]
- Microsoft Visual Studio 2005中使用水晶报表
- Microsoft Visual Studio 2005 怎么更改安装路径?
- 从Microsoft Visual Studio.NET 2002/2003到Microsoft Visual Studio 2005(发展趋势)
- Microsoft Visual Studio 2005 BETA2资源最新谍报
- Microsoft Visual Studio 2005中使用水晶报表(非常棒)
- 关于 Microsoft Visual Studio 2005 无法调试应用程序的解决方法
- Microsoft Visual Studio 2005 试图运行项目时出错: 无法启动调试。绑定句柄无效。
- Microsoft Visual Studio 2005 简体中文专业版(DVD)下载地址
- Microsoft Visual Studio 2005中使用水晶报表 winform c# asp.net水晶报表
- Microsoft Visual Studio 2003 2005 2008 2010 2012 下载
- 在Microsoft Visual Studio 2005上安装.net3.0开发环境(含开发环境下
- Microsoft Visual Studio 2005 Team Suite 简体