private void timer1_Tick(object sender, EventArgs e) { //读取Notice表,取出未读消息 ToUser == LoginUser.UserID AND IsRead==false // FrmPopup.Show("34224"); File_User_Notice notice = _fileShareBll.GetNotice(LoginUser.UserId); if (notice != null) { if (FrmPopup.Show(string.Format("{0}借阅了一份文件给你", notice.UserRealName), notice)) { _fileShareBll.UpdateNotice(notice.NoticeID); } } }
public static bool Show(string caption, string content, int duration, object tag) { if (_isPopup) { return(false); } _isPopup = true; _frmPopup = new FrmPopup(); _frmPopup.Text = caption; _frmPopup.lblContent.Text = content; _frmPopup.Tag = tag; if (duration > 0) { _timer1.Interval = duration; _timer1.Enabled = true; } _frmPopup.Show(); return(true); }