forked from amkovkov/GranuSightSoftware2
26 lines
739 B
C#
26 lines
739 B
C#
using Avalonia.Controls;
|
|
|
|
namespace GSS2.Test;
|
|
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
PointerPressed += async (_, _) =>
|
|
{
|
|
var viewModel = DataContext as MainWindowViewModel;
|
|
if (viewModel is null)
|
|
return;
|
|
|
|
var result = await viewModel.CaptureImage();
|
|
if (result is not null)
|
|
{
|
|
var (frameBuffer, streamConfiguration) = result.Value;
|
|
// cameraView.Update(frameBuffer, streamConfiguration);
|
|
(cameraView.Content as CameraViewModel)?.CallUpdate(frameBuffer, streamConfiguration);
|
|
}
|
|
};
|
|
}
|
|
} |