Commit 7176fbd7 authored by 潘栩锋's avatar 潘栩锋 🚴

1. 修改Misc.Version 的bug

2.修改 MainEdit 模块查找的bug
parent ee92836d
......@@ -48,15 +48,30 @@ namespace Misc
Version version = asm.GetName().Version;
string version_str = string.Format("v{0}.{1}.{2}", version.Major, version.Minor, version.Build);
string buliddt = System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString("yyyyMMdd");
string location = asm.Location;
string buliddt;
if (!string.IsNullOrEmpty(location))
{
buliddt = System.IO.File.GetLastWriteTime(location).ToString("yyyyMMdd");
}
else
{
buliddt = "";
}
Product = asmproduct.Product;
V = version_str;
BuildTime = buliddt;
}
public override string ToString()
{
if (!string.IsNullOrEmpty(BuildTime))
{
return Product + " " + V + " at " + BuildTime;
}
else
{
return Product + " " + V;
}
}
}
}
......@@ -554,7 +554,7 @@ namespace ThickTcpUiInWindow.MainEdit
UIModule.DynAreaComponent dynAreaItem;
if (component.ID != 0)
{
int idx = dest_dynAreaItems.FindIndex((daitem) => { return daitem.GetHashCode() == component.ID; });
int idx = dest_dynAreaItems.FindIndex((daitem) => { return daitem.ID == component.ID; });
if (idx == -1)
{
//异常
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment