⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rl_yhzc_unit.pas

📁 通用人力资源系统,分类可以自设定 可以熟练掌握DELPHI语言
💻 PAS
字号:
unit rl_yhzc_unit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  Trl_yhzc = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    Edit2: TEdit;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rl_yhzc: Trl_yhzc;

implementation
uses sysifo, rlzy_main_unit;
{$R *.dfm}

procedure Trl_yhzc.Button1Click(Sender: TObject);
var
  i, cd: integer;
  list: tstrings;
  zhucema, zc, yzm: string;
begin
  zc := edit2.text;
  cd := strlen(pchar(edit2.text));
  for i := 1 to cd do
  begin
   if yzm='' then yzm:='0';
  if zc[i]<>'0' then
       YZM := inttostr((strtoint(YZM) + trunc(ord(zc[i]) *9867)));
       //    YZM := YZM + inttostr(trunc(ord(zc[i]) / 9));
  end;
  yzm:=inttostr((strtoint(yzm)+15769876));
  zhucema := uppercase(edit1.text);
  if yzm <> zhucema then
  begin
    showmessage('注册码非法!');
    close;

  end
  else
  begin
    if zhucema <> '' then
    begin
      List := TStringList.Create;
      list.Add(zhucema);
      list.SaveToFile('key.dat');
      showmessage('注册成功!');
      close;
    end;
  end;
end;

procedure Trl_yhzc.FormActivate(Sender: TObject);
var
 cups:TcpuMSG;
  aa: array[1..10] of char;
  i, j, cd, sjcd: integer;
  zfc, zc, yzm, yzm1: string;
begin

  j := 1;
  zfc := '';
  yzm := '';
  cd := strlen(GetIdeSerialNumber);
  sjcd := strlen(pchar(trim(GetIdeSerialNumber)));
  if sjcd < cd then
    for i := 1 to cd - sjcd do
    begin
      zfc := zfc + chr(64 + i + j);
      j := j + 3;
      if 64 + i + j > 90 then
        j := 1;
    end;
if trim(uppercase(zfc + trim(GetIdeSerialNumber)))='' then
begin
   cups:=GetcpuMSG;
  edit2.Text :=cups.ID1+cups.ID2+cups.ID3+cups.ID4;

  end
  else
    edit2.Text:= uppercase(zfc + trim(GetIdeSerialNumber));
   cd := strlen(pchar(edit2.text));
  zc := edit2.text;
  for i := 1 to cd do
  begin
   if yzm='' then yzm:='0';
  if zc[i]<>'0' then
       YZM := inttostr((strtoint(YZM) + trunc(ord(zc[i]) *9867)));
  end;

  edit2.text := zc;
 // edit1.text := inttostr((strtoint(yzm)+15769876));
end;

procedure Trl_yhzc.Button2Click(Sender: TObject);
begin
  close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -