program Workgb;
uses
Forms,
Sysutils,
ConstFrm in 'SOURCE/ConstPas.pas',
LoginFrm in 'SOURCE/LoginFrm.pas' {frmLogin},
WorkgbFrm in 'SOURCE/WorkgbFrm.pas' {frmWorkgb};
{$R *.RES}
begin
Application.Initialize;
Application.Title := 'XXXXXX编写'; //改一下,要是同事看着不好。
LoginInf := TLoginInf.Create;
LoginInf.WorkPath := ExtractFilePath(Application.ExeName);
if not LoginInf.SessionConnect then
begin
LoginInf.Free;
Exit;
end;
frmLogin := TfrmLogin.Create(nil);
frmLogin.ShowModal;
frmLogin.Free;
frmLogin := nil;
if not LoginInf.Logined then //登陆成功后的标志。
begin
LoginInf.SessionDisConn;
LoginInf.Free;
LoginInf := nil;
end
else
begin
Application.CreateForm(TfrmWorkgb, frmWorkgb);
Application.Run;
end;
end.