Ejemplo n.º 1
0
        private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(IntPtr result, IntPtr pNative)
        {
            List <EventHandler <PropertyChangedEventArgs> > list = null;

            BodyIndexFrameSource.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out list);
            object obj = list;

            lock (obj)
            {
                BodyIndexFrameSource     objThis = NativeObjectCache.GetObject <BodyIndexFrameSource>(pNative);
                PropertyChangedEventArgs args    = new PropertyChangedEventArgs(result);
                using (List <EventHandler <PropertyChangedEventArgs> > .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        EventHandler <PropertyChangedEventArgs> func = enumerator.Current;
                        EventPump.Instance.Enqueue(delegate
                        {
                            try
                            {
                                func(objThis, args);
                            }
                            catch
                            {
                            }
                        });
                    }
                }
            }
        }
Ejemplo n.º 2
0
 // Token: 0x06002B6F RID: 11119 RVA: 0x000DA7E0 File Offset: 0x000D8BE0
 private void Dispose(bool disposing)
 {
     if (this._pNative == IntPtr.Zero)
     {
         return;
     }
     this.__EventCleanup();
     NativeObjectCache.RemoveObject <BodyIndexFrameSource>(this._pNative);
     BodyIndexFrameSource.Windows_Kinect_BodyIndexFrameSource_ReleaseObject(ref this._pNative);
     this._pNative = IntPtr.Zero;
 }
Ejemplo n.º 3
0
        // Token: 0x06002B7F RID: 11135 RVA: 0x000DAD4C File Offset: 0x000D914C
        public BodyIndexFrameReader OpenReader()
        {
            if (this._pNative == IntPtr.Zero)
            {
                throw new ObjectDisposedException("BodyIndexFrameSource");
            }
            IntPtr intPtr = BodyIndexFrameSource.Windows_Kinect_BodyIndexFrameSource_OpenReader(this._pNative);

            ExceptionHelper.CheckLastError();
            if (intPtr == IntPtr.Zero)
            {
                return(null);
            }
            return(NativeObjectCache.CreateOrGetObject <BodyIndexFrameReader>(intPtr, (IntPtr n) => new BodyIndexFrameReader(n)));
        }
Ejemplo n.º 4
0
        // Token: 0x06002B80 RID: 11136 RVA: 0x000DADC0 File Offset: 0x000D91C0
        private void __EventCleanup()
        {
            BodyIndexFrameSource.Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks.TryAddDefault(this._pNative);
            List <EventHandler <FrameCapturedEventArgs> > list = BodyIndexFrameSource.Windows_Kinect_FrameCapturedEventArgs_Delegate_callbacks[this._pNative];
            object obj = list;

            lock (obj)
            {
                if (list.Count > 0)
                {
                    list.Clear();
                    if (this._pNative != IntPtr.Zero)
                    {
                        IntPtr pNative = this._pNative;
                        if (BodyIndexFrameSource.f__mg2 == null)
                        {
                            BodyIndexFrameSource.f__mg2 = new BodyIndexFrameSource._Windows_Kinect_FrameCapturedEventArgs_Delegate(BodyIndexFrameSource.Windows_Kinect_FrameCapturedEventArgs_Delegate_Handler);
                        }
                        BodyIndexFrameSource.Windows_Kinect_BodyIndexFrameSource_add_FrameCaptured(pNative, BodyIndexFrameSource.f__mg2, true);
                    }
                    BodyIndexFrameSource._Windows_Kinect_FrameCapturedEventArgs_Delegate_Handle.Free();
                }
            }
            BodyIndexFrameSource.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryAddDefault(this._pNative);
            List <EventHandler <PropertyChangedEventArgs> > list2 = BodyIndexFrameSource.Windows_Data_PropertyChangedEventArgs_Delegate_callbacks[this._pNative];
            object obj2 = list2;

            lock (obj2)
            {
                if (list2.Count > 0)
                {
                    list2.Clear();
                    if (this._pNative != IntPtr.Zero)
                    {
                        IntPtr pNative2 = this._pNative;
                        if (BodyIndexFrameSource.f__mg3 == null)
                        {
                            BodyIndexFrameSource.f__mg3 = new BodyIndexFrameSource._Windows_Data_PropertyChangedEventArgs_Delegate(BodyIndexFrameSource.Windows_Data_PropertyChangedEventArgs_Delegate_Handler);
                        }
                        BodyIndexFrameSource.Windows_Kinect_BodyIndexFrameSource_add_PropertyChanged(pNative2, BodyIndexFrameSource.f__mg3, true);
                    }
                    BodyIndexFrameSource._Windows_Data_PropertyChangedEventArgs_Delegate_Handle.Free();
                }
            }
        }
Ejemplo n.º 5
0
 // Token: 0x06002B6A RID: 11114 RVA: 0x000DA78D File Offset: 0x000D8B8D
 internal BodyIndexFrameSource(IntPtr pNative)
 {
     this._pNative = pNative;
     BodyIndexFrameSource.Windows_Kinect_BodyIndexFrameSource_AddRefObject(ref this._pNative);
 }