mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-09-19 18:22:30 +08:00
初始化
This commit is contained in:
36
CPF.Mac/Mac/AppKit/NSWorkspaceFileOperationEventArgs.cs
Normal file
36
CPF.Mac/Mac/AppKit/NSWorkspaceFileOperationEventArgs.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using CPF.Mac.Foundation;
|
||||
using CPF.Mac.ObjCRuntime;
|
||||
using System;
|
||||
|
||||
namespace CPF.Mac.AppKit
|
||||
{
|
||||
public class NSWorkspaceFileOperationEventArgs : NSNotificationEventArgs
|
||||
{
|
||||
private static IntPtr k0;
|
||||
|
||||
public int FileType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (k0 == IntPtr.Zero)
|
||||
{
|
||||
k0 = Dlfcn.GetIntPtr(Libraries.AppKit.Handle, "NSOperationNumber");
|
||||
}
|
||||
IntPtr intPtr = base.Notification.UserInfo.LowlevelObjectForKey(k0);
|
||||
if (intPtr == IntPtr.Zero)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
using (NSNumber nSNumber = new NSNumber(intPtr))
|
||||
{
|
||||
return nSNumber.Int32Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NSWorkspaceFileOperationEventArgs(NSNotification notification)
|
||||
: base(notification)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user