private void menuNotificationListenerActive_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; if (SubscriptionManager.IsListening()) { SubscriptionManager.CloseListeningService(); menuNotificationListenerActive.Checked = false; } else { Action x = () => menuNotificationListenerActive.Checked = true; SubscriptionManager.StartListening(() => this.BeginInvoke(x)); } } finally { Cursor.Current = Cursors.Default; } }