SuperDesign/Source/开发辅助工具/Tools/UpLog/FrmUpdateLog.cs
zilinsoft a0cbe0a68f ### 2024-12-20 星期五更新
------
#### SuperDesign    V3.0.2412.2003
- *.[新增]新增支持更新日志发布时自动调用起TortoiseGit。
- *.[新增]版本列表新增支持设置正式版本。
- *.[改进]自定义对话框针对单选函数返回值,则使用if而不是switch语句。
- *.[改进]点击发布日志按钮弹出确认框,避免误点击。
- *.[改进]更新版本列表的更新时间支持昨天、今天的简短显示。
2024-12-20 15:55:33 +08:00

66 lines
2.2 KiB
C#

using Newtonsoft.Json.Linq;
using ryCommon;
using ryControls.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace SuperDesign.Tools
{
public partial class FrmUpdateLog : Form
{
public FrmUpdateLog()
{
InitializeComponent();
}
public void ShowLog(string LogJson)
{
try
{
JArray jarr = JArray.Parse(LogJson);
for (int i = 0; i < jarr.Count; i++)
{
var item = jarr[i];
var ProjectName = item.GetJsonValue("ProjectChsName", "");
if(ProjectName.Length==0)
{
ProjectName = item.GetJsonValue("ProjectName", "");
}
TabPage tab = new TabPage()
{
Text = ProjectName
};
Label label = new Label
{
Parent = tab,
Location = new Point(1, 4),
AutoSize = true,
Text = "版本号:" + item.GetJsonValue("VerStr", "")
};
RichTextBox2 rich = new RichTextBox2
{
Parent = tab,
Dock = DockStyle.Fill,
Font = new Font("微软雅黑", 11),
ReadOnly=true,
BackColor=Color.White,
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", "")
};
tabControl1.TabPages.Add(tab);
}
}
catch { }
}
}
}