CPF/CPF.Mac/Mac/Foundation/NSUndoManagerCloseUndoGroupEventArgs.cs
2023-11-21 23:05:03 +08:00

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)
{
}
}
}