mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-07-15 05:13:18 +08:00
40 lines
785 B
C#
40 lines
785 B
C#
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)
|
|
{
|
|
}
|
|
}
|
|
}
|