ab56a9bcf7
SVN-Revision: r240
610 lines
24 KiB
C#
610 lines
24 KiB
C#
using DevExpress.XtraEditors.Controls;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Security;
|
|
using System.Security.Cryptography.X509Certificates;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using AxCamCaptureCtlLib;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace Lskj.Control.HighBeaterInvoice
|
|
{
|
|
public partial class FrmHighBeater : BaseForm
|
|
{
|
|
#region 公开字段
|
|
/// <summary>
|
|
/// 是否能打开
|
|
/// </summary>
|
|
public bool isopen = false;
|
|
/// <summary>
|
|
/// 图片保存地址
|
|
/// </summary>
|
|
public string ImgPath;
|
|
/// <summary>
|
|
/// 图片下载个数
|
|
/// </summary>
|
|
public int count = 0;
|
|
|
|
public DataTable dataSource;
|
|
|
|
#endregion
|
|
#region 私有字段
|
|
/// <summary>
|
|
/// 旋转位置
|
|
/// </summary>
|
|
private int rotateAngle = 0;
|
|
/// <summary>
|
|
/// 接口数字头
|
|
/// </summary>
|
|
private const String host = "https://multcommon.market.alicloudapi.com";
|
|
/// <summary>
|
|
/// 接口path字段
|
|
/// </summary>
|
|
private const String path = "/ocrservice/mixedMultiCommon";
|
|
/// <summary>
|
|
/// 接口调用方法
|
|
/// </summary>
|
|
private const String method = "POST";
|
|
/// <summary>
|
|
/// 接口调用的appcode值
|
|
/// </summary>
|
|
private const String appcode = "a3d2489d8d994df3b42f8c655acfed8a";
|
|
#endregion
|
|
public FrmHighBeater()
|
|
{
|
|
InitializeComponent();
|
|
this.KeyDown += new KeyEventHandler(OnKeyDown);
|
|
this.startBtn.Click += new EventHandler(OnStartBtn);
|
|
InitializeLoad();
|
|
}
|
|
#region 方法
|
|
#region 初始化事件
|
|
/// <summary>
|
|
/// 初始化事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void InitializeLoad()
|
|
{
|
|
int devCount = axCamCaptureCtl.GetDeviceCount(); //获取设备支持的视频格式数目
|
|
if (devCount <= 0)
|
|
{
|
|
MessageUtil.Show("没发现合适的设备");
|
|
return;
|
|
}
|
|
for (int k = 0; k < devCount; k++)
|
|
{
|
|
com_Equip.Items.Add(axCamCaptureCtl.GetDeviceName(k)); //获取设备名称
|
|
}
|
|
com_Equip.SelectedIndex = 0;
|
|
int resCount = axCamCaptureCtl.GetResolutionCount(com_Equip.SelectedIndex);
|
|
for (int j = 0; j < resCount; j++)
|
|
{
|
|
com_resolution.Items.Add(axCamCaptureCtl.GetResolution(j)); //获取分辨率
|
|
}
|
|
com_resolution.SelectedIndex = 6;
|
|
com_Colorformat.SelectedIndex = 0; //默认为彩色
|
|
com_fileFormat.SelectedIndex = 0; //默认文件格式为jpg
|
|
|
|
ImgPath = Lskj.Util.PubUtil.CreateInvoicePic; //System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
|
btn_select.Text = ImgPath;
|
|
btn_select.ButtonClick += new ButtonPressedEventHandler(OnButtonEditClick);
|
|
btn_selectPic.ButtonClick += new ButtonPressedEventHandler(OnBtn_selectPic_ButtonClick);
|
|
|
|
}
|
|
#region 打开设备
|
|
public void OpenDev()
|
|
{
|
|
if (isopen == true) return;
|
|
string SizeStr = com_resolution.SelectedItem.ToString();
|
|
int pos, width, height;
|
|
pos = SizeStr.LastIndexOf("*");
|
|
width = Convert.ToInt32(SizeStr.Substring(0, pos)); //宽
|
|
height = Convert.ToInt32(SizeStr.Substring(pos + 1, SizeStr.Length - (pos + 1))); //高
|
|
|
|
int i = this.axCamCaptureCtl.OpenDevice(com_Equip.SelectedIndex, width, height); //开启摄像头
|
|
if (i == 0)
|
|
{
|
|
//MessageBox.Show("开启成功");
|
|
isopen = true;
|
|
}
|
|
else
|
|
{
|
|
//MessageBox.Show("开启失败!");
|
|
//return;
|
|
}
|
|
|
|
//axCamCaptureCtl1.CAM_Open(0, 1, 2592, 1944); //开启摄像头
|
|
}
|
|
#endregion
|
|
#endregion
|
|
#endregion
|
|
#region 事件
|
|
#region 分辨率改变事件
|
|
/// <summary>
|
|
/// 分辨率改变事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnComResSelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if (isopen == true)
|
|
{
|
|
this.axCamCaptureCtl.CloseDevice();
|
|
string SizeStr = com_resolution.SelectedItem.ToString();
|
|
int pos, width, height;
|
|
pos = SizeStr.LastIndexOf("*");
|
|
width = Convert.ToInt32(SizeStr.Substring(0, pos)); //宽
|
|
height = Convert.ToInt32(SizeStr.Substring(pos + 1, SizeStr.Length - (pos + 1))); //高
|
|
int i = this.axCamCaptureCtl.OpenDevice(com_Equip.SelectedIndex, width, height); //开启摄像头
|
|
//if (i == 0)
|
|
//{
|
|
// MessageBox.Show("切换分辨率失败!");
|
|
// isopen = true;
|
|
//}
|
|
//else
|
|
//{
|
|
// MessageBox.Show("切换分辨率失败!");
|
|
//}
|
|
}
|
|
}
|
|
#endregion
|
|
#region 手动查询图片执行
|
|
/// <summary>
|
|
/// 手动查询图片执行
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnStartBtn(object sender, EventArgs e)
|
|
{
|
|
if (!string.IsNullOrEmpty(this.btn_selectPic.Text))
|
|
{
|
|
string headStr = string.Empty;
|
|
string extensionStr = Path.GetExtension(this.btn_selectPic.Text).ToLower();
|
|
switch (extensionStr)
|
|
{
|
|
case ".jpg":
|
|
case ".jpeg":
|
|
headStr = "data:image/jpeg;base64,";
|
|
break;
|
|
case ".png":
|
|
headStr = "data:image/png;base64,";
|
|
break;
|
|
}
|
|
//string base64str = headStr + axCamCaptureCtl.GetBase64FromFile(this.btn_selectPic.Text);
|
|
if (!string.IsNullOrEmpty(Business.SystemInfo.Instance.GpyAccessKey) && !string.IsNullOrEmpty(Business.SystemInfo.Instance.GpyAccessSecret))
|
|
{
|
|
MethodClass.Api.AccessKey = Business.SystemInfo.Instance.GpyAccessKey;
|
|
MethodClass.Api.AccessSecret = Business.SystemInfo.Instance.GpyAccessSecret;
|
|
}
|
|
string resultStr = MethodClass.Api.GetResult("", "", this.btn_selectPic.Text);
|
|
JObject result = (JObject)JsonConvert.DeserializeObject(resultStr);
|
|
if (result["data"] == null && result["message"] != null && result["status"] != null)
|
|
{
|
|
MessageUtil.Show(string.Format("错误编号:{0}\r\n错误信息:{1}", result["status"] + "", result["message"] + ""));
|
|
this.DialogResult = DialogResult.No;
|
|
}
|
|
else
|
|
{
|
|
if (result["data"] != null && result["data"]["type"] != null)
|
|
{
|
|
string _result = TranInvoiceData.TranData(@resultStr, result["data"]["type"] + "");
|
|
JObject nResult = (JObject)JsonConvert.DeserializeObject(_result);
|
|
|
|
DataRow row = this.dataSource.NewRow();
|
|
foreach (DataColumn col in this.dataSource.Columns)
|
|
{
|
|
if (nResult["data"]["details"][col.Caption + ""] != null)
|
|
{
|
|
row[col.ColumnName] = nResult["data"]["details"][col.Caption + ""] + "";
|
|
}
|
|
}
|
|
if (result["data"]["items"] != null)
|
|
{
|
|
foreach (DataColumn col in this.dataSource.Columns)
|
|
{
|
|
if (nResult["data"]["details"]["items"][col.Caption + ""] != null)
|
|
{
|
|
row[col.ColumnName] = nResult["data"]["details"]["items"][col.Caption + ""] + "";
|
|
}
|
|
}
|
|
}
|
|
this.dataSource.Rows.Add(row);
|
|
}
|
|
else
|
|
{
|
|
MessageUtil.Show("未识别到数据!");
|
|
}
|
|
//result.
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.axCamCaptureCtl.Focus();
|
|
SendKeys.Send("{ENTER}");
|
|
}
|
|
}
|
|
#endregion
|
|
#region 基本操作
|
|
/// <summary>
|
|
/// 缩小操作
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnBtnMinClick(object sender, EventArgs e)
|
|
{
|
|
this.axCamCaptureCtl.ZoomOut();
|
|
}
|
|
/// <summary>
|
|
/// 放大操作
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnBtnMaxClick(object sender, EventArgs e)
|
|
{
|
|
this.axCamCaptureCtl.ZoomIn();
|
|
}
|
|
/// <summary>
|
|
/// 左旋转操作
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnLeftRevClick(object sender, EventArgs e)
|
|
{
|
|
rotateAngle -= 90;
|
|
if (rotateAngle < 0)
|
|
rotateAngle = 270;
|
|
this.axCamCaptureCtl.SetRotate(rotateAngle);
|
|
}
|
|
/// <summary>
|
|
/// 右旋转操作
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnRightRevClick(object sender, EventArgs e)
|
|
{
|
|
rotateAngle += 90;
|
|
if (rotateAngle > 270)
|
|
rotateAngle = 0;
|
|
this.axCamCaptureCtl.SetRotate(rotateAngle);
|
|
}
|
|
/// <summary>
|
|
/// 自动适合大小
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnfitAutoClick(object sender, EventArgs e)
|
|
{
|
|
this.axCamCaptureCtl.BestSize();
|
|
}
|
|
/// <summary>
|
|
/// 设置1:1对比
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnToOneClick(object sender, EventArgs e)
|
|
{
|
|
this.axCamCaptureCtl.TrueSize();
|
|
}
|
|
#endregion
|
|
#region 文件存储地址改变事件
|
|
/// <summary>
|
|
/// 文件存储地址改变事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnButtonEditClick(object sender, ButtonPressedEventArgs e)
|
|
{
|
|
folderBrowserDialog1.Description = "请选择文件夹";
|
|
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
|
|
{
|
|
ImgPath = folderBrowserDialog1.SelectedPath;
|
|
btn_select.Text = ImgPath;
|
|
}
|
|
}
|
|
private void OnBtn_selectPic_ButtonClick(object sender, ButtonPressedEventArgs e)
|
|
{
|
|
OpenFileDialog fileDialog = new OpenFileDialog();
|
|
fileDialog.Title = "请选择文件";
|
|
fileDialog.Filter = "图片文件(*.bmp;*.jpg;*.png)|*.bmp;*.jpg;*.png|All files (*.*)|*.*";
|
|
if (fileDialog.ShowDialog() == DialogResult.OK)
|
|
{
|
|
//ImgPath = folderBrowserDialog1.SelectedPath;
|
|
//btn_select.Text = ImgPath;
|
|
btn_selectPic.Text = fileDialog.FileName;
|
|
}
|
|
}
|
|
#endregion
|
|
#region ocr获取参数事件
|
|
/// <summary>
|
|
/// ocr获取参数事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnBtnobtainClick(object sender, EventArgs e)
|
|
{
|
|
Label1.Enabled = true;
|
|
Label2.Enabled = true;
|
|
TrackBar1.Enabled = true;
|
|
cek_autoExposure.Enabled = true;
|
|
int min, max, currentVal, defVal;
|
|
|
|
string strRang = axCamCaptureCtl.GetCamProcParmRange(0); //获取亮度值范围
|
|
int pos = strRang.LastIndexOf("|");
|
|
min = Convert.ToInt32(strRang.Substring(0, pos));
|
|
max = Convert.ToInt32(strRang.Substring(pos + 1, strRang.Length - (pos + 1)));
|
|
|
|
string CurrentDefStr = axCamCaptureCtl.GetCamProcParmDefCurrVal(0); //获取亮度当前值及默认值
|
|
pos = CurrentDefStr.LastIndexOf("|");
|
|
defVal = Convert.ToInt32(CurrentDefStr.Substring(0, pos));
|
|
currentVal = Convert.ToInt32(CurrentDefStr.Substring(pos + 1, CurrentDefStr.Length - (pos + 1)));
|
|
TrackBar1.Minimum = min;
|
|
TrackBar1.Maximum = max;
|
|
TrackBar1.Value = currentVal;
|
|
|
|
strRang = axCamCaptureCtl.GetCamExpParmRange(); //获取曝光值范围
|
|
pos = strRang.LastIndexOf("|");
|
|
min = Convert.ToInt32(strRang.Substring(0, strRang.LastIndexOf("|")));
|
|
max = Convert.ToInt32(strRang.Substring(pos + 1, strRang.Length - (pos + 1)));
|
|
|
|
CurrentDefStr = axCamCaptureCtl.GetCamExpParmDefCurrVal(); ; //获取曝光当前值及默认值
|
|
pos = CurrentDefStr.LastIndexOf("|");
|
|
defVal = Convert.ToInt32(CurrentDefStr.Substring(0, pos));
|
|
currentVal = Convert.ToInt32(CurrentDefStr.Substring(pos + 1, CurrentDefStr.Length - (pos + 1)));
|
|
TrackBar2.Minimum = min;
|
|
TrackBar2.Maximum = max;
|
|
TrackBar2.Value = currentVal;
|
|
cek_autoExposure.Checked = true;
|
|
}
|
|
#endregion
|
|
#region 曝光事件汇总
|
|
/// <summary>
|
|
/// 调节亮度事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnTrackBarScrol(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetCamProcParm(0, TrackBar1.Value);
|
|
}
|
|
/// <summary>
|
|
/// 调节曝光
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnTrackExposureScrol(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetCamExpParm(TrackBar2.Value);
|
|
}
|
|
/// <summary>
|
|
/// 是否自动曝光
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnCheckBoxCheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (cek_autoExposure.Checked == true)
|
|
{
|
|
axCamCaptureCtl.SetAutoExp(true);
|
|
TrackBar2.Enabled = false;
|
|
}
|
|
else
|
|
{
|
|
axCamCaptureCtl.SetAutoExp(false);
|
|
TrackBar2.Enabled = true;
|
|
}
|
|
}
|
|
#endregion
|
|
#region 图像设置
|
|
/// <summary>
|
|
/// 图像设置
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnPicSettingClick(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.ShowImageSettingWindow();
|
|
}
|
|
#endregion
|
|
#region 关闭事件
|
|
/// <summary>
|
|
/// 关闭事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnFrmHighBeater_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
//if (isopen == true)
|
|
//{
|
|
// this.axCamCaptureCtl.CloseDevice(); //关闭摄像头
|
|
// isopen = false;
|
|
//}
|
|
}
|
|
#endregion
|
|
#region 界面键盘事件
|
|
/// <summary>
|
|
/// 界面键盘事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnKeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
//回车直接拍照
|
|
if (e.KeyCode == Keys.Enter)
|
|
{
|
|
count++;
|
|
string savePath = "";
|
|
if (com_fileFormat.SelectedIndex == 0) savePath = ImgPath + "\\" + Convert.ToString(count) + ".jpg";
|
|
if (com_fileFormat.SelectedIndex == 1) savePath = ImgPath + "\\" + Convert.ToString(count) + ".bmp";
|
|
if (com_fileFormat.SelectedIndex == 2) savePath = ImgPath + "\\" + Convert.ToString(count) + ".png";
|
|
if (com_fileFormat.SelectedIndex == 3) savePath = ImgPath + "\\" + Convert.ToString(count) + ".tiff";
|
|
if (com_fileFormat.SelectedIndex == 4) savePath = ImgPath + "\\" + Convert.ToString(count) + ".gif";
|
|
if (com_fileFormat.SelectedIndex == 5) savePath = ImgPath + "\\" + Convert.ToString(count) + ".pdf";
|
|
axCamCaptureCtl.CaptureImage(savePath);
|
|
if (savePath == "")
|
|
{
|
|
MessageBox.Show("高拍仪生成拍照失败!");
|
|
}
|
|
else
|
|
{
|
|
string headStr = string.Empty;
|
|
string extensionStr = Path.GetExtension(savePath).ToLower();
|
|
switch (extensionStr)
|
|
{
|
|
case ".jpg":
|
|
case ".jpeg":
|
|
headStr = "data:image/jpeg;base64,";
|
|
break;
|
|
case ".png":
|
|
headStr = "data:image/png;base64,";
|
|
break;
|
|
}
|
|
//string base64str = headStr + axCamCaptureCtl.GetBase64FromFile(savePath);
|
|
if (!string.IsNullOrEmpty(Business.SystemInfo.Instance.GpyAccessKey) && !string.IsNullOrEmpty(Business.SystemInfo.Instance.GpyAccessSecret))
|
|
{
|
|
MethodClass.Api.AccessKey = Business.SystemInfo.Instance.GpyAccessKey;
|
|
MethodClass.Api.AccessSecret = Business.SystemInfo.Instance.GpyAccessSecret;
|
|
}
|
|
string resultStr = MethodClass.Api.GetResult("", "", savePath);
|
|
|
|
JObject result = (JObject)JsonConvert.DeserializeObject(resultStr);
|
|
if (result["data"] == null && result["message"] != null && result["status"] != null)
|
|
{
|
|
MessageUtil.Show(string.Format("错误编号:{0}\r\n错误信息:{1}", result["status"] + "", result["message"] + ""));
|
|
this.DialogResult = DialogResult.No;
|
|
}
|
|
else
|
|
{
|
|
if (result["data"] != null && result["data"]["type"] != null)
|
|
{
|
|
string _result = TranInvoiceData.TranData(@resultStr, result["data"]["type"] + "");
|
|
JObject nResult = (JObject)JsonConvert.DeserializeObject(_result);
|
|
|
|
DataRow row = this.dataSource.NewRow();
|
|
foreach (DataColumn col in this.dataSource.Columns)
|
|
{
|
|
if (nResult["data"]["details"][col.Caption + ""] != null)
|
|
{
|
|
row[col.ColumnName] = nResult["data"]["details"][col.Caption + ""] + "";
|
|
}
|
|
}
|
|
if (result["data"]["items"] != null)
|
|
{
|
|
foreach (DataColumn col in this.dataSource.Columns)
|
|
{
|
|
if (nResult["data"]["details"]["items"][col.Caption + ""] != null)
|
|
{
|
|
row[col.ColumnName] = nResult["data"]["details"]["items"][col.Caption + ""] + "";
|
|
}
|
|
}
|
|
}
|
|
this.dataSource.Rows.Add(row);
|
|
}
|
|
else
|
|
{
|
|
MessageUtil.Show("未识别到数据!");
|
|
}
|
|
//result.
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
//textBox1.Text += httpResponse.StatusCode;
|
|
//textBox1.Text += httpResponse.Method;
|
|
//textBox1.Text += httpResponse.Headers;
|
|
//Stream st = httpResponse.GetResponseStream();
|
|
//StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
|
|
//textBox1.Text += reader.ReadToEnd();
|
|
//textBox1.Text += "\n";
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
#region 质量设置
|
|
/// <summary>
|
|
/// 质量设置事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnTrackQuality(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetJpgQuanlity(TrackQuality.Value);
|
|
Label14.Text = Convert.ToString(TrackQuality.Value);
|
|
}
|
|
#endregion
|
|
#region 裁切事件汇总
|
|
/// <summary>
|
|
/// 不裁切
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnFrmDontTrim(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetCutType(0);
|
|
}
|
|
/// <summary>
|
|
/// 自动裁切
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnFrmAutoTrim(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetCutType(1);
|
|
}
|
|
/// <summary>
|
|
/// 手动裁切
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
public void OnFrmManualTrim(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetCutType(2);
|
|
}
|
|
#endregion
|
|
#region 扫码方法
|
|
/// <summary>
|
|
/// 扫码方法
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="certificate"></param>
|
|
/// <param name="chain"></param>
|
|
/// <param name="errors"></param>
|
|
/// <returns></returns>
|
|
public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
|
|
{
|
|
return true;
|
|
}
|
|
#endregion
|
|
#region 图像操作汇总
|
|
/// <summary>
|
|
/// 颜色格式
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnColorformatSelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetImageColorMode(com_Colorformat.SelectedIndex);
|
|
}
|
|
/// <summary>
|
|
/// 文件格式
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnFileFormatSelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
axCamCaptureCtl.SetImageFormat(com_fileFormat.SelectedIndex);
|
|
}
|
|
|
|
#endregion
|
|
#endregion
|
|
}
|
|
}
|