- UID
- 1879
高级会员
- 经验
- 点
- 和山币
- 枚
- 积分
- 2364
- 阅读权限
- 50
- 注册时间
- 2006-4-23
- 最后登录
- 1970-1-1
|
我那99完全巧合....公布代码:
---------------------------------------
unit main;
interface
uses
windows, messages,SysUtils, Forms,
RzButton, StdCtrls, ComCtrls, ToolWin, Classes, Controls;
type
TForm1 = class(TForm)
CoolBar1: TCoolBar;
Label1: TLabel;
Label2: TLabel;
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Label3: TLabel;
Label4: TLabel;
shuchu: TMemo;
RzButton1: TRzButton;
Memo1: TMemo;
procedure Label2Click(Sender: TObject);
procedure Edit1Click(Sender: TObject);
procedure Edit2Click(Sender: TObject);
procedure RzButton1Click(Sender: TObject);
procedure Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure CoolBar1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{关闭窗口}
procedure TForm1.Label2Click(Sender: TObject);
var
i:integer;
begin
for i:=1 to 100 do
begin
self.Top := self.Top + i;
self.Left := self.Left + Trunc((i * i)/10);
self.AlphaBlendValue:=255-i;
self.Height:=Trunc(self.Height-i/3);
self.Width:=Trunc(self.Width-i/3);
sleep(10);
end;
self.close;
end;
{移动窗口}
procedure TForm1.Edit1Click(Sender: TObject);
begin
Edit1.Text:='';
end;
procedure TForm1.Edit2Click(Sender: TObject);
begin
Edit2.Text:='';
end;
{中文转unicode}
定义变量 Chinese2UniCode(AiChinese : string) : Integer;
Var
ch, cl : String[2];
a : array [1..2] of char;
Begin
StringToWideChar(Copy(AiChinese, 1, 2), @(a[1]), 2);
ch := IntToHex(Integer(a[2]), 2);
cl := IntToHex(Integer(a[1]), 2);
Result := StrToInt('$' + ch + cl);
end;
{得到RP}
定义变量 getMark(str:string):integer;
var _local2 :integer;
_local1 :integer;
chr:string;
begin
_local1:=0;
_local2:=0;
SetLength(chr,2);
while _local1 < length(str) do
begin
chr[1]:=str[_local1+1];
chr[2]:=str[_local1+2];
_local2 := _local2 + chinese2unicode(chr);
_local1:=_local1+1;
end;
result:=_local2;
end;
{评价}
定义变量 pinjia(n:integer):string;
var
_local2:string;
begin
if (n =0) then
_local2 := '你一定不是人吧?怎么一点人品都没有?!'
else if ((n > 0) and (n <= 5)) then
_local2 := '西蜜湖应该能淹死你,快去吧~愿你投胎做个好人~'
else if ((n > 5) and (n <= 10)) then
_local2 := '是我不好...不应该跟你谈人品问题的...'
else if ((n > 10) and (n <= 15)) then
_local2 := '杀过人没有?放过火没有?科院还有你这种人?'
else if ((n > 15) and (n <= 20)) then
_local2 := '昨天是不是去偷看女生洗澡了,真是的...'
else if ((n > 20) and (n <= 25)) then
_local2 := '你的人品之低下实在让人惊讶啊,管理员,赶紧封IP...'
else if ((n > 25) and (n <= 30)) then
_local2 := '你的人品太差了。恶意灌水的事情没少干吧?'
else if ((n > 30) and (n <= 35)) then
_local2 := '你的人品真差!在宾馆打饭经常插队吧...'
else if ((n > 35) and (n <= 40)) then
_local2 := '你拥有如此差的人品请经常祈求佛祖保佑你吧...'
else if ((n > 40) and (n <= 45)) then
_local2 := '老实交待..论坛上经常出现的偷拍照是不是你的杰作?'
else if ((n > 45) and (n <= 50)) then
_local2 := '你随地大小便之类的事没少干吧?'
else if ((n > 50) and (n <= 55)) then
_local2 := '你的人品太差了..那色情帖是你发的吧,别不承认!'
else if ((n > 55) and (n <= 60)) then
_local2 := '你的人品很差了..要时刻克制住灌水的冲动哦..'
else if ((n > 60) and (n <= 65)) then
_local2 := '你的人品比较差了..多向人家MagicWolf同志学习啊..'
else if ((n > 65) and (n <= 70)) then
_local2 := '你的人品勉勉强强..要自己好自为之..'
else if ((n > 70) and (n <= 75)) then
_local2 := '有你这样的人品算是不错了..'
else if ((n > 75) and (n <= 80)) then
_local2 := '你有较好的人品..继续保持..'
else if ((n > 80) and (n <= 85)) then
_local2 := '你的人品不错..科院需要你这样的人!'
else if ((n > 85) and (n <= 90)) then
_local2 := '你的人品真好..建议你找天涯要个斑竹当当..'
else if ((n > 90) and (n <= 95)) then
_local2 := '你的人品太好了..走路经常踩到金子吧...'
else if ((n > 95) and (n <= 99)) then
_local2 := '你是世人的榜样!你就是当代活雷锋啊~~'
else if (n =100) then
_local2 := '天啦!你不是人!你是神!!!'
else
_local2 := '你的人品竟然负溢出了...我对你无语..';
result:=_local2;
end;
procedure TForm1.RzButton1Click(Sender: TObject);
var
mark:integer;
begin
mark:=(getMark(edit1.Text) +getMark(edit2.Text)) mod 101;
memo1.Text:='你的人品值为:'+inttostr(mark);
shuchu.Text:=pinjia(mark);
end;
procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND, $F012, 0);
end;
procedure TForm1.CoolBar1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND, $F012, 0);
end;
end. |
|