### 2025-01-13 星期一更新

------
#### SuperDesign    V3.0.2501.1302
- *.#### 项目功能
- *.[新增]更新日志新增支持记录每一行的新增时间。
- *.[新增]生成Html日志新增支持####标签转为h4标签。
- *.[新增]更新日志新增支持记录分组功能。
- *.[修复]修复项目窗口里的文件夹标签页列表视图没对齐的BUG。
- *.[修复]修复更新日志页面发布日志后会导致周期信息无法显示的BUG。
This commit is contained in:
紫林软件 2025-01-13 17:14:17 +08:00
parent d240361f74
commit 2b0b38dd14
8 changed files with 135 additions and 18 deletions

View File

@ -1,4 +1,14 @@
### 2025-01-13 星期一更新
------
#### SuperDesign V3.0.2501.1302
- *.#### 项目功能
- *.[新增]更新日志新增支持记录每一行的新增时间。
- *.[新增]生成Html日志新增支持####标签转为h4标签。
- *.[新增]更新日志新增支持记录分组功能。
- *.[修复]修复项目窗口里的文件夹标签页列表视图没对齐的BUG。
- *.[修复]修复更新日志页面发布日志后会导致周期信息无法显示的BUG。
### 2025-01-13 星期一更新
------

View File

@ -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<h4>" + System.Web.HttpUtility.HtmlEncode(log_item.Substring(5)) + "</h4>";
continue;
}
if (log_item.StartsWith("- *."))
{
log_text += "\r\n<p>" +System.Web.HttpUtility.HtmlEncode(log_item.Substring(2))+"</p>";

View File

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

View File

@ -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);

View File

@ -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<string, long> dict = new Dictionary<string, long>();
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<string, long> dict = new Dictionary<string, long>();
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)

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>388, 17</value>
</metadata>

View File

@ -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<string, long> dict = new Dictionary<string, long>();
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);
}