public MultiViewFrameControl()
        {
            dock = new DockControl();
            stopwatch = new Stopwatch();

            InitializeComponent();

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, () => Thread.CurrentThread.ExecuteOnUIThread(delegate
                {
                    var window = new StatusUpdater();

                    window.Show();
                }));

            EventBroker.Subscribe<List<Message>>(AppEvents.RequestAddLabels, messages => Thread.CurrentThread.ExecuteOnUIThread(delegate
                {
                    var window = new AddLabelsWindow(messages);

                    window.Show();
                }));

            EventBroker.Subscribe<List<Document>>(AppEvents.RequestAddLabels, documents => Thread.CurrentThread.ExecuteOnUIThread(delegate
                {
                    var window = new AddLabelsWindow(documents);

                    window.Show();
                }));

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, (string text) => Thread.CurrentThread.ExecuteOnUIThread(delegate
                {
                    var window = new StatusUpdater();

                    window.SetText(text);
                    window.Show();
                }));

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, (string text, long channelid, UserStatus replyTo) => Thread.CurrentThread.ExecuteOnUIThread(delegate
                {
                    var window = new StatusUpdater(new[] { channelid });
                    window.SetReplyTo(replyTo);
                    window.SetText(text);
                    window.Show();
                }));

            EventBroker.Subscribe(AppEvents.RequestFocus, () => Thread.CurrentThread.ExecuteOnUIThread(
                () => ((TabItem)TabHost.SelectedItem).FocusFirstResponder()));
        }
        public MultiViewFrameControl()
        {
            dock      = new DockControl();
            stopwatch = new Stopwatch();

            InitializeComponent();

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, () => Thread.CurrentThread.ExecuteOnUIThread(delegate
            {
                var window = new StatusUpdater();

                window.Show();
            }));

            EventBroker.Subscribe <List <Message> >(AppEvents.RequestAddLabels, messages => Thread.CurrentThread.ExecuteOnUIThread(delegate
            {
                var window = new AddLabelsWindow(messages);

                window.Show();
            }));

            EventBroker.Subscribe <List <Document> >(AppEvents.RequestAddLabels, documents => Thread.CurrentThread.ExecuteOnUIThread(delegate
            {
                var window = new AddLabelsWindow(documents);

                window.Show();
            }));

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, (string text) => Thread.CurrentThread.ExecuteOnUIThread(delegate
            {
                var window = new StatusUpdater();

                window.SetText(text);
                window.Show();
            }));

            EventBroker.Subscribe(AppEvents.RequestStatusUpdate, (string text, long channelid, UserStatus replyTo) => Thread.CurrentThread.ExecuteOnUIThread(delegate
            {
                var window = new StatusUpdater(new[] { channelid });
                window.SetReplyTo(replyTo);
                window.SetText(text);
                window.Show();
            }));

            EventBroker.Subscribe(AppEvents.RequestFocus, () => Thread.CurrentThread.ExecuteOnUIThread(
                                      () => ((TabItem)TabHost.SelectedItem).FocusFirstResponder()));
        }