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