unit GetAPass;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Variants, ComOBJ, StdCtrls, ExtCtrls, ComCtrls, FileCtrl, ActnList, ImgList, ToolWin;
const Model = 'yyyy-mm-dd hh:nn:ss'; type PassType = record PassCode: string; FileType: string; FileTime: TDateTime; end; TPassForm = class(TForm) ListView1: TListView; ImageList1: TImageList; StatusBar1: TStatusBar; Memo1: TMemo; CoolBar1: TCoolBar; ToolBar1: TToolBar; ToolButton1: TToolButton; ToolButton2: TToolButton; ToolButton3: TToolButton; ToolButton4: TToolButton; ToolButton5: TToolButton; ToolButton6: TToolButton; ImageList2: TImageList; Edit1: TEdit; Pick1: TDateTimePicker; Splitter1: TSplitter; procedure CloseForm(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure GetMDBDir(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure CreateMDB(Sender: TObject); procedure GetAllPass(Sender: TObject); procedure SetCurTime(Sender: TObject); private { Private declarations } DateStr: DWord; PassCode: WideString; EncodeArray: array[0..19] of Word; ReaderArray: array[0..19] of Word; function ExecFile(FName: string): PassType; procedure ExecDirectory(S: string); function Make01(F: string; P: string = ''): boolean; function Make02(F: string): boolean; procedure SetTime(YY, MM, DD: Word); overload; procedure SetTime(MYDate: TDate); overload; public { Public declarations } FileBox1: TFileListBox; end;
var //2079-06-05前[EC379CFA28E68A607B36DFB11343B133795B7C2A ] //2079-06-05后[ED379DFA29E68B607A36DEB11243B033785B7D2A ] { 固定密钥 } InhereCode: array[0..9] of Word = ($37EC, $FA9C, $E628, $608A, $367B, $B1DF, $4313, $33B1, $5B79, $2A7C);
{活动密钥 } UserCode8: array[0..9] of Word = //89年9月17日前 ($8B86, $345D, $2EC6, $C613, $E454, $02F5, $8477, $DFCF, $1134, $C592); UserCode: array[0..9] of Word = //89年9月17日后 ($7B86, $C45D, $DEC6, $3613, $1454, $F2F5, $7477, $2FCF, $E134, $3592);
InCode97: array[0..19] of byte = //Access 97 固定密钥 ($86, $FB, $EC, $37, $5D, $44, $9C, $FA, $C6, $5E, $28, $E6, $13, $00, $00, $00, $00, $00, $00, $00); var PassForm: TPassForm;
implementation
{$R *.DFM}
procedure TPassForm.SetTime(YY, MM, DD: Word); var myST: TSystemTime; MSec: Word; begin with myST do begin MyST.wYear := YY; MyST.wMonth := MM; MyST.wDay := DD; DecodeTime(Time, wHour, wMinute, wSecond, MSec); end; try SetLocalTime(myST)except ShowMessage('Error'); end; end;
procedure TPassForm.SetTime(MYDate: TDate); var myST: TSystemTime; MSec: Word; begin with myST do begin DecodeDate(MyDate, wYear, wMonth, wDay); DecodeTime(Time, wHour, wMinute, wSecond, MSec); end; try SetLocalTime(myST)except end; end;
[1] [2] 下一页
|