-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathClientNotification.cs
135 lines (109 loc) · 3.35 KB
/
ClientNotification.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
Copyright © Olav Christian Botterli.
Dual licensed under the MIT or GPL Version 2 licenses.
Date: 30.08.2011, Norway.
http://www.webgrid.com
*/
#region Header
/*
Copyright © Olav Christian Botterli.
Dual licensed under the MIT or GPL Version 2 licenses.
Date: 30.08.2011, Norway.
http://www.webgrid.com
*/
#endregion Header
namespace WebGrid
{
using System.ComponentModel;
using System.Web.UI;
/// <summary>
/// Client Notification raises unobtrusive messages within the browser, similar to the way that OS X's Growl Framework works
/// </summary>
[PersistenceMode(PersistenceMode.InnerProperty)]
[Description("Client Notification settings for WebGrid")]
[MergableProperty(false)]
[Browsable(false)]
public class ClientNotification
{
#region Fields
private string _HeaderText;
private int _lifespan = 3000;
string _position;
string _cssClass;
#endregion Fields
#region Properties
/// <summary>
/// Whether or not the close-all button should be used when more then one notification appears on the screen. Optionally this property can be set to a function which will be used as a callback when the close all button is clicked.
/// </summary>
public bool Closer
{
get; set;
}
///<summary>
/// This content is used for the close-all link that is added to the bottom of a jGrowl container when it contains more than one notification.
///</summary>
public string CloserTemplate
{
get; set;
}
/// <summary>
/// Html container for the client notification. Default is none
/// </summary>
public string Container
{
get
{
return _position;
}
set { _position = value; }
}
/// <summary>
/// Default is Grid Title
/// </summary>
public string HeaderText
{
get { return _HeaderText; }
set { _HeaderText = value; }
}
/// <summary>
/// The lifespan of a non-sticky message on the screen.
/// </summary>
public int LifeSpan
{
get { return _lifespan; }
set { _lifespan = value; }
}
/// <summary>
/// When set to true a message will stick to the screen until it is intentionally closed by the user.
/// </summary>
public bool Sticky
{
get; set;
}
/// <summary>
/// A CSS class designating custom styling for this particular message.
/// </summary>
public string CssClass
{
get
{
return _cssClass;
}
set { _cssClass = value; }
}
#endregion Properties
#region Methods
/// <summary>
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
/// </summary>
/// <returns>
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
/// </returns>
/// <filterpriority>2</filterpriority>
public override string ToString()
{
return "No design support";
}
#endregion Methods
}
}