示例#1
0
文件: Camera.cs 项目: yourina/TizenFX
 private void RegisterInterruptedCallback()
 {
     _interruptedCallback = (CameraPolicy policy, CameraState previous, CameraState current, IntPtr userData) =>
     {
         Interrupted?.Invoke(this, new CameraInterruptedEventArgs(policy, previous, current));
     };
     CameraErrorFactory.ThrowIfError(Native.SetInterruptedCallback(_handle, _interruptedCallback, IntPtr.Zero),
                                     "Failed to set interrupt callback");
 }
示例#2
0
        private void RegisterInterruptedCallback()
        {
            _interruptedCallback = (policy, previous, current, _) =>
            {
                Interrupted?.Invoke(this, new CameraInterruptedEventArgs(policy, previous, current));
            };

            Native.SetInterruptedCallback(_handle, _interruptedCallback).
            ThrowIfFailed("Failed to set interrupt callback.");
        }