Commit 9e97db06 authored by 罗显健's avatar 罗显健

打包工具优化:1.调整更新命名 2.增加打开应用目录功能。

parent 6fe49ab4
......@@ -25,7 +25,7 @@ namespace Ftt.PatchPack
public FilePack(string directory, string patchName, List<PatchFileInfo> files)
{
this.directory = directory;
this.patchName = $"{patchName}-{DateTime.Now.ToString("MMddHHmm")}";
this.patchName = $"{patchName}-{DateTime.Now.ToString("yyMMddHHmm")}";
this.files = files;
}
......
......@@ -36,6 +36,7 @@
this.lblNotes = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.btnDel = new System.Windows.Forms.Button();
this.btnOpenDirectory = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
......@@ -91,7 +92,7 @@
this.lstProject.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.lstProject.RightToLeftLayout = true;
this.lstProject.ShowGroups = false;
this.lstProject.Size = new System.Drawing.Size(517, 231);
this.lstProject.Size = new System.Drawing.Size(599, 231);
this.lstProject.TabIndex = 10;
this.lstProject.UseCompatibleStateImageBehavior = false;
this.lstProject.View = System.Windows.Forms.View.List;
......@@ -103,12 +104,13 @@
this.lblNotes.Location = new System.Drawing.Point(0, 289);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Padding = new System.Windows.Forms.Padding(12, 8, 0, 0);
this.lblNotes.Size = new System.Drawing.Size(517, 52);
this.lblNotes.Size = new System.Drawing.Size(599, 52);
this.lblNotes.TabIndex = 11;
this.lblNotes.Text = "注意:本工具只打包项目设定文件夹内通用文件。。。。。详细内容见源代码";
//
// panel1
//
this.panel1.Controls.Add(this.btnOpenDirectory);
this.panel1.Controls.Add(this.btnDel);
this.panel1.Controls.Add(this.btnEdit);
this.panel1.Controls.Add(this.btnPatch);
......@@ -117,7 +119,7 @@
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(517, 58);
this.panel1.Size = new System.Drawing.Size(599, 58);
this.panel1.TabIndex = 12;
//
// btnDel
......@@ -133,11 +135,24 @@
this.btnDel.UseVisualStyleBackColor = false;
this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
//
// btnOpenDirectory
//
this.btnOpenDirectory.BackColor = System.Drawing.SystemColors.Control;
this.btnOpenDirectory.ForeColor = System.Drawing.SystemColors.WindowText;
this.btnOpenDirectory.Location = new System.Drawing.Point(486, 15);
this.btnOpenDirectory.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnOpenDirectory.Name = "btnOpenDirectory";
this.btnOpenDirectory.Size = new System.Drawing.Size(81, 27);
this.btnOpenDirectory.TabIndex = 11;
this.btnOpenDirectory.Text = "打开目录";
this.btnOpenDirectory.UseVisualStyleBackColor = false;
this.btnOpenDirectory.Click += new System.EventHandler(this.btnOpenDirectory_Click);
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(517, 341);
this.ClientSize = new System.Drawing.Size(599, 341);
this.Controls.Add(this.lstProject);
this.Controls.Add(this.panel1);
this.Controls.Add(this.lblNotes);
......@@ -164,6 +179,7 @@
private System.Windows.Forms.Label lblNotes;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnDel;
private System.Windows.Forms.Button btnOpenDirectory;
}
}
......@@ -145,8 +145,17 @@ namespace Ftt.PatchPack
MessageBox.Show($"打包项目{totalCount}个,成功{success}个 { strFail }。");
}
#endregion
/// <summary>
/// 打开本应用目录。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnOpenDirectory_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory);
}
#endregion
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment