UIPermission.Window 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
사용 권한이 나타내는 창 액세스를 가져오거나 설정합니다.
public:
property System::Security::Permissions::UIPermissionWindow Window { System::Security::Permissions::UIPermissionWindow get(); void set(System::Security::Permissions::UIPermissionWindow value); };
public System.Security.Permissions.UIPermissionWindow Window { get; set; }
member this.Window : System.Security.Permissions.UIPermissionWindow with get, set
Public Property Window As UIPermissionWindow
속성 값
UIPermissionWindow 값 중 하나입니다.
예제
다음 코드 예제에서는 Window 속성입니다. 이 예제는에 대해 제공 된 큰 예제의 일부는 UIPermission 클래스입니다.
// IsSubsetOf determines whether the current permission is a subset of the specified permission.
void IsSubsetOfDemo()
{
Console::WriteLine("\n********************** IsSubsetOf() Demo **********************\n");
UIPermission ^ uiPerm1 = gcnew UIPermission(UIPermissionWindow::SafeTopLevelWindows);
UIPermission ^ uiPerm2 = gcnew UIPermission(UIPermissionWindow::SafeSubWindows);
Console::WriteLine(" {0} is {1}a subset of {2} ", uiPerm1->Window,
uiPerm1->IsSubsetOf(uiPerm2)?"":"not ", uiPerm2->Window);
Console::WriteLine(" {0} is {1}a subset of {2} ", uiPerm2->Window,
uiPerm2->IsSubsetOf(uiPerm1)?"":"not ", uiPerm1->Window);
uiPerm1 = gcnew UIPermission(UIPermissionClipboard::AllClipboard);
uiPerm2 = gcnew UIPermission(UIPermissionClipboard::OwnClipboard);
Console::WriteLine(" {0} is {1}a subset of {2} ", uiPerm1->Clipboard,
uiPerm1->IsSubsetOf(uiPerm2)?"":"not ", uiPerm2->Clipboard);
Console::WriteLine(" {0} is {1}a subset of {2} ", uiPerm2->Clipboard,
uiPerm2->IsSubsetOf(uiPerm1)?"":"not ", uiPerm1->Clipboard);
}
// IsSubsetOf determines whether the current permission is a subset of the specified permission.
private static void IsSubsetOfDemo()
{
UIPermission uiPerm1 = new UIPermission(UIPermissionWindow.SafeTopLevelWindows);
UIPermission uiPerm2 = new UIPermission(UIPermissionWindow.SafeSubWindows);
CheckIsSubsetOfWindow(uiPerm1, uiPerm2);
uiPerm1 = new UIPermission(UIPermissionClipboard.AllClipboard);
uiPerm2 = new UIPermission(UIPermissionClipboard.OwnClipboard);
CheckIsSubsetOfClipBoard(uiPerm1, uiPerm2);
}
private static void CheckIsSubsetOfWindow(UIPermission uiPerm1, UIPermission uiPerm2)
{
if (uiPerm1.IsSubsetOf(uiPerm2))
{
Console.WriteLine(uiPerm1.Window.ToString() + " is a subset of " +
uiPerm2.Window.ToString());
}
else
{
Console.WriteLine(uiPerm1.Window.ToString() + " is not a subset of " +
uiPerm2.Window.ToString());
}
if (uiPerm2.IsSubsetOf(uiPerm1))
{
Console.WriteLine(uiPerm2.Window.ToString() + " is a subset of " +
uiPerm1.Window.ToString());
}
else
{
Console.WriteLine(uiPerm2.Window.ToString() + " is not a subset of " +
uiPerm1.Window.ToString());
}
}
private static void CheckIsSubsetOfClipBoard(UIPermission uiPerm1, UIPermission uiPerm2)
{
if (uiPerm1.IsSubsetOf(uiPerm2))
{
Console.WriteLine(uiPerm1.Clipboard.ToString() + " is a subset of " +
uiPerm2.Clipboard.ToString());
}
else
{
Console.WriteLine(uiPerm1.Clipboard.ToString() + " is not a subset of " +
uiPerm2.Clipboard.ToString());
}
if (uiPerm2.IsSubsetOf(uiPerm1))
{
Console.WriteLine(uiPerm2.Clipboard.ToString() + " is a subset of " +
uiPerm1.Clipboard.ToString());
}
else
{
Console.WriteLine(uiPerm2.Clipboard.ToString() + " is not a subset of " +
uiPerm1.Clipboard.ToString());
}
}
' IsSubsetOf determines whether the current permission is a subset of the specified permission.
Private Shared Sub IsSubsetOfDemo()
Dim uiPerm1 As New UIPermission(UIPermissionWindow.SafeTopLevelWindows)
Dim uiPerm2 As New UIPermission(UIPermissionWindow.SafeSubWindows)
CheckIsSubsetOfWindow(uiPerm1, uiPerm2)
uiPerm1 = New UIPermission(UIPermissionClipboard.AllClipboard)
uiPerm2 = New UIPermission(UIPermissionClipboard.OwnClipboard)
CheckIsSubsetOfClipBoard(uiPerm1, uiPerm2)
End Sub
Private Shared Sub CheckIsSubsetOfWindow(ByVal uiPerm1 As UIPermission, ByVal uiPerm2 As UIPermission)
If uiPerm1.IsSubsetOf(uiPerm2) Then
Console.WriteLine(uiPerm1.Window.ToString() + " is a subset of " + uiPerm2.Window.ToString())
Else
Console.WriteLine(uiPerm1.Window.ToString() + " is not a subset of " + uiPerm2.Window.ToString())
End If
If uiPerm2.IsSubsetOf(uiPerm1) Then
Console.WriteLine(uiPerm2.Window.ToString() + " is a subset of " + uiPerm1.Window.ToString())
Else
Console.WriteLine(uiPerm2.Window.ToString() + " is not a subset of " + uiPerm1.Window.ToString())
End If
End Sub
Private Shared Sub CheckIsSubsetOfClipBoard(ByVal uiPerm1 As UIPermission, ByVal uiPerm2 As UIPermission)
If uiPerm1.IsSubsetOf(uiPerm2) Then
Console.WriteLine(uiPerm1.Clipboard.ToString() + " is a subset of " + uiPerm2.Clipboard.ToString())
Else
Console.WriteLine(uiPerm1.Clipboard.ToString() + " is not a subset of " + uiPerm2.Clipboard.ToString())
End If
If uiPerm2.IsSubsetOf(uiPerm1) Then
Console.WriteLine(uiPerm2.Clipboard.ToString() + " is a subset of " + uiPerm1.Clipboard.ToString())
Else
Console.WriteLine(uiPerm2.Clipboard.ToString() + " is not a subset of " + uiPerm1.Clipboard.ToString())
End If
End Sub
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET