예제 #1
0
        internal static Camera TryGet(IntPtr handle)
        {
            if (handle == IntPtr.Zero)
                return null;

            var camera = Cameras.FirstOrDefault(x => x.Handle == handle);
            if (camera != null)
                return camera;

            camera = new Camera();
            camera.Handle = handle;

            Cameras.Add(camera);

            return camera;
        }