public LabelsEditorControl() { InitializeComponent(); InputCommands.Stub(this); _flipper = new Flipper(TimeSpan.FromMilliseconds(400), CheckExistingLabel); // If labels are updated from elsewhere in the message we are currently viewing // (and we are not the one causing the updated), rebuild the labels subscription = EventBroker.Subscribe(AppEvents.MessageLabelsUpdated, (Message message) => Thread.CurrentThread.ExecuteOnUIThread(delegate { if (message == Message && !Editor.IsFocused) Reset(); })); }
public LabelsEditorControl() { InitializeComponent(); InputCommands.Stub(this); _flipper = new Flipper(TimeSpan.FromMilliseconds(400), CheckExistingLabel); // If labels are updated from elsewhere in the message we are currently viewing // (and we are not the one causing the updated), rebuild the labels subscription = EventBroker.Subscribe(AppEvents.MessageLabelsUpdated, (Message message) => Thread.CurrentThread.ExecuteOnUIThread(delegate { if (message == Message && !Editor.IsFocused) { Reset(); } })); }
public static void Unregister(IEventReg registration) { lock (_synclock) _Registrations.Remove(registration); }