### 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

@@ -1 +1 @@
{"RootPath":"E:\\My Datas\\My Codes\\毕方项目\\CSharp\\SuperDesign\\Source\\开发辅助工具","ProjectFileName":"SuperDesign.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteItem.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteItems.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteListView.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteMenu.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteMenuHost.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\Colors.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\EventArgs.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\IAutocompleteListView.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\ITextBoxWrapper.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\Range.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\ScintillaWrapper.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\TextBoxWrapper.cs"},{"SourceFile":"Controls\\Highlight\\CharacterRange.cs"},{"SourceFile":"Controls\\Highlight\\ContextMenuStripHighlightText2.cs"},{"SourceFile":"Controls\\Highlight\\ContextMenuStripHighlightText2.Designer.cs"},{"SourceFile":"Controls\\ContextMenuStripRichText.cs"},{"SourceFile":"Controls\\ContextMenuStripRichText.Designer.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.Designer.cs"},{"SourceFile":"Controls\\FrmText.cs"},{"SourceFile":"Controls\\FrmText.Designer.cs"},{"SourceFile":"Controls\\FrmTitle.cs"},{"SourceFile":"Controls\\FrmTitle.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindAllResults\\FindAllResultsPanel.cs"},{"SourceFile":"Controls\\Highlight\\FindAllResults\\FindAllResultsPanel.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindConfig.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindConfig.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindOption.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplace.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplaceDialog.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplaceDialog.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\IncrementalSearcher.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\IncrementalSearcher.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\ToolStripIncrementalSearcher.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoTo.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoToDialog.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoToDialog.Designer.cs"},{"SourceFile":"Controls\\Highlight\\HighlightEditor.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerBatch.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCommon.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCpp.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCs.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCss.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerHtml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerIni.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerInnoSetup.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJava.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJavaScript.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJson.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerNsis.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerNull.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPascal.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPhp.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPowerShell.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPython.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerSql.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerVb.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerXml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerYaml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\LexerFoldProperties.cs"},{"SLine truncated
{"RootPath":"E:\\My Datas\\My Codes\\毕方项目\\CSharp\\SuperDesign\\Source\\开发辅助工具","ProjectFileName":"SuperDesign.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Controls\\ContextMenuStripRichText.cs"},{"SourceFile":"Controls\\ContextMenuStripRichText.Designer.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.Designer.cs"},{"SourceFile":"Controls\\FrmText.cs"},{"SourceFile":"Controls\\FrmText.Designer.cs"},{"SourceFile":"Controls\\FrmTitle.cs"},{"SourceFile":"Controls\\FrmTitle.Designer.cs"},{"SourceFile":"Controls\\MenuRight.cs"},{"SourceFile":"Controls\\MenuRight.Designer.cs"},{"SourceFile":"Form1.cs"},{"SourceFile":"Form1.Designer.cs"},{"SourceFile":"FrmMessageBox.cs"},{"SourceFile":"FrmMessageBox.Designer.cs"},{"SourceFile":"Globals.cs"},{"SourceFile":"Manager\\APIManager.cs"},{"SourceFile":"Manager\\FrmAddVar.cs"},{"SourceFile":"Manager\\FrmAddVar.Designer.cs"},{"SourceFile":"Manager\\FrmSetting.cs"},{"SourceFile":"Manager\\FrmSetting.Designer.cs"},{"SourceFile":"Manager\\FTP\\FileTransferProgressEventArgs.cs"},{"SourceFile":"Manager\\FTP\\FrmUploadFilesToFtp.cs"},{"SourceFile":"Manager\\FTP\\FrmUploadFilesToFtp.Designer.cs"},{"SourceFile":"Manager\\FTP\\FrmUploadUpdateZipToFtp.cs"},{"SourceFile":"Manager\\FTP\\FrmUploadUpdateZipToFtp.Designer.cs"},{"SourceFile":"Manager\\FTP\\FtpInfo.cs"},{"SourceFile":"Manager\\FTP\\FTP_WinSCP.cs"},{"SourceFile":"Manager\\FTP\\IFTP.cs"},{"SourceFile":"Manager\\HtmlFormater.cs"},{"SourceFile":"Manager\\HtmlIndent.cs"},{"SourceFile":"Manager\\ImgExt.cs"},{"SourceFile":"Manager\\Init.cs"},{"SourceFile":"Manager\\JsonSplit.cs"},{"SourceFile":"Manager\\ClsPY.cs"},{"SourceFile":"Manager\\FrmAddTools.cs"},{"SourceFile":"Manager\\FrmAddTools.Designer.cs"},{"SourceFile":"Manager\\Itrycn_Info.cs"},{"SourceFile":"Manager\\Json.cs"},{"SourceFile":"Manager\\MsgManager.cs"},{"SourceFile":"Manager\\ReactorXML.cs"},{"SourceFile":"Manager\\RyProject.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Tools\\API\\APIEditor.cs"},{"SourceFile":"Tools\\API\\APIEditor.Designer.cs"},{"SourceFile":"Tools\\API\\FrmAddPostParam.cs"},{"SourceFile":"Tools\\API\\FrmAddPostParam.Designer.cs"},{"SourceFile":"Tools\\FrmColor.cs"},{"SourceFile":"Tools\\FrmColor.Designer.cs"},{"SourceFile":"Tools\\FrmCreateProject.cs"},{"SourceFile":"Tools\\FrmCreateProject.Designer.cs"},{"SourceFile":"Tools\\FrmEncode.cs"},{"SourceFile":"Tools\\FrmEncode.Designer.cs"},{"SourceFile":"Tools\\FrmFileTime.cs"},{"SourceFile":"Tools\\FrmFileTime.Designer.cs"},{"SourceFile":"Tools\\FrmHistoryUrls.cs"},{"SourceFile":"Tools\\FrmHistoryUrls.Designer.cs"},{"SourceFile":"Tools\\FrmImageToIcon.cs"},{"SourceFile":"Tools\\FrmImageToIcon.Designer.cs"},{"SourceFile":"Tools\\FrmJson.cs"},{"SourceFile":"Tools\\FrmJson.Designer.cs"},{"SourceFile":"Tools\\FrmPathInfo.cs"},{"SourceFile":"Tools\\FrmPathInfo.Designer.cs"},{"SourceFile":"Tools\\FrmProject.cs"},{"SourceFile":"Tools\\FrmProject.Designer.cs"},{"SourceFile":"Tools\\FrmProjectSearch.cs"},{"SourceFile":"Tools\\FrmProjectSearch.Designer.cs"},{"SourceFile":"Tools\\FrmQrCode.cs"},{"SourceFile":"Tools\\FrmQrCode.Designer.cs"},{"SourceFile":"Tools\\FrmRegex.cs"},{"SourceFile":"Tools\\FrmRegex.Designer.cs"},{"SourceFile":"Tools\\FrmSetup.cs"},{"SourceFile":"Tools\\FrmSetup.Designer.cs"},{"SourceFile":"Tools\\FrmKeyBroad.cs"},{"SourceFile":"Tools\\FrmKeyBroad.Designer.cs"},{"SourceFile":"Tools\\FrmStrCount.cs"},{"SourceFile":"Tools\\FrmStrCount.Designer.cs"},{"SourceFile":"Tools\\FrmStrToCode.cs"},{"SourceFile":"Tools\\FrmStrToCode.Designer.cs"},{"SourceFile":"Tools\\FrmTime.cs"},{"SourceFile":"Tools\\FrmTime.Designer.cs"},{"SourceFile":"Tools\\FrmToolsBox.cs"},{"SourceFile":"Tools\\FrmToolsBox.Designer.cs"},{"SourceFile":"Manager\\FrmToolsSearch.cs"},{"SourceFile":"Manager\\FrmToolsSearch.Designer.cs"},{"SourceFile":"Tools\\UpLog\\FrmPublishLogs.cs"},{"SourceFile":"Tools\\UpLog\\FrmPublishLogs.Designer.cs"},{"SourceFile":"Tools\\UpLog\\FrmUpdateLog.cs"},{"SourceFile":"Tools\\UpLog\\FrmUpdateLog.Designer.cs"},{"SourceFile":"Tools\\FrmWebGet.cs"},{"SourceFile":"Tools\\FrmWebGet.Designer.cs"},{"SourceFile":"Tools\\FrmXpath.cs"},{"SourceFile":"Tools\\FrmXpath.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"E:\\My Datas\\My Codes\\毕方项目\\CSharp\\SuperDesign\\Source\\packages\\DiffPlex.1.7.1\\lib\\net40\\DiffPlex.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"ReferLine truncated
+6 -1
View File
@@ -157,13 +157,18 @@ namespace 开发辅助工具
{ create_str += ")"; }
}
if (dg.Count == 0) { create_str += ";"; }
else if (dg.Count == 1)
{
create_str = "if(" + create_str + "=="+ DialogResult_str[0] + ")";
create_str += "\r\n{\r\n\r\n}";
}
else
{
create_str = "switch(" + create_str + ")";
create_str += "\r\n{";
for (int i = 0; i < DialogResult_str.Count; i++)
{
create_str += "\r\n case "+ DialogResult_str[i]+ ":\r\n break;";
create_str += "\r\n case " + DialogResult_str[i] + ":\r\n break;";
}
create_str += "\r\n}";
}
@@ -2,9 +2,11 @@
using ryCommon;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 开发辅助工具;
namespace SuperDesign.Manager
{
@@ -72,6 +74,19 @@ namespace SuperDesign.Manager
}
return log_text;
}
public static string GetTortoiseGitProcPath()
{
DriveInfo[] driveInfo = DriveInfo.GetDrives();
for (int i = 0; i < driveInfo.Length; i++)
{
var path = driveInfo[i].Name + "Program Files\\TortoiseGit\\bin\\TortoiseGitProc.exe";
if (System.IO.File.Exists(path))
{
return path;
}
}
return "";
}
/// <summary>
/// 获取参数翻译名称
/// </summary>
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2412.2002")]
[assembly: AssemblyFileVersion("3.0.2412.2002")]
[assembly: AssemblyVersion("3.0.2412.2003")]
[assembly: AssemblyFileVersion("3.0.2412.2003")]
@@ -90,6 +90,16 @@ namespace SuperDesign.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap fav {
get {
object obj = ResourceManager.GetObject("fav", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
@@ -127,6 +127,9 @@
<data name="diff" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\diff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fav" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\主要特点.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GoToNextMessage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gotonextmessage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

+7 -6
View File
@@ -193,6 +193,11 @@
<Compile Include="Manager\RyProject.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Tools\API\APIEditor.cs">
<SubType>Form</SubType>
</Compile>
@@ -378,14 +383,9 @@
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Tools\API\APIEditor.resx">
<DependentUpon>APIEditor.cs</DependentUpon>
</EmbeddedResource>
@@ -475,6 +475,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="gaim_48px_29650_easyicon.net.ico" />
<None Include="Resources\主要特点.png" />
<None Include="Resources\plus.png" />
<None Include="Resources\ok.png" />
<None Include="Resources\minus.png" />
+37
View File
@@ -77,11 +77,14 @@
this.BtnSave2 = new ryControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.BtnSubmitGit = new ryControls.ButtonEx();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.BtnSaveLog = new ryControls.ButtonEx();
this.LvUpdateLogList = new BrightIdeasSoftware.ObjectListView();
this.OlvUpVer = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvUpdateDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.设为正式版本ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnPublishLogs = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
@@ -93,6 +96,7 @@
this.panel1.SuspendLayout();
this.tabPage4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// BtnCustomMessageBox
@@ -701,6 +705,7 @@
//
// tabPage4
//
this.tabPage4.Controls.Add(this.BtnSubmitGit);
this.tabPage4.Controls.Add(this.tabControl1);
this.tabPage4.Controls.Add(this.BtnSaveLog);
this.tabPage4.Controls.Add(this.LvUpdateLogList);
@@ -713,6 +718,18 @@
this.tabPage4.Text = "更新日志";
this.tabPage4.UseVisualStyleBackColor = true;
//
// BtnSubmitGit
//
this.BtnSubmitGit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnSubmitGit.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnSubmitGit.Location = new System.Drawing.Point(741, 3);
this.BtnSubmitGit.Name = "BtnSubmitGit";
this.BtnSubmitGit.Size = new System.Drawing.Size(75, 33);
this.BtnSubmitGit.TabIndex = 13;
this.BtnSubmitGit.Text = "提交Git";
this.BtnSubmitGit.UseVisualStyleBackColor = true;
this.BtnSubmitGit.Click += new System.EventHandler(this.BtnSubmitGit_Click);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -745,6 +762,7 @@
this.LvUpdateLogList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvUpVer,
this.OlvUpdateDate});
this.LvUpdateLogList.ContextMenuStrip = this.contextMenuStrip1;
this.LvUpdateLogList.Cursor = System.Windows.Forms.Cursors.Default;
this.LvUpdateLogList.FullRowSelect = true;
this.LvUpdateLogList.HideSelection = false;
@@ -766,6 +784,21 @@
this.OlvUpdateDate.Text = "更新时间";
this.OlvUpdateDate.Width = 150;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.设为正式版本ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 48);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// 设为正式版本ToolStripMenuItem
//
this.设为正式版本ToolStripMenuItem.Name = "设为正式版本ToolStripMenuItem";
this.设为正式版本ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.设为正式版本ToolStripMenuItem.Text = "设为正式版本";
this.设为正式版本ToolStripMenuItem.Click += new System.EventHandler(this.设为正式版本ToolStripMenuItem_Click);
//
// BtnPublishLogs
//
this.BtnPublishLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -810,6 +843,7 @@
this.panel1.PerformLayout();
this.tabPage4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -871,5 +905,8 @@
private BrightIdeasSoftware.OLVColumn OlvUpVer;
private BrightIdeasSoftware.OLVColumn OlvUpdateDate;
private System.Windows.Forms.TabControl tabControl1;
private ryControls.ButtonEx BtnSubmitGit;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 设为正式版本ToolStripMenuItem;
}
}
+115 -4
View File
@@ -1,4 +1,5 @@
using Microsoft.Win32;
using BrightIdeasSoftware;
using Microsoft.Win32;
using Newtonsoft.Json.Linq;
using ryCommon;
using ryCommonDb;
@@ -8,9 +9,11 @@ using SuperDesign.Tools;
using SuperDesign.Tools.UpLog;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Threading;
using System.Windows.Documents;
@@ -85,7 +88,49 @@ namespace 开发辅助工具.Tools
}
catch { }
OlvUpVer.AspectGetter = delegate (object x) { return ((UpLogItem)x).Version; };
OlvUpdateDate.AspectGetter = delegate (object x) { return ((UpLogItem)x).AddTime.ToDateTime().ToString(); };
OlvUpdateDate.AspectGetter = delegate (object x) {
var dt = ((UpLogItem)x).AddTime.ToDateTime();
if(dt.Date==DateTime.Now.Date)
{
return "今天 "+dt.ToString("HH:mm:ss");
}
if (dt.Date.AddDays(1) == DateTime.Now.Date)
{
return "昨天 " + dt.ToString("HH:mm:ss");
}
return dt.ToString();
};
OlvUpVer.Renderer = new VerRenderer();
}
class VerRenderer : BaseRenderer
{
public VerRenderer()
{
UseGdiTextRendering = false;
}
//
// 摘要:
// Draw the flags
//
// 参数:
// g:
//
// r:
public override void Render(Graphics g, Rectangle r)
{
DrawBackground(g, r);
if (!(base.Aspect is IConvertible convertible))
{
return;
}
r = ApplyCellPadding(r);
if (base.RowObject is UpLogItem item1)
{
var start_x = 2;
if (item1.VerType=="main") { start_x += DrawImage2(g, r, start_x,SuperDesign.Properties.Resources.fav); }
start_x += DrawText2(g, r, start_x, item1.Version);
}
}
}
/// <summary>
/// 获取毕方标准项目根路径
@@ -350,6 +395,7 @@ namespace 开发辅助工具.Tools
mySQL.AddField("VerStr", "");
mySQL.AddField("LogText", "");
mySQL.AddField("LogJson", "");
mySQL.AddField("VerType", "");//版本类型(main表示主线版本,beta表示测试版)
mySQL.AddField("editTime", DateTime.Now.ToInt64());
mySQL.AddField("addTime", DateTime.Now.ToInt64());
db.CreateDb(mySQL);
@@ -385,7 +431,9 @@ namespace 开发辅助工具.Tools
{
var row = ds_logs.GetRow(i);
list.Add(new UpLogItem() {
Id = row["id"].ToInt(),
Version = row["VerStr"].ToString(),
VerType = row["VerType"].ToString(),
LogJson = row["LogJson"].ToString(),
LogText = row["LogText"].ToString(),
AddTime = row["addTime"].ToInt64(),
@@ -1030,6 +1078,13 @@ namespace 开发辅助工具.Tools
}
private void BtnPublishLogs_Click(object sender, EventArgs e)
{
switch (MessageBox.Show("是否确认要发布更新日志?", "询问", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2))
{
case DialogResult.OK:
break;
default:
return;
}
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
@@ -1146,7 +1201,9 @@ namespace 开发辅助工具.Tools
var row = ds_logs.GetRow(i);
list.Add(new UpLogItem()
{
Id= row["id"].ToInt(),
Version = row["VerStr"].ToString(),
VerType = row["VerType"].ToString(),
LogText = row["LogText"].ToString(),
LogJson = row["LogJson"].ToString(),
AddTime = row["addTime"].ToInt64(),
@@ -1163,8 +1220,11 @@ namespace 开发辅助工具.Tools
}
ds_logs?.Dispose();
MessageBox.Show("发布成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
FrmPublishLogs frm = new FrmPublishLogs();
frm.Icon = Icon;
FrmPublishLogs frm = new FrmPublishLogs
{
Icon = Icon
};
frm.BFFolderPath = GetBFFolderPath();
frm.ShowLog(jarr.ToString());
frm.ShowDialog();
frm.Dispose();
@@ -1193,10 +1253,61 @@ namespace 开发辅助工具.Tools
}
frm.Dispose();
}
private void BtnSubmitGit_Click(object sender, EventArgs e)
{
var git_path = SuperDesign.Manager.APIManager.GetTortoiseGitProcPath();
if (git_path.Length > 0)
{
RyFiles.RunFile(git_path, "/command:commit", GetBFFolderPath());
}
}
private void 设为正式版本ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvUpdateLogList.SelectedObject == null) { return; }
var item = (UpLogItem)LvUpdateLogList.SelectedObject;
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
var VerType = item.VerType == "main"?"beta": "main";
IDbInterface db = new SQLiteDataProvider();
if (db.ConnDb(_path + "\\Res\\Setting\\UpdateLogs.dat") == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("UpdateLogs");
mySQL.AddField("VerType", VerType);
db.Update(mySQL,"id="+item.Id);
item.VerType = VerType;
LvUpdateLogList.RefreshObject(item);
}
db.Free();
}
}
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
{
if (LvUpdateLogList.SelectedObject == null) {
设为正式版本ToolStripMenuItem.Enabled = false;
return;
}
设为正式版本ToolStripMenuItem.Enabled = true;
var item = (UpLogItem)LvUpdateLogList.SelectedObject;
if(item.VerType=="main")
{
设为正式版本ToolStripMenuItem.Text = "设为测试版本";
}
else
{
设为正式版本ToolStripMenuItem.Text = "设为正式版本";
}
}
}
class UpLogItem
{
public int Id { get; set; } = 0;
public string Version { get; set; } = "";
public string VerType { get; set; } = "";
public string LogText { get; set; } = "";
public string LogJson { get; set; } = "";
public long AddTime { get; set; } = 0;
@@ -126,7 +126,7 @@
<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 name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>388, 17</value>
</metadata>
</root>
@@ -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", "")