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) 해야 합니다. 이 메서드를 재정의할 때 매개 변수에 feature 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String) 에 사용되는 클래스와 같은지 확인합니다. 두 feature 매개 변수가 다른 경우 재정의해야 합니다 IsPresent(String, String).

생성자

Name Description
FeatureSupport()

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

메서드

Name Description
Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

GetVersionPresent(String, String)

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

IsPresent(Object, Version)

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

IsPresent(Object)

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

IsPresent(String, String, Version)

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

IsPresent(String, String)

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

MemberwiseClone()

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

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

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

(다음에서 상속됨 Object)

적용 대상

추가 정보