## 2025-04-24 星期四更新

### SuperDesign    V3.0.2504.2401
#### 项目功能->更新日志
- *.[新增]支持将更新日志直接更新到FTP上。
#### 网页抓取工具
- *.[修复]修复API编辑器在某些情况下因为时间戳识别错误导致报错的BUG。
This commit is contained in:
紫林软件 2025-04-24 16:26:40 +08:00
parent 7d0c050763
commit 30afab3ce9
14 changed files with 217 additions and 29 deletions

Binary file not shown.

View File

@ -11423,6 +11423,12 @@
</summary>
<param name="e"></param>
</member>
<member name="M:RaUI.UI.Rili.PaDateInput.OnPreviewKeyDown(System.Windows.Forms.PreviewKeyDownEventArgs)">
<summary>
</summary>
<param name="e"></param>
</member>
<member name="M:RaUI.UI.Rili.PaDateInput.OnKeyDown(System.Windows.Forms.KeyEventArgs)">
<summary>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link rel="stylesheet" href="css/cui.css" />
<link rel="stylesheet" href="css/comm.css" />
<link rel="stylesheet" href="css/game/style.css" />
<link rel="stylesheet" href="css/zx/style.css" />
<link rel="stylesheet" href="css/gl/style.css" />
<link rel="stylesheet" href="edit.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/comm.js"></script>
<script type="text/javascript" src="js/tab.js"></script>
</head>
<body>
<div id="wp">
<!--INCLUDE:/head/head.html-->
<div id="bd" style="width:100%"> <!--主体开始-->
<h2>智能编辑器</h2>
<p>*.[新增]在文件管理器中新增支持将所有站点对应的文件上传到FTP。</p>
<p>*.[新增]新增支持自动同步选定文件到最新版。</p>
<h2>开发辅助工具</h2>
<h4>项目功能-&gt;更新日志</h4>
<p>*.[修复]修复当更新日志为空时,插入更新分组会报错的BUG。</p>
<p>*.[修复]修复存在多个分组时,添加修复日志会添加到最后一个分组末尾的BUG。</p>
<h4>网页抓取工具</h4>
<p>*.[改进]改进网页图标获取,支持获取更多网站的图标。</p>
<p>*.[修复]修复当图标文件夹不存在时,读取图标会报错的BUG。</p>
<p>*.[修复]修复当Url不是图片地址时,勾选获取图片会报错的BUG。</p>
<p>*.[修复]某些情况下,当目标网站图标不存在时,点击执行按钮时会长时间等待的BUG。</p>
<p>*.[修复]修复剪切板读取失败可能会导致程序异常退出的BUG。</p>
<p>*.[修复]修复历史记录里的UserAgent值不正确导致无法执行操作的BUG。</p>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link rel="stylesheet" href="css/cui.css" />
<link rel="stylesheet" href="css/comm.css" />
<link rel="stylesheet" href="css/game/style.css" />
<link rel="stylesheet" href="css/zx/style.css" />
<link rel="stylesheet" href="css/gl/style.css" />
<link rel="stylesheet" href="edit.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/comm.js"></script>
<script type="text/javascript" src="js/tab.js"></script>
</head>
<body>
<div id="wp">
<!--INCLUDE:/head/head.html-->
<div id="bd" style="width:100%"> <!--主体开始-->
<%content%>
</div>
</div>
</body>
</html>

View File

@ -1,4 +1,4 @@
<root>
<list id="LastUpdateTime" Value="2025/3/14 13:47:24" />
<list id="LastUpdateTime" Value="2025/4/24 16:23:12" />
<list id="UpdateAfterTime" Value="0" />
</root>

View File

@ -1,4 +1,12 @@
## :date:2025-03-30 星期日更新
## :date:2025-04-24 星期四更新
### SuperDesign V3.0.2504.2401
#### 项目功能->更新日志
- :cactus:[新增]支持将更新日志直接更新到FTP上。
#### 网页抓取工具
- :lady_beetle:[修复]修复API编辑器在某些情况下因为时间戳识别错误导致报错的BUG。
## :date:2025-03-30 星期日更新
### RySmartEditor V1.0.2503.3001
- :cactus:[新增]在文件管理器中新增支持将所有站点对应的文件上传到FTP。

View File

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
@ -21,13 +22,28 @@ namespace SuperDesign.Manager.FTP
{
InitializeComponent();
}
/// <summary>
/// 更新日志模式
/// </summary>
public bool UpdateLogMode { get; set; } = false;
/// <summary>
/// 更新日志
/// </summary>
public string UpdateHtml { get; set; } = "";
public string LocalPath { get; set; } = "";
public string EngName { get; set; } = "";
public int FTPId { get; set; } = 0;
public string RemoteDir { get; set; } = "";
private void BtnUploadZSB_Click(object sender, EventArgs e)
{
Upload(EngName+".zip");
if (UpdateLogMode)
{
Upload(EngName + ".html_bak");
}
else
{
Upload(EngName + ".zip");
}
}
private void Upload(string filename)
{
@ -44,6 +60,32 @@ namespace SuperDesign.Manager.FTP
var opened = ftp.Open(ftp_info);
if (opened == 1)
{
if(UpdateLogMode)
{
var local_mod_file = System.IO.Path.GetDirectoryName(LocalPath) + "\\_mod.html";
var fileinfo = ftp.GetFileInfo(RemoteDir + "/_mod.html");
if(fileinfo!=null)
{
var local_dt = RyFiles.GetFileDate(local_mod_file);
if(fileinfo.LastWriteTime>local_dt.LastWriteTime)
{
if(ftp.Download(RemoteDir + "/_mod.html", local_mod_file)==1)
{
}
}
}
if(System.IO.File.Exists(local_mod_file))
{
var html= System.IO.File.ReadAllText(local_mod_file).Replace("<%content%>",UpdateHtml);
var local_html_file = System.IO.Path.GetDirectoryName(LocalPath) + "\\"+EngName+".html";
RyFiles.WriteAllText(local_html_file, html);
if (ftp.Upload(local_html_file, RemoteDir + "/" + EngName + ".html") != 1)
{
MessageBox.Show("本地目录:" + local_html_file + "\r\n远程目录:" + RemoteDir + "/" + EngName + ".html" + "\r\n" + ftp.LastError, "出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
if(ftp.Upload(LocalPath, RemoteDir + "/" + filename)!=1)
{
MessageBox.Show("本地目录:"+ LocalPath + "\r\n远程目录:"+ RemoteDir + "/" + filename+"\r\n"+ftp.LastError,"出错",MessageBoxButtons.OK, MessageBoxIcon.Error);
@ -76,7 +118,14 @@ namespace SuperDesign.Manager.FTP
private void BtnUploadBeta_Click(object sender, EventArgs e)
{
Upload(EngName + "_beta.zip");
if (UpdateLogMode)
{
Upload(EngName + "_beta.html_bak");
}
else
{
Upload(EngName + "_beta.zip");
}
}
}
}

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2503.3001")]
[assembly: AssemblyFileVersion("3.0.2503.3001")]
[assembly: AssemblyVersion("3.0.2504.2401")]
[assembly: AssemblyFileVersion("3.0.2504.2401")]

View File

@ -39,10 +39,14 @@ namespace 开发辅助工具.Tools
{
dt =RyDate.JSTimeToDateTime(time);
}
else
else if (row.ParamValue.Length==10)
{
dt = time.ToDateTime();
}
else
{
return row.ParamValue;
}
if (dt == DateTime.MinValue || dt<=new DateTime(2000,1,1) || dt >= new DateTime(2100, 1, 1)) { return row.ParamValue; }
if (dt == dt.Date) {return dt.ToString("yyyy-MM-dd"); }
return dt.ToString("yyyy-MM-dd HH:mm:ss");

View File

@ -92,6 +92,7 @@
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Html日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Html日志并上传到服务器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnPublishLogs = new ryControls.ButtonEx();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
@ -873,25 +874,33 @@
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.Html日志ToolStripMenuItem});
this.Html日志ToolStripMenuItem,
this.Html日志并上传到服务器ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(152, 48);
this.contextMenuStrip1.Size = new System.Drawing.Size(236, 70);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// 设为正式版本ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "设为正式版本ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(235, 22);
this.ToolStripMenuItem.Text = "设为正式版本";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 生成Html日志ToolStripMenuItem
//
this.Html日志ToolStripMenuItem.Name = "生成Html日志ToolStripMenuItem";
this.Html日志ToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.Html日志ToolStripMenuItem.Size = new System.Drawing.Size(235, 22);
this.Html日志ToolStripMenuItem.Text = "生成Html日志";
this.Html日志ToolStripMenuItem.Click += new System.EventHandler(this.Html日志ToolStripMenuItem_Click);
//
// 生成Html日志并上传到服务器ToolStripMenuItem
//
this.Html日志并上传到服务器ToolStripMenuItem.Name = "生成Html日志并上传到服务器ToolStripMenuItem";
this.Html日志并上传到服务器ToolStripMenuItem.Size = new System.Drawing.Size(235, 22);
this.Html日志并上传到服务器ToolStripMenuItem.Text = "生成Html日志并上传到服务器";
this.Html日志并上传到服务器ToolStripMenuItem.Click += new System.EventHandler(this.Html日志并上传到服务器ToolStripMenuItem_Click);
//
// BtnPublishLogs
//
this.BtnPublishLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -1019,5 +1028,6 @@
private System.Windows.Forms.Timer timer1;
private ryControls.ButtonEx BtnFtpFiles;
private ryControls.ButtonEx BtnPackFileList;
private System.Windows.Forms.ToolStripMenuItem Html日志并上传到服务器ToolStripMenuItem;
}
}

View File

@ -1814,9 +1814,8 @@ namespace 开发辅助工具.Tools
public List<string> FixInfo { get; set; } = new List<string>();
public List<string> OtherInfo { get; set; } = new List<string>();
}
private void Html日志ToolStripMenuItem_Click(object sender, EventArgs e)
private string GetHtmlLogs()
{
if (LvUpdateLogList.SelectedObjects.Count==0) { return; }
ryCommon.Ini ini = new Ini(GetBFFolderPath() + "\\查看项目.ryp");
var list = LvUpdateLogList.SelectedObjects;
List<UpLogItem> list2 = new List<UpLogItem>();
@ -1827,11 +1826,11 @@ namespace 开发辅助工具.Tools
}
list2.Sort((x, y) => x.CompareTo(y));
var Main_Project = ini.ReadIni("project", "MainProject", "");
Dictionary<string,Dictionary<string,UpContentInfo>> dict_up = new Dictionary<string, Dictionary<string, UpContentInfo>>();
Dictionary<string, Dictionary<string, UpContentInfo>> dict_up = new Dictionary<string, Dictionary<string, UpContentInfo>>();
Dictionary<string, string> dict_eng_to_chs = new Dictionary<string, string>();
for (int i = 0; i < list2.Count; i++)
{
var item =list2[i];
var item = list2[i];
try
{
JArray jarr = JArray.Parse(item.LogJson);
@ -1844,14 +1843,14 @@ namespace 开发辅助工具.Tools
continue;
}
var ProjectChsName = item_json.GetJsonValue("ProjectChsName", "");
if (ProjectChsName.Length> 0)
if (ProjectChsName.Length > 0)
{
if (!dict_eng_to_chs.ContainsKey(eng_name))
{ dict_eng_to_chs[eng_name] = ProjectChsName; }
}
if(!dict_up.ContainsKey(eng_name))
if (!dict_up.ContainsKey(eng_name))
{
dict_up[eng_name] =new Dictionary<string, UpContentInfo>();
dict_up[eng_name] = new Dictionary<string, UpContentInfo>();
}
var ValueTime = item_json.GetJsonValue("LogTime", "");
var JSON_ValueTime = ValueTime.Length == 0 ? new JArray() : JArray.Parse(ValueTime);
@ -1869,7 +1868,7 @@ namespace 开发辅助工具.Tools
var log_item = logs[m];
if (log_item.StartsWith("- *."))
{
log_item=log_item.Substring(2);
log_item = log_item.Substring(2);
}
if (log_item.IndexOf("[开发]") >= 0) { continue; }
if (log_item.StartsWith("#### "))
@ -1878,11 +1877,11 @@ namespace 开发辅助工具.Tools
}
#region
var group = "主功能";
if(dict_group.ContainsKey(log_item))
if (dict_group.ContainsKey(log_item))
{
group = dict_group[log_item];
}
UpContentInfo up_content=null;
UpContentInfo up_content = null;
if (!up_content_all.ContainsKey(group))
{
up_content = new UpContentInfo();
@ -1912,18 +1911,18 @@ namespace 开发辅助工具.Tools
else
{
up_content.OtherInfo.Add(log_item);
}
}
#endregion
}
}
}
catch(Exception ex)
catch (Exception ex)
{ }
}
string log_text = "";
if (dict_up.ContainsKey(Main_Project))
{
log_text += "<h4>" + System.Web.HttpUtility.HtmlEncode(dict_eng_to_chs.ContainsKey(Main_Project)? dict_eng_to_chs[Main_Project]:Main_Project) + "</h4>";
log_text += "<h2>" + System.Web.HttpUtility.HtmlEncode(dict_eng_to_chs.ContainsKey(Main_Project) ? dict_eng_to_chs[Main_Project] : Main_Project) + "</h2>";
var main_info_all = dict_up[Main_Project];
foreach (var item in main_info_all)
{
@ -1957,7 +1956,7 @@ namespace 开发辅助工具.Tools
foreach (var item in dict_up)
{
if (item.Key == Main_Project) { continue; }
log_text += "\r\n<h4>" + System.Web.HttpUtility.HtmlEncode(dict_eng_to_chs.ContainsKey(item.Key) ? dict_eng_to_chs[item.Key] : item.Key) + "</h4>";
log_text += "\r\n<h2>" + System.Web.HttpUtility.HtmlEncode(dict_eng_to_chs.ContainsKey(item.Key) ? dict_eng_to_chs[item.Key] : item.Key) + "</h2>";
var main_info_all = item.Value;
foreach (var item2 in main_info_all)
{
@ -1988,7 +1987,12 @@ namespace 开发辅助工具.Tools
}
}
}
RyFiles.CopyToClip(log_text.Trim());
return log_text.Trim();
}
private void Html日志ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvUpdateLogList.SelectedObjects.Count==0) { return; }
RyFiles.CopyToClip(GetHtmlLogs());
MessageBox.Show("已复制到剪切板。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
bool ProcUse = false;
@ -2046,6 +2050,55 @@ namespace 开发辅助工具.Tools
frm.Dispose();
}
}
private void Html日志并上传到服务器ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvUpdateLogList.SelectedObjects.Count == 0) { return; }
var html = GetHtmlLogs();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
var ds = db.ReadData("select * from Settings where name='Setting'");
if (ds.HaveData())
{
var row = ds.GetRow(0);
ryCommon.Storage mStor = new ryCommon.Storage(row["value"].ToString());
mStor.SelectNodeBySet();
var bf_folder = GetBFFolderPath();
if (bf_folder != "")
{
ryCommon.Ini ini = new ryCommon.Ini(bf_folder + "\\查看项目.ryp");
var eng_name = ini.ReadIni("project", "engname");
var proglang = ini.ReadIni("project", "proglang");
var confuse = ini.ReadIni("project", "confuse", 1);
var upload_name = ini.ReadIni("project", "UploadLogName");
if (upload_name.Trim().Length == 0) { upload_name = eng_name; }
var ftpid = mStor.GetAttrValue("ftpid", 0);
var ftp_remote_dir = mStor.GetAttrValue("ftp_remote_dir");
if (ftpid > 0)
{
this.Invoke(new Action(() =>
{
RyFiles.WriteAllText(Application.StartupPath + "\\temp_"+ upload_name + ".html", html);
SuperDesign.Manager.FTP.FrmUploadUpdateZipToFtp frm = new SuperDesign.Manager.FTP.FrmUploadUpdateZipToFtp();
frm.UpdateLogMode = true;
frm.UpdateHtml = html;
frm.LocalPath = Application.StartupPath + "\\temp_" + upload_name + ".html";
frm.EngName = upload_name;
frm.FTPId = ftpid;
frm.RemoteDir = ftp_remote_dir.TrimEnd('/')+ "/WebUpdateLogs/";
if (frm.ShowDialog() == DialogResult.OK)
{
//ShowState("上传完成...");
}
frm.Dispose();
RyFiles.DeleteFile(Application.StartupPath + "\\temp_"+ upload_name + ".html");
}));
}
}
}
}
}
}
class UpLogItem
{

View File

@ -126,9 +126,6 @@
<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>