Exemplo n.º 1
0
        void OnChatViewManagerChatRemoved(object sender, ChatViewManagerChatRemovedEventArgs e)
        {
            MessageTextViewMessageHighlightedEventHandler handler;

            if (!HighlightEventHandlers.TryGetValue(e.ChatView, out handler))
            {
                return;
            }

            e.ChatView.OutputMessageTextView.MessageHighlighted -= handler;
        }
Exemplo n.º 2
0
        void OnChatViewManagerChatRemoved(object sender, ChatViewManagerChatRemovedEventArgs e)
        {
            MessageTextViewMessageHighlightedEventHandler handler;

            if (!HighlightEventHandlers.TryGetValue(e.ChatView, out handler))
            {
                return;
            }

            e.ChatView.OutputMessageTextView.MessageHighlighted -= handler;

            // close possibly active indicator
            DisposeIndicator(e.ChatView);
        }
Exemplo n.º 3
0
        void OnChatViewManagerChatRemoved(object sender, ChatViewManagerChatRemovedEventArgs e)
        {
            MessageTextViewMessageHighlightedEventHandler handler;

            if (!HighlightEventHandlers.TryGetValue(e.ChatView, out handler))
            {
                return;
            }

            e.ChatView.OutputMessageTextView.MessageHighlighted -= handler;
            HighlightEventHandlers.Remove(e.ChatView);

            // close possibly active indicator
#if INDICATE_SHARP
            DisposeIndicator(e.ChatView);
#elif MESSAGING_MENU_SHARP
            DisposeSource(e.ChatView);
#endif
        }
Exemplo n.º 4
0
        void OnChatViewManagerChatAdded(object sender, ChatViewManagerChatAddedEventArgs e)
        {
            // we are only interested in highlights on person and group chats
            if (!(e.ChatView is PersonChatView) &&
                !(e.ChatView is GroupChatView))
            {
                return;
            }

            MessageTextViewMessageHighlightedEventHandler handler =
                delegate(object o, MessageTextViewMessageHighlightedEventArgs args) {
                OnChatViewMessageHighlighted(o, args, e.ChatView);
            };

            e.ChatView.OutputMessageTextView.MessageHighlighted += handler;

            // keep a reference to the handler so we can cleanup it up later
            // in OnChatViewManagerChatRemoved()
            HighlightEventHandlers.Add(e.ChatView, handler);
        }