示例#1
0
文件: Camera.cs 项目: yourina/TizenFX
 private void RegisterFocusStateChanged()
 {
     _focusStateChangedCallback = (CameraFocusState state, IntPtr userData) =>
     {
         FocusStateChanged?.Invoke(this, new CameraFocusStateChangedEventArgs(state));
     };
     CameraErrorFactory.ThrowIfError(Native.SetFocusStateChangedCallback(_handle, _focusStateChangedCallback, IntPtr.Zero),
                                     "Setting focus changed callback failed");
 }
示例#2
0
        private void RegisterFocusStateChanged()
        {
            _focusStateChangedCallback = (state, _) =>
            {
                FocusStateChanged?.Invoke(this, new CameraFocusStateChangedEventArgs(state));
            };

            Native.SetFocusStateChangedCallback(_handle, _focusStateChangedCallback).
            ThrowIfFailed("Failed to set focus changed callback.");
        }