温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:SpaceBuilder v1.1源代码
当前文件:
SpaceBuider11/BasicWebControls/Manage/SiteHint.cs,打开代码结构图
SpaceBuider11/BasicWebControls/Manage/SiteHint.cs,打开代码结构图1//------------------------------------------------------------------------------ 2
// <copyright company="Tunynet"> 3
// Copyright (c) Tunynet Inc. All rights reserved. 4
// </copyright> 5
//------------------------------------------------------------------------------ 6
7
using System; 8
using System.Collections.Generic; 9
using System.Text; 10
using System.Web.UI.WebControls; 11
using SpaceBuilder.Configuration; 12
using System.Web.UI.HtmlControls; 13
using SpaceBuilder.Components; 14
15
namespace 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





}