### 2024-12-20 星期五更新

------
#### SuperDesign    V3.0.2412.2003
- *.[新增]新增支持更新日志发布时自动调用起TortoiseGit。
- *.[新增]版本列表新增支持设置正式版本。
- *.[改进]自定义对话框针对单选函数返回值,则使用if而不是switch语句。
- *.[改进]点击发布日志按钮弹出确认框,避免误点击。
- *.[改进]更新版本列表的更新时间支持昨天、今天的简短显示。
This commit is contained in:
zilinsoft committed 2024-12-20 15:55:33 +08:00
1 parent 179f349d8f
commit a0cbe0a68f
36 files changed
+245 -1770

No files matched your search

@@ -40,7 +40,7 @@
this.BtnCopyMD.Name = "BtnCopyMD";
this.BtnCopyMD.Size = new System.Drawing.Size(157, 46);
this.BtnCopyMD.TabIndex = 27;
this.BtnCopyMD.Text = "复制GIT更新日志(MD)";
this.BtnCopyMD.Text = "复制Git更新日志(MD)";
this.BtnCopyMD.UseDefSkin = false;
this.BtnCopyMD.UseVisualStyleBackColor = true;
this.BtnCopyMD.Click += new System.EventHandler(this.BtnCopyMD_Click);
@@ -7,6 +7,7 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -31,9 +32,42 @@ namespace SuperDesign.Tools.UpLog
}
catch { }
}
public string BFFolderPath { get; set; } = "";
int index = 0;
private void BtnCopyMD_Click(object sender, EventArgs e)
{
RyFiles.CopyToClip(MdLog);
var git_path= SuperDesign.Manager.APIManager.GetTortoiseGitProcPath();
if(git_path.Length>0 && BFFolderPath.Length>0)
{
RyFiles.RunFile(git_path, "/command:commit", BFFolderPath);
using (var bg = new BackgroundWorker())
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(1000); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
var handle = RyForm.GetForegroundWindow();
var path = ryCommon.ProcessExt.GetPath(RyForm.GetProcessId(handle));
if (path != null && path.Length > 0)
{
var filename = System.IO.Path.GetFileName(path);
if (filename == "TortoiseGitProc.exe")
{
SendKeys.Send("^v");
}
}
else
{
index++;
if(index>10 || this.IsDisposed)
{
return;
}
System.Threading.Thread.Sleep(1000);
}
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
}
}
}
private void BtnCopyHtml_Click(object sender, EventArgs e)
@@ -51,7 +51,7 @@ namespace SuperDesign.Tools
Font = new Font("微软雅黑", 11),
ReadOnly=true,
BackColor=Color.White,
Location = new Point(label.Left, label.Top + label.Height + 2),
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", "")