FeatureSupport 클래스

정의

현재 시스템에서 기능 정보를 검색하는 데 사용되는 static 메서드를 제공합니다.

public ref class FeatureSupport abstract : System::Windows::Forms::IFeatureSupport
public abstract class FeatureSupport : System.Windows.Forms.IFeatureSupport
type FeatureSupport = class
    interface IFeatureSupport
Public MustInherit Class FeatureSupport
Implements IFeatureSupport
상속
FeatureSupport
파생
구현

예제

다음 예제에서는 합니다 OSFeature 구현의 FeatureSupport 에 대 한 쿼리는 LayeredWindows 기능입니다. 버전을 확인 하는 경우 확인 null을 기능이 있는지 여부를 결정 합니다. 결과 텍스트 상자에 표시 됩니다. 이 코드에서는 가정 textBox1 생성 되어 폼에 배치 합니다.

private:
   void LayeredWindows()
   {
      // Gets the version of the layered windows feature.
      Version^ myVersion = OSFeature::Feature->GetVersionPresent(
         OSFeature::LayeredWindows );
      
      // Prints whether the feature is available.
      if ( myVersion != nullptr )
      {
         textBox1->Text = "Layered windows feature is installed.\n";
      }
      else
      {
         textBox1->Text = "Layered windows feature is not installed.\n";
      }

      
      // This is an alternate way to check whether a feature is present.
      if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is installed." );
      }
      else
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is not installed." );
      }
   }
private void LayeredWindows() {
   // Gets the version of the layered windows feature.
   Version myVersion = OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);

   // Prints whether the feature is available.
   if (myVersion != null)
      textBox1.Text = "Layered windows feature is installed." + '\n';
   else
      textBox1.Text = "Layered windows feature is not installed." + '\n';

   // This is an alternate way to check whether a feature is present.
   if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
      textBox1.Text += "Again, layered windows feature is installed.";
   else
      textBox1.Text += "Again, layered windows feature is not installed.";
}
Private Sub LayeredWindows()
    ' Gets the version of the layered windows feature.
    Dim myVersion As Version = _
       OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
       
    ' Prints whether the feature is available.
    If (myVersion IsNot Nothing) Then
        textBox1.Text = "Layered windows feature is installed." & _
           ControlChars.CrLf
    Else
        textBox1.Text = "Layered windows feature is not installed." & _
           ControlChars.CrLf
    End If 
    'This is an alternate way to check whether a feature is present.
    If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
        textBox1.Text &= "Again, layered windows feature is installed."
    Else
        textBox1.Text &= "Again, layered windows feature is not installed."
    End If
End Sub

설명

사용 하 여 합니다 static 클래스에 대 한 쿼리 기능 정보 때이 클래스의 메서드를 구현 합니다 IFeatureSupport 인터페이스입니다. 상속 하는 고, 그렇지 FeatureSupport 고유한 구현을 제공 합니다. 이 클래스의 구현을 참조 하세요. OSFeature합니다.

기능의 버전 번호를 가져오려면 호출 GetVersionPresent합니다. 호출 IsPresent 특정 기능 또는 기능의 버전을 설치 하는 경우를 결정 합니다.

구현자 참고

상속 하는 경우 FeatureSupport를 재정의 해야 합니다는 GetVersionPresent(String, String) 메서드. 이 메서드를 재정의할 때 매개 변수에 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String)feature 사용되는 클래스와 같은지 검사. 두 feature 매개 변수가 다른 경우 도 재정 IsPresent(String, String)의해야 합니다.

생성자

FeatureSupport()

FeatureSupport 클래스의 새 인스턴스를 초기화합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetVersionPresent(Object)

파생 클래스에서 재정의하는 경우 시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

GetVersionPresent(String, String)

시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

IsPresent(Object)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

IsPresent(Object, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

IsPresent(String, String)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

IsPresent(String, String, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보