Commit 1ae87798 LN

识别有料dll更新

1 个父辈 3708de31
......@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
......@@ -90,6 +91,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// <param name="exist"></param>
/// <returns>true=有料,false=无料</returns>
[HandleProcessCorruptedStateExceptions]
public bool VisionComp(out Dictionary<string, bool> exist)
{
bool returnResult = false;
......@@ -129,6 +131,10 @@ namespace OnlineStore.DeviceLibrary
}
}
}
catch (AccessViolationException e)
{
LogUtil.error(Name + "VisionLibCom 出错 AccessViolationException:" + e.ToString());
}
catch (Exception ex)
{
LogUtil.error(Name + "VisionLibCom 出错:" + ex.ToString());
......
......@@ -140,6 +140,10 @@ namespace OnlineStore.DeviceLibrary
try
{
string vfile = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.VisionConfigFile);
if (String.IsNullOrEmpty(vfile))
{
vfile = @"\Camera.json";
}
if (!String.IsNullOrEmpty(vfile))
{
vision = new Asa.Camera.VisionLib(vfile, "RollingLogFileAppender");
......@@ -160,6 +164,7 @@ namespace OnlineStore.DeviceLibrary
{
if (vision != null)
{
vision.Dispose();
vision.Close();
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!