Skip to content

Commit 72596f8

Browse files
committed
Add log folder options in GUI
1 parent fa1bdbd commit 72596f8

2 files changed

Lines changed: 68 additions & 5 deletions

File tree

SignToolGUI/Forms/MainForm.Designer.cs

Lines changed: 35 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SignToolGUI/Forms/MainForm.cs

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,9 +1681,40 @@ private void changelogToolStripMenuItem_Click(object sender, EventArgs e)
16811681
ChangelogForm f2 = new ChangelogForm();
16821682
f2.ShowDialog();
16831683
}
1684-
1684+
1685+
private void OpenTodaysLogfileToolStripMenuItem_Click(object sender, EventArgs e)
1686+
{
1687+
// Open the log file for today
1688+
try
1689+
{
1690+
var logFilePath = Files.LogFilePath;
1691+
logFilePath = logFilePath + "\\" + Globals.ToolName.SignToolGui + " Log " + DateTime.Today.ToString("dd-MM-yyyy") + "." + "log";
1692+
Process.Start(logFilePath);
1693+
}
1694+
catch (Exception exception)
1695+
{
1696+
Console.WriteLine(exception);
1697+
throw;
1698+
}
1699+
}
1700+
1701+
private void OpenLogfolderToolStripMenuItem_Click(object sender, EventArgs e)
1702+
{
1703+
// Open the log folder
1704+
try
1705+
{
1706+
var logFolderPath = Files.LogFilePath;
1707+
Process.Start("explorer.exe", logFolderPath);
1708+
}
1709+
catch (Exception exception)
1710+
{
1711+
Console.WriteLine(exception);
1712+
throw;
1713+
}
1714+
}
1715+
16851716
#endregion Form actions
1686-
1717+
16871718
#region Sign options - GUI
16881719

16891720
private void CheckedListBoxFiles_KeyDown(object sender, KeyEventArgs e)
@@ -2167,6 +2198,5 @@ private void ShowCertificatesFromStore(string loadStore)
21672198
}
21682199

21692200
#endregion Certificate info
2170-
21712201
}
21722202
}

0 commit comments

Comments
 (0)