Source code of file oscpmwin_v0.1.1.875/oscpm1.dpr from the
osCommerce Product Manager for Windows.
0000: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001: osCommerce Product Manager for Windows (oscpmwin).
0002: Copyright �2003,2004,2005 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: PROGRAM oscpm1;
0023:
0024: uses
0025: gnugettext in 'gnugettext.pas',
0026: Forms,
0027: Windows,
0028: Graphics,
0029: SysUtils,
0030: main in 'main.pas' {opm_Form_Main},
0031: config in 'config.pas' {opm_Form_Config},
0032: search in 'search.pas' {opm_Form_SearchProduct},
0033: pedit in 'pedit.pas' {opm_Form_PEdit},
0034: askuser in 'askuser.pas' {opm_Form_AskUser},
0035: license in 'license.pas' {opm_Form_License},
0036: about in 'about.pas' {opm_Form_About},
0037: pimgzoom in 'pimgzoom.pas' {opm_Form_ImageZoom},
0038: splash in 'splash.pas' {opm_Form_splash},
0039: oscpmdata in 'oscpmdata.pas',
0040: balloons in 'balloons.pas',
0041: regconfig in 'regconfig.pas',
0042: dataman in 'dataman.pas',
0043: attention in 'attention.pas',
0044: network in 'network.pas',
0045: FreeImage in 'freeimage.pas',
0046: imageman in 'imageman.pas',
0047: askupload in 'askupload.pas' {opm_Form_UploadImage},
0048: modules in 'modules.pas',
0049: runmod in 'runmod.pas' {opm_Form_Runmod},
0050: colorsel in 'colorsel.pas' {opm_Form_ColorSel},
0051: configmod in 'configmod.pas' {opm_Form_ConfigMod},
0052: askcat in 'askcat.pas' {opm_Form_AskCat},
0053: progress in 'progress.pas' {opm_Form_Progress};
0054:
0055: VAR
0056: opm_OnlyOne_Mutex : THandle;
0057:
0058: {$R *.res}
0059:
0060: BEGIN
0061: {The following line to be used with MemCheck only http://v.mahon.free.fr/pro/freeware/memcheck/}
0062: {MemChk;}
0063: Graphics.DefFontData.Name := FNReg_ReadSetting ('UIFontName', opmC_DefaultFont, opmC_RegistryKey, opmC_RKVisual);
0064: Graphics.DefFontData.Height := FNopm_StrToInt (FNReg_ReadSetting ('UIFontHeight', INTTOSTR (opmC_DefaultFontHeight), opmC_RegistryKey, opmC_RKVisual));
0065: Graphics.DefFontData.Charset := FNopm_StrToInt (FNReg_ReadSetting ('UIFontCharset', INTTOSTR (opmC_DefaultFontCharset), opmC_RegistryKey, opmC_RKVisual));
0066: AddDomainForResourceString ('delphi');
0067: UseLanguage(opmC_Def_GUILang);
0068: opm_OnlyOne_Mutex := CreateMutex (NIL, TRUE, 'opm_oscpm1');
0069: IF ((opm_OnlyOne_Mutex <> 0) AND (GetLastError = 0)) THEN
0070: BEGIN
0071: TRY
0072: opm_Form_splash := Topm_Form_splash.Create(Application);
0073: opm_Form_splash.Show;
0074: opm_Form_splash.Update;
0075: Application.Initialize;
0076: Application.Title := 'OSCPM1';
0077: Application.UpdateFormatSettings := FALSE;
0078: Application.CreateForm(Topm_Form_Main, opm_Form_Main);
0079: opm_Form_splash.opm_ProgressBar_Splash.Position := 7; opm_Form_splash.Update;
0080: Application.CreateForm(Topm_Form_Progress, opm_Form_Progress);
0081: opm_Form_splash.opm_ProgressBar_Splash.Position := 14; opm_Form_splash.Update;
0082: Application.CreateForm(Topm_Form_AskCat, opm_Form_AskCat);
0083: opm_Form_splash.opm_ProgressBar_Splash.Position := 21; opm_Form_splash.Update;
0084: Application.CreateForm(Topm_Form_ConfigMod, opm_Form_ConfigMod);
0085: opm_Form_splash.opm_ProgressBar_Splash.Position := 28; opm_Form_splash.Update;
0086: Application.CreateForm(Topm_Form_UploadImage, opm_Form_UploadImage);
0087: opm_Form_splash.opm_ProgressBar_Splash.Position := 35; opm_Form_splash.Update;
0088: Application.CreateForm(Topm_Form_Config, opm_Form_Config);
0089: opm_Form_splash.opm_ProgressBar_Splash.Position := 42; opm_Form_splash.Update;
0090: Application.CreateForm(Topm_Form_SearchProduct, opm_Form_SearchProduct);
0091: opm_Form_splash.opm_ProgressBar_Splash.Position := 49; opm_Form_splash.Update;
0092: Application.CreateForm(Topm_Form_PEdit, opm_Form_PEdit);
0093: opm_Form_splash.opm_ProgressBar_Splash.Position := 56; opm_Form_splash.Update;
0094: Application.CreateForm(Topm_Form_AskUser, opm_Form_AskUser);
0095: opm_Form_splash.opm_ProgressBar_Splash.Position := 63; opm_Form_splash.Update;
0096: Application.CreateForm(Topm_Form_License, opm_Form_License);
0097: opm_Form_splash.opm_ProgressBar_Splash.Position := 70; opm_Form_splash.Update;
0098: Application.CreateForm(Topm_Form_About, opm_Form_About);
0099: opm_Form_splash.opm_ProgressBar_Splash.Position := 77; opm_Form_splash.Update;
0100: Application.CreateForm(Topm_Form_ImageZoom, opm_Form_ImageZoom);
0101: opm_Form_splash.opm_ProgressBar_Splash.Position := 84; opm_Form_splash.Update;
0102: Application.CreateForm(Topm_Form_Runmod, opm_Form_Runmod);
0103: opm_Form_splash.opm_ProgressBar_Splash.Position := 91; opm_Form_splash.Update;
0104: Application.CreateForm(Topm_Form_ColorSel, opm_Form_ColorSel);
0105: opm_Form_splash.opm_ProgressBar_Splash.Position := 98; opm_Form_splash.Update;
0106: Application.Run;
0107: FINALLY
0108: opm_Form_splash.Close;
0109: opm_Form_splash.Free;
0110: END;
0111: IF (opm_OnlyOne_Mutex <> 0) THEN CloseHandle (opm_OnlyOne_Mutex);
0112: END;
0113: END.