<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. -->
<Rule Name="Application" Description="指定專案的應用程式設定和屬性。" DisplayName="應用程式" PageTemplate="generic" Order="100" xmlns="http://schemas.microsoft.com/build/2009/properties">
  <Rule.Categories>
    <Category Name="General" DisplayName="一般" Description="應用程式的一般設定。" />
    <Category Name="Resources" DisplayName="資源" Description="應用程式的資源設定。" />
  </Rule.Categories>
  <Rule.DataSource>
    <DataSource Persistence="ProjectFile" SourceOfDefaultValue="AfterContext" HasConfigurationCondition="False" />
  </Rule.DataSource>
  <StringProperty Name="AssemblyName" DisplayName="組件名稱" Description="指定要儲存組件資訊清單的輸出檔案名稱。" Category="General" />
  <StringProperty Name="RootNamespace" DisplayName="預設命名空間" Description="指定新增到專案之檔案的基底命名空間。" Category="General" />
  <BoolProperty Name="TargetMultipleFrameworks" DisplayName="適用於多個架構" Description="建置此專案用於多個目標架構。" HelpUrl="https://go.microsoft.com/fwlink/?linkid=2147236" Category="General">
    <BoolProperty.DataSource>
      <DataSource Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </BoolProperty.DataSource>
  </BoolProperty>
  <DynamicEnumProperty Name="TargetFramework" DisplayName="目標 Framework" Description="指定應用程式的目標 .NET 版本。根據電腦上所安裝的 .NET 版本，這個選項可能會有不同的值。" HelpUrl="https://go.microsoft.com/fwlink/?linkid=2147236" Category="General" EnumProvider="SupportedTargetFrameworksEnumProvider" MultipleValuesAllowed="False">
    <DynamicEnumProperty.Metadata>
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(not (evaluated "Application" "TargetMultipleFrameworks"))</NameValuePair.Value>
      </NameValuePair>
      <NameValuePair Name="DependsOn" Value="Application::TargetMultipleFrameworks" />
    </DynamicEnumProperty.Metadata>
  </DynamicEnumProperty>
  <StringProperty Name="TargetFrameworks" DisplayName="目標架構" Description="指定此專案適用之架構的清單 (以分號分隔)。" HelpUrl="https://go.microsoft.com/fwlink/?linkid=2147236" Category="General">
    <StringProperty.DataSource>
      <DataSource Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </StringProperty.DataSource>
    <StringProperty.Metadata>
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(evaluated "Application" "TargetMultipleFrameworks")</NameValuePair.Value>
      </NameValuePair>
      <NameValuePair Name="DependsOn" Value="Application::TargetMultipleFrameworks" />
    </StringProperty.Metadata>
  </StringProperty>
  <StringProperty Name="InstallOtherFrameworks" DisplayName="安裝其他架構">
    <StringProperty.DataSource>
      <DataSource PersistedName="InstallOtherFrameworks" Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </StringProperty.DataSource>
    <StringProperty.ValueEditors>
      <ValueEditor EditorType="LinkAction">
        <ValueEditor.Metadata>
          <NameValuePair Name="Action" Value="URL" />
          <NameValuePair Name="URL" Value="http://go.microsoft.com/fwlink/?LinkID=287120" />
        </ValueEditor.Metadata>
      </ValueEditor>
    </StringProperty.ValueEditors>
  </StringProperty>
  <EnumProperty Name="OutputType" DisplayName="輸出類型" Description="指定要建置的應用程式類型。" Category="General">
    <EnumValue Name="Library" DisplayName="類別庫" />
    <EnumValue Name="Exe" DisplayName="主控台應用程式" />
    <EnumValue Name="WinExe" DisplayName="Windows 應用程式" />
  </EnumProperty>
  <DynamicEnumProperty Name="StartupObject" DisplayName="啟始物件" Description="定義應用程式載入時要呼叫的進入點。通常會設定為應用程式的主表單，或應用程式啟動時應執行的 'Main' 程序。類別庫未定義進入點。" Category="General" EnumProvider="StartupObjectsEnumProvider">
    <DynamicEnumProperty.Metadata>
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(ne (evaluated "Application" "OutputType") "Library")</NameValuePair.Value>
      </NameValuePair>
    </DynamicEnumProperty.Metadata>
  </DynamicEnumProperty>
  <EnumProperty Name="ResourceSpecificationKind" DisplayName="資源" Description="指定要應用程式資源的管理方式。" Category="Resources">
    <EnumProperty.DataSource>
      <DataSource PersistedName="ResourceSpecificationKind" Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </EnumProperty.DataSource>
    <EnumValue Name="IconAndManifest" DisplayName="圖示與資訊清單" />
    <EnumValue Name="ResourceFile" DisplayName="資源檔案" />
  </EnumProperty>
  <StringProperty Name="ApplicationIcon" DisplayName="圖示" Category="Resources" Description="設定您程式圖示要使用的 .ico 檔案。" Subtype="file">
    <StringProperty.Metadata>
      <NameValuePair Name="DependsOn" Value="Application::ResourceSpecificationKind" />
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(eq (evaluated "Application" "ResourceSpecificationKind") "IconAndManifest")</NameValuePair.Value>
      </NameValuePair>
    </StringProperty.Metadata>
  </StringProperty>
  <EnumProperty Name="ApplicationManifestKind" DisplayName="資訊清單" Description="選取當應用程式在 Windows Vista 或更新版本上之使用者帳戶控制 (UAC) 下執行時的資訊清單產選項。這些選項包括 [預設資訊清單]、[無資訊清單] 或 [專案提供的自訂資訊清單]。" Category="Resources">
    <EnumProperty.DataSource>
      <DataSource PersistedName="ApplicationManifestKind" Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </EnumProperty.DataSource>
    <EnumProperty.Metadata>
      <NameValuePair Name="DependsOn" Value="Application::ResourceSpecificationKind" />
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(eq (evaluated "Application" "ResourceSpecificationKind") "IconAndManifest")</NameValuePair.Value>
      </NameValuePair>
    </EnumProperty.Metadata>
    <EnumValue Name="DefaultManifest" DisplayName="用預設設定嵌入資訊清單" />
    <EnumValue Name="NoManifest" DisplayName="建立無資訊清單應用程式" />
    <EnumValue Name="CustomManifest" DisplayName="使用自訂資訊清單" />
  </EnumProperty>
  <StringProperty Name="ApplicationManifestPath" DisplayName="資訊清單路徑" Description="自訂資訊清單檔案的路徑。" Category="Resources" Subtype="file">
    <StringProperty.DataSource>
      <DataSource PersistedName="ApplicationManifestPath" Persistence="ProjectFileWithInterception" HasConfigurationCondition="False" />
    </StringProperty.DataSource>
    <StringProperty.Metadata>
      <NameValuePair Name="DependsOn" Value="Application::ResourceSpecificationKind;Application::ApplicationManifestKind" />
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>
          (and 
            (eq (evaluated "Application" "ApplicationManifestKind") "CustomManifest")
            (eq (evaluated "Application" "ResourceSpecificationKind") "IconAndManifest"))
        </NameValuePair.Value>
      </NameValuePair>
    </StringProperty.Metadata>
  </StringProperty>
  <StringProperty Name="Win32Resource" DisplayName="資源檔案" Description="指定專案的資源檔案。" HelpUrl="https://go.microsoft.com/fwlink/?linkid=2147078" Category="Resources" Subtype="file">
    <StringProperty.Metadata>
      <NameValuePair Name="DependsOn" Value="Application::ResourceSpecificationKind" />
      <NameValuePair Name="VisibilityCondition">
        <NameValuePair.Value>(eq (evaluated "Application" "ResourceSpecificationKind") "ResourceFile")</NameValuePair.Value>
      </NameValuePair>
    </StringProperty.Metadata>
  </StringProperty>
</Rule>