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

📄 sysinfo.pas

📁 学校里做课程设计的东西,在delphi环境下运行,采用Sql2000数据库
💻 PAS
字号:
 unit SysInfo;

interface

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

type
  TSysInfoForm = class(TForm)
    Label2: TLabel;
    Label3: TLabel;
    BitBtn1: TButton;
    BitBtn2: TButton;
    OldEdit: TEdit;
    NewEdit: TEdit;
    ConfirmEdit: TEdit;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  
   

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SysInfoForm: TSysInfoForm;

implementation

uses DataModule, Main;


{$R *.DFM}
procedure TSysInfoForm.BitBtn1Click(Sender: TObject);
var
  PWFile: TextFile;
  Possword : string;
begin
AssignFile(PWFile,'config.sys');
  Reset(PWFile);
  Readln(PWFile,Possword);
  CloseFile(PWFile);

  if  OldEdit.Text <> Possword then
    Showmessage('原密码不对,不能修改密码。')
  else if NewEdit.Text = ConfirmEdit.Text then
       begin
         AssignFile(PWFile,'config.sys');
         Rewrite(PWFile);
         Writeln(PWFile,NewEdit.Text);
         CloseFile(PWFile);
         ShowMessage('密码修改成功.');
       end
       else begin
              ShowMessage('新密码和确认密码不一致。');
              NewEdit.SetFocus;
            end;

end;

procedure TSysInfoForm.BitBtn2Click(Sender: TObject);
begin
Close;

end;

end.



⌨️ 快捷键说明

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