1、修改Halcon取图工具,对功能进行拆分,简化逻辑

2、修改PMA工具,修正其中的bug
3、其他BUG修复
This commit is contained in:
liu.wenjie
2022-04-08 15:31:57 +08:00
parent 159fb6b967
commit 8f7a1e0ffd
52 changed files with 1360 additions and 1457 deletions

View File

@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Logger</RootNamespace>
<AssemblyName>Logger</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@@ -31,9 +31,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\VisionEdit\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />

View File

@@ -3,16 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using System.Windows.Forms;
namespace Logger
{
public class LoggerClass
{
private static readonly ILog loginfo = LogManager.GetLogger("loginfo");
private static readonly ILog logerror = LogManager.GetLogger("logerror");
/// <summary>
/// Log队列
/// </summary>
@@ -20,10 +16,6 @@ namespace Logger
public static void WriteLog(string info, bool ShowMsgBox = false)
{
if (loginfo.IsInfoEnabled)
{
loginfo.Info(info);
}
logQueue.Enqueue(new LogInfo{ message = info, ex = null, logLevel = MsgLevel.Info});
if(ShowMsgBox)
{
@@ -32,10 +24,6 @@ namespace Logger
}
public static void WriteLog(string info, MsgLevel msgLevel, bool ShowMsgBox = false)
{
if (loginfo.IsInfoEnabled)
{
loginfo.Info(info);
}
logQueue.Enqueue(new LogInfo { message = info,ex = null, logLevel = msgLevel });
if (ShowMsgBox)
{
@@ -44,10 +32,6 @@ namespace Logger
}
public static void WriteLog(string info, MsgLevel msgLevel, Exception ex, bool ShowMsgBox = false)
{
if (logerror.IsErrorEnabled)
{
logerror.Error(info, ex);
}
logQueue.Enqueue(new LogInfo { message = info, ex = ex, logLevel = msgLevel });
if (ShowMsgBox)
{
@@ -56,10 +40,6 @@ namespace Logger
}
public static void WriteLog(string info, Exception ex, bool ShowMsgBox = false)
{
if (logerror.IsErrorEnabled)
{
logerror.Error(info, ex);
}
logQueue.Enqueue(new LogInfo { message = info, ex = ex, logLevel = MsgLevel.Exception });
if (ShowMsgBox)
{

View File

@@ -13,7 +13,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]
//[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000