diff --git a/Bin/Debug/SuperDesign/SuperDesign.exe b/Bin/Debug/SuperDesign/SuperDesign.exe index f90ea0d..b3d2665 100644 Binary files a/Bin/Debug/SuperDesign/SuperDesign.exe and b/Bin/Debug/SuperDesign/SuperDesign.exe differ diff --git a/CHANGELOG.md b/CHANGELOG.md index efe2eec..761a73f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ ### 2025-01-13 星期一更新 +------ +#### SuperDesign V3.0.2501.1302 +- *.#### 项目功能 +- *.[新增]更新日志新增支持记录每一行的新增时间。 +- *.[新增]生成Html日志新增支持####标签转为h4标签。 +- *.[新增]更新日志新增支持记录分组功能。 +- *.[修复]修复项目窗口里的文件夹标签页列表视图没对齐的BUG。 +- *.[修复]修复更新日志页面发布日志后会导致周期信息无法显示的BUG。 + +### 2025-01-13 星期一更新 ------ diff --git a/Source/开发辅助工具/Manager/APIManager.cs b/Source/开发辅助工具/Manager/APIManager.cs index 05c9aeb..b236231 100644 --- a/Source/开发辅助工具/Manager/APIManager.cs +++ b/Source/开发辅助工具/Manager/APIManager.cs @@ -69,6 +69,10 @@ namespace SuperDesign.Manager if (logs[m].Length == 0) { continue; } var log_item = logs[m]; if (log_item.IndexOfEx("[开发]") >= 0) { continue; } + if (log_item.IndexOfEx("#### ")== 0) { + log_text += "\r\n

" + System.Web.HttpUtility.HtmlEncode(log_item.Substring(5)) + "

"; + continue; + } if (log_item.StartsWith("- *.")) { log_text += "\r\n

" +System.Web.HttpUtility.HtmlEncode(log_item.Substring(2))+"

"; diff --git a/Source/开发辅助工具/Properties/AssemblyInfo.cs b/Source/开发辅助工具/Properties/AssemblyInfo.cs index 29b9362..21d7a45 100644 --- a/Source/开发辅助工具/Properties/AssemblyInfo.cs +++ b/Source/开发辅助工具/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.2501.1301")] -[assembly: AssemblyFileVersion("3.0.2501.1301")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.2501.1302")] +[assembly: AssemblyFileVersion("3.0.2501.1302")] \ No newline at end of file diff --git a/Source/开发辅助工具/Tools/FrmProject.Designer.cs b/Source/开发辅助工具/Tools/FrmProject.Designer.cs index dfd553a..95e2fa8 100644 --- a/Source/开发辅助工具/Tools/FrmProject.Designer.cs +++ b/Source/开发辅助工具/Tools/FrmProject.Designer.cs @@ -85,11 +85,11 @@ this.LvUpdateLogList = new BrightIdeasSoftware.ObjectListView(); this.OlvUpVer = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.OlvUpdateDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.OlvTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); 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.BtnPublishLogs = new ryControls.ButtonEx(); - this.OlvTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); ((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -158,7 +158,7 @@ this.table1.Location = new System.Drawing.Point(3, 3); this.table1.Name = "table1"; this.table1.NoItemsText = "当前列表没有任何项"; - this.table1.Size = new System.Drawing.Size(894, 371); + this.table1.Size = new System.Drawing.Size(915, 371); this.table1.TabIndex = 20; this.table1.TableModel = this.tableModel1; this.table1.Text = "table1"; @@ -430,7 +430,7 @@ this.tabPage2.Location = new System.Drawing.Point(1, 29); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(903, 380); + this.tabPage2.Size = new System.Drawing.Size(921, 380); this.tabPage2.TabIndex = 0; this.tabPage2.Text = "文件夹"; this.tabPage2.UseVisualStyleBackColor = true; @@ -456,7 +456,7 @@ this.tabPage1.Location = new System.Drawing.Point(1, 29); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(903, 380); + this.tabPage1.Size = new System.Drawing.Size(921, 380); this.tabPage1.TabIndex = 1; this.tabPage1.Text = "项目信息"; this.tabPage1.UseVisualStyleBackColor = true; @@ -690,7 +690,7 @@ this.tabPage3.Location = new System.Drawing.Point(1, 29); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(903, 380); + this.tabPage3.Size = new System.Drawing.Size(921, 380); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "C#编译选项"; this.tabPage3.UseVisualStyleBackColor = true; @@ -818,6 +818,11 @@ this.OlvUpdateDate.Text = "更新时间"; this.OlvUpdateDate.Width = 130; // + // OlvTime + // + this.OlvTime.Text = "周期"; + this.OlvTime.Width = 100; + // // contextMenuStrip1 // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -855,11 +860,6 @@ this.BtnPublishLogs.UseVisualStyleBackColor = true; this.BtnPublishLogs.Click += new System.EventHandler(this.BtnPublishLogs_Click); // - // OlvTime - // - this.OlvTime.Text = "周期"; - this.OlvTime.Width = 100; - // // FrmProject // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/Source/开发辅助工具/Tools/FrmProject.cs b/Source/开发辅助工具/Tools/FrmProject.cs index 14ccbc2..077fd0a 100644 --- a/Source/开发辅助工具/Tools/FrmProject.cs +++ b/Source/开发辅助工具/Tools/FrmProject.cs @@ -21,6 +21,7 @@ using System.Threading; using System.Windows.Documents; using System.Windows.Forms; using System.Xml; +using System.Xml.Linq; using WeifenLuo.WinFormsUI.Docking; using 开发辅助工具.Manager; @@ -848,7 +849,7 @@ namespace 开发辅助工具.Tools { if (clean) { - db.ExecuteNonQuery("update ProjectNowLogs set Value='',editTime="+DateTime.Now.ToInt64()); + db.ExecuteNonQuery("update ProjectNowLogs set Value='',ValueTime='', editTime="+DateTime.Now.ToInt64()); for (int i = 0; i < tabControl1.TabPages.Count; i++) { var tab = tabControl1.TabPages[i]; @@ -905,7 +906,35 @@ namespace 开发辅助工具.Tools mySQL.AddField("Value", rich.Text);//值 mySQL.AddField("editTime", DateTime.Now.ToInt64()); var ds = db.ReadData("select * from ProjectNowLogs where Name=@Name",mySQL); + var ValueTime = ""; if(ds.HaveData()) + { + ValueTime = ds.GetRow(0)["ValueTime"].ToString(); + } + var JSON_ValueTime = ValueTime.Length == 0 ? new JArray():JArray.Parse(ValueTime); + Dictionary dict = new Dictionary(); + for (int j = 0; j < JSON_ValueTime.Count; j++) + { + var item = JSON_ValueTime[j]; + dict[item.GetJsonValue("text", "")] = item.GetJsonValue("time", 0L); + } + var lines = rich.Lines; + for (int j = 0; j < lines.Length; j++) + { + if (lines[j].Length == 0) { continue; } + if (!dict.ContainsKey(lines[j])) + { + JObject jo = new JObject + { + ["text"] = lines[j], + ["time"] = DateTime.Now.ToInt64() + }; + JSON_ValueTime.Add(jo); + dict[lines[j]] = DateTime.Now.ToInt64(); + } + } + mySQL.AddField("ValueTime", JSON_ValueTime.ToString()); + if (ds.HaveData()) { if (ds.GetRow(0)["editTime"].ToInt64().ToDateTime()> p_item.LastSave) { @@ -1063,12 +1092,59 @@ namespace 开发辅助工具.Tools } } if (index == 0) { first_tag = p_item; } + var ds_now_up = db.ReadData("select * from ProjectNowLogs where Name='" + p_item.ProjectName + "'"); + var ValueTime = ""; + if (ds_now_up.HaveData()) + { + ValueTime = ds_now_up.GetRow(0)["ValueTime"].ToString(); + } + ds_now_up?.Dispose(); + var JSON_ValueTime = ValueTime.Length == 0 ? new JArray() : JArray.Parse(ValueTime); + Dictionary dict = new Dictionary(); + for (int j = 0; j < JSON_ValueTime.Count; j++) + { + var item = JSON_ValueTime[j]; + dict[item.GetJsonValue("text", "")] = item.GetJsonValue("time", 0L); + } + var lines = rich.Lines; + var now_jarr = new JArray(); + var group = ""; + for (int j = 0; j < lines.Length; j++) + { + if (lines[j].Length == 0) { continue; } + if (lines[j].StartsWith("#### ")) + { + group = lines[j].Substring(5); + } + if (!dict.ContainsKey(lines[j])) + { + JObject jo = new JObject + { + ["text"] = lines[j], + ["time"] = DateTime.Now.ToInt64(), + ["group"]= group, + }; + now_jarr.Add(jo); + dict[lines[j]] = DateTime.Now.ToInt64(); + } + else + { + JObject jo = new JObject + { + ["text"] = lines[j], + ["time"] = dict[lines[j]], + ["group"] = group, + }; + now_jarr.Add(jo); + } + } JObject jo_item = new JObject { { "ProjectName", p_item.ProjectName }, { "ProjectChsName", txt.Text }, { "VerStr", Version }, - { "LogText",rich.Text } + { "LogText",rich.Text }, + { "LogTime",now_jarr } }; if (Main_Version.Length > 0) { @@ -1126,6 +1202,11 @@ namespace 开发辅助工具.Tools for (int i = 0; i < ds_logs.RowCount(); i++) { var row = ds_logs.GetRow(i); + var IntervalTime = 0L; + if (i < ds_logs.RowCount() - 1) + { + IntervalTime = row["addTime"].ToInt64() - ds_logs.GetRow(i + 1)["addTime"].ToInt64(); + } list.Add(new UpLogItem() { Id= row["id"].ToInt(), @@ -1134,6 +1215,7 @@ namespace 开发辅助工具.Tools LogText = row["LogText"].ToString(), LogJson = row["LogJson"].ToString(), AddTime = row["addTime"].ToInt64(), + IntervalTime= IntervalTime }); } LvUpdateLogList.AddObjects(list); @@ -1253,6 +1335,7 @@ namespace 开发辅助工具.Tools mySQL.AddField("Name", ""); mySQL.AddField("ChsName", "");//值 mySQL.AddField("Value", "");//值 + mySQL.AddField("ValueTime", "");//值 mySQL.AddField("editTime", DateTime.Now.ToInt64()); mySQL.AddField("addTime", DateTime.Now.ToInt64()); if (db.CreateDb(mySQL) == 1) diff --git a/Source/开发辅助工具/Tools/FrmProject.resx b/Source/开发辅助工具/Tools/FrmProject.resx index 91b9b63..9d3a98e 100644 --- a/Source/开发辅助工具/Tools/FrmProject.resx +++ b/Source/开发辅助工具/Tools/FrmProject.resx @@ -126,9 +126,6 @@ 285, 17 - - 285, 17 - 388, 17 diff --git a/Source/开发辅助工具/Tools/UpLog/FrmUpdateLog.cs b/Source/开发辅助工具/Tools/UpLog/FrmUpdateLog.cs index 8ca6413..87c0357 100644 --- a/Source/开发辅助工具/Tools/UpLog/FrmUpdateLog.cs +++ b/Source/开发辅助工具/Tools/UpLog/FrmUpdateLog.cs @@ -44,6 +44,29 @@ namespace SuperDesign.Tools AutoSize = true, Text = "版本号:" + item.GetJsonValue("VerStr", "") }; + var LogTime = item.GetJsonValue("LogTime", ""); + var now_jarr = LogTime.Length==0? new JArray(): JArray.Parse(LogTime); + Dictionary dict = new Dictionary(); + for (int j = 0; j < now_jarr.Count; j++) + { + var item_jarr = now_jarr[j]; + dict[item_jarr.GetJsonValue("text", "")] = item_jarr.GetJsonValue("time", 0L); + } + var LogText_lines = item.GetJsonValue("LogText", "").Replace("\r", "\n").Replace("\n\n", "\n").Split('\n'); + var LogText = ""; + for (int l = 0; l < LogText_lines.Length; l++) + { + if (LogText_lines[l].Length == 0) { continue; } + if (LogText.Length > 0) { LogText += "\n"; } + if(dict.ContainsKey(LogText_lines[l])) + { + LogText += LogText_lines[l] + "=>" + dict[LogText_lines[l]].ToDateTime().ToString("yyyy-MM-dd HH:mm"); + } + else + { + LogText += LogText_lines[l]; + } + } RichTextBox2 rich = new RichTextBox2 { Parent = tab, @@ -56,7 +79,7 @@ namespace SuperDesign.Tools Location = new Point(label.Left, label.Top + label.Height + 4), Size = new Size(tab.ClientSize.Width, tab.ClientSize.Height - (label.Top + label.Height + 4)), Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom, - Text= item.GetJsonValue("LogText", "") + Text= LogText }; tabControl1.TabPages.Add(tab); }