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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
5b858d45
Commit
5b858d45
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Document behavior of UpdateTrayIcon.
Refers to
#2
parent
76438d96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATxTray/AutoTxTray.cs
+8
-0
8 additions, 0 deletions
ATxTray/AutoTxTray.cs
with
8 additions
and
0 deletions
ATxTray/AutoTxTray.cs
+
8
−
0
View file @
5b858d45
...
...
@@ -479,6 +479,10 @@ namespace ATxTray
}
private
void
UpdateTrayIcon
()
{
// if a transfer is running and active show the transfer icon, alternating between its
// two variants every second ("blinking")
// NOTE: this is independent of a status change as the blinking should still happen
// even if the status (file) has not been updated in between
if
(
_txInProgress
&&
!
_serviceSuspended
)
{
if
(
DateTime
.
Now
.
Second
%
2
==
0
)
{
_notifyIcon
.
Icon
=
_tiTx0
;
...
...
@@ -487,19 +491,23 @@ namespace ATxTray
}
}
// now we can check if a status change occurred and just return otherwise:
if
(!
_statusChanged
)
return
;
// show the "stopped" icon if the service process is not running:
if
(!
_serviceProcessAlive
)
{
_notifyIcon
.
Icon
=
_tiStopped
;
return
;
}
// show the "suspended" icon of the service is in the corresponding state:
if
(
_serviceSuspended
)
{
_notifyIcon
.
Icon
=
_tiSuspended
;
return
;
}
// if none of the above is true and no transfer is running show the default icon:
if
(!
_txInProgress
)
{
_notifyIcon
.
Icon
=
_tiDefault
;
}
...
...
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
register
or
sign in
to comment