Source code of file oscpmwin_v0.1.2.484/oscpm1.dpr 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: 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: currencyedit in 'currencyedit.pas' {opm_Form_CurrencyEdit},
0055: currencyman in 'currencyman.pas' {opm_Form_CurrencyMan},
0056: currupd in 'currupd.pas' {opm_Form_Currupd},
0057: openpicdlg in 'openpicdlg.pas',
0058: sqllog in 'sqllog.pas' {opm_Form_SQLLog};
0059:
0060: VAR
0061: opm_OnlyOne_Mutex : THandle;
0062:
0063: {$R *.res}
0064:
0065: BEGIN
0066: {The following line to be used with MemCheck only http://v.mahon.free.fr/pro/freeware/memcheck/}
0067: {MemChk;}
0068: Graphics.DefFontData.Name := FNReg_ReadSetting ('UIFontName', opmC_DefaultFont, opmC_RegistryKey, opmC_RKVisual);
0069: Graphics.DefFontData.Height := FNopm_StrToInt (FNReg_ReadSetting ('UIFontHeight', INTTOSTR (opmC_DefaultFontHeight), opmC_RegistryKey, opmC_RKVisual));
0070: Graphics.DefFontData.Charset := FNopm_StrToInt (FNReg_ReadSetting ('UIFontCharset', INTTOSTR (opmC_DefaultFontCharset), opmC_RegistryKey, opmC_RKVisual));
0071: AddDomainForResourceString ('delphi');
0072: UseLanguage (opmC_Def_GUILang);
0073: opm_OnlyOne_Mutex := CreateMutex (NIL, TRUE, 'opm_oscpm1');
0074: IF ((opm_OnlyOne_Mutex <> 0) AND (GetLastError = 0)) THEN
0075: BEGIN
0076: TRY
0077: opm_Form_splash := Topm_Form_splash.Create(Application);
0078: opm_Form_splash.Show;
0079: opm_Form_splash.Update;
0080: Application.Initialize;
0081: Application.Title := 'OSCPM1';
0082: Application.UpdateFormatSettings := FALSE;
0083: opm_Form_splash.opm_ProgressBar_Splash.Position := 5; opm_Form_splash.Update;
0084: Application.CreateForm(Topm_Form_Main, opm_Form_Main);
0085: opm_Form_splash.opm_ProgressBar_Splash.Position := 8; opm_Form_splash.Update;
0086: Application.CreateForm(Topm_Form_SQLLog, opm_Form_SQLLog);
0087: opm_Form_splash.opm_ProgressBar_Splash.Position := 11; opm_Form_splash.Update;
0088: Application.CreateForm(Topm_Form_Currupd, opm_Form_Currupd);
0089: opm_Form_splash.opm_ProgressBar_Splash.Position := 16; opm_Form_splash.Update;
0090: Application.CreateForm(Topm_Form_CurrencyEdit, opm_Form_CurrencyEdit);
0091: opm_Form_splash.opm_ProgressBar_Splash.Position := 22; opm_Form_splash.Update;
0092: Application.CreateForm(Topm_Form_CurrencyMan, opm_Form_CurrencyMan);
0093: opm_Form_splash.opm_ProgressBar_Splash.Position := 27; opm_Form_splash.Update;
0094: Application.CreateForm(Topm_Form_Progress, opm_Form_Progress);
0095: opm_Form_splash.opm_ProgressBar_Splash.Position := 33; opm_Form_splash.Update;
0096: Application.CreateForm(Topm_Form_AskCat, opm_Form_AskCat);
0097: opm_Form_splash.opm_ProgressBar_Splash.Position := 38; opm_Form_splash.Update;
0098: Application.CreateForm(Topm_Form_ConfigMod, opm_Form_ConfigMod);
0099: opm_Form_splash.opm_ProgressBar_Splash.Position := 44; opm_Form_splash.Update;
0100: Application.CreateForm(Topm_Form_UploadImage, opm_Form_UploadImage);
0101: opm_Form_splash.opm_ProgressBar_Splash.Position := 49; opm_Form_splash.Update;
0102: Application.CreateForm(Topm_Form_Config, opm_Form_Config);
0103: opm_Form_splash.opm_ProgressBar_Splash.Position := 55; opm_Form_splash.Update;
0104: Application.CreateForm(Topm_Form_SearchProduct, opm_Form_SearchProduct);
0105: opm_Form_splash.opm_ProgressBar_Splash.Position := 61; opm_Form_splash.Update;
0106: Application.CreateForm(Topm_Form_PEdit, opm_Form_PEdit);
0107: opm_Form_splash.opm_ProgressBar_Splash.Position := 66; opm_Form_splash.Update;
0108: Application.CreateForm(Topm_Form_AskUser, opm_Form_AskUser);
0109: opm_Form_splash.opm_ProgressBar_Splash.Position := 72; opm_Form_splash.Update;
0110: Application.CreateForm(Topm_Form_License, opm_Form_License);
0111: opm_Form_splash.opm_ProgressBar_Splash.Position := 77; opm_Form_splash.Update;
0112: Application.CreateForm(Topm_Form_About, opm_Form_About);
0113: opm_Form_splash.opm_ProgressBar_Splash.Position := 83; opm_Form_splash.Update;
0114: Application.CreateForm(Topm_Form_ImageZoom, opm_Form_ImageZoom);
0115: opm_Form_splash.opm_ProgressBar_Splash.Position := 88; opm_Form_splash.Update;
0116: Application.CreateForm(Topm_Form_Runmod, opm_Form_Runmod);
0117: opm_Form_splash.opm_ProgressBar_Splash.Position := 94; opm_Form_splash.Update;
0118: Application.CreateForm(Topm_Form_ColorSel, opm_Form_ColorSel);
0119: opm_Form_splash.opm_ProgressBar_Splash.Position := 99; opm_Form_splash.Update;
0120: Application.Run;
0121: FINALLY
0122: opm_Form_splash.Close;
0123: opm_Form_splash.Free;
0124: END;
0125: IF (opm_OnlyOne_Mutex <> 0) THEN CloseHandle (opm_OnlyOne_Mutex);
0126: END;
0127: END.