You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
2.6 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ShenTun.ImageCollection.Common;
using ShenTun.ImageCollection.Instance;
namespace ShenTun.ImageCollection
{
public class ImageAcquisitionMethods
{
private readonly ClientAcquisition clientAcquistion = new ClientAcquisition();
public async Task<object> ImageAcquisition(dynamic request)
{
RequestInterface req = new RequestInterface()
{
AcquisitionInterface = request.asAcquisitionInterface,
ImagePath = request.asImagePath,
Delay=(float)request.asDelay,
Quality = (long)request.asQuality,
Total=(int)request.asTotal,
VideoDevice=request.asVideoDevice,
VideoPixel =request.asVideoPixel,
mode = request.asMode,
BarCode = request.asBarCode,
PatientName = request.asPatientName,
SexName = request.asSexName,
Age = request.asAge,
AsbitemName = request.asAsbitemName,
TopLeftX = Convert.ToInt32(request.asTopLeftX),
TopLeftY = Convert.ToInt32(request.asTopLeftY),
BottomRightX = Convert.ToInt32(request.asBottomRightX),
BottomRightY = Convert.ToInt32(request.asBottomRightY),
};
return await clientAcquistion.ShowCameraAsync(req);
}
public async Task<object> ImageCut(dynamic request)
{
DialogResponse dialogres = new DialogResponse()
{
code =1,
message = "Success",
};
RequestImageEdit imageEdit = new RequestImageEdit()
{
ImageSvr = request.asImageSvr,
PeisApiUrl=request.asPeisApiUrl,
ImagePath = request.asImagePath,
Images = request.asImages,
Token = request.asToken,
AsbitemName = request.asbitemName,
};
await clientAcquistion.ShowImageListAsync(imageEdit);
string res = JsonHelper.SerializeObject(dialogres);
return res;
}
public async Task<object> ImagePixelVideo(dynamic request)
{
int index = (int)request.asDeviceIndex;
return await clientAcquistion.GetPixelVideoListAsync(index);
}
public async Task<object> ImageDeviceVideo(dynamic request)
{
return await clientAcquistion.GetDeviceVideoListAsync();
}
}
}