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

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

Binary file not shown.

View File

@ -2045,11 +2045,35 @@
</member>
<member name="M:ryCommon.RyFiles.GetFileDate(System.String)">
<summary>
获取一个文件的全名
获取文件日期
</summary>
<param name="fileName">文件名</param>
<returns>返回生成文件的完整路径名</returns>
</member>
<member name="M:ryCommon.RyFiles.SetFileCreationTime(System.String,System.DateTime)">
<summary>
设置文件创建时间
</summary>
<param name="fileName"></param>
<param name="time"></param>
<returns></returns>
</member>
<member name="M:ryCommon.RyFiles.SetFileLastWriteTime(System.String,System.DateTime)">
<summary>
设置文件修改时间
</summary>
<param name="fileName"></param>
<param name="time"></param>
<returns></returns>
</member>
<member name="M:ryCommon.RyFiles.SetFileDate(System.String,ryCommon.sType.FileTime)">
<summary>
设置文件日期
</summary>
<param name="fileName">文件名</param>
<param name="time">要设置的时间,当时间小于等于1970年1月1日时,则不进行修改</param>
<returns>返回是否设置成功</returns>
</member>
<member name="M:ryCommon.RyFiles.GetErrorString(System.Int32)">
<summary>
解释错误代码
@ -11017,11 +11041,12 @@
</summary>
</member>
<member name="M:RaUI.UI.LayeredForm.ILayeredForm.Layered(System.Windows.Forms.Control)">
<member name="M:RaUI.UI.LayeredForm.ILayeredForm.Layered(System.Windows.Forms.Control,System.Boolean)">
<summary>
将窗体作为某个控件的弹出窗体(弹出的窗体将不会获得焦点,如果包含文本框,文本框可能将无法输入文字)
</summary>
<param name="control"></param>
<param name="SetChild">是否设为子样式,这将不会使控件所在窗体失去焦点,但是弹出的窗体里的文本框将可能无法编辑</param>
</member>
<member name="F:RaUI.UI.LayeredForm.ILayeredForm.PARENT">
<summary>
@ -11313,6 +11338,11 @@
the contents of this method with the code editor.
</summary>
</member>
<member name="F:RaUI.UI.Rili.FrmDropCalendar.chinaCalendar1">
<summary>
</summary>
</member>
<member name="T:RaUI.UI.Rili.PaDateInput">
<summary>
日期输入框
@ -13722,6 +13752,12 @@
<param name="SearchText">多个条件之间请用空格隔开</param>
<returns></returns>
</member>
<member name="M:ryCommonDb.RyQuickSQL.GetPostData">
<summary>
根据输入的内容,生成Post数据
</summary>
<returns></returns>
</member>
<member name="M:ryCommonDb.RyQuickSQL.GetInsertSQL">
<summary>
获取插入SQL语句

Binary file not shown.

View File

@ -1,4 +1,16 @@
### 2024-12-21 星期六更新
### 2025-01-08 星期三更新
------
#### RySmartEditor V1.0.2501.0801
- *.[改进]复制文件到其它站点同位置功能支持复制文件夹。
#### SuperDesign V3.0.2501.0801
- *.[新增]支持直接设置主项目的功能。
- *.[新增]新增支持设置在发布日志时是否更新版本号的功能。
- *.[新增]更新日志右键菜单支持快速添加日志前缀。
- *.[改进]更新日志保存时如果冲突,则显示数据库和本地日志内容进行对比。
- *.[修复]修复更新日志输入框粘贴文本会携带颜色的字体的BUG。
- *.[修复]修复打开Git时无法粘贴更新日志的BUG。
### 2024-12-21 星期六更新
------
#### SuperDesign V3.0.2412.2101
- *.[新增]新增支持多选更新日志列表,合并生成Html日志。

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2412.0201")]
[assembly: AssemblyFileVersion("1.0.2412.0201")]
[assembly: AssemblyVersion("1.0.2501.0801")]
[assembly: AssemblyFileVersion("1.0.2501.0801")]

View File

@ -29,6 +29,7 @@ using ScintillaNET;
using WinShell;
using static System.Net.Mime.MediaTypeNames;
using System.Runtime.InteropServices.ComTypes;
using System.Threading;
namespace SuperDesign.Tools.SmartEditor
{
@ -1218,6 +1219,11 @@ namespace SuperDesign.Tools.SmartEditor
case DialogResult.No:
return;
}
this.Enabled = false;
Thread th = new Thread(Start);
th.Start();
void Start()
{
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
@ -1250,12 +1256,12 @@ namespace SuperDesign.Tools.SmartEditor
{
DataRow reader = ds.Tables[0].Rows[i];
if (cur_Id == reader["id"].ToInt()) { continue; }
if (System.IO.File.Exists(reader["localPath"].ToString() + "\\" + xd_path))
if (RyFiles.FileOrDirExist(reader["localPath"].ToString() + "\\" + xd_path))
{
//如果已存在,则先进行备份
RyFiles.DeleteFile(reader["localPath"].ToString() + "\\" + xd_path, true);
}
if (!RyFiles.CopyBigFile(row.FullName, reader["localPath"].ToString() + "\\" + xd_path))
if (RyFiles.CopyFileOrFolder(row.FullName, reader["localPath"].ToString() + "\\" + xd_path) != 0)
{
MessageBox.Show("复制到以下位置出错\r\n" + reader["localPath"].ToString() + "\\" + xd_path, "复制出错", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
@ -1266,7 +1272,12 @@ namespace SuperDesign.Tools.SmartEditor
ds?.Dispose();
}
db.Free();
this.Invoke(new Action(() =>
{
this.Enabled = true;
UpdateNode(TreeDir.SelectedNode);
}));
}
//olvFiles.RemoveObjects(del_list);
}
}

File diff suppressed because one or more lines are too long

View File

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

View File

@ -55,6 +55,7 @@
<PropertyGroup>
<ApplicationIcon>gaim_48px_29650_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="DiffPlex, Version=1.7.1.0, Culture=neutral, PublicKeyToken=1d35e91d1bd7bc0f, processorArchitecture=MSIL">
<HintPath>..\packages\DiffPlex.1.7.1\lib\net40\DiffPlex.dll</HintPath>
@ -324,6 +325,12 @@
<Compile Include="Manager\FrmToolsSearch.Designer.cs">
<DependentUpon>FrmToolsSearch.cs</DependentUpon>
</Compile>
<Compile Include="Tools\UpLog\FrmCompareLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\UpLog\FrmCompareLog.Designer.cs">
<DependentUpon>FrmCompareLog.cs</DependentUpon>
</Compile>
<Compile Include="Tools\UpLog\FrmPublishLogs.cs">
<SubType>Form</SubType>
</Compile>
@ -449,6 +456,9 @@
<EmbeddedResource Include="Manager\FrmToolsSearch.resx">
<DependentUpon>FrmToolsSearch.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\UpLog\FrmCompareLog.resx">
<DependentUpon>FrmCompareLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\UpLog\FrmPublishLogs.resx">
<DependentUpon>FrmPublishLogs.cs</DependentUpon>
</EmbeddedResource>

View File

@ -59,6 +59,7 @@
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.ChkIsMain = new System.Windows.Forms.CheckBox();
this.TxtUploadName = new ryControls.TextBoxEx2();
this.label6 = new System.Windows.Forms.Label();
this.TxtProjectVer = new ryControls.TextBoxEx2();
@ -77,6 +78,7 @@
this.BtnSave2 = new ryControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.ChkUpdateVerByPublish = new System.Windows.Forms.CheckBox();
this.BtnSubmitGit = new ryControls.ButtonEx();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.BtnSaveLog = new ryControls.ButtonEx();
@ -85,8 +87,8 @@
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();
this.Html日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnPublishLogs = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
@ -434,6 +436,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.ChkIsMain);
this.tabPage1.Controls.Add(this.BtnUploadProject);
this.tabPage1.Controls.Add(this.TxtUploadName);
this.tabPage1.Controls.Add(this.label6);
@ -457,6 +460,17 @@
this.tabPage1.Text = "项目信息";
this.tabPage1.UseVisualStyleBackColor = true;
//
// ChkIsMain
//
this.ChkIsMain.AutoSize = true;
this.ChkIsMain.Location = new System.Drawing.Point(552, 68);
this.ChkIsMain.Name = "ChkIsMain";
this.ChkIsMain.Size = new System.Drawing.Size(60, 16);
this.ChkIsMain.TabIndex = 33;
this.ChkIsMain.Text = "主项目";
this.ChkIsMain.UseVisualStyleBackColor = true;
this.ChkIsMain.CheckedChanged += new System.EventHandler(this.ChkIsMain_CheckedChanged);
//
// TxtUploadName
//
this.TxtUploadName.BackColor = System.Drawing.Color.White;
@ -706,6 +720,7 @@
//
// tabPage4
//
this.tabPage4.Controls.Add(this.ChkUpdateVerByPublish);
this.tabPage4.Controls.Add(this.BtnSubmitGit);
this.tabPage4.Controls.Add(this.tabControl1);
this.tabPage4.Controls.Add(this.BtnSaveLog);
@ -719,6 +734,19 @@
this.tabPage4.Text = "更新日志";
this.tabPage4.UseVisualStyleBackColor = true;
//
// ChkUpdateVerByPublish
//
this.ChkUpdateVerByPublish.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ChkUpdateVerByPublish.AutoSize = true;
this.ChkUpdateVerByPublish.Checked = true;
this.ChkUpdateVerByPublish.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChkUpdateVerByPublish.Location = new System.Drawing.Point(591, 12);
this.ChkUpdateVerByPublish.Name = "ChkUpdateVerByPublish";
this.ChkUpdateVerByPublish.Size = new System.Drawing.Size(144, 16);
this.ChkUpdateVerByPublish.TabIndex = 14;
this.ChkUpdateVerByPublish.Text = "发布时自动更新版本号";
this.ChkUpdateVerByPublish.UseVisualStyleBackColor = true;
//
// BtnSubmitGit
//
this.BtnSubmitGit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -793,16 +821,23 @@
this.ToolStripMenuItem,
this.Html日志ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70);
this.contextMenuStrip1.Size = new System.Drawing.Size(152, 48);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// 设为正式版本ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "设为正式版本ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.ToolStripMenuItem.Text = "设为正式版本";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 生成Html日志ToolStripMenuItem
//
this.Html日志ToolStripMenuItem.Name = "生成Html日志ToolStripMenuItem";
this.Html日志ToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
this.Html日志ToolStripMenuItem.Text = "生成Html日志";
this.Html日志ToolStripMenuItem.Click += new System.EventHandler(this.Html日志ToolStripMenuItem_Click);
//
// BtnPublishLogs
//
this.BtnPublishLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -817,13 +852,6 @@
this.BtnPublishLogs.UseVisualStyleBackColor = true;
this.BtnPublishLogs.Click += new System.EventHandler(this.BtnPublishLogs_Click);
//
// 生成Html日志ToolStripMenuItem
//
this.Html日志ToolStripMenuItem.Name = "生成Html日志ToolStripMenuItem";
this.Html日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.Html日志ToolStripMenuItem.Text = "生成Html日志";
this.Html日志ToolStripMenuItem.Click += new System.EventHandler(this.Html日志ToolStripMenuItem_Click);
//
// FrmProject
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -856,6 +884,7 @@
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
@ -923,5 +952,7 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Html日志ToolStripMenuItem;
private System.Windows.Forms.CheckBox ChkIsMain;
private System.Windows.Forms.CheckBox ChkUpdateVerByPublish;
}
}

View File

@ -14,6 +14,7 @@ using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows.Documents;
@ -153,6 +154,7 @@ namespace 开发辅助工具.Tools
}
return "";
}
private bool IsMain { get; set; } = false;
private void LoadPath()
{
var _path = GetBFFolderPath();
@ -166,6 +168,10 @@ namespace 开发辅助工具.Tools
Txtproglang.Text = ini.ReadIni("project", "proglang");
ChkConfuse.Checked = ini.ReadIni("project", "confuse", false);
TxtUploadName.Text = ini.ReadIni("project", "UploadName");
ProcUse = true;
IsMain = ini.ReadIni("project", "MainProject", "")== ProjectName;
ChkIsMain.Checked = IsMain;
ProcUse = false;
AddPath(true,"Debug输出目录", "Bin\\Debug","包含调试信息的输出目录");
AddPath(true, "Release输出目录", "Bin\\Release", "不包含调试信息的输出目录");
AddPath(true,"源代码目录", "Source", "含有项目源码");
@ -406,6 +412,7 @@ namespace 开发辅助工具.Tools
Manager.RyProject.UpdateVer(VersionPath);
}
public string VersionPath { get; set; } = "";
public DateTime LastSave { get; set; } = DateTime.MinValue;
}
private void table1_DoubleClick(object sender, EventArgs e)
{
@ -694,6 +701,18 @@ namespace 开发辅助工具.Tools
ini.WriteIni("project", "proglang", Txtproglang.Text);
ini.WriteIni("project", "confuse", ChkConfuse.Checked);
ini.WriteIni("project", "UploadName", TxtUploadName.Text);
if (ChkIsMain.Checked)
{
ini.WriteIni("project", "MainProject", ProjectName);
IsMain = true;
}
else
{
if(IsMain)
{
ini.WriteIni("project", "MainProject", "");
}
}
MessageBox.Show("保存成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
@ -829,6 +848,7 @@ namespace 开发辅助工具.Tools
var ctl = tab.Controls[c];
if (tab.Tag is ProjectLogItem p_item)
{
p_item.LastSave = DateTime.Now;
if (ctl is RichTextBox2 rich)
{
rich.Text = "";
@ -836,6 +856,7 @@ namespace 开发辅助工具.Tools
}
}
}
dict_changed.Clear();
}
else
{
@ -861,16 +882,57 @@ namespace 开发辅助工具.Tools
}
if (rich != null && txt != null)
{
if (dict_changed.ContainsKey(p_item.ProjectName))
{
if (!dict_changed[p_item.ProjectName])
{
continue;
}
}
else { continue; }
RyQuickSQL mySQL = new RyQuickSQL("ProjectNowLogs");
mySQL.AddField("Name", p_item.ProjectName);
mySQL.AddField("ChsName", txt.Text);
mySQL.AddField("Value", rich.Text);//值
mySQL.AddField("editTime", DateTime.Now.ToInt64());
if (db.Update(mySQL, "Name=@Name") == 0)
var ds = db.ReadData("select * from ProjectNowLogs where Name=@Name",mySQL);
if(ds.HaveData())
{
if (ds.GetRow(0)["editTime"].ToInt64().ToDateTime()> p_item.LastSave)
{
if(ds.GetRow(0)["Value"].ToString()!= rich.Text)
{
FrmCompareLog frm = new FrmCompareLog();
frm.Rich1.Text = ds.GetRow(0)["Value"].ToString();
frm.Lbl1.Text = "数据库";
frm.Rich2.Text = rich.Text;
frm.Lbl2.Text = "本地信息";
frm.Text = "[" + (txt.Text.Length == 0 ? p_item.ProjectName : txt.Text) + "]当前日志已被修改";
if (frm.ShowDialog()==DialogResult.OK)
{
db.Update(mySQL, "Name=@Name");
dict_changed[p_item.ProjectName] = false;
frm.Dispose();
continue;
}
frm.Dispose();
}
continue;
}
else
{
dict_changed[p_item.ProjectName] = false;
db.Update(mySQL, "Name=@Name");
}
}
else
{
mySQL.AddField("addTime", DateTime.Now.ToInt64());
db.Insert(mySQL);
dict_changed[p_item.ProjectName] = false;
}
ds?.Dispose();
p_item.LastSave = DateTime.Now;
}
}
}
@ -974,7 +1036,8 @@ namespace 开发辅助工具.Tools
}
if(rich!=null && txt!=null)
{
p_item.UpdateVer();
if (ChkUpdateVerByPublish.Checked)
{ p_item.UpdateVer(); }
var Version = p_item.Version;
if (Main_Project.Length == 0)
{
@ -1077,9 +1140,9 @@ namespace 开发辅助工具.Tools
MessageBox.Show("发布成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
FrmPublishLogs frm = new FrmPublishLogs
{
Icon = Icon
Icon = Icon,
BFFolderPath = GetBFFolderPath()
};
frm.BFFolderPath = GetBFFolderPath();
frm.ShowLog(jarr.ToString());
frm.ShowDialog();
frm.Dispose();
@ -1108,7 +1171,6 @@ namespace 开发辅助工具.Tools
}
frm.Dispose();
}
private void BtnSubmitGit_Click(object sender, EventArgs e)
{
var git_path = SuperDesign.Manager.APIManager.GetTortoiseGitProcPath();
@ -1295,16 +1357,79 @@ namespace 开发辅助工具.Tools
Parent = tab,
Dock = DockStyle.Fill,
Font = new Font("微软雅黑", 11),
OnlyInputText=true,
ScrollBars= RichTextBoxScrollBars.Both,
WordWrap=false,
Location = new Point(label_title.Left, label_title.Top + label_title.Height + 10),
Size = new Size(tab.ClientSize.Width, tab.ClientSize.Height - (label_title.Top + label_title.Height + 8)),
Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom
};
rich.AddMenu("添加一个[新增日志]", "log_add").Click += delegate(object s1, EventArgs e1)
{
AddUpLog("新增");
};
rich.AddMenu("添加一个[改进日志]", "log_up").Click += delegate (object s2, EventArgs e2)
{
AddUpLog("改进");
};
rich.AddMenu("添加一个[修复日志]", "log_fix").Click += delegate (object s3, EventArgs e3)
{
AddUpLog("修复");
};
rich.AddMenu("添加一个[删除日志]", "log_del").Click += delegate (object s4, EventArgs e4)
{
AddUpLog("删除");
};
void AddUpLog(string name)
{
var lines = rich.Text.Replace("\r", "\n").Replace("\n\n", "\n").Split('\n');
var txts = "";
var find_line = -1;
var selected_index = -1;
for (int i1 = 0; i1 < lines.Length; i1++)
{
var line = lines[i1];
if (txts.Length > 0) { txts += "\n"; }
if (line.IndexOfEx("["+ name + "]") >= 0)
{
find_line = i1;
}
else
{
if (find_line >= 0 && selected_index==-1)
{
txts += "*.["+ name + "]";
selected_index = txts.Length;
txts += "\n";
}
}
txts += line;
}
if(selected_index==-1)
{
if (txts.Length > 0) { txts += "\n"; }
txts += "*.[" + name + "]";
selected_index =txts.Length;
}
rich.Text = txts;
rich.Refresh();
if (selected_index.IsInRange(0, txts.Length))
{
rich.Select(selected_index,0);
}
rich.SelectionLength = 0;
}
var ds_now_up = db.ReadData("select * from ProjectNowLogs where Name='" + p_name + "'");
if (ds_now_up.HaveData())
{
txt_title.Text = ds_now_up.GetRow(0)["ChsName"].ToString();
rich.Text = ds_now_up.GetRow(0)["Value"].ToString();
projectLogItem.LastSave = ds_now_up.GetRow(0)["EditTime"].ToInt64().ToDateTime();
}
rich.TextChanged += delegate (object s0, EventArgs e0)
{
dict_changed[p_name] = true;
};
ds_now_up?.Dispose();
tabControl1.TabPages.Add(tab);
if (p_name == Main_Project)
@ -1316,6 +1441,7 @@ namespace 开发辅助工具.Tools
db.Free();
}
}
private Dictionary<string, bool> dict_changed = new Dictionary<string, bool>();
class UpContentInfo
{
public List<string> AddInfo { get; set; } = new List<string>();
@ -1460,6 +1586,12 @@ namespace 开发辅助工具.Tools
}
}
RyFiles.CopyToClip(log_text.Trim());
MessageBox.Show("已复制到剪切板。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
bool ProcUse = false;
private void ChkIsMain_CheckedChanged(object sender, EventArgs e)
{
if (ProcUse) { return; }
}
}
class UpLogItem

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

@ -42,11 +42,11 @@ namespace 开发辅助工具.Tools
InitializeComponent();
LoadPram();
tabControl2.SelectedTab = tabPage12;
OlvUrl.AspectGetter = delegate (object x) { return ((UrlInfo)x).Url; };
OlvUrl.AspectGetter = delegate (object x) { return ((UrlInfo)x)?.Url; };
OlvName.AspectGetter = delegate (object x) {
var item = (UrlInfo)x;
if (item.Des.Length == 0)
{ return item.Name; }
if (item==null || item.Des.Length == 0)
{ return item==null?"":item.Name; }
else
{
return "【"+item.Des+"】"+ item.Name;
@ -89,7 +89,7 @@ namespace 开发辅助工具.Tools
private void ObjectListView2_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
{
var item = (UrlInfo)e.Model;
if (item.Fav) { e.Item.ForeColor = Color.Blue; } else { e.Item.ForeColor = Color.Black; }
if (item!=null && item.Fav) { e.Item.ForeColor = Color.Blue; } else { e.Item.ForeColor = Color.Black; }
}
private void LoadPram()

View File

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

View File

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

View File

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

View File

@ -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")
{
this.Invoke(new Action(() =>
{
SendKeys.Send("^v");
}));
break;
}
}
else
{
index++;
if(index>10 || this.IsDisposed)
{
return;
}
System.Threading.Thread.Sleep(1000);
}
}; // 线程执行完成后会执行 RunWorkerCompleted 事伯的代码块
bg.RunWorkerAsync();
}
}
}

View File

@ -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,