您目前尚未登陆,请选择【登陆】或【注册
首页->博客论坛->SpaceBuilder v1.1源代码>>BasicWebControls/Manage/SiteHint.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:SpaceBuilder v1.1源代码
当前文件:文件类型 SpaceBuider11/BasicWebControls/Manage/SiteHint.cs打开代码结构图
普通视图
		            
1//------------------------------------------------------------------------------ 2// <copyright company="Tunynet"> 3// Copyright (c) Tunynet Inc. All rights reserved. 4// </copyright> 5//------------------------------------------------------------------------------ 6 7using System; 8using System.Collections.Generic; 9using System.Text; 10using System.Web.UI.WebControls; 11using SpaceBuilder.Configuration; 12using System.Web.UI.HtmlControls; 13using SpaceBuilder.Components; 14 15namespace SpaceBuilder.Web.Manage.Controls 16{ 17 /// <summary> 18 /// 站点信息显示模块 19 /// </summary> 20 public class SiteHint : ManageBaseControl 21 { 22 protected override void Authorize() 23 { 24 25 } 26 27 OnInit 36 37 Child Controls 112 113 114 protected override void AttachChildControls() 115 { 116 totalUsers = FindControl("TotalUsers") as Literal; 117 totalEvents = FindControl("TotalEvents") as Literal; 118 totalClubs = FindControl("TotalClubs") as Literal; 119 totalBlogThreads = FindControl("TotalBlogThreads") as Literal; 120 totalGalleryThreads = FindControl("TotalGalleryThreads") as Literal; 121 totalFileThreads = FindControl("TotalFileThreads") as Literal; 122 totalBookmarks = FindControl("TotalBookmarks") as Literal; 123 totalForumThreads = FindControl("TotalForumThreads") as Literal; 124 totalNews = FindControl("TotalNews") as Literal; 125 126 newUsersInPast24Hours = FindControl("NewUsersInPast24Hours") as Literal; 127 newClubsInPast24Hours = FindControl("NewClubsInPast24Hours") as Literal; 128 newEventsInPast24Hours = FindControl("NewEventsInPast24Hours") as Literal; 129 newBlogThreadsInPast24Hours = FindControl("NewBlogThreadsInPast24Hours") as Literal; 130 newGalleryThreadsInPast24Hours = FindControl("NewGalleryThreadsInPast24Hours") as Literal; 131 newFileThreadsInPast24Hours = FindControl("NewFileThreadsInPast24Hours") as Literal; 132 newBookmarksInPast24Hours = FindControl("NewBookmarksInPast24Hours") as Literal; 133 newForumThreadsInPast24Hours = FindControl("NewForumThreadsInPast24Hours") as Literal; 134 newNewsInPast24Hours = FindControl("NewNewsInPast24Hours") as Literal; 135 } 136 137 138 protected override void OnLoad(EventArgs e) 139 { 140 base.OnLoad(e); 141 EnsureChildControls(); 142 if (!Page.IsPostBack) 143 bind(); 144 } 145 146 private void bind() 147 { 148 SiteStatistics siteStatistics = SiteStatistics.LoadSiteStatistics(); 149 totalUsers.Text = siteStatistics.TotalUsers.ToString(); 150 totalEvents.Text = siteStatistics.TotalEvents.ToString(); 151 totalClubs.Text = siteStatistics.TotalClubs.ToString(); 152 totalBlogThreads.Text = siteStatistics.TotalBlogThreads.ToString(); 153 totalGalleryThreads.Text = siteStatistics.TotalGalleryThreads.ToString(); 154 totalFileThreads.Text = siteStatistics.TotalFileThreads.ToString(); 155 totalBookmarks.Text = siteStatistics.TotalBookmarks.ToString(); 156 totalForumThreads.Text = siteStatistics.TotalForumThreads.ToString(); 157 totalNews.Text = siteStatistics.TotalNews.ToString(); 158 159 newUsersInPast24Hours.Text = siteStatistics.NewUsersInPast24Hours.ToString(); 160 newClubsInPast24Hours.Text = siteStatistics.NewClubsInPast24Hours.ToString(); 161 newEventsInPast24Hours.Text = siteStatistics.NewEventsInPast24Hours.ToString(); 162 newBlogThreadsInPast24Hours.Text = siteStatistics.NewBlogThreadsInPast24Hours.ToString(); 163 newGalleryThreadsInPast24Hours.Text = siteStatistics.NewGalleryThreadsInPast24Hours.ToString(); 164 newFileThreadsInPast24Hours.Text = siteStatistics.NewFileThreadsInPast24Hours.ToString(); 165 newBookmarksInPast24Hours.Text = siteStatistics.NewBookmarksInPast24Hours.ToString(); 166 newForumThreadsInPast24Hours.Text = siteStatistics.NewForumThreadsInPast24Hours.ToString(); 167 newNewsInPast24Hours.Text = siteStatistics.NewNewsInPast24Hours.ToString(); 168 169 } 170 171 } 172} 173
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:SpaceBuilder v1.1源代码