この記事は翻訳者によって翻訳されたものです。 記事の文章にポインターを重ねると、原文のテキストが表示されます。 |
訳文
原文
|
ProjectItem インターフェイス
プロジェクトの項目を表します。
アセンブリ: EnvDTE (EnvDTE.dll 内)
ProjectItem 型で公開されるメンバーは以下のとおりです。
| 名前 | 説明 | |
|---|---|---|
|
Collection | このプロパティをサポートしている ProjectItem オブジェクトを含む ProjectItems コレクションを取得します。 |
|
ConfigurationManager | この ProjectItem の ConfigurationManager オブジェクトを取得します。 |
|
ContainingProject | ProjectItem をホストするプロジェクトを取得します。 |
|
Document | 項目に関連付けられている Document があれば、そのオブジェクトを取得します。 |
|
DTE | トップレベルの機能拡張オブジェクトを取得します。 |
|
Extender | 要求された Extender がこのオブジェクトで利用できる場合は、その Extender を取得します。 |
|
ExtenderCATID | オブジェクトの Extender カテゴリ ID (CATID) を取得します。 |
|
ExtenderNames | オブジェクトで使用できる Extender のリストを取得します。 |
|
FileCodeModel | プロジェクト項目の FileCodeModel オブジェクトを取得します。 |
|
FileCount | ProjectItem に関連付けられているファイルの数を取得します。 |
|
FileNames | プロジェクト項目に関連付けられているファイルの完全パスと名前を取得します。 |
|
IsDirty | インフラストラクチャ。 マイクロソフト内部でのみ使用。 |
|
IsOpen | プロジェクト項目が特定の種類のビューで開いているかどうかを示す値を取得します。 |
|
Kind | オブジェクトの種類や型を表す GUID 文字列を取得します。 |
|
Name | オブジェクトの名前を取得または設定します。 |
|
Object | 実行時に名前でアクセスできるオブジェクトを取得します。 |
|
ProjectItems | オブジェクトの ProjectItems を取得します。 |
|
Properties | オブジェクトに属するすべてのプロパティのコレクションを取得します。 |
|
Saved | オブジェクトが最後に保存されたとき、または開かれたとき以降、変更されているかどうかを示す値を取得または設定します。 |
|
SubProject | プロジェクト項目がサブプロジェクトのルートである場合、SubProject プロパティは、そのサブプロジェクトの Project オブジェクトを返します。 |
| 名前 | 説明 | |
|---|---|---|
|
Delete | プロジェクトとストレージから項目を削除します。 |
|
ExpandView | ソリューション エクスプローラーのビューを展開して、プロジェクト項目を表示します。 |
|
Open | 指定したビューで ProjectItem を開きます。 |
|
Remove | コレクションからプロジェクト項目を削除します。 |
|
Save | プロジェクトまたはプロジェクト項目を保存します。 |
|
SaveAs | プロジェクト項目を保存します。 |
' Before running, create a new project or open an existing project. Sub ListProj() Dim proj As Project = DTE.ActiveSolutionProjects(0) Dim win As Window = _ DTE.Windows.Item(Constants.vsWindowKindCommandWindow) ListProjAux(proj.ProjectItems(), 0) End Sub Sub ListProjAux(ByVal projitems As ProjectItems, ByVal Level As Integer) Dim projitem As ProjectItem For Each projitem In projitems MsgBox("Project item: " & projitem.Name, Level) ' Recurse if the project item has sub-items... Dim projitems2 As ProjectItems projitems2 = projitem.ProjectItems Dim notsubcoll As Boolean = projitems2 Is Nothing If Not notsubcoll Then ListProjAux(projitems2, Level + 1) End If Next End Sub