mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-09-18 17:48:18 +08:00
初始化
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using CPF.Mac.ObjCRuntime;
|
||||
using System;
|
||||
|
||||
namespace CPF.Mac.Foundation
|
||||
{
|
||||
public class NSUndoManagerCloseUndoGroupEventArgs : NSNotificationEventArgs
|
||||
{
|
||||
private static IntPtr k0;
|
||||
|
||||
public bool? Discardable
|
||||
{
|
||||
get
|
||||
{
|
||||
if (k0 == IntPtr.Zero)
|
||||
{
|
||||
k0 = Dlfcn.GetIntPtr(Libraries.Foundation.Handle, "NSUndoManagerGroupIsDiscardableKey");
|
||||
}
|
||||
if (base.Notification.UserInfo == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
IntPtr intPtr = base.Notification.UserInfo.LowlevelObjectForKey(k0);
|
||||
if (intPtr == IntPtr.Zero)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
using (NSNumber nSNumber = new NSNumber(intPtr))
|
||||
{
|
||||
return nSNumber.BoolValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NSUndoManagerCloseUndoGroupEventArgs(NSNotification notification)
|
||||
: base(notification)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user