### 2025-01-13 星期一更新
------ #### SuperDesign V3.0.2501.1301 - *.[新增]更新日志新增支持显示开发周期。 - *.[改进]上传项目到服务端判断本地根目录默认为输出目录,不存在才为毕方输出目录。 - *.[改进]更新日志右键菜单新增日志时自动按位置插入到指定行。 - *.[改进]当日志里包含[开发]时,就不会发布到Html日志里。
This commit is contained in:
1 parent
c000c7ef1b
commit
d240361f74
9 files changed
+222
-114
No files matched your search
+22
-13
@@ -89,6 +89,7 @@
|
||||
this.设为正式版本ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.生成Html日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.BtnPublishLogs = new ryControls.ButtonEx();
|
||||
this.OlvTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
@@ -412,12 +413,12 @@
|
||||
this.chromeTabControl1.Controls.Add(this.tabPage4);
|
||||
this.chromeTabControl1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.chromeTabControl1.ItemSize = new System.Drawing.Size(100, 25);
|
||||
this.chromeTabControl1.Location = new System.Drawing.Point(12, 205);
|
||||
this.chromeTabControl1.Location = new System.Drawing.Point(3, 205);
|
||||
this.chromeTabControl1.Name = "chromeTabControl1";
|
||||
this.chromeTabControl1.SelectedIndex = 0;
|
||||
this.chromeTabControl1.ShowAddButton = false;
|
||||
this.chromeTabControl1.ShowCloseButton = false;
|
||||
this.chromeTabControl1.Size = new System.Drawing.Size(905, 410);
|
||||
this.chromeTabControl1.Size = new System.Drawing.Size(923, 410);
|
||||
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.chromeTabControl1.TabContextMenuStrip = null;
|
||||
this.chromeTabControl1.TabIndex = 29;
|
||||
@@ -729,7 +730,7 @@
|
||||
this.tabPage4.Location = new System.Drawing.Point(1, 29);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage4.Size = new System.Drawing.Size(903, 380);
|
||||
this.tabPage4.Size = new System.Drawing.Size(921, 380);
|
||||
this.tabPage4.TabIndex = 3;
|
||||
this.tabPage4.Text = "更新日志";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
@@ -740,7 +741,7 @@
|
||||
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.Location = new System.Drawing.Point(609, 12);
|
||||
this.ChkUpdateVerByPublish.Name = "ChkUpdateVerByPublish";
|
||||
this.ChkUpdateVerByPublish.Size = new System.Drawing.Size(144, 16);
|
||||
this.ChkUpdateVerByPublish.TabIndex = 14;
|
||||
@@ -752,7 +753,7 @@
|
||||
this.BtnSubmitGit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnSubmitGit.BaseColor = System.Drawing.Color.Green;
|
||||
this.BtnSubmitGit.ColorGradient = true;
|
||||
this.BtnSubmitGit.Location = new System.Drawing.Point(741, 3);
|
||||
this.BtnSubmitGit.Location = new System.Drawing.Point(759, 3);
|
||||
this.BtnSubmitGit.Name = "BtnSubmitGit";
|
||||
this.BtnSubmitGit.Size = new System.Drawing.Size(75, 33);
|
||||
this.BtnSubmitGit.TabIndex = 13;
|
||||
@@ -766,16 +767,16 @@
|
||||
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabControl1.Location = new System.Drawing.Point(342, 39);
|
||||
this.tabControl1.Location = new System.Drawing.Point(354, 39);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(555, 335);
|
||||
this.tabControl1.Size = new System.Drawing.Size(561, 335);
|
||||
this.tabControl1.TabIndex = 12;
|
||||
//
|
||||
// BtnSaveLog
|
||||
//
|
||||
this.BtnSaveLog.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
|
||||
this.BtnSaveLog.Location = new System.Drawing.Point(342, 3);
|
||||
this.BtnSaveLog.Location = new System.Drawing.Point(354, 3);
|
||||
this.BtnSaveLog.Name = "BtnSaveLog";
|
||||
this.BtnSaveLog.Size = new System.Drawing.Size(75, 33);
|
||||
this.BtnSaveLog.TabIndex = 11;
|
||||
@@ -787,19 +788,21 @@
|
||||
//
|
||||
this.LvUpdateLogList.AllColumns.Add(this.OlvUpVer);
|
||||
this.LvUpdateLogList.AllColumns.Add(this.OlvUpdateDate);
|
||||
this.LvUpdateLogList.AllColumns.Add(this.OlvTime);
|
||||
this.LvUpdateLogList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.LvUpdateLogList.CellEditUseWholeCell = false;
|
||||
this.LvUpdateLogList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.OlvUpVer,
|
||||
this.OlvUpdateDate});
|
||||
this.OlvUpdateDate,
|
||||
this.OlvTime});
|
||||
this.LvUpdateLogList.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.LvUpdateLogList.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.LvUpdateLogList.FullRowSelect = true;
|
||||
this.LvUpdateLogList.HideSelection = false;
|
||||
this.LvUpdateLogList.Location = new System.Drawing.Point(3, 6);
|
||||
this.LvUpdateLogList.Name = "LvUpdateLogList";
|
||||
this.LvUpdateLogList.Size = new System.Drawing.Size(333, 368);
|
||||
this.LvUpdateLogList.Size = new System.Drawing.Size(345, 368);
|
||||
this.LvUpdateLogList.TabIndex = 10;
|
||||
this.LvUpdateLogList.UseCompatibleStateImageBehavior = false;
|
||||
this.LvUpdateLogList.View = System.Windows.Forms.View.Details;
|
||||
@@ -808,12 +811,12 @@
|
||||
// OlvUpVer
|
||||
//
|
||||
this.OlvUpVer.Text = "版本";
|
||||
this.OlvUpVer.Width = 150;
|
||||
this.OlvUpVer.Width = 110;
|
||||
//
|
||||
// OlvUpdateDate
|
||||
//
|
||||
this.OlvUpdateDate.Text = "更新时间";
|
||||
this.OlvUpdateDate.Width = 150;
|
||||
this.OlvUpdateDate.Width = 130;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
@@ -843,7 +846,7 @@
|
||||
this.BtnPublishLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnPublishLogs.BaseColor = System.Drawing.Color.Green;
|
||||
this.BtnPublishLogs.ColorGradient = true;
|
||||
this.BtnPublishLogs.Location = new System.Drawing.Point(822, 3);
|
||||
this.BtnPublishLogs.Location = new System.Drawing.Point(840, 3);
|
||||
this.BtnPublishLogs.Name = "BtnPublishLogs";
|
||||
this.BtnPublishLogs.Size = new System.Drawing.Size(75, 33);
|
||||
this.BtnPublishLogs.TabIndex = 9;
|
||||
@@ -852,6 +855,11 @@
|
||||
this.BtnPublishLogs.UseVisualStyleBackColor = true;
|
||||
this.BtnPublishLogs.Click += new System.EventHandler(this.BtnPublishLogs_Click);
|
||||
//
|
||||
// OlvTime
|
||||
//
|
||||
this.OlvTime.Text = "周期";
|
||||
this.OlvTime.Width = 100;
|
||||
//
|
||||
// FrmProject
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
@@ -954,5 +962,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem 生成Html日志ToolStripMenuItem;
|
||||
private System.Windows.Forms.CheckBox ChkIsMain;
|
||||
private System.Windows.Forms.CheckBox ChkUpdateVerByPublish;
|
||||
private BrightIdeasSoftware.OLVColumn OlvTime;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@@ -99,9 +100,12 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
return "昨天 " + dt.ToString("HH:mm:ss");
|
||||
}
|
||||
return dt.ToString();
|
||||
return dt.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
};
|
||||
OlvUpVer.Renderer = new VerRenderer();
|
||||
OlvTime.AspectGetter = delegate (object x) {
|
||||
return ((UpLogItem)x).IntervalTimeStr;
|
||||
};
|
||||
}
|
||||
class VerRenderer : BaseRenderer
|
||||
{
|
||||
@@ -129,6 +133,7 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
var start_x = 2;
|
||||
if (item1.VerType=="main") { start_x += DrawImage2(g, r, start_x,SuperDesign.Properties.Resources.fav); }
|
||||
else { start_x += 4; }
|
||||
start_x += DrawText2(g, r, start_x, item1.Version);
|
||||
}
|
||||
}
|
||||
@@ -771,13 +776,17 @@ namespace 开发辅助工具.Tools
|
||||
string ftp_setting_path = _path + "\\FTPUploadData.jryp";
|
||||
if(System.IO.File.Exists(ftp_setting_path))
|
||||
{
|
||||
ryCommon.Ini ini = new ryCommon.Ini(_path + "\\查看项目.ryp");
|
||||
var eng_name = ini.ReadIni("project", "engname");
|
||||
var com_mode = "Debug";
|
||||
var ouput_folder = _path + "\\Bin\\" + com_mode + "\\" + eng_name;
|
||||
if (!System.IO.Directory.Exists(ouput_folder))
|
||||
var ouput_folder = GetDebugPath();
|
||||
if (ouput_folder.Length ==0 || !System.IO.Directory.Exists(ouput_folder))
|
||||
{
|
||||
ouput_folder = _path + "\\Bin\\" + com_mode;
|
||||
ryCommon.Ini ini = new ryCommon.Ini(_path + "\\查看项目.ryp");
|
||||
var eng_name = ini.ReadIni("project", "engname");
|
||||
var com_mode = "Debug";
|
||||
ouput_folder = _path + "\\Bin\\" + com_mode + "\\" + eng_name;
|
||||
if (!System.IO.Directory.Exists(ouput_folder))
|
||||
{
|
||||
ouput_folder = _path + "\\Bin\\" + com_mode;
|
||||
}
|
||||
}
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
@@ -1269,6 +1278,11 @@ namespace 开发辅助工具.Tools
|
||||
for (int i = 0; i < ds_logs.RowCount(); i++)
|
||||
{
|
||||
var row = ds_logs.GetRow(i);
|
||||
var IntervalTime = 0L;
|
||||
if (i< ds_logs.RowCount()-1)
|
||||
{
|
||||
IntervalTime = row["addTime"].ToInt64() - ds_logs.GetRow(i + 1)["addTime"].ToInt64();
|
||||
}
|
||||
list.Add(new UpLogItem()
|
||||
{
|
||||
Id = row["id"].ToInt(),
|
||||
@@ -1277,6 +1291,7 @@ namespace 开发辅助工具.Tools
|
||||
LogJson = row["LogJson"].ToString(),
|
||||
LogText = row["LogText"].ToString(),
|
||||
AddTime = row["addTime"].ToInt64(),
|
||||
IntervalTime= IntervalTime
|
||||
});
|
||||
}
|
||||
LvUpdateLogList.AddObjects(list);
|
||||
@@ -1364,6 +1379,7 @@ namespace 开发辅助工具.Tools
|
||||
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.AddSeparatorMenu();
|
||||
rich.AddMenu("添加一个[新增日志]", "log_add").Click += delegate(object s1, EventArgs e1)
|
||||
{
|
||||
AddUpLog("新增");
|
||||
@@ -1380,43 +1396,94 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
AddUpLog("删除");
|
||||
};
|
||||
rich.AddMenu("设置为开发日志", "log_dev").Click += delegate (object s4, EventArgs e4)
|
||||
{
|
||||
var iPos= rich.GetFirstCharIndexOfCurrentLine();
|
||||
if(iPos>=0)
|
||||
{
|
||||
var txt = rich.Text;
|
||||
var iPos2 = txt.IndexOf("]", iPos);
|
||||
if((iPos2-5)>=iPos)
|
||||
{
|
||||
txt = txt.Substring(0, iPos)+ txt.Substring(iPos, iPos2- iPos+1)+"[开发]"+txt.Substring(iPos2+1);
|
||||
}
|
||||
rich.Text = txt;
|
||||
}
|
||||
};
|
||||
void AddUpLog(string name)
|
||||
{
|
||||
var lines = rich.Text.Replace("\r", "\n").Replace("\n\n", "\n").Split('\n');
|
||||
var txts = "";
|
||||
var lines = rich.Text.Replace("\r", "\n").Replace("\n\n", "\n").Split('\n').ToList<string>();
|
||||
var find_line = -1;
|
||||
var selected_index = -1;
|
||||
for (int i1 = 0; i1 < lines.Length; i1++)
|
||||
var match = false;
|
||||
Dictionary<string, int> dict_line = new Dictionary<string, int>();
|
||||
for (int i1 = 0; i1 < lines.Count; i1++)
|
||||
{
|
||||
var line = lines[i1];
|
||||
if (txts.Length > 0) { txts += "\n"; }
|
||||
var stype = line.GetStr("[","]");
|
||||
if (stype.Length > 0)
|
||||
{
|
||||
dict_line[stype] = i1;
|
||||
}
|
||||
if (line.IndexOfEx("["+ name + "]") >= 0)
|
||||
{
|
||||
find_line = i1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (find_line >= 0 && selected_index==-1)
|
||||
if (find_line >= 0)
|
||||
{
|
||||
txts += "*.["+ name + "]";
|
||||
selected_index = txts.Length;
|
||||
txts += "\n";
|
||||
lines.Insert(find_line+1, "*.[" + name + "]");
|
||||
find_line++;
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
txts += line;
|
||||
}
|
||||
if(selected_index==-1)
|
||||
if(find_line>=0 && !match)
|
||||
{
|
||||
if (txts.Length > 0) { txts += "\n"; }
|
||||
txts += "*.[" + name + "]";
|
||||
selected_index =txts.Length;
|
||||
lines.Add("*.[" + name + "]");
|
||||
find_line++;
|
||||
}
|
||||
rich.Text = txts;
|
||||
rich.Refresh();
|
||||
if (selected_index.IsInRange(0, txts.Length))
|
||||
if(find_line == -1)
|
||||
{
|
||||
rich.Select(selected_index,0);
|
||||
if (name == "新增")
|
||||
{
|
||||
lines.Insert(0, "*.[" + name + "]");
|
||||
find_line = 0;
|
||||
}
|
||||
else if (name == "改进")
|
||||
{
|
||||
if (dict_line.ContainsKey("新增"))
|
||||
{
|
||||
lines.Insert(dict_line["新增"]+1, "*.[" + name + "]");
|
||||
find_line = dict_line["新增"]+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.Insert(0, "*.[" + name + "]");
|
||||
find_line = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.Add("*.[" + name + "]");
|
||||
find_line = lines.Count - 1;
|
||||
}
|
||||
}
|
||||
var txt = "";
|
||||
var SelectionStart = -1;
|
||||
for (int t = 0; t < lines.Count; t++)
|
||||
{
|
||||
if (lines[t].Length == 0) { continue; }
|
||||
if (txt.Length > 0) { txt += "\n"; }
|
||||
txt += lines[t];
|
||||
if(find_line==t)
|
||||
{
|
||||
SelectionStart = txt.Length;
|
||||
}
|
||||
}
|
||||
rich.Text = txt;
|
||||
rich.SelectionStart= SelectionStart;
|
||||
rich.SelectionLength = 0;
|
||||
}
|
||||
var ds_now_up = db.ReadData("select * from ProjectNowLogs where Name='" + p_name + "'");
|
||||
@@ -1505,6 +1572,7 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
log_item=log_item.Substring(2);
|
||||
}
|
||||
if (log_item.IndexOf("[开发]") >= 0) { continue; }
|
||||
#region 更新日志
|
||||
var name = log_item.GetStr("[", "]");
|
||||
if (name == "新增")
|
||||
@@ -1601,6 +1669,17 @@ namespace 开发辅助工具.Tools
|
||||
public string VerType { get; set; } = "";
|
||||
public string LogText { get; set; } = "";
|
||||
public string LogJson { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 开发周期
|
||||
/// </summary>
|
||||
public long IntervalTime { get; set; } = 0;
|
||||
public string IntervalTimeStr {
|
||||
get
|
||||
{
|
||||
if (IntervalTime == 0) { return "无"; }
|
||||
return RyDate.DateDiff(DateTime.MinValue, DateTime.MinValue.AddSeconds(IntervalTime), seconds: false);
|
||||
}
|
||||
}
|
||||
public long AddTime { get; set; } = 0;
|
||||
public int CompareTo(UpLogItem other)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
<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>
|
||||
|
||||
Reference in new issue
Block a user