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
8bcb2c50
Commit
8bcb2c50
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Remember the suspend reason to detect changes there.
Refers to
#2
parent
ffd6e0b2
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
+7
-2
7 additions, 2 deletions
ATXTray/AutoTxTray.cs
with
7 additions
and
2 deletions
ATXTray/AutoTxTray.cs
+
7
−
2
View file @
8bcb2c50
...
...
@@ -22,6 +22,7 @@ namespace ATXTray
private
static
bool
_statusChanged
=
false
;
private
static
bool
_svcRunning
=
false
;
private
static
bool
_svcSuspended
=
true
;
private
static
string
_svcSuspendReason
;
private
readonly
NotifyIcon
_notifyIcon
=
new
NotifyIcon
();
private
readonly
ContextMenuStrip
_cmStrip
=
new
ContextMenuStrip
();
...
...
@@ -158,13 +159,17 @@ namespace ATXTray
}
private
void
UpdateSvcSuspended
()
{
if
(
_svcSuspended
==
_status
.
ServiceSuspended
)
// first update the suspend reason as this can possibly change even if the service
// never leaves the suspended state and we should still display the correct reason:
if
(
_svcSuspendReason
==
_status
.
LimitReason
&&
_svcSuspended
==
_status
.
ServiceSuspended
)
return
;
_statusChanged
=
true
;
_svcSuspended
=
_status
.
ServiceSuspended
;
_svcSuspendReason
=
_status
.
LimitReason
;
if
(
_svcSuspended
)
{
_miSvcSuspended
.
Text
=
@"Service suspended, reason: "
+
_s
tatus
.
Limit
Reason
;
_miSvcSuspended
.
Text
=
@"Service suspended, reason: "
+
_s
vcSuspend
Reason
;
_miSvcSuspended
.
BackColor
=
Color
.
LightYellow
;
/*
_notifyIcon.ShowBalloonTip(500, "AutoTx Monitor",
...
...
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