1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-08 20:34:05 +02:00

Disable 'Show Error Log' button if the logging failed

This commit is contained in:
chylex 2016-11-16 14:51:47 +01:00
parent c64f7daa8d
commit cd53f6e757

View File

@ -34,7 +34,7 @@ public bool Log(string data){
}
public void HandleException(string caption, string message, bool canIgnore, Exception e){
Log(e.ToString());
bool loggedSuccessfully = Log(e.ToString());
FormMessage form = new FormMessage(caption, message+"\r\nError: "+e.Message, canIgnore ? MessageBoxIcon.Warning : MessageBoxIcon.Error);
@ -43,6 +43,7 @@ public void HandleException(string caption, string message, bool canIgnore, Exce
Button btnOpenLog = new Button{
Anchor = AnchorStyles.Bottom | AnchorStyles.Left,
Enabled = loggedSuccessfully,
Location = new Point(12, 12),
Margin = new Padding(0, 0, 48, 0),
Size = new Size(88, 26),