1、解决因在debug目录下放置多余的dll导致反射时报错的问题

2、解决显示窗口滑动时,坐标及灰度值不实时更新的问题
3、解决模板匹配工具,模板图像不更新的问题
4、将各工具的生成位置改至主程序的debug目录下
This commit is contained in:
liu.wenjie
2022-10-26 15:55:48 +08:00
parent 900ea68f69
commit 394f64912a
32 changed files with 1708 additions and 1603 deletions

View File

@@ -60,7 +60,7 @@ namespace ToolLib.VisionJob
{
try
{
if (tvw_ToolBox.SelectedNode.SelectedImageIndex == 0) //如果双击的是文件夹节点,返回
if (tvw_ToolBox.SelectedNode.Level == 0) //如果双击的是文件夹节点,返回
return;
if(VisionJobParams.pVisionProject.Project.Count == 0) // 若当前无流程,需要先建立项目和流程树,并对其进行初始化
{
@@ -69,12 +69,20 @@ namespace ToolLib.VisionJob
if (VisionJobParams.pVisionProject.Project.Count > 0) //再次确认已存在流程
{
object selectTag = tvw_ToolBox.SelectedNode.Tag;
OperateTreeView.Instance.Add_Tool((ToolType)Enum.Parse(typeof(ToolType), selectTag.ToString()));
if(selectTag != null)
{
ToolType mToolType = (ToolType)Enum.Parse(typeof(ToolType), selectTag.ToString());
OperateTreeView.Instance.Add_Tool(mToolType);
}
else
{
Logger.LoggerClass.WriteLog($"{tvw_ToolBox.SelectedNode.Text} 工具尚未开发", Logger.MsgLevel.Warn);
}
}
}
catch (Exception ex)
{
Logger.LoggerClass.WriteLog("添加流程失败!", ex);
Logger.LoggerClass.WriteLog($"添加流程失败!失败原因:{ex.Message}", ex);
}
}

View File

@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -82,30 +82,32 @@ namespace VisionJobFactory
{
if (bShouldCrossAssembly)
{
//Assembly[] Assemblys = AppDomain.CurrentDomain.GetAssemblies();
//if (Assemblys != null)
//{
// for (int i = 0, len = Assemblys.Length; i < len; i++)
// {
// CheckInAssembly(Assemblys[i], bIgnoreAbstract, bInheritAttribute);
// }
//}
List<Assembly> allAssemblies = new List<Assembly>();
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string[] FILES = Directory.GetFiles(path, "*.dll");
foreach (string dll in Directory.GetFiles(path, "*.dll"))
allAssemblies.Add(Assembly.LoadFile(dll));
Assembly[] Assemblys = AppDomain.CurrentDomain.GetAssemblies();
if (Assemblys != null)
{
for (int i = 0, len = Assemblys.Length; i < len; i++)
{
CheckInAssembly(Assemblys[i], bIgnoreAbstract, bInheritAttribute);
}
}
//List<Assembly> allAssemblies = new List<Assembly>();
//string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//string[] FILES = Directory.GetFiles(path, "*.dll");
//foreach (string dll in Directory.GetFiles(path, "*.dll"))
// allAssemblies.Add(Assembly.LoadFile(dll));
// 手动寻找该dll若dll名称改变需要重新编译不智能
// Assembly assem = Assembly.LoadFile($"{AppDomain.CurrentDomain.BaseDirectory}ToolLib.VisionToolList.dll");
if (allAssemblies != null)
{
for (int i = 0; i < allAssemblies.Count; i++)
{
CheckInAssembly(allAssemblies[i], bIgnoreAbstract, bInheritAttribute);
}
}
//if (allAssemblies != null)
//{
// for (int i = 0; i < allAssemblies.Count; i++)
// {
// CheckInAssembly(allAssemblies[i], bIgnoreAbstract, bInheritAttribute);
// }
//}
}
else