private void UpdateStatusText() {
string message;
lock (this.counterLock) {
if (this.syncRequested == true) {
if (this.changesFound > 0) {
message = string.Format(Properties_Resources.StatusSearchingForChangesAndFound, this.changesFound.ToString());
} else {
message = Properties_Resources.StatusSearchingForChanges;
}
} else {
if (this.changesFound > 0) {
if (this.changesFoundAt == null) {
message = string.Format(Properties_Resources.StatusChangesDetected, this.changesFound.ToString());
} else {
message = string.Format(Properties_Resources.StatusChangesDetectedSince, this.changesFound.ToString(), this.changesFoundAt.Value);
}
} else {
if (this.changesFoundAt == null) {
message = string.Format(Properties_Resources.StatusNoChangeDetected);
} else {
message = string.Format(Properties_Resources.StatusNoChangeDetectedSince, this.changesFoundAt.Value);
}
}
}
}
Application.Invoke(delegate {
try {
(this.statusItem.Child as Label).Text = message;
} catch(NullReferenceException) {
}
});
}
}