forked from xuxiaowei007/FoxOne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToolTip.cs
48 lines (41 loc) · 1.08 KB
/
ToolTip.cs
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
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using FoxOne.Core;
namespace FoxOne.Controls
{
public class ToolTip:PageControlBase
{
public ToolTip()
{
CssClass = "alert";
Attributes["role"] = "alert";
}
[DisplayName("标题")]
public string Title { get; set; }
[DisplayName("内容")]
public string Content { get; set; }
[DisplayName("提示类型")]
public ToolTipType ToolTipType { get; set; }
public override string Render()
{
CssClass+=" alert-"+ToolTipType.ToString().ToLower();
return base.Render();
}
public override string RenderContent()
{
return "<strong>{0}</strong>{1}".FormatTo(Title,Content);
//return base.RenderContent();
}
}
public enum ToolTipType
{
Info,
Warning,
Danger,
Success,
}
}