对话框中显示的转换器

对话框中显示的转换器

本文介绍了如何提供在“转换"对话框中显示的转换器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2010(及更高版本)在文件">打开"菜单中具有转换"命令.我认为这是将自定义项目转换器集成到IDE中的正确位置.

Visual Studio 2010 (and newer versions) has the Convert command in the File > Open menu. I assume this is the right place where custom project converters should be integrated into the IDE.

此菜单命令显示一个对话框,用户可以在其中选择转换器...

This menu command shows a dialog where the user can select a converter...

我想知道一个软件包如何提供一个转换器,该转换器将显示在该对话框中.

I would like to know how a package can provide a converter, that shows up in that dialog.

推荐答案

它没有记录恕我直言(至少我找不到它).它基于位于C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE(对于Visual Studio 2010)中名为convert.dir的文件的内容.该文件可能不存在,或大小可能为0.

It's not documented IMHO (at least I can't find it anywhere). It's based on the content of a file called convert.dir located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE (for Visual Studio 2010). This file may not exist or its size may be 0.

定义后,它包含一个行列表,每行对应一个转换器.行格式是5个值,以"|"分隔像这样的人物;

When defined, it contains a list of lines, each line corresponding to a converter. The line format is 5 values separated by the '|' character, like this;

relative path to .vsz|relative icon path|localized name|localized description|priority

例如,在旧的Visual Studio 2008安装中,这是Convert.dir的内容:

As an exemple, in my old Visual Studio 2008 installation, here is the content of Convert.dir:

vsz\VJToCSharp.vsz|images\VJToCSharp.bmp|#VJMigrationWizard.VJMigrationWizard,MWZ_ConverterName|#VJMigrationWizard.VJMigrationWizard,MWZ_ConverterDescription|1
vsz\vb6tovb7.vsz|images\VB6ToVB7.bmp|#MigrationWizard.MigrationWizard,MWZ_ConverterName|#MigrationWizard.MigrationWizard,MWZ_ConverterDescription|1

.vsz文件是标准的 Visual Studio向导文件.

The .vsz file is a standard Visual Studio wizard file.

这篇关于如何提供在“转换"对话框中显示的转换器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 09:12