📄 sms.pas
字号:
unit SMS;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ShellAPI, ComCtrls, ExtCtrls, StdCtrls, IdIntercept, IdLogBase,
IdLogEvent, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, Buttons, Spin, IdAntiFreezeBase, IdAntiFreeze;
const
web : string = 'http://api.twsms.com/SendSMS.php';
type
TForm1 = class(TForm)
Panel1: TPanel;
StatusBar1: TStatusBar;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label5: TLabel;
SendToNo: TMemo;
Label6: TLabel;
SendMsg: TMemo;
SMSUser: TLabeledEdit;
SMSPwd: TLabeledEdit;
IdHTTP1: TIdHTTP;
IdLogEvent1: TIdLogEvent;
GroupBox1: TGroupBox;
ProxyHost: TLabeledEdit;
ProxyPort: TSpinEdit;
Label3: TLabel;
ProxyUser: TLabeledEdit;
ProxyPwd: TLabeledEdit;
LogList: TListBox;
Label4: TLabel;
Memo1: TMemo;
IdAntiFreeze1: TIdAntiFreeze;
procedure Label2Click(Sender: TObject);
procedure IdLogEvent1Received(ASender: TComponent; const AText,
AData: String);
procedure IdLogEvent1Sent(ASender: TComponent; const AText,
AData: String);
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure IdLogEvent1Status(ASender: TComponent; const AText: String);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(Handle,'open','http://www.twsms.com',nil,nil,SW_SHOWNORMAL);
end;
procedure TForm1.IdLogEvent1Received(ASender: TComponent; const AText,
AData: String);
begin
LogList.Items.Add('Received :'+AText+';'+AData);
LogList.ItemIndex := LogList.Count-1;
end;
procedure TForm1.IdLogEvent1Sent(ASender: TComponent; const AText,
AData: String);
begin
LogList.Items.Add('Sent :'+AText+';'+AData);
LogList.ItemIndex := LogList.Count-1;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var Content : Tstrings;
Response,ResDesc : string;
i : integer;
begin
if Length(SMSUser.Text)* Length(SMSPwd.Text)*
Length(SendToNo.Text)* Length(SendMsg.Text) = 0 then
raise Exception.Create('戈
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -