和山论坛

 找回密码
 会员注册
楼主: MagicWolf
打印 上一主题 下一主题

人品计算器(和山论坛专用喔~~)[公布源代码(DELPHI)]

[复制链接]
31
发表于 2007-5-6 08:54 | 只看该作者
玩了 一次 就够了 哈
32
发表于 2007-5-6 13:10 | 只看该作者
今天没心情灌水不知道为什么
什么嘛,太假了,估计就楼主是100
33
 楼主| 发表于 2007-5-6 16:07 | 只看该作者
我那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.
34
发表于 2007-5-6 16:09 | 只看该作者
看不懂哈哈,哎。。。悲哀
35
发表于 2007-5-6 16:14 | 只看该作者
这么复杂的阿
36
发表于 2007-5-6 16:17 | 只看该作者
看不懂。。程序一窍不通。。。
37
发表于 2007-5-7 12:00 | 只看该作者
代码好长瓦%@17
38
发表于 2007-5-7 12:11 | 只看该作者
小河看的懂??
39
发表于 2007-5-7 12:12 | 只看该作者
偶假装看懂了
40
发表于 2007-5-7 18:35 | 只看该作者
4。。。。
lz,我要K了你%@9
41
发表于 2007-5-7 18:48 | 只看该作者
HOHO~~~~偶就不多说了...
42
发表于 2007-5-7 18:50 | 只看该作者
哇!这么高。。我都没有去测过。。等下试下。。估计是不高的。我一向自认为RP很差。%@16。。。居然有2个人品的说。。呵呵

[ 本帖最后由 伤心女人 于 2007-5-7 07:17 PM 编辑 ]

good luck.gif (2.59 KB, 下载次数: 8)

good luck.gif

heartbroken .gif (3.73 KB, 下载次数: 5)

heartbroken .gif
43
发表于 2007-5-7 20:23 | 只看该作者
怎么会这样,果然不准,要不燃我怎么会是0
44
 楼主| 发表于 2007-5-7 22:38 | 只看该作者
你们都不填写自己的名字...当然不准啦....~~~~
45
发表于 2007-5-7 22:57 | 只看该作者
不是不准。呵呵/一个是填了。我自己名字。一个没有填。哈哈/天然之别%@13
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则


浙江科技学院和山论坛|手机客户端|小黑屋|和山论坛

GMT+8, 2025-11-6 20:24 , Processed in 0.114197 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.2

© 2005-2019 和山论坛(www.hsbbs.com)

快速回复 返回顶部 返回列表