?? smstimer.java
字號:
package com.ideas.communicate;
import com.ideas.alert.*;
import java.awt.event.*;
import com.ideas.util.*;
public class SMSTimer
implements ActionListener {
//設置定時器
javax.swing.Timer timer = new javax.swing.Timer(Configuration.PageRefreshRate, this);
public SMSTimer() {
if (AlertProperties.success && Configuration.SMSFlag) {
timer.start();
System.out.println("手機短信報警程序啟動。");
}
}
public void actionPerformed(ActionEvent e) {
for (int i = 0; i < Alert.HtmlContent.length; i++) {
String sms = Alert.HtmlContent[i];
if (sms != null) {
new SMSTeller().sendSMS(Configuration.SMSGatewayIP, Configuration.SMSGatewayPort,
Configuration.SMSPhoneNumber, sms);
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -