### 2025-01-08 星期三更新

------
#### RySmartEditor    V1.0.2501.0801
- *.[改进]复制文件到其它站点同位置功能支持复制文件夹。
#### SuperDesign    V3.0.2501.0801
- *.[新增]支持直接设置主项目的功能。
- *.[新增]新增支持设置在发布日志时是否更新版本号的功能。
- *.[新增]更新日志右键菜单支持快速添加日志前缀。
- *.[改进]更新日志保存时如果冲突,则显示数据库和本地日志内容进行对比。
- *.[修复]修复更新日志输入框粘贴文本会携带颜色的字体的BUG。
- *.[修复]修复打开Git时无法粘贴更新日志的BUG。
This commit is contained in:
zilinsoft committed 2025-01-08 16:55:25 +08:00
1 parent 1501abd07f
commit c000c7ef1b
21 files changed
+631 -80

No files matched your search

@@ -0,0 +1,140 @@
namespace SuperDesign.Tools.UpLog
{
partial class FrmCompareLog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCompareLog));
this.Rich1 = new ryControls.Controls.RichTextBox2();
this.Rich2 = new ryControls.Controls.RichTextBox2();
this.BtnSubmit = new ryControls.ButtonEx();
this.BtnCancel = new ryControls.ButtonEx();
this.Lbl1 = new System.Windows.Forms.Label();
this.Lbl2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// Rich1
//
this.Rich1.DetectUrls = false;
this.Rich1.EmptyText = "";
this.Rich1.Font = new System.Drawing.Font("Courier New", 10F);
this.Rich1.Location = new System.Drawing.Point(1, 62);
this.Rich1.Name = "Rich1";
this.Rich1.OnlyInputText = true;
this.Rich1.Size = new System.Drawing.Size(356, 497);
this.Rich1.TabIndex = 0;
this.Rich1.Text = "";
//
// Rich2
//
this.Rich2.DetectUrls = false;
this.Rich2.EmptyText = "";
this.Rich2.Font = new System.Drawing.Font("Courier New", 10F);
this.Rich2.Location = new System.Drawing.Point(363, 62);
this.Rich2.Name = "Rich2";
this.Rich2.OnlyInputText = true;
this.Rich2.Size = new System.Drawing.Size(356, 497);
this.Rich2.TabIndex = 1;
this.Rich2.Text = "";
//
// BtnSubmit
//
this.BtnSubmit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnSubmit.BaseColor = System.Drawing.Color.Green;
this.BtnSubmit.ColorGradient = true;
this.BtnSubmit.Location = new System.Drawing.Point(2, 5);
this.BtnSubmit.Name = "BtnSubmit";
this.BtnSubmit.Size = new System.Drawing.Size(75, 33);
this.BtnSubmit.TabIndex = 10;
this.BtnSubmit.Text = "确认覆盖";
this.BtnSubmit.UseDefSkin = false;
this.BtnSubmit.UseVisualStyleBackColor = true;
this.BtnSubmit.Click += new System.EventHandler(this.BtnSubmit_Click);
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.BtnCancel.ColorGradient = true;
this.BtnCancel.Location = new System.Drawing.Point(83, 5);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(75, 33);
this.BtnCancel.TabIndex = 11;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseDefSkin = false;
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// Lbl1
//
this.Lbl1.AutoSize = true;
this.Lbl1.Location = new System.Drawing.Point(0, 47);
this.Lbl1.Name = "Lbl1";
this.Lbl1.Size = new System.Drawing.Size(35, 12);
this.Lbl1.TabIndex = 12;
this.Lbl1.Text = "文本1";
//
// Lbl2
//
this.Lbl2.AutoSize = true;
this.Lbl2.Location = new System.Drawing.Point(361, 47);
this.Lbl2.Name = "Lbl2";
this.Lbl2.Size = new System.Drawing.Size(35, 12);
this.Lbl2.TabIndex = 13;
this.Lbl2.Text = "文本2";
//
// FrmCompareLog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(790, 563);
this.Controls.Add(this.Lbl2);
this.Controls.Add(this.Lbl1);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnSubmit);
this.Controls.Add(this.Rich2);
this.Controls.Add(this.Rich1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmCompareLog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "确认日志覆盖";
this.Load += new System.EventHandler(this.FrmCompareLog_Load);
this.Resize += new System.EventHandler(this.FrmCompareLog_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnSubmit;
private ryControls.ButtonEx BtnCancel;
public ryControls.Controls.RichTextBox2 Rich1;
public ryControls.Controls.RichTextBox2 Rich2;
public System.Windows.Forms.Label Lbl1;
public System.Windows.Forms.Label Lbl2;
}
}
@@ -0,0 +1,48 @@
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;
namespace SuperDesign.Tools.UpLog
{
public partial class FrmCompareLog : Form
{
public FrmCompareLog()
{
InitializeComponent();
}
private void SetSize()
{
Rich1.Width = Rich2.Width = (this.ClientSize.Width - 8) / 2;
Rich1.Height = Rich2.Height = this.ClientSize.Height - Rich1.Top - 2;
Rich2.Left = Rich1.Left + Rich1.Width + 4;
Lbl1.Left = Rich1.Left=2;
Lbl2.Left = Rich2.Left;
}
private void FrmCompareLog_Resize(object sender, EventArgs e)
{
SetSize();
}
private void FrmCompareLog_Load(object sender, EventArgs e)
{
Rich1.WordWrap = Rich2.WordWrap = false;
SetSize();
}
private void BtnSubmit_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAAAIADGAQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAF9SURBVFhHY2CAgsOP/zscevR//qFH/+8fevT//9rTr/5L6oRSjNVss/5P33Ll
P8hMqNn7QXbB7AWDQ4/+J0AVwDFIE8gAoZRXFGE5cxQHwPHhh//rkX2OoQCkCaRZMPc/RRiXA0B4//3/
CiDfg4IdQ5JcB/hO+v9/6Yn///XrCTsAFB0gB6ALUuQAGDh8iygH/KeZA0BgZDvg4dsBcgAoAYJAxzYI
X9GSTAeACiJQISIcewXDEkIYlgNAekFlCcgsdPMJOgCES6bu/y9tmgUuUNAtIYRBemQdGv5HFkzFMJdo
B4BcntSw6r+yddZ/ZZcGkjDI54QsJ+gAGAY5pGnefpIwuhm4MFEOoCUedcCoA0YdMOoAgg5Yf+/T/9IL
Z0nGHVdvgvWim4eOCTrA/8Tm/xr7Z5GFrQ8vxzAPHQ9+B4CCERSc6EFMDKZKFNAagxwA7ooNEL4PcgDW
jgmd8H5Y12xAQgHeSQV1FNEl6YATUHrI0JDYT4fQmI/cPQcAn3IBrGGmgNcAAAAASUVORK5CYII=
</value>
</data>
</root>
@@ -9,6 +9,7 @@ using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -40,32 +41,30 @@ namespace SuperDesign.Tools.UpLog
var git_path= SuperDesign.Manager.APIManager.GetTortoiseGitProcPath();
if(git_path.Length>0 && BFFolderPath.Length>0)
{
index = 0;
RyFiles.RunFile(git_path, "/command:commit", BFFolderPath);
using (var bg = new BackgroundWorker())
new Thread(Start).Start();
void Start()
{
bg.DoWork += delegate { System.Threading.Thread.Sleep(1000); };//180秒后,3分钟
bg.RunWorkerCompleted += delegate {
while (index < 10 && !this.IsDisposed)
{
System.Threading.Thread.Sleep(1000);
var handle = RyForm.GetForegroundWindow();
var path = ryCommon.ProcessExt.GetPath(RyForm.GetProcessId(handle));
index++;
if (path != null && path.Length > 0)
{
var filename = System.IO.Path.GetFileName(path);
if (filename == "TortoiseGitProc.exe")
{
SendKeys.Send("^v");
this.Invoke(new Action(() =>
{
SendKeys.Send("^v");
}));
break;
}
}
else
{
index++;
if(index>10 || this.IsDisposed)
{
return;
}
System.Threading.Thread.Sleep(1000);
}
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
}
}
}
}
@@ -51,6 +51,8 @@ namespace SuperDesign.Tools
Font = new Font("微软雅黑", 11),
ReadOnly=true,
BackColor=Color.White,
ScrollBars= RichTextBoxScrollBars.Both,
WordWrap=false,
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,