PageRenderTime 18ms CodeModel.GetById 9ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/widgets/Administration/widget.ascx.cs

#
C# | 61 lines | 30 code | 8 blank | 23 comment | 0 complexity | 8c281c69324bd90e12723f6c7d55ad11 MD5 | raw file
 1// --------------------------------------------------------------------------------------------------------------------
 2// <summary>
 3//   The widget.
 4// </summary>
 5// --------------------------------------------------------------------------------------------------------------------
 6
 7namespace Widgets.Administration
 8{
 9    using App_Code.Controls;
10    using BlogEngine.Core;
11
12    /// <summary>
13    /// The widget.
14    /// </summary>
15    public partial class Widget : WidgetBase
16    {
17        #region Properties
18
19        /// <summary>
20        /// Gets a value indicating whether or not the widget can be edited.
21        /// <remarks>
22        /// The only way a widget can be editable is by adding a edit.ascx file to the widget folder.
23        /// </remarks>
24        /// </summary>
25        /// <value></value>
26        public override bool IsEditable
27        {
28            get
29            {
30                return false;
31            }
32        }
33
34        /// <summary>
35        /// Gets the name. It must be exactly the same as the folder that contains the widget.
36        /// </summary>
37        /// <value></value>
38        public override string Name
39        {
40            get
41            {
42                return "Administration";
43            }
44        }
45
46        #endregion
47
48        #region Public Methods
49
50        /// <summary>
51        /// This method works as a substitute for Page_Load. You should use this method for
52        /// data binding etc. instead of Page_Load.
53        /// </summary>
54        public override void LoadWidget()
55        {
56            this.Visible = Security.IsAuthenticated;
57        }
58
59        #endregion
60    }
61}