[+] 重新布局界面,完成控件与方法的绑定
This commit is contained in:
@@ -1,12 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RevokeMsgPatcher.Model;
|
||||
using RevokeMsgPatcher.Utils;
|
||||
|
||||
namespace RevokeMsgPatcher.Modifier
|
||||
{
|
||||
class TIMModifier
|
||||
class TIMModifier : AppModifier
|
||||
{
|
||||
|
||||
public TIMModifier(App config)
|
||||
{
|
||||
this.config = config;
|
||||
}
|
||||
/// <summary>
|
||||
/// 自动寻找获取微信安装路径
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string FindInstallPath()
|
||||
{
|
||||
string installPath = PathUtil.FindInstallPathFromRegistry("TIM");
|
||||
if (!IsAllFilesExist(installPath))
|
||||
{
|
||||
foreach (string defaultPath in PathUtil.GetDefaultInstallPaths(@"Tencent\TIM"))
|
||||
{
|
||||
if (IsAllFilesExist(defaultPath))
|
||||
{
|
||||
return defaultPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return installPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取整个APP的当前版本
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string GetVersion()
|
||||
{
|
||||
if (editors != null && editors.Count > 0)
|
||||
{
|
||||
foreach (FileHexEditor editor in editors)
|
||||
{
|
||||
if (editor.FileName == "IM.dll")
|
||||
{
|
||||
return editor.FileVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user