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

📄 xtgl_zc.~pas

📁 明日腾龙编修管理系统,对于做相关软件的朋友是一个非常好的参考
💻 ~PAS
字号:
unit xtgl_zc;

interface

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

type
  Tzc = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Image1: TImage;
    Bevel1: TBevel;
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  zc: Tzc;
   myinifile:Tinifile;
implementation

uses XTSZ_QXMMFORM, MR_WXFORM;

{$R *.dfm}

procedure Tzc.FormCreate(Sender: TObject);
var
filename,Mystring:string;
begin
myinifile:=Tinifile.create('myini.ini');
Mystring:=myinifile.readstring ('mitl','12333','DOGDOG');
IF Mystring= 'DOGDOG' THEN   exit
else
  if myinifile.readbool ('y','是否正式用户',FALSE)=true  then
  BEGIN
     XTSZ_MMSZ.showmodal;
     XTSZ_MMSZ.DBLookupComboBox1.enabled:=true;
    CLOSE;
    ZC.Visible:=FALSE;
   END;
  if myinifile.readbool ('y','是否正式用户',TRUE)=FALSE  then
  BEGIN
    IF TODAY-STRTODATE(myinifile.readstring('t','记录日期','0001-09-09'))>30  then   SHOWMESSAGE('试用期已到,请注册后使用。');
   END;
end;
procedure Tzc.Button2Click(Sender: TObject);
begin
   if edit1.text='' then begin
      showmessage('用户名不能为空。') ;
      exit;
   end;
   myinifile.writestring('mitl','用户',edit1.text);
   myinifile.writestring('t','记录日期',datetostr(today));
   myinifile.writebool('y','是否正式用户',false);
   myinifile.Destroy;
   CLOSE;
end;
procedure Tzc.Button3Click(Sender: TObject);
begin
  MR_WX.CLOSE;
  XTSZ_MMSZ.CLOSE;
  CLOSE;
end;
procedure Tzc.Button1Click(Sender: TObject);
begin
   if edit1.text='' then begin
      showmessage('用户名不能为空。');
      exit;
   end;
   if edit2.Text='MRKJ' then begin
   myinifile.writestring('mitl','用户', edit1.text);
   myinifile.writestring('t','注册日期',datetostr(today));
   myinifile.writebool('y','是否正式用户',TRUE);
   showmessage('用户注册成功,将进入系统登陆窗口。');
   myinifile.Destroy;
   end
   else
   showmessage('用户注册不成功,清重新输入注册码。')
end;

End.

⌨️ 快捷键说明

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