-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a copy logs command #1623
Add a copy logs command #1623
Conversation
@@ -164,6 +164,20 @@ public LogAppenderFile() | |||
File.Delete(FileName); | |||
} | |||
|
|||
public void CopyToClipboard() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this here instead of in MainForm.cs so the knowledge of where the file is on disk is contained within the log class.
@@ -67,10 +68,11 @@ private void InitializeUILanguage() | |||
|
|||
public event EventHandler<ConfigFile> ConfigLoaded; | |||
|
|||
private readonly LogAppenderFile logAppenderFile = new LogAppenderFile(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moved out of InitializeLogging() so it's available in the menu click handler.
@@ -20,6 +20,7 @@ | |||
using System.Threading.Tasks; | |||
using MobiFlight.InputConfig; | |||
using Newtonsoft.Json; | |||
using System.IO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required for FileLoadException
Build for this pull request: |
Fixes #1622
Add a "Copy logs to clipboard" command to the extras menu. Correctly handles the case of no log file being available, or other exceptions that might come up.