Ejemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            List <MessageModel> resultList = MysqlHelper.GetNewMessage(ApplicationContext.Credential.UserId);

            if (resultList.Count != 0)
            {
                foreach (MessageModel message in resultList)
                {
                    frmTaskbarNotifier tn = new frmTaskbarNotifier(message);
                    tn.ScrollShow();
                }
            }
        }
        private void fillNotifierContent(MessageModel messageModel)
        {
            this.lblDate.Text               = "创建日期: " + messageModel.CreateTime;
            this.lnkTitle.Text              = messageModel.Title;
            this.lnkTitle.Enabled           = true;
            this.lnkTitle.LinkArea          = new LinkArea(0, this.lnkTitle.Text.Length);
            this.lnkTitle.Links[0].LinkData = ApplicationContext.ServerHost()
                                              + "index.php?&sid="
                                              + ApplicationContext.Credential.SessionId;

            // update message state
            MysqlHelper.UpdateMessageState(messageModel.Id);
        }