この記事は翻訳者によって翻訳されたものです。 記事の文章にポインターを重ねると、原文のテキストが表示されます。 |
訳文
原文
|
WindowConfigurations インターフェイス
WindowConfigurations コレクションには、その環境に作成されたすべての名前付きウィンドウ構成が含まれます。
アセンブリ: EnvDTE (EnvDTE.dll 内)
WindowConfigurations 型で公開されるメンバーは以下のとおりです。
| 名前 | 説明 | |
|---|---|---|
|
ActiveConfigurationName | 現在アクティブなウィンドウ構成の名前を取得します。 |
|
Count | コレクション内のオブジェクトの数を示す値を取得します。 |
|
DTE | トップレベルの機能拡張オブジェクトを取得します。 |
|
Parent | WindowConfigurations コレクションの直接の親オブジェクトを取得します。 |
| 名前 | 説明 | |
|---|---|---|
|
Add | 現在のウィンドウの配置状態に基づいて新しい名前付きウィンドウ構成を作成し、その構成を WindowConfigurations コレクションに追加して、今後の呼び出しのために保持します。 |
|
GetEnumerator() | コレクションを反復処理する列挙子を返します。 (IEnumerable から継承されます。) |
|
GetEnumerator() | コレクション内の項目の列挙体を取得します。 |
|
Item | WindowConfigurations コレクションのインデックス付きメンバーを返します。 |
void WinConfigExample1(_DTE dte) { // Set references to all necessary objects. WindowConfigurations colWinConfig; WindowConfiguration objWinConfig; colWinConfig = dte.WindowConfigurations; MessageBox.Show("Number of configurations: " + colWinConfig.Count); // List all saved named window configurations. FillMsg(colWinConfig); // Create a new window configuration. objWinConfig = colWinConfig.Add("NewLayout"); FillMsg(colWinConfig); // Get rid of the new window configuration. objWinConfig.Delete(); MessageBox.Show("Number of configurations: " + colWinConfig.Count); FillMsg(colWinConfig); } void FillMsg(WindowConfigurations colWinConfig ) { // Lists all currently available named window configurations. int lCtr; string strMsg = null; for (lCtr = 1; lCtr < colWinConfig.Count + 1; lCtr ++) { strMsg = strMsg + "Configuration name " + lCtr + ": " + colWinConfig.Item(lCtr).Name + "\n"; } strMsg = "Current Configurations: \n" + strMsg; MessageBox.Show(strMsg); }