## :date:2026-04-11 星期六更新
### RySmartEditor V1.0.2604.1101 - *.[新增]新增支持站点禁用功能。 ### SuperDesign V3.0.2604.1101 - *.[新增]更新dll版本功能新增进度展示,并提示替换的dll数量。 - *.[修复]修复生成C#代码时,多行Cookie和PostData生成错误的BUG。 - *.[修复]修复更新引用dll时,如果dll不存在,会更新失败的BUG。
This commit is contained in:
1 parent
9d3ea0c979
commit
ee1a5b9c34
24 files changed
+476
-200
No files matched your search
@@ -46,6 +46,18 @@ namespace 开发辅助工具.Manager
|
||||
/// </summary>
|
||||
[Description("状态变化时激发")]
|
||||
public event StringEventHandler OnStateChanged;
|
||||
/// <summary>
|
||||
/// 传输进度
|
||||
/// </summary>
|
||||
/// <param name="curValue">当前传输完成的值</param>
|
||||
/// <param name="totalValue">全部值,为-1表示无法获取</param>
|
||||
/// <param name="percent">当前传输的百分比,为-1表示无法获取</param>
|
||||
/// <param name="Tag">携带的参数(可选)</param>
|
||||
public delegate void TranProgressHandler(long curValue, long totalValue, double percent);
|
||||
/// <summary>
|
||||
/// 文件传输进度
|
||||
/// </summary>
|
||||
public event TranProgressHandler OnReplaceDllProgress;
|
||||
public RyProject()
|
||||
{
|
||||
UpdateSetting();
|
||||
@@ -92,7 +104,7 @@ namespace 开发辅助工具.Manager
|
||||
var path_list = ReferenceDllPath.Replace("\r", "").Split('\n');
|
||||
//var find = false;
|
||||
var result = "";
|
||||
var Min_Ver = RySoft.GetVersionStr(dll_full_path);
|
||||
var Min_Ver =System.IO.File.Exists(dll_full_path)?RySoft.GetVersionStr(dll_full_path):"0.0.0.0";
|
||||
var Min_dt=RyFiles.GetFileDate(dll_full_path);
|
||||
#region 在引用文件夹查找是否有该dll,有则使用引用文件夹里的dll
|
||||
for (int m = 0; m < path_list.Length; m++)
|
||||
@@ -192,6 +204,7 @@ namespace 开发辅助工具.Manager
|
||||
}
|
||||
return _rel_path;
|
||||
}
|
||||
public int ReplaceDllCount { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 更新dll版本,如果全部复制成功,则返回0,否则返回错误个数
|
||||
/// </summary>
|
||||
@@ -199,6 +212,8 @@ namespace 开发辅助工具.Manager
|
||||
{
|
||||
var _error_str = "";
|
||||
int error = 0;
|
||||
int replace_count = 0;
|
||||
ReplaceDllCount = 0;
|
||||
Updates("",folder);
|
||||
Updates("x86", folder+"\\x86");
|
||||
Updates("x64", folder + "\\x64");
|
||||
@@ -206,8 +221,10 @@ namespace 开发辅助工具.Manager
|
||||
{
|
||||
if (!System.IO.Directory.Exists(_path)) { return; }
|
||||
var files = System.IO.Directory.GetFiles(_path, "*.dll");
|
||||
OnReplaceDllProgress?.Invoke(0, files.Length, 0);
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
OnReplaceDllProgress?.Invoke(i, files.Length, i/ (float)files.Length);
|
||||
string filename = System.IO.Path.GetFileName(files[i]);
|
||||
var dllpath = GetDllPath(foldername, files[i]);
|
||||
if (dllpath.Length>0)
|
||||
@@ -222,17 +239,32 @@ namespace 开发辅助工具.Manager
|
||||
if (RyFiles.CopyFolder(sourch_folder + "\\x64\\", _path + "\\x64\\") != 0)
|
||||
{ _error_str += sourch_folder + "\\x64\\*\r\n"; error++; }
|
||||
}
|
||||
if (dllpath!= files[i] && !RyFiles.CopyBigFile(dllpath, files[i]))
|
||||
{ _error_str += files[i]+ "\r\n"; error++; }
|
||||
if (dllpath!= files[i])
|
||||
{
|
||||
if (!RyFiles.CopyBigFile(dllpath, files[i]))
|
||||
{
|
||||
_error_str += files[i] + "\r\n"; error++;
|
||||
}
|
||||
else
|
||||
{
|
||||
replace_count++;
|
||||
}
|
||||
}
|
||||
var dll_xml_path = System.IO.Path.GetDirectoryName(dllpath) +"\\"+ System.IO.Path.GetFileNameWithoutExtension(dllpath) + ".xml";
|
||||
if (System.IO.File.Exists(dll_xml_path))
|
||||
{
|
||||
var to_xml_path = System.IO.Path.GetDirectoryName(files[i]) + "\\" + System.IO.Path.GetFileNameWithoutExtension(files[i]) + ".xml";
|
||||
if (dll_xml_path.ToLower()!=to_xml_path.ToLower() && !RyFiles.CopyBigFile(dll_xml_path, to_xml_path))
|
||||
{ _error_str += files[i] + "\r\n"; error++; }
|
||||
if (dll_xml_path.ToLower()!=to_xml_path.ToLower())
|
||||
{
|
||||
if (!RyFiles.CopyBigFile(dll_xml_path, to_xml_path))
|
||||
{
|
||||
_error_str += files[i] + "\r\n"; error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OnReplaceDllProgress?.Invoke(files.Length, files.Length,1);
|
||||
var dirs = System.IO.Directory.GetDirectories(_path);
|
||||
for (int i = 0; i < dirs.Length; i++)
|
||||
{
|
||||
@@ -240,6 +272,7 @@ namespace 开发辅助工具.Manager
|
||||
}
|
||||
}
|
||||
error_str = _error_str;
|
||||
ReplaceDllCount = replace_count;
|
||||
return error;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -248,6 +281,10 @@ namespace 开发辅助工具.Manager
|
||||
public int UpdateCSproj(string folder)
|
||||
{
|
||||
int error = 0;
|
||||
if(System.IO.File.Exists(folder) && System.IO.Path.GetExtension(folder)== ".csproj")
|
||||
{
|
||||
SetCSproj(folder, "");
|
||||
}
|
||||
Updates(folder);
|
||||
void Updates(string _path)
|
||||
{
|
||||
@@ -276,7 +313,7 @@ namespace 开发辅助工具.Manager
|
||||
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
|
||||
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
|
||||
//var root = @"d:Project//d:ItemGroup//d:Reference";
|
||||
if (_project_Eng_name != "")
|
||||
if (_project_Eng_name.Length>0)
|
||||
{
|
||||
SetValue(@"d:Project//d:PropertyGroup//d:RootNamespace", _project_Eng_name.Replace(" ", ""));//命名空间名
|
||||
SetValue(@"d:Project//d:PropertyGroup//d:AssemblyName", _project_Eng_name.Replace(" ", ""));//程序集名称
|
||||
|
||||
Reference in new issue
Block a user