Exemple #1
0
        private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(RootSystem.IntPtr result,
                                                                                   RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <FrameCapturedEventArgs> > callbackList = null;

            Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <BodyFrameSource>(pNative);
                var args    = new FrameCapturedEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
Exemple #2
0
        private static void Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative)
        {
            List <EventHandler <FrameCapturedEventArgs> > list = null;

            AudioSource.Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list);
            object obj = list;

            lock (obj)
            {
                AudioSource            objThis = NativeObjectCache.GetObject <AudioSource>(pNative);
                FrameCapturedEventArgs args    = new FrameCapturedEventArgs(result);
                using (List <EventHandler <FrameCapturedEventArgs> > .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        EventHandler <FrameCapturedEventArgs> func = enumerator.Current;
                        EventPump.Instance.Enqueue(delegate
                        {
                            try
                            {
                                func(objThis, args);
                            }
                            catch
                            {
                            }
                        });
                    }
                }
            }
        }
 // Token: 0x06002C8A RID: 11402 RVA: 0x000DDBE4 File Offset: 0x000DBFE4
 private void Dispose(bool disposing)
 {
     if (this._pNative == IntPtr.Zero)
     {
         return;
     }
     this.__EventCleanup();
     NativeObjectCache.RemoveObject <FrameCapturedEventArgs>(this._pNative);
     FrameCapturedEventArgs.Windows_Kinect_FrameCapturedEventArgs_ReleaseObject(ref this._pNative);
     this._pNative = IntPtr.Zero;
 }
 // Token: 0x06002C85 RID: 11397 RVA: 0x000DDB92 File Offset: 0x000DBF92
 internal FrameCapturedEventArgs(IntPtr pNative)
 {
     this._pNative = pNative;
     FrameCapturedEventArgs.Windows_Kinect_FrameCapturedEventArgs_AddRefObject(ref this._pNative);
 }