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

📄 uloader.pas

📁 一套来自国外的ERP系统,有兴趣的朋友可以看看!
💻 PAS
字号:
unit uloader;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, jpeg, ExtCtrls,dbTables, RXCtrls, BdeUtils;

type
  TLoader = class(TForm)
    Panel1: TPanel;
    status: TLabel;
    Panel2: TPanel;
    RxLabel1: TRxLabel;
    Image2: TImage;
    loadDb: TDatabase;
    Image1: TImage;
    Memo1: TMemo;
    Image3: TImage;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    procedure Customizza ;
  public
    { Public declarations }
  end;

var
  Loader: TLoader;

implementation

uses  aboutOS, leggiImpostazioni;

{$R *.DFM}

procedure TLoader.Customizza ;
var
   nfileimg : string ;

begin
 nfileImg := Custom('IMGLOGOSPLASH','') ;
 if nfileImg <> '' then
  begin
   Image1.Picture.LoadFromFile(nfileImg) ;
  end ;

 if Custom('SOLOIMG','NO') = 'SI' then
  begin
   RxLabel1.Visible := false ;
   Memo1.Visible := False ;
   Image2.Visible := False ;
   Image1.Stretch := false ;
   Self.Width := image1.Width + 20 ;
   Self.Height := image1.Height + 30 ;
   exit ;
  end ;

 RxLabel1.Caption := Custom('COPYLEFT',RxLabel1.Caption) ;
 nfileImg := Custom('IMGLOGO2SPLASH','') ;
 if nfileImg <> '' then
  begin
   Image2.Picture.LoadFromFile(nfileImg) ;
  end ;
 nfileImg := Custom('IMGLOGO3SPLASH','') ;
 if nfileImg <> '' then
  begin
   Image3.Picture.LoadFromFile(nfileImg) ;
  end ;
  
end ;

procedure TLoader.FormCreate(Sender: TObject);
const
 tableVersioneuro2000 : string = '6.0.9' ;
 tableVersionLocal : string = '2.7' ;
 tableVersionReport : string = '1.3' ;

Var
 VersionFile : TextFile ;
 v : String ;

 Procedure ControlloParametri ;
  Var
     iPar : Integer ;
     Parametro : string ;
 begin
  For iPar := 1 to ParamCount  do
   begin
    Parametro := ParamStr(iPar) ;
    If Pos('/NDIR:',Parametro) > 0 then
     begin
      Session.NetFileDir := Copy(Parametro,7,Length(Parametro) - 6) ;
     end ;
   end ;
 end ;

    Function Valido : boolean ;
     begin
      (*
      result := false ;
      If AboutBox.Professional.Registered then
       begin
        result := true;
        GiorniPassati.Caption := 'Professional Edition' ;
       end
      else
       begin
        If AboutBox.Advanced.Registered then
         begin
          result := true ;
          GiorniPassati.Caption := 'Advanced Edition' ;
         end
        else
         begin
          If AboutBox.Standard.Registered then
           begin
            Result := true ;
            GiorniPassati.Caption := 'Standard Edition' ;
           end
          else
           begin
             // non siamo registrati
             If AboutBox.Standard.DaysLeft > 0 then
              begin
               Giornipassati.Caption := 'Giorni demo residui: ' + IntToStr(AboutBox.Standard.DaysLeft) ;
               result := true ;
              end ;
           end ;
         end ;
       end ; *)
       result := true ;
     end ;

    Function CheckVersion(alias : string) : string ;
    Var
       NomeFile : String ;

    begin
     result := '' ;
     LoadDb.AliasName := Alias ;
     LoadDb.open ;
     NomeFile := loadDb.Directory + 'versione.txt' ;
     LoadDb.Close ;
     If not FileExists(nomeFile) then
      begin
       result := '0.00' ;
       exit;
      end ;
     AssignFile(VersionFile,nomefile) ;
     Reset(versionFile) ;
     ReadLn(VersionFile,result) ;
     CloseFile(VersionFile) ;
    end ;

begin
 Customizza ;
 ControlloParametri ;
 V := CheckVersion('euro2000') ;
 If V <> tableVersioneuro2000 then
  begin
   ShowMessage('Attenzione : le tabelle principali non sono allineate(V.attuale : ' + V + '), lanciare il programma di allineamento tabelle "TABLESCANNER" e riprovare !') ;
   Tag := -1 ;
  end ;
 V := CheckVersion('e2_local') ;
 If V <> tableVersionlocal then
  begin
   ShowMessage('Attenzione : le tabelle di supporto non sono allineate(V.attuale : ' + V + '), lanciare il programma di allineamento tabelle "TABLESCANNER" e riprovare !') ;
   Tag := -2 ;
  end ;
 V := CheckVersion('e2_redata') ;
 If V <> tableVersionreport then
  begin
   ShowMessage('Attenzione : le tabelle del report manager non sono allineate(V.attuale : ' + V + '), lanciare il programma di allineamento tabelle "TABLESCANNER" e riprovare !') ;
   Tag := -3 ;
  end ;
 If Not Valido then
  begin
    If MessageDlg('Periodo demo esaurito, registrare il programma adesso ?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
     begin
        Aboutbox.ShowModal ;
        AboutBox.Close ;
        If Not Valido then
         tag := -4
        else
         tag := 0 ;
     end
    else
     tag := -5 ;
  end ;
end;

end.

⌨️ 快捷键说明

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