mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-04-02 23:36:36 +08:00
1、解决因在debug目录下放置多余的dll导致反射时报错的问题
2、解决显示窗口滑动时,坐标及灰度值不实时更新的问题 3、解决模板匹配工具,模板图像不更新的问题 4、将各工具的生成位置改至主程序的debug目录下
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user