forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessage.cs
More file actions
41 lines (37 loc) · 1.18 KB
/
Copy pathMessage.cs
File metadata and controls
41 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Web.UI;
using SiteServer.Utils;
namespace SiteServer.BackgroundPages.Controls
{
public class Message : Control
{
private bool isShowImmidiatary = false;
public bool IsShowImmidiatary
{
get { return isShowImmidiatary; }
set { isShowImmidiatary = value; }
}
private MessageUtils.Message.EMessageType messageType = MessageUtils.Message.EMessageType.None;
public MessageUtils.Message.EMessageType MessageType
{
get { return messageType; }
set { messageType = value; }
}
private string content = string.Empty;
public string Content
{
get { return content; }
set { content = value; }
}
protected override void Render(HtmlTextWriter writer)
{
if (isShowImmidiatary) // 有直接显示的消息
{
writer.Write(MessageUtils.GetMessageHtml(messageType, content, this));
}
else // 没有直接显示的消息则去cookies中检查是否有消息需要显示
{
writer.Write(MessageUtils.GetMessageHtml(this));
}
}
}
}