Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //String serverOS = Environment.OSVersion.ToString();
            //String CpuSum = Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS");// CPU个数:
            //String CpuType = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");// CPU类型:
            ////String ServerSoft = Request.ServerVariables["SERVER_SOFTWARE"]; // 信息服务软件:
            //String MachineName = Server.MachineName;// 服务器名
            //String ServerName = Request.ServerVariables["SERVER_NAME"];// 服务器域名
            //String ServerPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];// 虚拟服务绝对路径
            //String ServerNet = ".NET CLR " + Environment.Version.ToString(); // DotNET 版本
            //String ServerArea = (DateTime.Now - DateTime.UtcNow).TotalHours > 0 ? "+" + (DateTime.Now - DateTime.UtcNow).TotalHours.ToString() : (DateTime.Now - DateTime.UtcNow).TotalHours.ToString();// 服务器时区
            //String ServerTimeOut = Server.ScriptTimeout.ToString(); // 脚本超时时间
            //String ServerStart = ((Double)System.Environment.TickCount / 3600000).ToString("N2");// 开机运行时长
            //// AspNet CPU时间
            //String ServerSessions = Session.Contents.Count.ToString();// Session总数
            //String ServerApp = Application.Contents.Count.ToString(); // Application总数
            ////String ServerCache = Cache.Count.ToString(); //应用程序缓存总数
            //// 应用程序占用内存
            ////  String ServerFso = Check("Scripting.FileSystemObject");                // FSO 文本文件读写
            ////String ServerTimeOut = Server.ScriptTimeout.ToString() + "毫秒"; // 本页执行时间
            //string s = HostingEnvironment.ApplicationVirtualPath;

            SmsClientProcessCenter.ReActiveTheService();
            this.Label1.Text = SmsClientProcessCenter.GetSmsServiceEnable.ToString();
        }
Example #2
0
 /// <summary>
 /// 服务器状态改变
 /// </summary>
 public void TheServiceStatusChanged(bool theStatus)
 {
     SmsClientProcessCenter.ReActiveTheService();
 }
Example #3
0
 protected void btnReActiveSms_Click(object sender, EventArgs e)
 {
     SmsClientProcessCenter.ReActiveTheService();
     ShowTheSmsStatus();
 }
Example #4
0
 protected void Application_Start(object sender, EventArgs e)
 {
     SmsClientProcessCenter.ReActiveTheService();
 }