## :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:
zilinsoft committed 2026-04-11 13:48:30 +08:00
1 parent 9d3ea0c979
commit ee1a5b9c34
24 files changed
+476 -200

No files matched your search

+43 -6
View File
@@ -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(" ", ""));//程序集名称
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2508.2601")]
[assembly: AssemblyFileVersion("3.0.2508.2601")]
[assembly: AssemblyVersion("3.0.2604.1101")]
[assembly: AssemblyFileVersion("3.0.2604.1101")]
+1 -1
View File
@@ -19,7 +19,7 @@ namespace SuperDesign.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
+1 -1
View File
@@ -12,7 +12,7 @@ namespace SuperDesign.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>get "E:\My Datas\My Codes\毕方项目\CSharp\SuperDesign\Source\开发辅助工具\SuperDesign.csproj"</StartArguments>
<StartArguments>get "E:\My Datas\My Codes\毕方项目\CSharp\数据库备份工具\Source\DatabaseBackup\DatabaseBackup.csproj"</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
@@ -198,6 +198,33 @@ namespace 开发辅助工具.Tools
ryCommon.RyFiles.WriteAllText(source_folder + "\\Properties\\AssemblyInfo.cs", AssemblyInfo, Encoding.UTF8);
#endregion
#region 替换命名空间
SuperFileSearch superFileSearch = new SuperFileSearch();
superFileSearch.Search(source_folder, "*.cs");
for (int i = 0; i < superFileSearch.ResultFiles.Count; i++)
{
var file_content = ryCommon.RyFiles.ReadAllLines(superFileSearch.ResultFiles[i].FullName);
if(file_content!=null && file_content.Length>0)
{
var have_changed = false;
for (int f = 0; f < file_content.Length; f++)
{
if (file_content[f].Trim().StartsWith("namespace "))
{
file_content[f] = file_content[f].Replace("Itrycn_Project2", project_Eng_name);
have_changed = true;
}
else if(file_content[f].Trim().StartsWith("using "))
{
file_content[f] = file_content[f].Replace("Itrycn_Project2", project_Eng_name);
have_changed = true;
}
}
if(have_changed)
{
RyFiles.WriteAllLines(superFileSearch.ResultFiles[i].FullName, file_content, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false));
}
}
}
//var Resources = ryCommon.RyFiles.ReadAllText(source_folder + "\\Properties\\Resources.Designer.cs");
//Resources = Resources.Replace("Itrycn_Project.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
//Resources = Resources.Replace("Itrycn_Project2.Properties", project_Eng_name.Replace(" ", "") + ".Properties");
+58 -47
View File
@@ -77,6 +77,10 @@
this.TxtName = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.label7 = new System.Windows.Forms.Label();
this.LvProjectBuild = new BrightIdeasSoftware.ObjectListView();
this.olvProjectName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.olvPlatform = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.BtnSave2 = new ryControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.tabPage4 = new System.Windows.Forms.TabPage();
@@ -96,10 +100,7 @@
this.生成Html日志并上传到服务器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnPublishLogs = new ryControls.ButtonEx();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label7 = new System.Windows.Forms.Label();
this.LvProjectBuild = new BrightIdeasSoftware.ObjectListView();
this.olvProjectName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.olvPlatform = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.progressBar1 = new System.Windows.Forms.ProgressBar();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -107,11 +108,11 @@
this.tabPage2.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvProjectBuild)).BeginInit();
this.panel1.SuspendLayout();
this.tabPage4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvProjectBuild)).BeginInit();
this.SuspendLayout();
//
// BtnCustomMessageBox
@@ -399,6 +400,7 @@
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.progressBar1);
this.groupBox1.Controls.Add(this.ChkPackByLite);
this.groupBox1.Controls.Add(this.BtnRepairFolder);
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
@@ -451,6 +453,7 @@
this.chromeTabControl1.Controls.Add(this.tabPage3);
this.chromeTabControl1.Controls.Add(this.tabPage4);
this.chromeTabControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.chromeTabControl1.DrawTabBorder = true;
this.chromeTabControl1.ItemSize = new System.Drawing.Size(100, 25);
this.chromeTabControl1.Location = new System.Drawing.Point(3, 205);
this.chromeTabControl1.Name = "chromeTabControl1";
@@ -458,7 +461,6 @@
this.chromeTabControl1.ShowAddButton = false;
this.chromeTabControl1.ShowCloseButton = false;
this.chromeTabControl1.Size = new System.Drawing.Size(1041, 500);
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.chromeTabControl1.TabContextMenuStrip = null;
this.chromeTabControl1.TabIndex = 29;
this.chromeTabControl1.TabMaxWidth = 100;
@@ -738,6 +740,48 @@
this.tabPage3.Text = "C#编译选项";
this.tabPage3.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(11, 61);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 39;
this.label7.Text = "打包前编译";
//
// LvProjectBuild
//
this.LvProjectBuild.AllColumns.Add(this.olvProjectName);
this.LvProjectBuild.AllColumns.Add(this.olvPlatform);
this.LvProjectBuild.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.LvProjectBuild.CellEditUseWholeCell = false;
this.LvProjectBuild.CheckBoxes = true;
this.LvProjectBuild.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.olvProjectName,
this.olvPlatform});
this.LvProjectBuild.Cursor = System.Windows.Forms.Cursors.Default;
this.LvProjectBuild.FullRowSelect = true;
this.LvProjectBuild.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.LvProjectBuild.HideSelection = false;
this.LvProjectBuild.Location = new System.Drawing.Point(12, 76);
this.LvProjectBuild.Name = "LvProjectBuild";
this.LvProjectBuild.Size = new System.Drawing.Size(391, 344);
this.LvProjectBuild.TabIndex = 38;
this.LvProjectBuild.UseCompatibleStateImageBehavior = false;
this.LvProjectBuild.View = System.Windows.Forms.View.Details;
this.LvProjectBuild.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.LvProjectBuild_ItemChecked);
//
// olvProjectName
//
this.olvProjectName.Text = "项目";
this.olvProjectName.Width = 180;
//
// olvPlatform
//
this.olvPlatform.Text = "平台";
this.olvPlatform.Width = 130;
//
// BtnSave2
//
this.BtnSave2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -943,47 +987,13 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label7
// progressBar1
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(11, 61);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 39;
this.label7.Text = "打包前编译";
//
// LvProjectBuild
//
this.LvProjectBuild.AllColumns.Add(this.olvProjectName);
this.LvProjectBuild.AllColumns.Add(this.olvPlatform);
this.LvProjectBuild.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.LvProjectBuild.CellEditUseWholeCell = false;
this.LvProjectBuild.CheckBoxes = true;
this.LvProjectBuild.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.olvProjectName,
this.olvPlatform});
this.LvProjectBuild.Cursor = System.Windows.Forms.Cursors.Default;
this.LvProjectBuild.FullRowSelect = true;
this.LvProjectBuild.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.LvProjectBuild.HideSelection = false;
this.LvProjectBuild.Location = new System.Drawing.Point(12, 76);
this.LvProjectBuild.Name = "LvProjectBuild";
this.LvProjectBuild.Size = new System.Drawing.Size(391, 344);
this.LvProjectBuild.TabIndex = 38;
this.LvProjectBuild.UseCompatibleStateImageBehavior = false;
this.LvProjectBuild.View = System.Windows.Forms.View.Details;
this.LvProjectBuild.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.LvProjectBuild_ItemChecked);
//
// olvProjectName
//
this.olvProjectName.Text = "项目";
this.olvProjectName.Width = 180;
//
// olvPlatform
//
this.olvPlatform.Text = "平台";
this.olvPlatform.Width = 130;
this.progressBar1.Location = new System.Drawing.Point(851, 23);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(161, 22);
this.progressBar1.TabIndex = 32;
this.progressBar1.Visible = false;
//
// FrmProject
//
@@ -1014,13 +1024,13 @@
this.tabPage1.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.LvProjectBuild)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvProjectBuild)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -1099,5 +1109,6 @@
private BrightIdeasSoftware.ObjectListView LvProjectBuild;
private BrightIdeasSoftware.OLVColumn olvProjectName;
private BrightIdeasSoftware.OLVColumn olvPlatform;
private System.Windows.Forms.ProgressBar progressBar1;
}
}
+17 -1
View File
@@ -1147,6 +1147,7 @@ namespace 开发辅助工具.Tools
private void BtnUpdateDllVer_Click(object sender, EventArgs e)
{
progressBar1.Visible = true;
BtnUpdateDllVer.Enabled = false;
int error = 0;
RyProject project = new RyProject
@@ -1154,6 +1155,7 @@ namespace 开发辅助工具.Tools
CopyDllToBin = true,
ChangedOutputPath = false
};
project.OnReplaceDllProgress += Project_OnReplaceDllProgress;
var bf_folder = GetBFFolderPath();
var _error_str = "";
if (bf_folder != "")
@@ -1166,9 +1168,17 @@ namespace 开发辅助工具.Tools
error += project.UpdateDlls(debug_path, out _error_str);
}
BtnUpdateDllVer.Enabled = true;
progressBar1.Visible = false;
if (error == 0)
{
MessageBox.Show("更新dll完成。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
if (project.ReplaceDllCount == 0)
{
MessageBox.Show("没有发现需要替换的文件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("更新dll完成,共替换" + project.ReplaceDllCount + "个dll文件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
else
{
@@ -1176,6 +1186,12 @@ namespace 开发辅助工具.Tools
}
}
private void Project_OnReplaceDllProgress(long curValue, long totalValue, double percent)
{
progressBar1.Value = (percent * 100).ToInt();
Application.DoEvents();
}
private void BtnRepairFolder_Click(object sender, EventArgs e)
{
var _path = GetBFFolderPath();
@@ -126,6 +126,9 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>392, 17</value>
</metadata>
+2 -2
View File
@@ -1744,10 +1744,10 @@ namespace 开发辅助工具.Tools
builder.Append(" Encoding = System.Text.Encoding.GetEncoding( \"" + this.CbbEncoding.Text.Trim() + "\"),//URL 可选项 默认为Get \r\n");
}
builder.Append(" Method = \"" + item.Method + "\",//URL 可选项 默认为Get \r\n");
builder.Append(" Cookie = \"" + item.Cookie.Replace("\n", "\"+\n \"") + "\",//字符串Cookie 可选项 \r\n");
builder.Append(" Cookie = \"" + item.Cookie.Replace("\"", "\\\"").Replace("\r\n", "\""+"+\r\n +\"") + "\",//字符串Cookie 可选项 \r\n");
builder.Append(" Referer =\"" + item.Referer + "\",//来源URL 可选项 \r\n");
builder.Append(" Accept = \"" + item.Accept + "\",//Accept 可选项 \r\n");
builder.Append(" Postdata = \"" + item.Postdata.Replace("\n", "\"+\n \"") + "\",//Post数据 可选项GET时不需要写 \r\n");
builder.Append(" Postdata = \"" + item.Postdata.Replace("\"","\\\"").Replace("\r\n", "\"" + "+\r\n \"") + "\",//Post数据 可选项GET时不需要写 \r\n");
builder.Append(" Timeout = " + item.Timeout + ",//连接超时时间 可选项默认为100000 \r\n");
builder.Append(" ReadWriteTimeout = " + item.ReadWriteTimeout + ",//写入Post数据超时时间 可选项默认为30000 \r\n");
builder.Append(" UserAgent = \"" + item.UserAgent + "\",//用户的浏览器类型,版本,操作系统 可选项有默认值 \r\n");