123456789101112131415161718192021 |
- using Microsoft.Maui.ApplicationModel;
- using Microsoft.Maui.Storage;
- using InABox.Avalonia.Platform;
- namespace InABox.Avalonia
- {
- public class MobileDocumentCameraSource : MobileImageSource<MobileDocumentCameraSource, MobileDocumentCameraOptions>
- {
- public MobileDocumentCameraSource(MobileDocumentCameraOptions options) : base(options)
- {
- }
-
- protected override async Task<bool> IsEnabled()
- => await IsEnabled<Permissions.Camera>();
-
- protected override async Task<FileResult> Capture()
- => await PlatformTools.ImageTools.CapturePhotoAsync(Options.Compression, Options.Constraints);
- }
- }
|