Source code of file oscpmwin_v0.4.1.816/config.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 config;
0023:   
0024:   interface
0025:   
0026:   uses
0027:     SysUtils, Classes, Graphics, Controls, Forms,
0028:     Dialogs, StdCtrls, Buttons, Spin, ExtCtrls, ComCtrls, FR_DSet,
0029:     FR_Desgn, FR_Class;
0030:   
0031:   type
0032:     Topm_Form_Config = class(TForm)
0033:       opm_BitBtn_ConfigOk: TBitBtn;
0034:       opm_BitBtn_ConfigCancel: TBitBtn;
0035:       opm_PageControl_Config: TPageControl;
0036:       opm_TabSheet_ConfigGeneral: TTabSheet;
0037:       opm_TabSheet_ConfigUI: TTabSheet;
0038:       opm_GroupBox_inter: TGroupBox;
0039:       Bevel4: TBevel;
0040:       opm_CheckBox_ConfigRemember: TCheckBox;
0041:       opm_CheckBox_ConfigHotTrack: TCheckBox;
0042:       opm_CheckBox_ConfigAutoload: TCheckBox;
0043:       opm_CheckBox_ConfigDragDrop: TCheckBox;
0044:       opm_CheckBox_ConfigTooltips: TCheckBox;
0045:       opm_CheckBox_ConfigSilent: TCheckBox;
0046:       opm_TabSheet_ConfigImg: TTabSheet;
0047:       opm_GroupBox_ImgConv: TGroupBox;
0048:       opm_CheckBox_ConfigResizeImg: TCheckBox;
0049:       opm_Label_ConfigImgResize: TLabel;
0050:       opm_SpinEdit_ConfigImgX: TSpinEdit;
0051:       opm_SpinEdit_ConfigImgY: TSpinEdit;
0052:       opm_Label_ConfigImgXSymbol: TLabel;
0053:       opm_SpinEdit_ConfigImgQ: TSpinEdit;
0054:       opm_Label_ConfigImgJPEGQuality: TLabel;
0055:       opm_OpenDialog_ConfigINI: TOpenDialog;
0056:       opm_SaveDialog_ConfigINI: TSaveDialog;
0057:       opm_GroupBox_inter2: TGroupBox;
0058:       opm_BitBtn_ConfigReset: TBitBtn;
0059:       Bevel2: TBevel;
0060:       opm_CheckBox_ConfigDragUps: TCheckBox;
0061:       opm_CheckBox_ConfigConfirmDels: TCheckBox;
0062:       opm_CheckBox_ConfigConfirmDrag: TCheckBox;
0063:       opm_CheckBox_ConfigConfirmMods: TCheckBox;
0064:       opm_CheckBox_ConfigConfirmUps: TCheckBox;
0065:       opm_CheckBox_ConfigAutoDownImg: TCheckBox;
0066:       opm_CheckBox_ConfigNoCacheImg: TCheckBox;
0067:       Bevel1: TBevel;
0068:       opm_CheckBox_ConfigConfirmExit: TCheckBox;
0069:       opm_CheckBox_ConfigConfirmImgDels: TCheckBox;
0070:       opm_Label_ConfigJPEGQCategory: TLabel;
0071:       opm_TabSheet_ConfigMods: TTabSheet;
0072:       opm_CheckBox_ConfigPaddingImg: TCheckBox;
0073:       opm_CheckBox_ConfigKeepARImg: TCheckBox;
0074:       opm_BitBtn_ConfigColSel: TBitBtn;
0075:       opm_Panel_ConfigColSel: TPanel;
0076:       opm_GroupBox_INI: TGroupBox;
0077:       opm_BitBtn_ConfigLoadINI: TBitBtn;
0078:       opm_BitBtn_ConfigSaveINI: TBitBtn;
0079:       opm_TabSheet_ConfigUI2: TTabSheet;
0080:       opm_GroupBox_Lang: TGroupBox;
0081:       opm_Label_ConfigUILang: TLabel;
0082:       opm_ComboBox_ConfigUILang: TComboBox;
0083:       opm_Label_ConfigUILangDesc: TLabel;
0084:       Bevel3: TBevel;
0085:       opm_FontDialog_Config: TFontDialog;
0086:       opm_GroupBox_Font: TGroupBox;
0087:       opm_BitBtn_ConfigFont: TBitBtn;
0088:       opm_Label_ConfigFontDetails: TLabel;
0089:       opm_CheckBox_ConfigAllowZeroPrice: TCheckBox;
0090:       opm_CheckBox_ConfigWBDebug: TCheckBox;
0091:       opm_CheckBox_ConfigAllowNegativeQuantity: TCheckBox;
0092:       opm_TabSheet_ConfigReports: TTabSheet;
0093:       opm_GroupBox_Reports: TGroupBox;
0094:       opm_GroupBox_Clipboard: TGroupBox;
0095:       opm_Label_Config_ClipMaxChars: TLabel;
0096:       opm_SpinEdit_Config_ClipColSize: TSpinEdit;
0097:       opm_BitBtn_ConfigReportEdit: TBitBtn;
0098:       opm_ListBox_ConfigReports: TListBox;
0099:       opm_CheckBox_ConfigPRNDirectPrint: TCheckBox;
0100:       opm_frReport_Config: TfrReport;
0101:       opm_frDesigner_Config: TfrDesigner;
0102:       opm_frUserDataset_Config: TfrUserDataset;
0103:       opm_BitBtn_ConfigReportPreview: TBitBtn;
0104:       opm_CheckBox_ConfigAllowEditImageName: TCheckBox;
0105:       opm_Label_ConfigModConnWait: TLabel;
0106:       opm_SpinEdit_ConfigModConnWait: TSpinEdit;
0107:       opm_Label_ConfigModConnRetries: TLabel;
0108:       opm_SpinEdit_ConfigModConnRetries: TSpinEdit;
0109:       opm_OpenDialog_ConfigMod: TOpenDialog;
0110:       opm_GroupBox_Modules: TGroupBox;
0111:       opm_BitBtn_ConfigModDel: TBitBtn;
0112:       opm_ListBox_ConfigMods: TListBox;
0113:       opm_BitBtn_ConfigModEdit: TBitBtn;
0114:       opm_BitBtn_ConfigModAdd: TBitBtn;
0115:       opm_TabSheet_ConfigNet: TTabSheet;
0116:       opm_GroupBox_HTTP: TGroupBox;
0117:       opm_Label_ConfigPHost: TLabel;
0118:       opm_Label_ConfigPPort: TLabel;
0119:       opm_ComboBox_ConfigProxyHost: TComboBox;
0120:       opm_SpinEdit_ConfigProxyPort: TSpinEdit;
0121:       opm_BitBtn_ConfigProxyIE: TBitBtn;
0122:       opm_CheckBox_ConfigUseProxy: TCheckBox;
0123:       opm_ComboBox_ConfigProxyApply: TComboBox;
0124:       opm_GroupBox_HTTPGen: TGroupBox;
0125:       opm_Label_ConfigETABase: TLabel;
0126:       opm_ComboBox_ConfigETABase: TComboBox;
0127:       opm_Label_ConfigUploadURL: TLabel;
0128:       opm_ComboBox_ConfigUploadURL: TComboBox;
0129:       opm_Label_ConfigHTTPConnWait: TLabel;
0130:       opm_SpinEdit_ConfigHTTPConnWait: TSpinEdit;
0131:       opm_GroupBox_Img: TGroupBox;
0132:       opm_ComboBox_ConfigImgURL: TComboBox;
0133:       opm_Label_ConfigImageURL: TLabel;
0134:       opm_CheckBox_ConfigStripes: TCheckBox;
0135:       opm_CheckBox_ConfigCacheIList: TCheckBox;
0136:       opm_Edit_ConfigPDFAuthor: TEdit;
0137:       opm_Label_ConfigPDFAuthor: TLabel;
0138:       opm_ComboBox_ConfigUsername: TComboBox;
0139:       opm_Label_ConfigUsername: TLabel;
0140:       opm_Label_ConfigPassword: TLabel;
0141:       opm_Edit_ConfigPassword: TEdit;
0142:       opm_CheckBox_ConfigStorePass: TCheckBox;
0143:       opm_CheckBox_ConfigDBDebugLog: TCheckBox;
0144:       opm_SpinEdit_ConfigHTTPConnRetries: TSpinEdit;
0145:       opm_Label_ConfigHTTPConnRetries: TLabel;
0146:       opm_CheckBox_ConfigHTTPCompress: TCheckBox;
0147:       opm_CheckBox_ConfigCenterImage: TCheckBox;
0148:       opm_GroupBox_ImgWatermark: TGroupBox;
0149:       opm_CheckBox_ConfigWatermarkImg: TCheckBox;
0150:       opm_Label_ConfigWatermarkBlend: TLabel;
0151:       opm_SpinEdit_ConfigWatermarkBlend: TSpinEdit;
0152:       opm_Edit_ConfigWatermarkFile: TEdit;
0153:       opm_BitBtn_ConfigWatermarkSelectFile: TBitBtn;
0154:       opm_Label_ConfigWatermarkFile: TLabel;
0155:       procedure FormShow(Sender: TObject);
0156:       procedure opm_BitBtn_ConfigOkClick(Sender: TObject);
0157:       procedure FormCreate(Sender: TObject);
0158:       procedure opm_BitBtn_ConfigResetClick(Sender: TObject);
0159:       procedure opm_CheckBox_ConfigResizeImgClick(Sender: TObject);
0160:       procedure opm_BitBtn_ConfigSaveINIClick(Sender: TObject);
0161:       procedure opm_BitBtn_ConfigLoadINIClick(Sender: TObject);
0162:       procedure opm_SpinEdit_ConfigImgQChange(Sender: TObject);
0163:       procedure opm_BitBtn_ConfigModDelClick(Sender: TObject);
0164:       procedure opm_ListBox_ConfigModsClick(Sender: TObject);
0165:       procedure opm_BitBtn_ConfigColSelClick(Sender: TObject);
0166:       procedure opm_BitBtn_ConfigProxyIEClick(Sender: TObject);
0167:       procedure opm_BitBtn_ConfigFontClick(Sender: TObject);
0168:       procedure opm_CheckBox_ConfigUseProxyClick(Sender: TObject);
0169:       procedure opm_ListBox_ConfigReportsClick(Sender: TObject);
0170:       procedure opm_BitBtn_ConfigReportEditClick(Sender: TObject);
0171:       procedure opm_frReport_ConfigGetValue (const ParName: String; var ParValue: Variant);
0172:       procedure opm_frUserDataset_ConfigCheckEOF(Sender: TObject; var Eof: Boolean);
0173:       procedure opm_BitBtn_ConfigReportPreviewClick(Sender: TObject);
0174:       procedure opm_BitBtn_ConfigModEditClick(Sender: TObject);
0175:       procedure opm_ListBox_ConfigModsDblClick(Sender: TObject);
0176:       procedure opm_ListBox_ConfigReportsDblClick(Sender: TObject);
0177:       procedure opm_BitBtn_ConfigModAddClick(Sender: TObject);
0178:       procedure opm_BitBtn_ConfigWatermarkSelectFileClick(Sender: TObject);
0179:       procedure opm_CheckBox_ConfigWatermarkImgClick(Sender: TObject);
0180:     private
0181:       PROCEDURE PRopm_ControlToVars;
0182:       procedure PRopm_VarsToControls;
0183:       PROCEDURE opm_PRRefresh_ModuleList (LastIndex : INTEGER);
0184:       PROCEDURE opm_PRRefresh_ReportList (LastIndex : INTEGER);
0185:     public
0186:     end;
0187:   
0188:   var
0189:     opm_Form_Config: Topm_Form_Config;
0190:   
0191:   implementation
0192:   
0193:   {$R *.dfm}
0194:   
0195:   Uses gnugettext, oscpmdata, regconfig, attention, imageman, modules, dataman,
0196:        colorsel, network, configmod, openpicdlg;
0197:   
0198:   
0199:   
0200:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0201:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0202:   procedure Topm_Form_Config.PRopm_VarsToControls;
0203:   VAR
0204:     UILang : LONGINT;
0205:   begin
0206:     opm_Edit_ConfigPDFAuthor.Text := opmG_PDFAuthor;
0207:     opm_ComboBox_ConfigUsername.Text := opmG_DBUsername;
0208:     opm_ComboBox_ConfigImgURL.Text := opmG_WBImgURL;
0209:     opm_ComboBox_ConfigUploadURL.Text := opmG_WBUploadURL;
0210:     opm_ComboBox_ConfigUsername.Items := opmG_PastUsername_BoxList;
0211:     opm_ComboBox_ConfigImgURL.Items := opmG_PastImgURL_BoxList;
0212:     opm_ComboBox_ConfigUploadURL.Items := opmG_PastUploadURL_BoxList;
0213:     opm_ComboBox_ConfigProxyHost.Items := opmG_PastProxy_BoxList;
0214:     opm_ComboBox_ConfigProxyHost.Text := opmG_WBProxyHost;
0215:     opm_Edit_ConfigPassword.Text := opmG_DBPassword;
0216:     opm_ComboBox_ConfigETABase.Text := INTTOSTR (opmG_ETABase) + ' kbps';
0217:     opm_SpinEdit_ConfigProxyPort.Value := opmG_WBProxyPort;
0218:     opm_SpinEdit_ConfigModConnWait.Value := opmG_ModConnWait;
0219:     opm_SpinEdit_ConfigHTTPConnWait.Value := opmG_HTTPConnWait;
0220:     opm_SpinEdit_ConfigModConnRetries.Value := opmG_ModConnRetries;
0221:     opm_SpinEdit_ConfigHTTPConnRetries.Value := opmG_HTTPConnRetries;
0222:     opm_SpinEdit_ConfigImgX.Value := opmG_WBImgX;
0223:     opm_SpinEdit_ConfigImgY.Value := opmG_WBImgY;
0224:     opm_SpinEdit_ConfigImgQ.Value := opmG_WBImgQ;
0225:     opm_Label_ConfigJPEGQCategory.Caption := FNopm_QualityExplain (opmG_WBImgQ);
0226:     opm_Panel_ConfigColSel.Color := FNopm_DecColorToColor (opmG_WBPaddingColor);
0227:     opm_Panel_ConfigColSel.Caption := FNopm_ColorToRGB (opm_Panel_ConfigColSel.Color);
0228:     opm_PageControl_Config.ActivePageIndex := 0;
0229:     opm_CheckBox_ConfigHotTrack.Checked := (opmG_UIHotTracking > 0);
0230:     opm_CheckBox_ConfigRemember.Checked := (opmG_UIRememberDisplay > 0);
0231:     opm_CheckBox_ConfigAutoload.Checked := (opmG_UIClickLoad > 0);
0232:     opm_CheckBox_ConfigDragDrop.Checked := (opmG_UIDragDrop > 0);
0233:     opm_CheckBox_ConfigDragUps.Checked := (opmG_UIImgDragDrop > 0);
0234:     opm_CheckBox_ConfigTooltips.Checked := (opmG_UIToolTips > 0);
0235:     opm_CheckBox_ConfigStripes.Checked := (opmG_UIStripes > 0);
0236:     opm_CheckBox_ConfigCacheIList.Checked := (opmG_UICacheIList > 0);
0237:     opm_CheckBox_ConfigUseProxy.Checked := (opmG_UseProxy > 0);
0238:     opm_ComboBox_ConfigProxyApply.ItemIndex := opmG_ProxyApply;
0239:     opm_CheckBox_ConfigStorePass.Checked := (opmG_DBStorePass > 0);
0240:     opm_CheckBox_ConfigSilent.Checked := (opmG_UISilent > 0);
0241:     opm_CheckBox_ConfigSilent.Enabled := (FNopm_CheckSound = TRUE);
0242:     opm_CheckBox_ConfigConfirmDels.Checked := (opmG_UIConfirmDels > 0);
0243:     opm_CheckBox_ConfigConfirmDrag.Checked := (opmG_UIConfirmDrag > 0);
0244:     opm_CheckBox_ConfigConfirmMods.Checked := (opmG_UIConfirmMods > 0);
0245:     opm_CheckBox_ConfigAllowZeroPrice.Checked := (opmG_UIAllowZeroPrice > 0);
0246:     opm_CheckBox_ConfigAllowEditImageName.Checked := (opmG_UIAllowEditImageName > 0);
0247:     opm_CheckBox_ConfigAllowNegativeQuantity.Checked := (opmG_UIAllowNegativeQuantity > 0);
0248:     opm_CheckBox_ConfigAutoDownImg.Checked := (opmG_UIAutoDownImg > 0);
0249:     opm_FontDialog_Config.Font.Name := opmG_UIFontName;
0250:     opm_FontDialog_Config.Font.Height := opmG_UIFontHeight;
0251:     opm_FontDialog_Config.Font.Charset := opmG_UIFontCharset;
0252:     opm_FontDialog_Config.Font.Style := opmC_DefaultFontStyle;
0253:     opm_Label_ConfigFontDetails.Font := opm_FontDialog_Config.Font;
0254:     opm_Label_ConfigFontDetails.Caption := opmG_UIFontName + ', ' +
0255:                                            INTTOSTR (ROUND ((opmG_UIFontHeight * -72) / opm_FontDialog_Config.Font.PixelsPerInch)) + ', ' +
0256:                                            opmG_CharsetList [opmG_UIFontCharset];
0257:     opm_SpinEdit_Config_ClipColSize.Value := opmG_Clip_ColSize;
0258:     opm_CheckBox_ConfigPRNDirectPrint.Checked := (opmG_PRNDirectPrint > 0);
0259:     opm_CheckBox_ConfigNoCacheImg.Checked := (opmG_WBNoCacheImg > 0);
0260:     opm_CheckBox_ConfigResizeImg.Checked := (opmG_WBResizeImg > 0);
0261:     opm_CheckBox_ConfigWatermarkImg.Checked := (opmG_WBWatermarkImg > 0);
0262:     opm_SpinEdit_ConfigWatermarkBlend.Value := opmG_WBWatermarkBlend;
0263:     opm_Edit_ConfigWatermarkFile.Text := opmG_WBWatermarkFile;
0264:     opm_CheckBox_ConfigPaddingImg.Checked := (opmG_WBPaddingImg > 0);
0265:     opm_CheckBox_ConfigKeepARImg.Checked := (opmG_WBKeepARImg > 0);
0266:     opm_CheckBox_ConfigConfirmExit.Checked := (opmG_UIConfirmExit > 0);
0267:     opm_CheckBox_ConfigCenterImage.Checked := (opmG_UICenterImage > 0);
0268:     opm_CheckBox_ConfigDBDebugLog.Checked := (opmG_DBDebugLog > 0);
0269:     opm_CheckBox_ConfigHTTPCompress.Checked := (opmG_HTTPCompress > 0);
0270:     opm_CheckBox_ConfigWBDebug.Checked := (opmG_UIWBDebug > 0);
0271:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0272:       FOR UILang := 0 TO opm_ComboBox_ConfigUILang.Items.Count DO
0273:         IF (ANSIPOS ('(' + opmG_UIGUILang + ')', opm_ComboBox_ConfigUILang.Items[UILang]) > 0) THEN
0274:           BEGIN
0275:             opm_ComboBox_ConfigUILang.ItemIndex := UILang;
0276:             BREAK;
0277:           END;
0278:   end;
0279:   
0280:   
0281:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0282:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0283:   PROCEDURE Topm_Form_Config.FormShow(Sender: TObject);
0284:   BEGIN
0285:     opm_Form_Config.Caption := _('Settings of ') + opmC_AppShortName;
0286:     opm_ComboBox_ConfigUILang.Items.Clear;
0287:     DefaultInstance.GetListOfLanguages ('default', opm_ComboBox_ConfigUILang.Items);
0288:     opm_ComboBox_ConfigUILang.Sorted := TRUE;
0289:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0290:       BEGIN
0291:         DefaultInstance.BindtextdomainToFile ('isotolanguagenames', ExtractFilePath (Application.Exename) + 'locale/isotolanguagenames.mo');
0292:         DefaultInstance.TranslateProperties (opm_ComboBox_ConfigUILang, 'isotolanguagenames');
0293:         opm_ComboBox_ConfigUILang.Enabled := TRUE;
0294:       END
0295:     ELSE
0296:       opm_ComboBox_ConfigUILang.Enabled := FALSE;
0297:     opm_Label_ConfigUILangDesc.Caption := _('Do you want to contribute with a translation in your native language?') + #13#10 +
0298:                                           _('It is very easy, and you don''t have to be a programmer to do it.') + #13#10 +
0299:                                           _('Please visit the website for more information.');
0300:     PRopm_VarsToControls;
0301:     opm_Label_ConfigImgResize.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0302:     opm_CheckBox_ConfigPaddingImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0303:     opm_CheckBox_ConfigKeepARImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0304:     opm_SpinEdit_ConfigImgX.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0305:     opm_SpinEdit_ConfigImgY.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0306:     opm_Panel_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0307:     opm_BitBtn_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0308:     opm_SpinEdit_ConfigImgQ.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0309:     opm_Label_ConfigImgJPEGQuality.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0310:     opm_Label_ConfigJPEGQCategory.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0311:     opm_Label_ConfigWatermarkBlend.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0312:     opm_SpinEdit_ConfigWatermarkBlend.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0313:     opm_Edit_ConfigWatermarkFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0314:     opm_BitBtn_ConfigWatermarkSelectFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0315:     opm_Label_ConfigWatermarkFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0316:     opm_ComboBox_ConfigProxyApply.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0317:     opm_ComboBox_ConfigProxyHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0318:     opm_SpinEdit_ConfigProxyPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0319:     opm_BitBtn_ConfigProxyIE.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0320:     opm_Label_ConfigPHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0321:     opm_Label_ConfigPPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0322:     opm_BitBtn_ConfigModDel.Enabled := FALSE;
0323:     opm_BitBtn_ConfigModEdit.Enabled := FALSE;
0324:     opm_PRRefresh_ModuleList (-1);
0325:     opm_ListBox_ConfigMods.ScrollWidth := ROUND (opm_ListBox_ConfigMods.Width * 1.5);
0326:     opm_BitBtn_ConfigReportEdit.Enabled := FALSE;
0327:     opm_BitBtn_ConfigReportPreview.Enabled := FALSE;
0328:     opm_PRRefresh_ReportList (-1);
0329:     opm_ListBox_ConfigReports.ScrollWidth := ROUND (opm_ListBox_ConfigReports.Width * 1.5);
0330:   END;
0331:   
0332:   
0333:   
0334:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0335:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0336:   PROCEDURE Topm_Form_Config.PRopm_ControlToVars;
0337:   VAR
0338:     LangUIStr : STRING;
0339:   BEGIN
0340:     opmG_PDFAuthor := TRIM (opm_Edit_ConfigPDFAuthor.Text);
0341:     opmG_DBUsername := TRIM (opm_ComboBox_ConfigUsername.Text);
0342:     opmG_DBPassword := TRIM (opm_Edit_ConfigPassword.Text);
0343:     opmG_WBImgURL := FNopm_FixURL (opm_ComboBox_ConfigImgURL.Text);
0344:     opmG_WBUploadURL := FNopm_FixURL (opm_ComboBox_ConfigUploadURL.Text);
0345:     opmG_WBProxyHost := FNopm_CleanHostName (opm_ComboBox_ConfigProxyHost.Text);
0346:     IF (opmG_WBImgURL[LENGTH (opmG_WBImgURL)] <> '/') THEN opmG_WBImgURL := opmG_WBImgURL + '/';
0347:     opmG_ETABase := FNopm_StrToInt (opm_ComboBox_ConfigETABase.Text);
0348:     opmG_WBProxyPort := ABS (opm_SpinEdit_ConfigProxyPort.Value);
0349:     opmG_ModConnWait := ABS (ROUND ((opm_SpinEdit_ConfigModConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0350:     opmG_HTTPConnWait := ABS (ROUND ((opm_SpinEdit_ConfigHTTPConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0351:     opmG_ModConnRetries := ABS (opm_SpinEdit_ConfigModConnRetries.Value);
0352:     opmG_HTTPConnRetries := ABS (opm_SpinEdit_ConfigHTTPConnRetries.Value);
0353:     opmG_WBImgX := ABS (opm_SpinEdit_ConfigImgX.Value);
0354:     opmG_WBImgY := ABS (opm_SpinEdit_ConfigImgY.Value);
0355:     opmG_WBImgQ := ABS (opm_SpinEdit_ConfigImgQ.Value);
0356:     IF (opm_CheckBox_ConfigHotTrack.Checked = TRUE) THEN opmG_UIHotTracking := 1 ELSE opmG_UIHotTracking := 0;
0357:     IF (opm_CheckBox_ConfigRemember.Checked = TRUE) THEN opmG_UIRememberDisplay := 1 ELSE opmG_UIRememberDisplay := 0;
0358:     IF (opm_CheckBox_ConfigAutoload.Checked = TRUE) THEN opmG_UIClickLoad := 1 ELSE opmG_UIClickLoad := 0;
0359:     IF (opm_CheckBox_ConfigDragDrop.Checked = TRUE) THEN opmG_UIDragDrop := 1 ELSE opmG_UIDragDrop := 0;
0360:     IF (opm_CheckBox_ConfigDragUps.Checked = TRUE) THEN opmG_UIImgDragDrop := 1 ELSE opmG_UIImgDragDrop := 0;
0361:     IF (opm_CheckBox_ConfigToolTips.Checked = TRUE) THEN opmG_UIToolTips := 1 ELSE opmG_UIToolTips := 0;
0362:     IF (opm_CheckBox_ConfigStripes.Checked = TRUE) THEN opmG_UIStripes := 1 ELSE opmG_UIStripes := 0;
0363:     IF (opm_CheckBox_ConfigCacheIList.Checked = TRUE) THEN opmG_UICacheIList := 1 ELSE opmG_UICacheIList := 0;
0364:     IF (opm_CheckBox_ConfigUseProxy.Checked = TRUE) THEN opmG_UseProxy := 1 ELSE opmG_UseProxy := 0;
0365:     IF (opm_ComboBox_ConfigProxyApply.ItemIndex >= 0) THEN opmG_ProxyApply := opm_ComboBox_ConfigProxyApply.ItemIndex ELSE opmG_ProxyApply := opmC_Def_ProxyApply; 
0366:     IF (opm_CheckBox_ConfigStorePass.Checked = TRUE) THEN opmG_DBStorePass := 1 ELSE opmG_DBStorePass := 0;
0367:     IF (opm_CheckBox_ConfigSilent.Checked = TRUE) THEN opmG_UISilent := 1 ELSE opmG_UISilent := 0;
0368:     IF (opm_CheckBox_ConfigConfirmDels.Checked = TRUE) THEN opmG_UIConfirmDels := 1 ELSE opmG_UIConfirmDels := 0;
0369:     IF (opm_CheckBox_ConfigConfirmDrag.Checked = TRUE) THEN opmG_UIConfirmDrag := 1 ELSE opmG_UIConfirmDrag := 0;
0370:     IF (opm_CheckBox_ConfigConfirmMods.Checked = TRUE) THEN opmG_UIConfirmMods := 1 ELSE opmG_UIConfirmMods := 0;
0371:     IF (opm_CheckBox_ConfigAllowZeroPrice.Checked = TRUE) THEN opmG_UIAllowZeroPrice := 1 ELSE opmG_UIAllowZeroPrice := 0;
0372:     IF (opm_CheckBox_ConfigAllowEditImageName.Checked = TRUE) THEN opmG_UIAllowEditImageName := 1 ELSE opmG_UIAllowEditImageName := 0;
0373:     IF (opm_CheckBox_ConfigAllowNegativeQuantity.Checked = TRUE) THEN opmG_UIAllowNegativeQuantity := 1 ELSE opmG_UIAllowNegativeQuantity := 0;
0374:     IF (opm_CheckBox_ConfigAutoDownImg.Checked = TRUE) THEN opmG_UIAutoDownImg := 1 ELSE opmG_UIAutoDownImg := 0;
0375:     opmG_UIFontName := opm_FontDialog_Config.Font.Name;
0376:     opmG_UIFontHeight := opm_FontDialog_Config.Font.Height;
0377:     opmG_UIFontCharset := opm_FontDialog_Config.Font.Charset;
0378:     opmG_Clip_ColSize := ABS (opm_SpinEdit_Config_ClipColSize.Value);
0379:     IF (opm_CheckBox_ConfigPRNDirectPrint.Checked = TRUE) THEN opmG_PRNDirectPrint := 1 ELSE opmG_PRNDirectPrint := 0;
0380:     IF (opm_CheckBox_ConfigNoCacheImg.Checked = TRUE) THEN opmG_WBNoCacheImg := 1 ELSE opmG_WBNoCacheImg := 0;
0381:     IF (opm_CheckBox_ConfigResizeImg.Checked = TRUE) THEN opmG_WBResizeImg := 1 ELSE opmG_WBResizeImg := 0;
0382:     IF (opm_CheckBox_ConfigWatermarkImg.Checked = TRUE) THEN opmG_WBWatermarkImg := 1 ELSE opmG_WBWatermarkImg := 0;
0383:     opmG_WBWatermarkBlend := ABS (opm_SpinEdit_ConfigWatermarkBlend.Value);
0384:     opmG_WBWatermarkFile := TRIM (opm_Edit_ConfigWatermarkFile.Text);
0385:     IF (opm_CheckBox_ConfigPaddingImg.Checked = TRUE) THEN opmG_WBPaddingImg := 1 ELSE opmG_WBPaddingImg := 0;
0386:     IF (opm_CheckBox_ConfigKeepARImg.Checked = TRUE) THEN opmG_WBKeepARImg := 1 ELSE opmG_WBKeepARImg := 0;
0387:     IF (opm_CheckBox_ConfigConfirmExit.Checked = TRUE) THEN opmG_UIConfirmExit := 1 ELSE opmG_UIConfirmExit := 0;
0388:     IF (opm_CheckBox_ConfigCenterImage.Checked = TRUE) THEN opmG_UICenterImage := 1 ELSE opmG_UICenterImage := 0;
0389:     IF (opm_CheckBox_ConfigDBDebugLog.Checked = TRUE) THEN opmG_DBDebugLog := 1 ELSE opmG_DBDebugLog := 0;
0390:     IF (opm_CheckBox_ConfigHTTPCompress.Checked = TRUE) THEN opmG_HTTPCompress := 1 ELSE opmG_HTTPCompress := 0;
0391:     IF (opm_CheckBox_ConfigWBDebug.Checked = TRUE) THEN opmG_UIWBDebug := 1 ELSE opmG_UIWBDebug := 0;
0392:     LangUIStr := opm_ComboBox_ConfigUILang.Items[opm_ComboBox_ConfigUILang.ItemIndex];
0393:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0394:       opmG_UIGUILang := COPY (LangUIStr, ANSIPOS ('(', LangUIStr) + 1, ANSIPOS (')', LangUIStr) - ANSIPOS ('(', LangUIStr) - 1)
0395:     ELSE
0396:       opmG_UIGUILang := opmC_Def_GUILang;
0397:   END;
0398:   
0399:   
0400:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0401:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0402:   procedure Topm_Form_Config.opm_BitBtn_ConfigOkClick(Sender: TObject);
0403:   begin
0404:     PRopm_ControlToVars;
0405:     PRReg_WriteSetting ('OSCETABase', INTTOSTR (opmG_ETABase), opmC_RegistryKey, opmC_RKConfig);
0406:     PRReg_WriteSetting ('OSCPDFAuthor', opmG_PDFAuthor, opmC_RegistryKey, opmC_RKConfig);
0407:     PRReg_WriteSetting ('OSCTable01', opmG_DBTable_Categories, opmC_RegistryKey, opmC_RKConfig);
0408:     PRReg_WriteSetting ('OSCTable02', opmG_DBTable_Manufacturers, opmC_RegistryKey, opmC_RKConfig);
0409:     PRReg_WriteSetting ('OSCTable03', opmG_DBTable_Languages, opmC_RegistryKey, opmC_RKConfig);
0410:     PRReg_WriteSetting ('OSCTable04', opmG_DBTable_Products, opmC_RegistryKey, opmC_RKConfig);
0411:     PRReg_WriteSetting ('OSCTable05', opmG_DBTable_Specials, opmC_RegistryKey, opmC_RKConfig);
0412:     PRReg_WriteSetting ('OSCTable06', opmG_DBTable_ProductsDescription, opmC_RegistryKey, opmC_RKConfig);
0413:     PRReg_WriteSetting ('OSCTable07', opmG_DBTable_TaxClass, opmC_RegistryKey, opmC_RKConfig);
0414:     PRReg_WriteSetting ('OSCTable08', opmG_DBTable_Currencies, opmC_RegistryKey, opmC_RKConfig);
0415:     PRReg_WriteSetting ('OSCTable09', opmG_DBTable_Configuration, opmC_RegistryKey, opmC_RKConfig);
0416:     PRReg_WriteSetting ('OSCTable10', opmG_DBTable_ProductsToCategories, opmC_RegistryKey, opmC_RKConfig);
0417:     PRReg_WriteSetting ('OSCTable11', opmG_DBTable_CategoriesDescription, opmC_RegistryKey, opmC_RKConfig);
0418:     PRReg_WriteSetting ('OSCTable13', opmG_DBTable_TaxRates, opmC_RegistryKey, opmC_RKConfig);
0419:     PRReg_WriteSetting ('OSCTable14', opmG_DBTable_ManufacturersInfo, opmC_RegistryKey, opmC_RKConfig);
0420:     PRReg_WriteSetting ('OSCUsername', opmG_DBUsername, opmC_RegistryKey, opmC_RKConfig);
0421:     IF (opmG_DBStorePass > 0) THEN
0422:       PRReg_WriteSetting ('OSCPassword', opmG_DBPassword, opmC_RegistryKey, opmC_RKConfig)
0423:     ELSE
0424:       PRReg_WriteSetting ('OSCPassword', '', opmC_RegistryKey, opmC_RKConfig);
0425:     PRReg_WriteSetting ('OSCImgURL', opmG_WBImgURL, opmC_RegistryKey, opmC_RKConfig);
0426:     PRReg_WriteSetting ('OSCUploadURL', opmG_WBUploadURL, opmC_RegistryKey, opmC_RKConfig);
0427:     PRReg_WriteSetting ('OSCProxyHost', opmG_WBProxyHost, opmC_RegistryKey, opmC_RKConfig);
0428:     PRReg_WriteSetting ('OSCProxyPort', IntToStr (opmG_WBProxyPort), opmC_RegistryKey, opmC_RKConfig);
0429:     PRReg_WriteSetting ('OSCModConnWait', IntToStr (opmG_ModConnWait), opmC_RegistryKey, opmC_RKConfig);
0430:     PRReg_WriteSetting ('OSCHTTPConnWait', IntToStr (opmG_HTTPConnWait), opmC_RegistryKey, opmC_RKConfig);
0431:     PRReg_WriteSetting ('OSCModConnRetries', IntToStr (opmG_ModConnRetries), opmC_RegistryKey, opmC_RKConfig);
0432:     PRReg_WriteSetting ('OSCHTTPConnRetries', IntToStr (opmG_HTTPConnRetries), opmC_RegistryKey, opmC_RKConfig);
0433:     PRReg_WriteSetting ('OSCImgX', IntToStr (opmG_WBImgX), opmC_RegistryKey, opmC_RKConfig);
0434:     PRReg_WriteSetting ('OSCImgY', IntToStr (opmG_WBImgY), opmC_RegistryKey, opmC_RKConfig);
0435:     PRReg_WriteSetting ('OSCImgQ', IntToStr (opmG_WBImgQ), opmC_RegistryKey, opmC_RKConfig);
0436:     PRReg_WriteSetting ('OSCPaddingColor', IntToStr (opmG_WBPaddingColor), opmC_RegistryKey, opmC_RKConfig);
0437:     PRReg_WriteSetting ('OSCHotTracking', IntToStr (opmG_UIHotTracking), opmC_RegistryKey, opmC_RKConfig);
0438:     PRReg_WriteSetting ('OSCAutoLoad', IntToStr (opmG_UIClickLoad), opmC_RegistryKey, opmC_RKConfig);
0439:     PRReg_WriteSetting ('OSCDragDrop', IntToStr (opmG_UIDragDrop), opmC_RegistryKey, opmC_RKConfig);
0440:     PRReg_WriteSetting ('OSCImgDragDrop', IntToStr (opmG_UIImgDragDrop), opmC_RegistryKey, opmC_RKConfig);
0441:     PRReg_WriteSetting ('OSCToolTips', IntToStr (opmG_UIToolTips), opmC_RegistryKey, opmC_RKConfig);
0442:     PRReg_WriteSetting ('OSCStripes', IntToStr (opmG_UIStripes), opmC_RegistryKey, opmC_RKConfig);
0443:     PRReg_WriteSetting ('OSCCacheIList', IntToStr (opmG_UICacheIList), opmC_RegistryKey, opmC_RKConfig);
0444:     PRReg_WriteSetting ('OSCUseProxy', IntToStr (opmG_UseProxy), opmC_RegistryKey, opmC_RKConfig);
0445:     PRReg_WriteSetting ('OSCProxyApply', IntToStr (opmG_ProxyApply), opmC_RegistryKey, opmC_RKConfig);
0446:     PRReg_WriteSetting ('OSCStorePass', IntToStr (opmG_DBStorePass), opmC_RegistryKey, opmC_RKConfig);
0447:     PRReg_WriteSetting ('OSCSilent', IntToStr (opmG_UISilent), opmC_RegistryKey, opmC_RKConfig);
0448:     PRReg_WriteSetting ('OSCConfirmDels', IntToStr (opmG_UIConfirmDels), opmC_RegistryKey, opmC_RKConfig);
0449:     PRReg_WriteSetting ('OSCConfirmDrag', IntToStr (opmG_UIConfirmDrag), opmC_RegistryKey, opmC_RKConfig);
0450:     PRReg_WriteSetting ('OSCConfirmMods', IntToStr (opmG_UIConfirmMods), opmC_RegistryKey, opmC_RKConfig);
0451:     PRReg_WriteSetting ('OSCAllowZeroPrice', IntToStr (opmG_UIAllowZeroPrice), opmC_RegistryKey, opmC_RKConfig);
0452:     PRReg_WriteSetting ('OSCAllowEditImageName', IntToStr (opmG_UIAllowEditImageName), opmC_RegistryKey, opmC_RKConfig);
0453:     PRReg_WriteSetting ('OSCAllowNegativeQuantity', IntToStr (opmG_UIAllowNegativeQuantity), opmC_RegistryKey, opmC_RKConfig);
0454:     PRReg_WriteSetting ('OSCAutoDownImg', IntToStr (opmG_UIAutoDownImg), opmC_RegistryKey, opmC_RKConfig);
0455:     PRReg_WriteSetting ('UIFontName', opmG_UIFontName, opmC_RegistryKey, opmC_RKVisual);
0456:     PRReg_WriteSetting ('UIFontHeight', INTTOSTR (opmG_UIFontHeight), opmC_RegistryKey, opmC_RKVisual);
0457:     PRReg_WriteSetting ('UIFontCharset', INTTOSTR (opmG_UIFontCharset), opmC_RegistryKey, opmC_RKVisual);
0458:     PRReg_WriteSetting ('Clip_ColSize', IntToStr (opmG_Clip_ColSize), opmC_RegistryKey, opmC_RKVisual);
0459:     PRReg_WriteSetting ('PRNDirectPrint', IntToStr (opmG_PRNDirectPrint), opmC_RegistryKey, opmC_RKVisual);
0460:     PRReg_WriteSetting ('PastAvailDate', INTTOSTR (opmG_Past_PAvailDate), opmC_RegistryKey, opmC_RKVisual);
0461:     PRReg_WriteSetting ('PastManufacturer', INTTOSTR (opmG_Past_PManufacturer), opmC_RegistryKey, opmC_RKVisual);
0462:     PRReg_WriteSetting ('PastTaxClass', INTTOSTR (opmG_Past_PTaxClass), opmC_RegistryKey, opmC_RKVisual);
0463:     PRReg_WriteSetting ('PastImageDir', opmG_Past_PImageDir, opmC_RegistryKey, opmC_RKVisual);
0464:     PRReg_WriteSetting ('OSCNoCacheImg', IntToStr (opmG_WBNoCacheImg), opmC_RegistryKey, opmC_RKConfig);
0465:     PRReg_WriteSetting ('OSCResizeImg', IntToStr (opmG_WBResizeImg), opmC_RegistryKey, opmC_RKConfig);
0466:     PRReg_WriteSetting ('OSCWatermarkImg', IntToStr (opmG_WBWatermarkImg), opmC_RegistryKey, opmC_RKConfig);
0467:     PRReg_WriteSetting ('OSCWatermarkBlend', IntToStr (opmG_WBWatermarkBlend), opmC_RegistryKey, opmC_RKConfig);
0468:     PRReg_WriteSetting ('OSCWatermarkFile', opmG_WBWatermarkFile, opmC_RegistryKey, opmC_RKConfig);
0469:     PRReg_WriteSetting ('OSCPaddingImg', IntToStr (opmG_WBPaddingImg), opmC_RegistryKey, opmC_RKConfig);
0470:     PRReg_WriteSetting ('OSCKeepARImg', IntToStr (opmG_WBKeepARImg), opmC_RegistryKey, opmC_RKConfig);
0471:     PRReg_WriteSetting ('OSCConfirmExit', IntToStr (opmG_UIConfirmExit), opmC_RegistryKey, opmC_RKConfig);
0472:     PRReg_WriteSetting ('OSCCenterImage', IntToStr (opmG_UICenterImage), opmC_RegistryKey, opmC_RKConfig);
0473:     PRReg_WriteSetting ('OSCDBDebugLog', IntToStr (opmG_DBDebugLog), opmC_RegistryKey, opmC_RKConfig);
0474:     PRReg_WriteSetting ('OSCHTTPCompress', IntToStr (opmG_HTTPCompress), opmC_RegistryKey, opmC_RKConfig);
0475:     PRReg_WriteSetting ('OSCWBDebug', IntToStr (opmG_UIWBDebug), opmC_RegistryKey, opmC_RKConfig);
0476:     PRReg_WriteSetting ('OSCRememberPosition', IntToStr (opmG_UIRememberDisplay), opmC_RegistryKey, opmC_RKConfig);
0477:     PRReg_WritePastList ('Username', opmC_RegistryKey, opmC_RKServers, opmG_DBUsername, opmG_PastUsername_BoxList, opmC_MaxPast_Usernames);
0478:     PRReg_WritePastList ('ImgURL', opmC_RegistryKey, opmC_RKServers, opmG_WBImgURL, opmG_PastImgURL_BoxList, opmC_MaxPast_ImgURL);
0479:     PRReg_WritePastList ('UploadURL', opmC_RegistryKey, opmC_RKServers, opmG_WBUploadURL, opmG_PastUploadURL_BoxList, opmC_MaxPast_UploadURL);
0480:     PRReg_WritePastList ('Proxy', opmC_RegistryKey, opmC_RKServers, opmG_WBProxyHost, opmG_PastProxy_BoxList, opmC_MaxPast_Proxy);
0481:   end;
0482:   
0483:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0484:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0485:   procedure Topm_Form_Config.FormCreate(Sender: TObject);
0486:   begin
0487:     opm_SpinEdit_ConfigProxyPort.MinValue := opmC_Min_ProxyPort;
0488:     opm_SpinEdit_ConfigProxyPort.MaxValue := opmC_Max_ProxyPort;
0489:     opm_SpinEdit_ConfigModConnWait.MinValue := opmC_Min_ModConnWait;
0490:     opm_SpinEdit_ConfigModConnWait.MaxValue := opmC_Max_ModConnWait;
0491:     opm_SpinEdit_ConfigModConnWait.Increment := opmC_MiliSecIncrement;
0492:     opm_SpinEdit_ConfigHTTPConnWait.MinValue := opmC_Min_HTTPConnWait;
0493:     opm_SpinEdit_ConfigHTTPConnWait.MaxValue := opmC_Max_HTTPConnWait;
0494:     opm_SpinEdit_ConfigHTTPConnWait.Increment := opmC_MiliSecIncrement;
0495:     opm_SpinEdit_ConfigModConnRetries.MinValue := opmC_Min_ModConnRetries;
0496:     opm_SpinEdit_ConfigModConnRetries.MaxValue := opmC_Max_ModConnRetries;
0497:     opm_SpinEdit_ConfigHTTPConnRetries.MinValue := opmC_Min_HTTPConnRetries;
0498:     opm_SpinEdit_ConfigHTTPConnRetries.MaxValue := opmC_Max_HTTPConnRetries;
0499:     opm_SpinEdit_ConfigImgX.MinValue := opmC_Min_ImgX;
0500:     opm_SpinEdit_ConfigImgX.MaxValue := opmC_Max_ImgX;
0501:     opm_SpinEdit_ConfigImgY.MinValue := opmC_Min_ImgY;
0502:     opm_SpinEdit_ConfigImgY.MaxValue := opmC_Max_ImgY;
0503:     opm_SpinEdit_ConfigImgQ.MinValue := opmC_Min_ImgQ;
0504:     opm_SpinEdit_ConfigImgQ.MaxValue := opmC_Max_ImgQ;
0505:     opm_SpinEdit_ConfigWatermarkBlend.MinValue := opmC_Min_WatermarkBlend;
0506:     opm_SpinEdit_ConfigWatermarkBlend.MaxValue := opmC_Max_WatermarkBlend;
0507:     opm_ComboBox_ConfigETABase.Items.Text := opmC_ETABitrates;
0508:     opm_ComboBox_ConfigProxyApply.Items.Text := _('For all web connections') + #13#10 + _('For OSCPM script only') + #13#10 + _('To check updates only') + #13#10;
0509:     opm_Edit_ConfigPassword.PasswordChar := opmC_PasswordChar;
0510:     opm_FontDialog_Config.MinFontSize := opmC_Min_FontHeight;
0511:     opm_FontDialog_Config.MaxFontSize := opmC_Max_FontHeight;
0512:     opm_SpinEdit_Config_ClipColSize.MinValue := opmC_Min_Clip_ColSize;
0513:     opm_SpinEdit_Config_ClipColSize.MaxValue := opmC_Max_Clip_ColSize;
0514:     IF (opmG_UIHotTracking > 0) THEN
0515:       opm_PageControl_Config.HotTrack := TRUE
0516:     ELSE
0517:       opm_PageControl_Config.HotTrack := FALSE;
0518:     TranslateComponent (self);
0519:   end;
0520:   
0521:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0522:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0523:   procedure Topm_Form_Config.opm_BitBtn_ConfigResetClick(Sender: TObject);
0524:   begin
0525:     opm_CheckBox_ConfigHotTrack.Checked := (opmC_Def_HotTracking > 0);
0526:     opm_CheckBox_ConfigRemember.Checked := (opmC_Def_RememberDisplay > 0);
0527:     opm_CheckBox_ConfigAutoload.Checked := (opmC_Def_AutoLoad > 0);
0528:     opm_CheckBox_ConfigDragDrop.Checked := (opmC_Def_DragDrop > 0);
0529:     opm_CheckBox_ConfigDragUps.Checked := (opmC_Def_ImgDragDrop > 0);
0530:     opm_CheckBox_ConfigTooltips.Checked := (opmC_Def_Tooltips > 0);
0531:     opm_CheckBox_ConfigStripes.Checked := (opmC_Def_Stripes > 0);
0532:     opm_CheckBox_ConfigCacheIList.Checked := (opmC_Def_CacheIList > 0);
0533:     opm_CheckBox_ConfigConfirmDels.Checked := (opmC_Def_ConfirmDels > 0);
0534:     opm_CheckBox_ConfigConfirmDrag.Checked := (opmC_Def_ConfirmDrag > 0);
0535:     opm_CheckBox_ConfigConfirmMods.Checked := (opmC_Def_ConfirmMods > 0);
0536:     opm_CheckBox_ConfigAllowZeroPrice.Checked := (opmC_Def_AllowZeroPrice > 0);
0537:     opm_CheckBox_ConfigAllowEditImageName.Checked := (opmC_Def_AllowEditImageName > 0);
0538:     opm_CheckBox_ConfigAllowNegativeQuantity.Checked := (opmC_Def_AllowNegativeQuantity > 0);
0539:     opm_CheckBox_ConfigAutoDownImg.Checked := (opmC_Def_AutoDownImg > 0);
0540:     opm_CheckBox_ConfigNoCacheImg.Checked := (opmC_Def_NoCacheImg > 0);
0541:     opm_CheckBox_ConfigConfirmExit.Checked := (opmC_Def_ConfirmExit > 0);
0542:     opm_CheckBox_ConfigCenterImage.Checked := (opmC_Def_CenterImage > 0);
0543:     opm_CheckBox_ConfigDBDebugLog.Checked := (opmC_Def_DBDebugLog > 0);
0544:     opm_CheckBox_ConfigHTTPCompress.Checked := (opmC_Def_HTTPCompress > 0);
0545:     opm_CheckBox_ConfigWBDebug.Checked := (opmC_Def_WBDebug > 0);
0546:   end;
0547:   
0548:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0549:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0550:   procedure Topm_Form_Config.opm_CheckBox_ConfigResizeImgClick (Sender: TObject);
0551:   begin
0552:     opm_Label_ConfigImgResize.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0553:     opm_CheckBox_ConfigPaddingImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0554:     opm_CheckBox_ConfigKeepARImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0555:     opm_SpinEdit_ConfigImgX.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0556:     opm_SpinEdit_ConfigImgY.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0557:     opm_Panel_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0558:     opm_BitBtn_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0559:     opm_SpinEdit_ConfigImgQ.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0560:     opm_Label_ConfigImgJPEGQuality.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0561:     opm_Label_ConfigJPEGQCategory.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0562:   end;
0563:   
0564:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0565:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0566:   procedure Topm_Form_Config.opm_BitBtn_ConfigSaveINIClick(Sender: TObject);
0567:   begin
0568:     opm_SaveDialog_ConfigINI.DefaultExt := opmC_Def_SaveINIExt;
0569:     opm_SaveDialog_ConfigINI.FileName := opmC_Def_SaveINIFilename;
0570:     opm_SaveDialog_ConfigINI.Filter := _('Configuration files') + ' (' + opmC_Def_SaveINIFilter + ')|' + opmC_Def_SaveINIFilter + '|' + _('All files (*.*)');
0571:     opm_SaveDialog_ConfigINI.Title := _('Saving configuration file...');
0572:     opm_SaveDialog_ConfigINI.InitialDir := ExtractFilePath (Application.Exename);
0573:     IF (opm_SaveDialog_ConfigINI.Execute = TRUE) THEN
0574:       BEGIN
0575:         PRopm_ControlToVars;
0576:         PRINI_WriteSetting ('OSCETABase', INTTOSTR (opmG_ETABase), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0577:         PRINI_WriteSetting ('OSCPDFAuthor', opmG_PDFAuthor, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0578:         PRINI_WriteSetting ('OSCTable01', opmG_DBTable_Categories, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0579:         PRINI_WriteSetting ('OSCTable02', opmG_DBTable_Manufacturers, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0580:         PRINI_WriteSetting ('OSCTable03', opmG_DBTable_Languages, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0581:         PRINI_WriteSetting ('OSCTable04', opmG_DBTable_Products, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0582:         PRINI_WriteSetting ('OSCTable05', opmG_DBTable_Specials, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0583:         PRINI_WriteSetting ('OSCTable06', opmG_DBTable_ProductsDescription, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0584:         PRINI_WriteSetting ('OSCTable07', opmG_DBTable_TaxClass, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0585:         PRINI_WriteSetting ('OSCTable08', opmG_DBTable_Currencies, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0586:         PRINI_WriteSetting ('OSCTable09', opmG_DBTable_Configuration, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0587:         PRINI_WriteSetting ('OSCTable10', opmG_DBTable_ProductsToCategories, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0588:         PRINI_WriteSetting ('OSCTable11', opmG_DBTable_CategoriesDescription, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0589:         PRINI_WriteSetting ('OSCTable13', opmG_DBTable_TaxRates, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0590:         PRINI_WriteSetting ('OSCTable14', opmG_DBTable_ManufacturersInfo, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0591:         PRINI_WriteSetting ('OSCUsername', opmG_DBUsername, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0592:         IF (opmG_DBStorePass > 0) THEN
0593:           PRINI_WriteSetting ('OSCPassword', opmG_DBPassword, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig)
0594:         ELSE
0595:           PRINI_WriteSetting ('OSCPassword', '', opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0596:         PRINI_WriteSetting ('OSCImgURL', opmG_WBImgURL, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0597:         PRINI_WriteSetting ('OSCUploadURL', opmG_WBUploadURL, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0598:         PRINI_WriteSetting ('OSCProxyHost', opmG_WBProxyHost, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0599:         PRINI_WriteSetting ('OSCProxyPort', IntToStr (opmG_WBProxyPort), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0600:         PRINI_WriteSetting ('OSCModConnWait', IntToStr (opmG_ModConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0601:         PRINI_WriteSetting ('OSCHTTPConnWait', IntToStr (opmG_HTTPConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0602:         PRINI_WriteSetting ('OSCModConnRetries', IntToStr (opmG_ModConnRetries), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0603:         PRINI_WriteSetting ('OSCHTTPConnRetries', IntToStr (opmG_HTTPConnRetries), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0604:         PRINI_WriteSetting ('OSCImgX', IntToStr (opmG_WBImgX), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0605:         PRINI_WriteSetting ('OSCImgY', IntToStr (opmG_WBImgY), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0606:         PRINI_WriteSetting ('OSCImgQ', IntToStr (opmG_WBImgQ), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0607:         PRINI_WriteSetting ('OSCPaddingColor', IntToStr (opmG_WBPaddingColor), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0608:         PRINI_WriteSetting ('OSCHotTracking', IntToStr (opmG_UIHotTracking), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0609:         PRINI_WriteSetting ('OSCAutoLoad', IntToStr (opmG_UIClickLoad), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0610:         PRINI_WriteSetting ('OSCDragDrop', IntToStr (opmG_UIDragDrop), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0611:         PRINI_WriteSetting ('OSCImgDragDrop', IntToStr (opmG_UIImgDragDrop), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0612:         PRINI_WriteSetting ('OSCToolTips', IntToStr (opmG_UIToolTips), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0613:         PRINI_WriteSetting ('OSCStripes', IntToStr (opmG_UIStripes), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0614:         PRINI_WriteSetting ('OSCCacheIList', IntToStr (opmG_UICacheIList), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0615:         PRINI_WriteSetting ('OSCUseProxy', IntToStr (opmG_UseProxy), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0616:         PRINI_WriteSetting ('OSCProxyApply', IntToStr (opmG_ProxyApply), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0617:         PRINI_WriteSetting ('OSCStorePass', IntToStr (opmG_DBStorePass), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0618:         PRINI_WriteSetting ('OSCSilent', IntToStr (opmG_UISilent), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0619:         PRINI_WriteSetting ('OSCConfirmDels', IntToStr (opmG_UIConfirmDels), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0620:         PRINI_WriteSetting ('OSCConfirmDrag', IntToStr (opmG_UIConfirmDrag), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0621:         PRINI_WriteSetting ('OSCConfirmMods', IntToStr (opmG_UIConfirmMods), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0622:         PRINI_WriteSetting ('OSCAllowZeroPrice', IntToStr (opmG_UIAllowZeroPrice), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0623:         PRINI_WriteSetting ('OSCAllowEditImageName', IntToStr (opmG_UIAllowEditImageName), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0624:         PRINI_WriteSetting ('OSCAllowNegativeQuantity', IntToStr (opmG_UIAllowNegativeQuantity), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0625:         PRINI_WriteSetting ('OSCAutoDownImg', IntToStr (opmG_UIAutoDownImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0626:         PRINI_WriteSetting ('UIFontName', opmG_UIFontName, opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0627:         PRINI_WriteSetting ('UIFontHeight', INTTOSTR (opmG_UIFontHeight), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0628:         PRINI_WriteSetting ('UIFontCharset', INTTOSTR (opmG_UIFontCharset), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0629:         PRINI_WriteSetting ('Clip_ColSize', IntToStr (opmG_PRNDirectPrint), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0630:         PRINI_WriteSetting ('PRNDirectPrint', IntToStr (opmG_PRNDirectPrint), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0631:         PRINI_WriteSetting ('PastAvailDate', INTTOSTR (opmG_Past_PAvailDate), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0632:         PRINI_WriteSetting ('PastManufacturer', INTTOSTR (opmG_Past_PManufacturer), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0633:         PRINI_WriteSetting ('PastTaxClass', INTTOSTR (opmG_Past_PTaxClass), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0634:         PRINI_WriteSetting ('PastImageDir', opmG_Past_PImageDir, opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0635:         PRINI_WriteSetting ('OSCNoCacheImg', IntToStr (opmG_WBNoCacheImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0636:         PRINI_WriteSetting ('OSCResizeImg', IntToStr (opmG_WBResizeImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0637:         PRINI_WriteSetting ('OSCWatermarkImg', IntToStr (opmG_WBWatermarkImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0638:         PRINI_WriteSetting ('OSCWatermarkImgBlend', IntToStr (opmG_WBWatermarkBlend), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0639:         PRINI_WriteSetting ('OSCWatermarkImgFile', opmG_WBWatermarkFile, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0640:         PRINI_WriteSetting ('OSCPaddingImg', IntToStr (opmG_WBPaddingImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0641:         PRINI_WriteSetting ('OSCKeepARImg', IntToStr (opmG_WBKeepARImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0642:         PRINI_WriteSetting ('OSCConfirmExit', IntToStr (opmG_UIConfirmExit), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0643:         PRINI_WriteSetting ('OSCCenterImage', IntToStr (opmG_UICenterImage), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0644:         PRINI_WriteSetting ('OSCDBDebugLog', IntToStr (opmG_DBDebugLog), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0645:         PRINI_WriteSetting ('OSCHTTPCompress', IntToStr (opmG_HTTPCompress), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0646:         PRINI_WriteSetting ('OSCWBDebug', IntToStr (opmG_UIWBDebug), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0647:         PRINI_WriteSetting ('OSCRememberPosition', IntToStr (opmG_UIRememberDisplay), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0648:       END;
0649:   end;
0650:   
0651:   
0652:   
0653:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0654:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0655:   procedure Topm_Form_Config.opm_BitBtn_ConfigWatermarkSelectFileClick(Sender: TObject);
0656:   VAR
0657:     OpenDialog : opmT_OpenPictureDialog;
0658:   BEGIN
0659:     TRY
0660:       OpenDialog := opmT_OpenPictureDialog.Create (opm_Form_Config);
0661:       TRY
0662:         OpenDialog.DefaultExt := opmC_Def_UploadExt;
0663:         OpenDialog.FileName := opmC_Def_UploadFilename;
0664:         OpenDialog.Filter := _('Image files') + '|' + opmC_Def_UploadFilter + '|' + _('All files (*.*)');
0665:         OpenDialog.Title := _('Uploading image file...');
0666:         IF (OpenDialog.Execute = TRUE) THEN opm_Edit_ConfigWatermarkFile.Text := OpenDialog.FileName;
0667:       FINALLY
0668:         OpenDialog.Free;
0669:       END;
0670:     EXCEPT
0671:       opm_Edit_ConfigWatermarkFile.Text := '';
0672:     END;
0673:   END;
0674:   
0675:   
0676:   
0677:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0678:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0679:   procedure Topm_Form_Config.opm_BitBtn_ConfigLoadINIClick(Sender: TObject);
0680:   begin
0681:     opm_OpenDialog_ConfigINI.DefaultExt := opmC_Def_LoadINIExt;
0682:     opm_OpenDialog_ConfigINI.FileName := '';
0683:     opm_OpenDialog_ConfigINI.Filter := _('Configuration files') + ' (' + opmC_Def_LoadINIFilter + ')|' + opmC_Def_LoadINIFilter + '|' + _('All files (*.*)');
0684:     opm_OpenDialog_ConfigINI.Title := _('Loading configuration file...');
0685:     opm_OpenDialog_ConfigINI.InitialDir := ExtractFilePath (Application.Exename);
0686:     IF (opm_OpenDialog_ConfigINI.Execute = TRUE) THEN
0687:       BEGIN
0688:         opmG_ETABase := FNopm_StrToInt (FNINI_ReadSetting ('OSCETABase', opmC_Def_ETABase, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0689:         opmG_PDFAuthor := FNINI_ReadSetting ('OSCPDFAuthor', opmC_Def_PDFAuthor, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0690:         opmG_DBUsername := FNINI_ReadSetting ('OSCUsername', opmC_Def_Username, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0691:         opmG_DBPassword := FNINI_ReadSetting ('OSCPassword', opmC_Def_Password, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0692:         opmG_WBImgURL := FNINI_ReadSetting ('OSCImgURL', opmC_Def_ImgURL, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0693:         opmG_WBUploadURL := FNINI_ReadSetting ('OSCUploadURL', opmC_Def_UploadURL, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0694:         opmG_WBProxyHost := FNopm_CleanHostName (FNINI_ReadSetting ('OSCProxyHost', opmC_Def_ProxyHost, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0695:         opmG_WBProxyPort := FNopm_StrToInt (FNINI_ReadSetting ('OSCProxyPort', INTTOSTR (opmC_Def_ProxyPort), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0696:         opmG_ModConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCModConnWait', INTTOSTR (opmC_Def_ModConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0697:         opmG_HTTPConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCHTTPConnWait', INTTOSTR (opmC_Def_HTTPConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0698:         opmG_ModConnRetries := FNopm_StrToInt (FNINI_ReadSetting ('OSCModConnRetries', INTTOSTR (opmC_Def_ModConnRetries), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0699:         opmG_HTTPConnRetries := FNopm_StrToInt (FNINI_ReadSetting ('OSCHTTPConnRetries', INTTOSTR (opmC_Def_HTTPConnRetries), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0700:         opmG_WBImgX := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgX', INTTOSTR (opmC_Def_ImgX), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0701:         opmG_WBImgY := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgY', INTTOSTR (opmC_Def_ImgY), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0702:         opmG_WBImgQ := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgQ', INTTOSTR (opmC_Def_ImgQ), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0703:         opmG_WBPaddingColor := FNopm_StrToInt (FNINI_ReadSetting ('OSCPaddingColor', INTTOSTR (opmC_Def_PaddingColor), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0704:         IF (opmG_WBImgURL[LENGTH (opmG_WBImgURL)] <> '/') THEN opmG_WBImgURL := opmG_WBImgURL + '/';
0705:         opmG_UIHotTracking := FNopm_StrToInt (FNINI_ReadSetting ('OSCHotTracking', INTTOSTR (opmC_Def_HotTracking), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0706:         opmG_UIClickLoad := FNopm_StrToInt (FNINI_ReadSetting ('OSCAutoLoad', INTTOSTR (opmC_Def_AutoLoad), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0707:         opmG_UIDragDrop := FNopm_StrToInt (FNINI_ReadSetting ('OSCDragDrop', INTTOSTR (opmC_Def_DragDrop), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0708:         opmG_UIImgDragDrop := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgDragDrop', INTTOSTR (opmC_Def_ImgDragDrop), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0709:         opmG_UIToolTips := FNopm_StrToInt (FNINI_ReadSetting ('OSCToolTips', INTTOSTR (opmC_Def_ToolTips), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0710:         opmG_UIStripes := FNopm_StrToInt (FNINI_ReadSetting ('OSCStripes', INTTOSTR (opmC_Def_Stripes), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0711:         opmG_UICacheIList := FNopm_StrToInt (FNINI_ReadSetting ('OSCCacheIList', INTTOSTR (opmC_Def_CacheIList), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0712:         opmG_UseProxy := FNopm_StrToInt (FNINI_ReadSetting ('OSCUseProxy', INTTOSTR (opmC_Def_UseProxy), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0713:         opmG_ProxyApply := FNopm_StrToInt (FNINI_ReadSetting ('OSCProxyApply', INTTOSTR (opmC_Def_ProxyApply), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0714:         opmG_DBStorePass := FNopm_StrToInt (FNINI_ReadSetting ('OSCStorePass', INTTOSTR (opmC_Def_StorePass), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0715:         opmG_UISilent := FNopm_StrToInt (FNINI_ReadSetting ('OSCSilent', INTTOSTR (opmC_Def_Silent), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0716:         opmG_UIConfirmDels := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmDels', INTTOSTR (opmC_Def_ConfirmDels), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0717:         opmG_UIConfirmDrag := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmDrag', INTTOSTR (opmC_Def_ConfirmDrag), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0718:         opmG_UIConfirmMods := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmMods', INTTOSTR (opmC_Def_ConfirmMods), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0719:         opmG_UIAllowZeroPrice := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowZeroPrice', INTTOSTR (opmC_Def_AllowZeroPrice), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0720:         opmG_UIAllowEditImageName := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowEditImageName', INTTOSTR (opmC_Def_AllowEditImageName), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0721:         opmG_UIAllowNegativeQuantity := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowNegativeQuantity', INTTOSTR (opmC_Def_AllowNegativeQuantity), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0722:         opmG_UIAutoDownImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCAutoDownImg', INTTOSTR (opmC_Def_AutoDownImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0723:         opmG_UIFontName := FNReg_ReadSetting ('UIFontName', opmC_DefaultFont, opmC_RegistryKey, opmC_RKVisual);
0724:         opmG_UIFontHeight := FNopm_StrToInt (FNReg_ReadSetting ('UIFontHeight', INTTOSTR (opmC_DefaultFontHeight), opmC_RegistryKey, opmC_RKVisual));
0725:         opmG_UIFontCharset := FNopm_StrToInt (FNReg_ReadSetting ('UIFontCharset', INTTOSTR (opmC_DefaultFontCharset), opmC_RegistryKey, opmC_RKVisual));
0726:         opmG_Clip_ColSize := FNopm_StrToInt (FNReg_ReadSetting ('Clip_ColSize', INTTOSTR (opmC_Def_Clip_ColSize), opmC_RegistryKey, opmC_RKVisual));
0727:         opmG_PRNDirectPrint := FNopm_StrToInt (FNReg_ReadSetting ('PRNDirectPrint', INTTOSTR (opmC_Def_PRNDirectPrint), opmC_RegistryKey, opmC_RKVisual));
0728:         opmG_Past_PAvailDate := FNopm_StrToInt (FNReg_ReadSetting ('PastAvailDate', INTTOSTR (opmC_Def_Past_PAvailDate), opmC_RegistryKey, opmC_RKVisual));
0729:         opmG_Past_PManufacturer := FNopm_StrToInt (FNReg_ReadSetting ('PastManufacturer', INTTOSTR (opmC_Def_Past_PManufacturer), opmC_RegistryKey, opmC_RKVisual));
0730:         opmG_Past_PTaxClass := FNopm_StrToInt (FNReg_ReadSetting ('PastTaxClass', INTTOSTR (opmC_Def_Past_PTaxClass), opmC_RegistryKey, opmC_RKVisual));
0731:         opmG_Past_PImageDir := FNReg_ReadSetting ('PastImageDir', opmC_Def_Past_PImageDir, opmC_RegistryKey, opmC_RKVisual);
0732:         opmG_WBNoCacheImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCNoCacheImg', INTTOSTR (opmC_Def_NoCacheImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0733:         opmG_WBResizeImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCResizeImg', INTTOSTR (opmC_Def_ResizeImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0734:         opmG_WBWatermarkImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCWatermarkImg', INTTOSTR (opmC_Def_WatermarkImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0735:         opmG_WBWatermarkBlend := FNopm_StrToInt (FNINI_ReadSetting ('OSCWatermarkBlend', INTTOSTR (opmC_Def_WatermarkBlend), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0736:         opmG_WBWatermarkFile := FNINI_ReadSetting ('OSCWatermarkFile', opmC_Def_WatermarkFile, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0737:         opmG_WBPaddingImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCPaddingImg', INTTOSTR (opmC_Def_PaddingImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0738:         opmG_WBKeepARImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCKeepARImg', INTTOSTR (opmC_Def_KeepARImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0739:         opmG_UIConfirmExit := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmExit', INTTOSTR (opmC_Def_ConfirmExit), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0740:         opmG_UICenterImage := FNopm_StrToInt (FNINI_ReadSetting ('OSCCenterImage', INTTOSTR (opmC_Def_CenterImage), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0741:         opmG_DBDebugLog := FNopm_StrToInt (FNINI_ReadSetting ('OSCDBDebugLog', INTTOSTR (opmC_Def_DBDebugLog), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0742:         opmG_HTTPCompress := FNopm_StrToInt (FNINI_ReadSetting ('OSCHTTPCompress', INTTOSTR (opmC_Def_HTTPCompress), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0743:         opmG_UIWBDebug := FNopm_StrToInt (FNINI_ReadSetting ('OSCWBDebug', INTTOSTR (opmC_Def_WBDebug), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0744:         opmG_UIGUILang := FNINI_ReadSetting ('OSCGUILang', opmC_Def_GUILang, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0745:         IF (FNopm_CheckLanguage (opmG_UIGUILang) = FALSE) THEN opmG_UIGUILang := opmC_Def_GUILang;
0746:         opmG_UIRememberDisplay := FNopm_StrToInt (FNINI_ReadSetting ('OSCRememberPosition', INTTOSTR (opmC_Def_RememberDisplay), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0747:         PRopm_VarsToControls;
0748:       END;
0749:   end;
0750:   
0751:   
0752:   
0753:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0754:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0755:   procedure Topm_Form_Config.opm_SpinEdit_ConfigImgQChange (Sender: TObject);
0756:   begin
0757:     opm_Label_ConfigJPEGQCategory.Caption := FNopm_QualityExplain (opm_SpinEdit_ConfigImgQ.Value);
0758:   end;
0759:   
0760:   
0761:   
0762:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0763:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0764:   PROCEDURE Topm_Form_Config.opm_PRRefresh_ModuleList (LastIndex : INTEGER);
0765:   VAR
0766:     ModCounter : LONGINT;
0767:   BEGIN
0768:     opm_PRLoad_ModuleList;
0769:     opm_ListBox_ConfigMods.Items.Clear;
0770:     FOR ModCounter := 0 TO (opm_TotalModules - 1) DO
0771:       opm_ListBox_ConfigMods.Items.Add (opmG_ModuleList[ModCounter].Name);
0772:     IF ((LastIndex + 1) < opm_TotalModules) THEN
0773:       opm_ListBox_ConfigMods.ItemIndex := LastIndex
0774:     ELSE opm_ListBox_ConfigMods.ItemIndex := (opm_TotalModules - 1);
0775:   END;
0776:   
0777:   
0778:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0779:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0780:   procedure Topm_Form_Config.opm_ListBox_ConfigModsClick(Sender: TObject);
0781:   begin
0782:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
0783:       BEGIN
0784:         opm_BitBtn_ConfigModDel.Enabled := TRUE;
0785:         opm_BitBtn_ConfigModEdit.Enabled := TRUE;
0786:       END
0787:     ELSE
0788:       BEGIN
0789:         opm_BitBtn_ConfigModDel.Enabled := FALSE;
0790:         opm_BitBtn_ConfigModEdit.Enabled := FALSE;
0791:       END;
0792:   end;
0793:   
0794:   
0795:   
0796:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0797:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0798:   procedure Topm_Form_Config.opm_BitBtn_ConfigColSelClick(Sender: TObject);
0799:   begin
0800:     opm_Form_ColorSel.opmG_ColorChoosed := FNopm_DecColorToColor (opmG_WBPaddingColor);
0801:     IF (opm_Form_ColorSel.ShowModal = mrOk) THEN
0802:       BEGIN
0803:         opmG_WBPaddingColor := opm_Form_ColorSel.opmG_ColorChoosedDec;
0804:         opm_Panel_ConfigColSel.Color := opm_Form_ColorSel.opmG_ColorChoosed;
0805:         opm_Panel_ConfigColSel.Caption := FNopm_ColorToRGB (opm_Panel_ConfigColSel.Color);
0806:       END;
0807:   end;
0808:   
0809:   
0810:   
0811:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0812:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0813:   procedure Topm_Form_Config.opm_BitBtn_ConfigProxyIEClick(Sender: TObject);
0814:   VAR
0815:     PHost : STRING;
0816:     PPort : LONGINT;
0817:   begin
0818:     PRopm_GetIEProxyData (PHost, PPort);
0819:     IF ((PHost <> '') AND (PPort > 0)) THEN
0820:       BEGIN
0821:         opm_ComboBox_ConfigProxyHost.Text := PHost;
0822:         opm_SpinEdit_ConfigProxyPort.Value := PPort;
0823:       END
0824:     ELSE
0825:       FNopm_Message (_('Cannot find the proxy settings automatically.'), mtWarning, [mbOK], opmG_UISilent);
0826:   end;
0827:   
0828:   
0829:   
0830:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0831:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0832:   procedure Topm_Form_Config.opm_BitBtn_ConfigFontClick (Sender: TObject);
0833:   begin
0834:     IF (opm_FontDialog_Config.Execute = TRUE) THEN
0835:       BEGIN
0836:         opm_Label_ConfigFontDetails.Caption := opm_FontDialog_Config.Font.Name + ', ' +
0837:                                                INTTOSTR (ROUND ((opm_FontDialog_Config.Font.Height * -72) / opm_FontDialog_Config.Font.PixelsPerInch)) + ', ' +
0838:                                                opmG_CharsetList [opm_FontDialog_Config.Font.Charset];
0839:         FNopm_Message (_('The font will change until you restart the application.'), mtInformation, [mbOk], opmG_UISilent);
0840:       END
0841:     ELSE
0842:       BEGIN
0843:         opm_FontDialog_Config.Font.Name := opmG_UIFontName;
0844:         opm_FontDialog_Config.Font.Height := opmG_UIFontHeight;
0845:         opm_FontDialog_Config.Font.Charset := opmG_UIFontCharset;
0846:         opm_FontDialog_Config.Font.Style := opmC_DefaultFontStyle;
0847:       END;
0848:   end;
0849:   
0850:   
0851:   
0852:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0853:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0854:   procedure Topm_Form_Config.opm_CheckBox_ConfigUseProxyClick (Sender: TObject);
0855:   begin
0856:     opm_ComboBox_ConfigProxyApply.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0857:     opm_ComboBox_ConfigProxyHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0858:     opm_SpinEdit_ConfigProxyPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0859:     opm_BitBtn_ConfigProxyIE.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0860:     opm_Label_ConfigPHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0861:     opm_Label_ConfigPPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0862:   end;
0863:   
0864:   
0865:   
0866:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0867:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0868:   procedure Topm_Form_Config.opm_CheckBox_ConfigWatermarkImgClick(Sender: TObject);
0869:   begin
0870:     opm_Label_ConfigWatermarkBlend.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0871:     opm_SpinEdit_ConfigWatermarkBlend.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0872:     opm_Edit_ConfigWatermarkFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0873:     opm_BitBtn_ConfigWatermarkSelectFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0874:     opm_Label_ConfigWatermarkFile.Enabled := opm_CheckBox_ConfigWatermarkImg.Checked;
0875:   end;
0876:   
0877:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0878:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0879:   procedure Topm_Form_Config.opm_ListBox_ConfigReportsClick(Sender: TObject);
0880:   begin
0881:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
0882:       BEGIN
0883:         opm_BitBtn_ConfigReportEdit.Enabled := TRUE;
0884:         opm_BitBtn_ConfigReportPreview.Enabled := TRUE;
0885:       END
0886:     ELSE
0887:       BEGIN
0888:         opm_BitBtn_ConfigReportEdit.Enabled := FALSE;
0889:         opm_BitBtn_ConfigReportPreview.Enabled := FALSE;
0890:       END;
0891:   end;
0892:   
0893:   
0894:   
0895:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0896:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0897:   procedure Topm_Form_Config.opm_BitBtn_ConfigReportEditClick(Sender: TObject);
0898:   begin
0899:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
0900:       BEGIN
0901:         TRY
0902:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
0903:           opm_frReport_Config.DesignReport;
0904:         EXCEPT
0905:           ON E : Exception DO
0906:             BEGIN
0907:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
0908:             END;
0909:         END;
0910:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
0911:       END;
0912:   end;
0913:   
0914:   
0915:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0916:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0917:   PROCEDURE Topm_Form_Config.opm_PRRefresh_ReportList (LastIndex : INTEGER);
0918:   VAR
0919:     DirRecord : TSearchRec;
0920:     RepCount : LONGINT;
0921:   BEGIN
0922:     RepCount := 0;
0923:     opm_ListBox_ConfigReports.Items.Clear;
0924:     IF (SysUtils.FINDFIRST (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + '*.' + opmC_Def_ReportExt, faAnyFile, DirRecord) = 0) THEN
0925:       BEGIN
0926:         REPEAT
0927:           opm_ListBox_ConfigReports.Items.Add (TRIM (DirRecord.Name));
0928:           INC (RepCount);
0929:         UNTIL (SysUtils.FINDNEXT (DirRecord) <> 0);
0930:         SysUtils.FINDCLOSE (DirRecord);
0931:         IF (LastIndex < RepCount) THEN
0932:           opm_ListBox_ConfigReports.ItemIndex := LastIndex
0933:         ELSE opm_ListBox_ConfigReports.ItemIndex := (RepCount - 1);
0934:       END;
0935:   END;
0936:   
0937:   
0938:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0939:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0940:   procedure Topm_Form_Config.opm_frReport_ConfigGetValue (const ParName: String; var ParValue: Variant);
0941:   begin
0942:     ParValue := _('Test data') + ' ' + INTTOSTR (opm_frUserDataset_Config.RecNo);
0943:   end;
0944:   
0945:   
0946:   
0947:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0948:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0949:   procedure Topm_Form_Config.opm_frUserDataset_ConfigCheckEOF (Sender: TObject; var Eof: Boolean);
0950:   begin
0951:     EOF := (opm_frUserDataset_Config.RecNo > 100);
0952:   end;
0953:   
0954:   
0955:   
0956:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0957:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0958:   procedure Topm_Form_Config.opm_BitBtn_ConfigReportPreviewClick(Sender: TObject);
0959:   begin
0960:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
0961:       BEGIN
0962:         TRY
0963:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
0964:           opm_frReport_Config.ShowReport;
0965:         EXCEPT
0966:           ON E : Exception DO
0967:             BEGIN
0968:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
0969:             END;
0970:         END;
0971:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
0972:       END;
0973:   end;
0974:   
0975:   
0976:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0977:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0978:   procedure Topm_Form_Config.opm_BitBtn_ConfigModEditClick(Sender: TObject);
0979:   begin
0980:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
0981:       BEGIN
0982:         opm_Form_ConfigMod.MC_Name := TRIM (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
0983:         opm_Form_ConfigMod.MC_AddEdit := FALSE;
0984:         IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
0985:       END;
0986:   end;
0987:   
0988:   
0989:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0990:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0991:   procedure Topm_Form_Config.opm_BitBtn_ConfigModAddClick(Sender: TObject);
0992:   begin
0993:     opm_Form_ConfigMod.MC_Name := '';
0994:     opm_Form_ConfigMod.MC_AddEdit := TRUE;
0995:     IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
0996:   end;
0997:   
0998:   
0999:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1000:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1001:   procedure Topm_Form_Config.opm_BitBtn_ConfigModDelClick(Sender: TObject);
1002:   begin
1003:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
1004:       IF (FNopm_Message (_('Are you sure you want to delete this module configuration?') +
1005:                          ' [' + opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + ']', mtConfirmation, [mbYes, mbNo], opmG_UISilent) = mrYes) THEN
1006:         BEGIN
1007:           opm_PRDelete_ModuleData (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
1008:           opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1009:         END;
1010:   end;
1011:   
1012:   
1013:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1014:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1015:   procedure Topm_Form_Config.opm_ListBox_ConfigModsDblClick(Sender: TObject);
1016:   begin
1017:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
1018:       BEGIN
1019:         opm_Form_ConfigMod.MC_Name := TRIM (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
1020:         opm_Form_ConfigMod.MC_AddEdit := FALSE;
1021:         IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1022:       END;
1023:   end;
1024:   
1025:   
1026:   
1027:   
1028:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1029:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1030:   procedure Topm_Form_Config.opm_ListBox_ConfigReportsDblClick(Sender: TObject);
1031:   begin
1032:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
1033:       BEGIN
1034:         TRY
1035:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
1036:           opm_frReport_Config.DesignReport;
1037:         EXCEPT
1038:           ON E : Exception DO
1039:             BEGIN
1040:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
1041:             END;
1042:         END;
1043:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
1044:       END;
1045:   end;
1046:   
1047:   
1048:   end.
 
 
NA fum/lmd: 2007.07.15
Copyright ©1994-2024 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link