Commit c2637e2c 夏萍

Merge branch 'master' of http://106.15.194.121:8083/zdl/NS100

2 个父辈 6f414e01 d3c3df2d
......@@ -232,7 +232,7 @@ namespace BLL
LogNet.log.Error($"{cameraName}取图失败:", e);
}
finally {
Close();
//Close();
}
return barcodeInfos;
}
......
......@@ -337,6 +337,8 @@ namespace BLL
public static MyConfig<int> REEL_ID_AutoResetStrategy;
[MyConfigComment("使用扫码相机")]
public static MyConfig<bool> Func_UseIDCamera=false;
[MyConfigComment("隐藏软件logo")]
public static MyConfig<bool> AppUI_HideLogo=false;
public void Save()
{
config.Save();
......
......@@ -426,20 +426,24 @@ namespace IDHIKCamera
try
{
int nRet = MvCodeReader.MV_CODEREADER_OK;
pData = IntPtr.Zero;
Thread.Sleep(50);
MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2 stFrameInfoEx2 = new MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2();
pstFrameInfoEx2 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2)));
Marshal.StructureToPtr(stFrameInfoEx2, pstFrameInfoEx2, false);
//Thread.Sleep(500);
nRet = cameraCurr[index].MV_CODEREADER_GetOneFrameTimeoutEx2_NET(ref pData, pstFrameInfoEx2, 3000);
LibLogUtil.Info($"获取结果{nRet}");
for (int i = 0; i < 4; i++)
{
nRet = cameraCurr[index].MV_CODEREADER_GetOneFrameTimeoutEx2_NET(ref pData, pstFrameInfoEx2, 1000);
if (nRet == MvCodeReader.MV_CODEREADER_OK)
{
stFrameInfoEx2 = (MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2)Marshal.PtrToStructure(pstFrameInfoEx2, typeof(MvCodeReader.MV_CODEREADER_IMAGE_OUT_INFO_EX2));
break;
}
else
{
LibLogUtil.Error($"结果不等于0,出错{nRet}");
LibLogUtil.Error(" Can not grab one : "+ nRet);
Thread.Sleep(50);
}
}
List<Point[]> pts=new List<Point[]>();
if (nRet == MvCodeReader.MV_CODEREADER_OK)
......
......@@ -275,7 +275,7 @@ namespace SmartScan
this.Controls.Add(this.BtnSet);
this.Controls.Add(this.BtnRetrospect);
this.Controls.Add(this.BtnStart);
this.Icon = global::SmartScan.Properties.Resources.App;
this.Name = "FrmMain";
this.Text = "Form1";
this.TitleFont = new System.Drawing.Font("宋体", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......
......@@ -25,6 +25,11 @@ namespace SmartScan
{
InitializeComponent();
BtnStart.Tag = "not";
if (Config.AppUI_HideLogo)
this.Icon = null;
else
this.Icon = global::SmartScan.Properties.Resources.App;
}
private bool CheckCamera()
......
......@@ -125,6 +125,8 @@ namespace SmartScan
private void FrmRetrospect_Load(object sender, EventArgs e)
{
int SH = Screen.PrimaryScreen.Bounds.Height; //1080
int SW = Screen.PrimaryScreen.Bounds.Width; //1920
......@@ -137,11 +139,12 @@ namespace SmartScan
DtpUpper.Value = DateTime.Now.Date;
tableLayoutPanel1.Width = this.Width-20;
tableLayoutPanel1.Height = this.Height - 60;
if (ConfigHelper.Config.Get("Display_EnableGetData", "1181")=="1181")
if (ConfigHelper.Config.Get("Display_EnableGetData", "1181") == "1181")
{
butt_startserver.Visible = true;
}
this.StartPosition = FormStartPosition.CenterScreen;
}
private void BtnSelect_Click(object sender, EventArgs e)
......
......@@ -339,6 +339,7 @@ namespace SmartScan
{
LogNet.log.Info("Work SetKey hasMatch:" + hasMatch);
//if (workCodeKeyword.Count == 0){ return;}
//if(hasMatch)
BLLCommon.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch, out _);
if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>")))
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!