大数据量生成工具源代码(Delphi)

可执行文件存放于: [url]http://bbs.51testing.com/thread-71954-1-1.html[/url]

unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, ExtCtrls, shellapi;
type
  TForm1 = class(TForm)
    pnl1: TPanel;
    edt1: TEdit;
    btn2: TButton;
    btn1: TButton;
    pnl2: TPanel;
    mmo2: TMemo;
    lbl1: TLabel;
    lbl2: TLabel;
    edt2: TEdit;
    ud1: TUpDown;
    lbl3: TLabel;
    edt3: TEdit;
    ud2: TUpDown;
    btn3: TButton;
    btn4: TButton;
    CheckBox1: TCheckBox;
    Memo1: TMemo;
    Button1: TButton;
    Button2: TButton;
    StatusBar1: TStatusBar;
    procedure btn1Click(Sender: TObject);
    procedure btn2Click(Sender: TObject);
    procedure btn3Click(Sender: TObject);
    procedure btn4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
  edt1.Clear;
  edt2.Clear;
  edt3.Clear;
end;
procedure TForm1.btn2Click(Sender: TObject);
var
  i: integer;
begin
  try
    strtoint(edt2.Text);
  except
    application.MessageBox('请输入整数!', '系统信息', 32);
    edt2.SetFocus;
    exit;
  end;
  try
    strtoint(edt3.Text);
  except
    application.MessageBox('请输入整数!', '系统信息', 32);
    edt3.SetFocus;
    exit;
  end;
  mmo2.Lines.Clear;
  if trim(edt2.Text) = '' then edt2.Text := '0';
  if not CheckBox1.Checked then begin
  for i := strtoint(edt2.Text) to strtoint(edt2.Text) + strtoint(edt3.Text) - 1 do
    mmo2.Lines.Add(edt1.Text + inttostr(i));
  end else begin
  for i := strtoint(edt2.Text) to strtoint(edt2.Text) + strtoint(edt3.Text) - 1 do
    mmo2.Lines.Add(edt1.Text);
  end;
  if mmo2.Lines.Count>0 then btn4.Enabled := true else btn4.Enabled := false;
end;
procedure TForm1.btn3Click(Sender: TObject);
begin
  halt;
end;
procedure TForm1.btn4Click(Sender: TObject);
begin
  mmo2.Lines.SaveToFile('c:\test.txt');
  ShellExecute(Handle, 'open', 'c:\test.txt', nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
  i :integer;
begin
  mmo2.Lines.Clear;
  for i:=0 to memo1.Lines.Count-1 do
    begin
      mmo2.Lines.Add(edt1.Text+memo1.Lines.Strings[i]);
    end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
  i :integer;
begin
  mmo2.Lines.Clear;
  for i:=0 to memo1.Lines.Count-1 do
    begin
      mmo2.Lines.Add(memo1.Lines.Strings[i]+edt1.Text);
    end;
end;
end.




本文转自 fish_yy 51CTO博客,原文链接:http://blog.51cto.com/tester2test/139322,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值