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();
                  	}));
        }
示例#2
0
        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();
                }
            }));
        }
示例#3
0
 public static void Unregister(IEventReg registration)
 {
     lock (_synclock)
         _Registrations.Remove(registration);
 }