Source code of file oscpmwin/splash.pas from the
osCommerce Product Manager for Windows.
0000: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001: osCommerce Product Manager for Windows (oscpmwin).
0002: Copyright �2003-2006 by Mario A. Valdez-Ramirez.
0003:
0004: You can contact Mario A. Valdez-Ramirez
0005: by email at mario@mariovaldez.org or paper mail at
0006: Olmos 809, San Nicolas, NL. 66495, Mexico.
0007:
0008: This program is free software; you can redistribute it and/or modify
0009: it under the terms of the GNU General Public License as published by
0010: the Free Software Foundation; either version 2 of the License, or (at
0011: your option) any later version.
0012:
0013: This program is distributed in the hope that it will be useful, but
0014: WITHOUT ANY WARRANTY; without even the implied warranty of
0015: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016: General Public License for more details.
0017:
0018: You should have received a copy of the GNU General Public License
0019: along with this program; if not, write to the Free Software
0020: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0021: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0022: unit splash;
0023:
0024: interface
0025:
0026: USES
0027: Windows, Classes, Forms, ComCtrls, ExtCtrls, StdCtrls, Graphics, Controls;
0028:
0029: TYPE
0030: Topm_Form_splash = class(TForm)
0031: opm_Panel_Splash: TPanel;
0032: opm_Image_splash: TImage;
0033: opm_ProgressBar_Splash: TProgressBar;
0034: opm_Label_SplashVersion: TLabel;
0035: procedure opm_Image_splashClick(Sender: TObject);
0036: procedure FormDeactivate(Sender: TObject);
0037: procedure FormKeyDown(Sender: TObject; var Key: Word;
0038: Shift: TShiftState);
0039: procedure FormShow(Sender: TObject);
0040: private
0041: { Private declarations }
0042: public
0043: PROCEDURE opmPR_ReshowSplash;
0044: end;
0045:
0046: var
0047: opm_Form_splash: Topm_Form_splash;
0048: opm_SplayDelay : DOUBLE;
0049:
0050: IMPLEMENTATION
0051:
0052: USES oscpmdata, dataman;
0053:
0054: {$R *.dfm}
0055:
0056:
0057: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0058: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0059: procedure Topm_Form_splash.opm_Image_splashClick(Sender: TObject);
0060: begin
0061: opm_Form_splash.Deactivate;
0062: end;
0063:
0064:
0065: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0066: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0067: procedure Topm_Form_splash.FormDeactivate(Sender: TObject);
0068: VAR
0069: SplashTime : DOUBLE;
0070: begin
0071: IF (opm_SplayDelay > 200) THEN
0072: BEGIN
0073: SplashTime := GetTickCount;
0074: REPEAT
0075: Application.ProcessMessages;
0076: UNTIL (((GetTickCount - SplashTime) > opm_SplayDelay) OR (GetTickCount < SplashTime));
0077: END;
0078: opm_Form_splash.Close;
0079: end;
0080:
0081:
0082: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0083: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0084: procedure Topm_Form_splash.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
0085: begin
0086: opm_Form_splash.Close;
0087: end;
0088:
0089:
0090: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0091: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0092: PROCEDURE Topm_Form_splash.opmPR_ReshowSplash;
0093: BEGIN
0094: opm_ProgressBar_Splash.Visible := FALSE;
0095: opm_SplayDelay := 0;
0096: opm_Form_splash.Show;
0097: END;
0098:
0099:
0100: procedure Topm_Form_splash.FormShow(Sender: TObject);
0101: begin
0102: opm_Label_SplashVersion.Caption := opmC_Version + '.' + opmG_ExeBuildVersion;
0103: end;
0104:
0105: INITIALIZATION
0106: opm_SplayDelay := 0;
0107:
0108:
0109: end.