Example #1
0
 private static void ProcessAlarm()
 {
     Console.WriteLine("开始计算超限报警");
     //String configFile = AppDomain.CurrentDomain.BaseDirectory + "SISKPI.AlarmService.exe.config";
     //RemotingConfiguration.Configure(configFile, false);
     AlarmProductor alarmProductor = new AlarmProductor();
     alarmProductor.AlarmInterval = 10;
     //Console.WriteLine(string.Format("{0}开始执行超限处理", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
     alarmProductor.PorcessExceedLimit();
     Console.WriteLine("超限报警计算结束");
 }
Example #2
0
        private static void ProcessAlarm()
        {
            Console.WriteLine("开始计算超限报警");
            //String configFile = AppDomain.CurrentDomain.BaseDirectory + "SISKPI.AlarmService.exe.config";
            //RemotingConfiguration.Configure(configFile, false);
            AlarmProductor alarmProductor = new AlarmProductor();

            alarmProductor.AlarmInterval = 10;
            //Console.WriteLine(string.Format("{0}开始执行超限处理", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
            alarmProductor.PorcessExceedLimit();
            Console.WriteLine("超限报警计算结束");
        }
Example #3
0
        private static void ReCalcuateOverLimit()
        {
            DateTime       StartDate      = new DateTime(2014, 6, 1, 0, 0, 0);
            DateTime       EndDate        = new DateTime(2014, 7, 1, 0, 0, 0);
            AlarmProductor alarmProductor = new AlarmProductor();

            while (StartDate < EndDate)
            {
                Console.WriteLine(String.Format("计算开始时间{0} 结束时间{1} ",
                                                StartDate.ToString("yyyy-MM-dd HH:mm:ss"),
                                                StartDate.AddMinutes(30).ToString("yyyy-MM-dd HH:mm:ss")));
                alarmProductor.ReCalcuateOverLimit(StartDate, StartDate.AddMinutes(30));
                StartDate = StartDate.AddMinutes(30);
            }
        }
Example #4
0
 private static void ReCalcuateOverLimit()
 {
     DateTime StartDate = new DateTime(2014, 6, 1, 0, 0, 0);
     DateTime EndDate = new DateTime(2014, 7, 1, 0, 0, 0);
     AlarmProductor alarmProductor = new AlarmProductor();
     while (StartDate < EndDate) {
         Console.WriteLine(String.Format("计算开始时间{0} 结束时间{1} ",
             StartDate.ToString("yyyy-MM-dd HH:mm:ss"),
             StartDate.AddMinutes(30).ToString("yyyy-MM-dd HH:mm:ss")));
         alarmProductor.ReCalcuateOverLimit(StartDate, StartDate.AddMinutes(30));
         StartDate = StartDate.AddMinutes(30);
     }
 }