Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
e8d025c1
Commit
e8d025c1
authored
Apr 18, 2019
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Do not show startup errors as balloon tips - too disturbing
Instead, the error is logged and the tray app will exit. Fixes
#44
parent
844ac746
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATxTray/AutoTxTray.cs
+9
-1
9 additions, 1 deletion
ATxTray/AutoTxTray.cs
with
9 additions
and
1 deletion
ATxTray/AutoTxTray.cs
+
9
−
1
View file @
e8d025c1
...
...
@@ -109,13 +109,21 @@ namespace ATxTray
catch
(
Exception
ex
)
{
var
msg
=
"Error during initialization: "
+
ex
.
Message
;
Log
.
Error
(
msg
);
_notifyIcon
.
ShowBalloonTip
(
5000
,
AppTitle
,
msg
,
ToolTipIcon
.
Error
);
// we cannot terminate the message loop (Application.Run()) while the constructor
// is being run as it is not active yet - therefore we set the _status object to
// null which will terminate the application during the next "Elapsed" event:
_status
=
null
;
/* Do NOT show the balloon tip at all, as this is highly disturbing for the
user. For debugging purposes, the log message is definitely enough:
_notifyIcon.ShowBalloonTip(5000, AppTitle, msg, ToolTipIcon.Error);
// suspend the thread for 5s to make sure the balloon tip is shown for a while:
System.Threading.Thread.Sleep(5000);
*/
// sleep briefly before exiting:
System
.
Threading
.
Thread
.
Sleep
(
100
);
}
// we need to enable the timer no matter whether the initialization steps above have
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment