Interaction logic for Message.xaml
Наследование: System.Windows.Controls.UserControl
        void Message_Clicked(Message message)
        {
            message.Data.Read = true;

            if (message.Data != null)
            {
                if (message.Data.Action != null)
                {
                    message.Data.Action(message.Data.ActionParameter);
                }

                if (mw != null && mw.CurrentUser != null && message.Data != null && message.Data.Remote)
                {
                    var info = new UpdateMessageInfo();
                    info.UserConfig = mw.CurrentUser;
                    info.MessageId = message.Data.Id;

                    ThreadPool.QueueUserWorkItem(new WaitCallback(MessageClicked_Worker), info);
                }
            }

            CheckForMessages();
        }
        void Message_CloseClicked(Message message)
        {
            if (mw != null && mw.CurrentUser != null && message.Data != null && message.Data.Remote)
            {
                var info = new CloseMessageInfo();
                info.UserConfig = mw.CurrentUser;
                info.MessageId = message.Data.Id;

                ThreadPool.QueueUserWorkItem(new WaitCallback(CloseMessage_Worker), info);
            }

            message.Shown = false;
            CheckForMessages();
        }
        void AddMessage_GUI(MessageData data)
        {
            Message m = new Message(data);
            m.Clicked += Message_Clicked;
            m.CloseClicked += Message_CloseClicked;

            Notifications.Add(m);

            m.Shown = true;

            CheckForMessages();
        }