Source code of file oscpmwin_v0.1.2.484/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:     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
0028:     Dialogs, StdCtrls, Buttons, Spin, Registry, 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_ConfigNet: TTabSheet;
0037:       opm_GroupBox_DB: TGroupBox;
0038:       opm_Label_ConfigHost: TLabel;
0039:       opm_Label_ConfigPassword: TLabel;
0040:       opm_Label_ConfigPort: TLabel;
0041:       opm_Label_ConfigUsername: TLabel;
0042:       opm_Label_ConfigDatabase: TLabel;
0043:       opm_Label_ConfigProtocol: TLabel;
0044:       opm_Edit_ConfigPassword: TEdit;
0045:       opm_ComboBox_ConfigProtocol: TComboBox;
0046:       opm_SpinEdit_ConfigPort: TSpinEdit;
0047:       opm_ComboBox_ConfigHost: TComboBox;
0048:       opm_ComboBox_ConfigDatabase: TComboBox;
0049:       opm_ComboBox_ConfigUsername: TComboBox;
0050:       opm_CheckBox_ConfigCompress: TCheckBox;
0051:       opm_TabSheet_ConfigUI: TTabSheet;
0052:       opm_GroupBox_inter: TGroupBox;
0053:       Bevel4: TBevel;
0054:       opm_CheckBox_ConfigRemember: TCheckBox;
0055:       opm_CheckBox_ConfigHotTrack: TCheckBox;
0056:       opm_CheckBox_ConfigAutoload: TCheckBox;
0057:       opm_CheckBox_ConfigDragDrop: TCheckBox;
0058:       opm_CheckBox_ConfigTooltips: TCheckBox;
0059:       opm_CheckBox_ConfigSilent: TCheckBox;
0060:       opm_TabSheet_ConfigImg: TTabSheet;
0061:       opm_GroupBox_ImgConv: TGroupBox;
0062:       opm_CheckBox_ConfigResizeImg: TCheckBox;
0063:       opm_Label_ConfigImgResize: TLabel;
0064:       opm_SpinEdit_ConfigImgX: TSpinEdit;
0065:       opm_SpinEdit_ConfigImgY: TSpinEdit;
0066:       opm_Label_ConfigImgXSymbol: TLabel;
0067:       opm_SpinEdit_ConfigImgQ: TSpinEdit;
0068:       opm_Label_ConfigImgJPEGQuality: TLabel;
0069:       opm_OpenDialog_ConfigINI: TOpenDialog;
0070:       opm_SaveDialog_ConfigINI: TSaveDialog;
0071:       opm_GroupBox_inter2: TGroupBox;
0072:       opm_BitBtn_ConfigReset: TBitBtn;
0073:       Bevel2: TBevel;
0074:       opm_CheckBox_ConfigDragUps: TCheckBox;
0075:       opm_CheckBox_ConfigConfirmDels: TCheckBox;
0076:       opm_CheckBox_ConfigConfirmDrag: TCheckBox;
0077:       opm_CheckBox_ConfigConfirmMods: TCheckBox;
0078:       opm_CheckBox_ConfigConfirmUps: TCheckBox;
0079:       opm_CheckBox_ConfigAutoDownImg: TCheckBox;
0080:       opm_CheckBox_ConfigNoCacheImg: TCheckBox;
0081:       Bevel1: TBevel;
0082:       opm_CheckBox_ConfigConfirmExit: TCheckBox;
0083:       opm_CheckBox_ConfigConfirmImgDels: TCheckBox;
0084:       opm_Label_ConfigJPEGQCategory: TLabel;
0085:       opm_TabSheet_ConfigMods: TTabSheet;
0086:       opm_CheckBox_ConfigPaddingImg: TCheckBox;
0087:       opm_CheckBox_ConfigKeepARImg: TCheckBox;
0088:       opm_BitBtn_ConfigColSel: TBitBtn;
0089:       opm_Panel_ConfigColSel: TPanel;
0090:       opm_TabSheet_ConfigNet2: TTabSheet;
0091:       opm_CheckBox_ConfigStorePass: TCheckBox;
0092:       opm_GroupBox_SSH: TGroupBox;
0093:       opm_Label_ConfigSSHPassword: TLabel;
0094:       opm_Label_ConfigSSHPort: TLabel;
0095:       opm_Label_ConfigSSHUsername: TLabel;
0096:       opm_Edit_ConfigSSHPassword: TEdit;
0097:       opm_SpinEdit_ConfigSSHLocalPort: TSpinEdit;
0098:       opm_ComboBox_ConfigSSHUsername: TComboBox;
0099:       opm_CheckBox_ConfigUseSSH: TCheckBox;
0100:       opm_GroupBox_INI: TGroupBox;
0101:       opm_BitBtn_ConfigLoadINI: TBitBtn;
0102:       opm_BitBtn_ConfigSaveINI: TBitBtn;
0103:       opm_BitBtn_ConfigTestSSH: TBitBtn;
0104:       opm_TabSheet_ConfigUI2: TTabSheet;
0105:       opm_GroupBox_Lang: TGroupBox;
0106:       opm_Label_ConfigUILang: TLabel;
0107:       opm_ComboBox_ConfigUILang: TComboBox;
0108:       opm_Label_ConfigUILangDesc: TLabel;
0109:       Bevel3: TBevel;
0110:       opm_FontDialog_Config: TFontDialog;
0111:       opm_GroupBox_Font: TGroupBox;
0112:       opm_BitBtn_ConfigFont: TBitBtn;
0113:       opm_Label_ConfigFontDetails: TLabel;
0114:       opm_SpinEdit_ConfigSSHConnWait: TSpinEdit;
0115:       opm_Label_ConfigSSHConnWait: TLabel;
0116:       opm_Label_ConfigDBConnWait: TLabel;
0117:       opm_SpinEdit_ConfigDBConnWait: TSpinEdit;
0118:       opm_TabSheet_ConfigDBDetail: TTabSheet;
0119:       opm_GroupBox_DBDetails: TGroupBox;
0120:       opm_Label_ConfigDBTable01: TLabel;
0121:       opm_Edit_ConfigDBTable01: TEdit;
0122:       opm_Edit_ConfigDBTable02: TEdit;
0123:       opm_Label_ConfigDBTable02: TLabel;
0124:       opm_Edit_ConfigDBTable04: TEdit;
0125:       opm_Label_ConfigDBTable04: TLabel;
0126:       opm_Edit_ConfigDBTable03: TEdit;
0127:       opm_Label_ConfigDBTable03: TLabel;
0128:       opm_Label_ConfigDBTable05: TLabel;
0129:       opm_Edit_ConfigDBTable05: TEdit;
0130:       opm_Label_ConfigDBTable06: TLabel;
0131:       opm_Edit_ConfigDBTable06: TEdit;
0132:       opm_Label_ConfigDBTable07: TLabel;
0133:       opm_Edit_ConfigDBTable07: TEdit;
0134:       opm_Label_ConfigDBTable08: TLabel;
0135:       opm_Edit_ConfigDBTable08: TEdit;
0136:       opm_Label_ConfigDBTable09: TLabel;
0137:       opm_Edit_ConfigDBTable09: TEdit;
0138:       opm_Label_ConfigDBTable10: TLabel;
0139:       opm_Edit_ConfigDBTable10: TEdit;
0140:       opm_Label_ConfigDBTable11: TLabel;
0141:       opm_Edit_ConfigDBTable11: TEdit;
0142:       opm_Label_ConfigDBTable13: TLabel;
0143:       opm_Edit_ConfigDBTable13: TEdit;
0144:       opm_BitBtn_ConfigDBReset: TBitBtn;
0145:       opm_CheckBox_ConfigDBDebugLog: TCheckBox;
0146:       opm_Label_ConfigDBTablesDesc: TLabel;
0147:       opm_CheckBox_ConfigAllowZeroPrice: TCheckBox;
0148:       opm_CheckBox_ConfigWBDebug: TCheckBox;
0149:       opm_CheckBox_ConfigSSHDebug: TCheckBox;
0150:       opm_CheckBox_ConfigAllowNegativeQuantity: TCheckBox;
0151:       opm_Label_ConfigDBConnRetries: TLabel;
0152:       opm_SpinEdit_ConfigDBConnRetries: TSpinEdit;
0153:       opm_TabSheet_ConfigReports: TTabSheet;
0154:       opm_GroupBox_Reports: TGroupBox;
0155:       opm_GroupBox_Clipboard: TGroupBox;
0156:       opm_Label_Config_ClipMaxChars: TLabel;
0157:       opm_SpinEdit_Config_ClipColSize: TSpinEdit;
0158:       opm_BitBtn_ConfigReportEdit: TBitBtn;
0159:       opm_ListBox_ConfigReports: TListBox;
0160:       opm_CheckBox_ConfigPRNDirectPrint: TCheckBox;
0161:       opm_frReport_Config: TfrReport;
0162:       opm_frDesigner_Config: TfrDesigner;
0163:       opm_frUserDataset_Config: TfrUserDataset;
0164:       opm_BitBtn_ConfigReportPreview: TBitBtn;
0165:       opm_CheckBox_ConfigAllowEditImageName: TCheckBox;
0166:       opm_Label_ConfigModConnWait: TLabel;
0167:       opm_SpinEdit_ConfigModConnWait: TSpinEdit;
0168:       opm_Label_ConfigModConnRetries: TLabel;
0169:       opm_SpinEdit_ConfigModConnRetries: TSpinEdit;
0170:       opm_OpenDialog_ConfigMod: TOpenDialog;
0171:       opm_GroupBox_Modules: TGroupBox;
0172:       opm_BitBtn_ConfigModDel: TBitBtn;
0173:       opm_ListBox_ConfigMods: TListBox;
0174:       opm_BitBtn_ConfigModEdit: TBitBtn;
0175:       opm_Edit_ConfigPLinkCall: TEdit;
0176:       opm_Label_ConfigDBTable14: TLabel;
0177:       opm_Edit_ConfigDBTable14: TEdit;
0178:       opm_BitBtn_ConfigModAdd: TBitBtn;
0179:       opm_TabSheet_ConfigNet3: TTabSheet;
0180:       opm_GroupBox_HTTP: TGroupBox;
0181:       opm_Label_ConfigPHost: TLabel;
0182:       opm_Label_ConfigPPort: TLabel;
0183:       opm_ComboBox_ConfigProxyHost: TComboBox;
0184:       opm_SpinEdit_ConfigProxyPort: TSpinEdit;
0185:       opm_BitBtn_ConfigProxyIE: TBitBtn;
0186:       opm_CheckBox_ConfigUseProxy: TCheckBox;
0187:       opm_ComboBox_ConfigProxyApply: TComboBox;
0188:       opm_GroupBox_HTTPGen: TGroupBox;
0189:       opm_Label_ConfigETABase: TLabel;
0190:       opm_ComboBox_ConfigETABase: TComboBox;
0191:       opm_Label_ConfigUploadURL: TLabel;
0192:       opm_ComboBox_ConfigUploadURL: TComboBox;
0193:       opm_Label_ConfigHTTPConnWait: TLabel;
0194:       opm_SpinEdit_ConfigHTTPConnWait: TSpinEdit;
0195:       opm_GroupBox_Img: TGroupBox;
0196:       opm_ComboBox_ConfigImgURL: TComboBox;
0197:       opm_Label_ConfigImageURL: TLabel;
0198:       opm_CheckBox_ConfigStripes: TCheckBox;
0199:       opm_CheckBox_ConfigCacheIList: TCheckBox;
0200:       opm_Edit_ConfigPDFAuthor: TEdit;
0201:       opm_Label_ConfigPDFAuthor: TLabel;
0202:       procedure FormShow(Sender: TObject);
0203:       procedure opm_BitBtn_ConfigOkClick(Sender: TObject);
0204:       procedure FormCreate(Sender: TObject);
0205:       procedure opm_BitBtn_ConfigResetClick(Sender: TObject);
0206:       procedure opm_CheckBox_ConfigResizeImgClick(Sender: TObject);
0207:       procedure opm_BitBtn_ConfigSaveINIClick(Sender: TObject);
0208:       procedure opm_BitBtn_ConfigLoadINIClick(Sender: TObject);
0209:       procedure opm_SpinEdit_ConfigImgQChange(Sender: TObject);
0210:       procedure opm_BitBtn_ConfigModDelClick(Sender: TObject);
0211:       procedure opm_ListBox_ConfigModsClick(Sender: TObject);
0212:       procedure opm_BitBtn_ConfigColSelClick(Sender: TObject);
0213:       procedure opm_CheckBox_ConfigUseSSHClick(Sender: TObject);
0214:       procedure opm_BitBtn_ConfigProxyIEClick(Sender: TObject);
0215:       procedure opm_BitBtn_ConfigTestSSHClick(Sender: TObject);
0216:       procedure opm_BitBtn_ConfigFontClick(Sender: TObject);
0217:       procedure opm_CheckBox_ConfigUseProxyClick(Sender: TObject);
0218:       procedure opm_BitBtn_ConfigDBResetClick(Sender: TObject);
0219:       procedure opm_ListBox_ConfigReportsClick(Sender: TObject);
0220:       procedure opm_BitBtn_ConfigReportEditClick(Sender: TObject);
0221:       procedure opm_frReport_ConfigGetValue (const ParName: String; var ParValue: Variant);
0222:       procedure opm_frUserDataset_ConfigCheckEOF(Sender: TObject; var Eof: Boolean);
0223:       procedure opm_BitBtn_ConfigReportPreviewClick(Sender: TObject);
0224:       procedure opm_BitBtn_ConfigModEditClick(Sender: TObject);
0225:       procedure opm_ListBox_ConfigModsDblClick(Sender: TObject);
0226:       procedure opm_ComboBox_ConfigSSHUsernameExit(Sender: TObject);
0227:       procedure opm_CheckBox_ConfigCompressClick(Sender: TObject);
0228:       procedure opm_ListBox_ConfigReportsDblClick(Sender: TObject);
0229:       procedure opm_BitBtn_ConfigModAddClick(Sender: TObject);
0230:     private
0231:       PROCEDURE PRopm_ControlToVars;
0232:       procedure PRopm_VarsToControls;
0233:       PROCEDURE opm_PRRefresh_ModuleList (LastIndex : INTEGER);
0234:       PROCEDURE opm_PRRefresh_ReportList (LastIndex : INTEGER);
0235:       PROCEDURE PRopm_UpdateTunnelCall;
0236:     public
0237:     end;
0238:   
0239:   var
0240:     opm_Form_Config: Topm_Form_Config;
0241:   
0242:   implementation
0243:   
0244:   {$R *.dfm}
0245:   
0246:   Uses gnugettext, oscpmdata, main, balloons, regconfig, attention, imageman, modules, dataman,
0247:        colorsel, network, configmod;
0248:   
0249:   
0250:   
0251:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0252:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0253:   procedure Topm_Form_Config.PRopm_VarsToControls;
0254:   VAR
0255:     UILang : LONGINT;
0256:   begin
0257:     opm_ComboBox_ConfigHost.Text := opmG_DBHost;
0258:     opm_Edit_ConfigPDFAuthor.Text := opmG_PDFAuthor;
0259:     opm_ComboBox_ConfigDatabase.Text := opmG_DBDatabase;
0260:     opm_Edit_ConfigDBTable01.Text := opmG_DBTable_Categories;
0261:     opm_Edit_ConfigDBTable02.Text := opmG_DBTable_Manufacturers;
0262:     opm_Edit_ConfigDBTable03.Text := opmG_DBTable_Languages;
0263:     opm_Edit_ConfigDBTable04.Text := opmG_DBTable_Products;
0264:     opm_Edit_ConfigDBTable05.Text := opmG_DBTable_Specials;
0265:     opm_Edit_ConfigDBTable06.Text := opmG_DBTable_ProductsDescription;
0266:     opm_Edit_ConfigDBTable07.Text := opmG_DBTable_TaxClass;
0267:     opm_Edit_ConfigDBTable08.Text := opmG_DBTable_Currencies;
0268:     opm_Edit_ConfigDBTable09.Text := opmG_DBTable_Configuration;
0269:     opm_Edit_ConfigDBTable10.Text := opmG_DBTable_ProductsToCategories;
0270:     opm_Edit_ConfigDBTable11.Text := opmG_DBTable_CategoriesDescription;
0271:     opm_Edit_ConfigDBTable13.Text := opmG_DBTable_TaxRates;
0272:     opm_Edit_ConfigDBTable14.Text := opmG_DBTable_ManufacturersInfo;
0273:     opm_ComboBox_ConfigUsername.Text := opmG_DBUsername;
0274:     opm_ComboBox_ConfigImgURL.Text := opmG_WBImgURL;
0275:     opm_ComboBox_ConfigUploadURL.Text := opmG_WBUploadURL;
0276:     opm_ComboBox_ConfigHost.Items := opmG_PastHost_BoxList;
0277:     opm_ComboBox_ConfigDatabase.Items := opmG_PastDatabase_BoxList;
0278:     opm_ComboBox_ConfigUsername.Items := opmG_PastUsername_BoxList;
0279:     opm_ComboBox_ConfigSSHUsername.Items := opmG_PastSSHUsername_BoxList;
0280:     opm_ComboBox_ConfigImgURL.Items := opmG_PastImgURL_BoxList;
0281:     opm_ComboBox_ConfigUploadURL.Items := opmG_PastUploadURL_BoxList;
0282:     opm_ComboBox_ConfigProxyHost.Items := opmG_PastProxy_BoxList;
0283:     opm_ComboBox_ConfigProxyHost.Text := opmG_WBProxyHost;
0284:     opm_Edit_ConfigPassword.Text := opmG_DBPassword;
0285:     opm_ComboBox_ConfigProtocol.Text := opmG_DBProtocol;
0286:     opm_ComboBox_ConfigETABase.Text := INTTOSTR (opmG_ETABase) + ' kbps';
0287:     opm_SpinEdit_ConfigPort.Value := opmG_DBPort;
0288:     opm_SpinEdit_ConfigProxyPort.Value := opmG_WBProxyPort;
0289:     opm_SpinEdit_ConfigDBConnWait.Value := opmG_DBConnWait;
0290:     opm_SpinEdit_ConfigModConnWait.Value := opmG_ModConnWait;
0291:     opm_SpinEdit_ConfigSSHConnWait.Value := opmG_SSHConnWait;
0292:     opm_SpinEdit_ConfigHTTPConnWait.Value := opmG_HTTPConnWait;
0293:     opm_SpinEdit_ConfigDBConnRetries.Value := opmG_DBConnRetries;
0294:     opm_SpinEdit_ConfigModConnRetries.Value := opmG_ModConnRetries;
0295:     opm_SpinEdit_ConfigImgX.Value := opmG_WBImgX;
0296:     opm_SpinEdit_ConfigImgY.Value := opmG_WBImgY;
0297:     opm_SpinEdit_ConfigImgQ.Value := opmG_WBImgQ;
0298:     opm_Label_ConfigJPEGQCategory.Caption := FNopm_QualityExplain (opmG_WBImgQ);
0299:     opm_Panel_ConfigColSel.Color := FNopm_DecColorToColor (opmG_WBPaddingColor);
0300:     opm_Panel_ConfigColSel.Caption := FNopm_ColorToRGB (opm_Panel_ConfigColSel.Color);
0301:     opm_PageControl_Config.ActivePageIndex := 0;
0302:     IF (opmG_UIHotTracking > 0) THEN opm_CheckBox_ConfigHotTrack.Checked := TRUE ELSE opm_CheckBox_ConfigHotTrack.Checked := FALSE;
0303:     IF (opmG_UIRememberDisplay > 0) THEN opm_CheckBox_ConfigRemember.Checked := TRUE ELSE opm_CheckBox_ConfigRemember.Checked := FALSE;
0304:     IF (opmG_UIClickLoad > 0) THEN opm_CheckBox_ConfigAutoload.Checked := TRUE ELSE opm_CheckBox_ConfigAutoload.Checked := FALSE;
0305:     IF (opmG_UIDragDrop > 0) THEN opm_CheckBox_ConfigDragDrop.Checked := TRUE ELSE opm_CheckBox_ConfigDragDrop.Checked := FALSE;
0306:     IF (opmG_UIImgDragDrop > 0) THEN opm_CheckBox_ConfigDragUps.Checked := TRUE ELSE opm_CheckBox_ConfigDragUps.Checked := FALSE;
0307:     IF (opmG_UIToolTips > 0) THEN opm_CheckBox_ConfigTooltips.Checked := TRUE ELSE opm_CheckBox_ConfigTooltips.Checked := FALSE;
0308:     IF (opmG_UIStripes > 0) THEN opm_CheckBox_ConfigStripes.Checked := TRUE ELSE opm_CheckBox_ConfigStripes.Checked := FALSE;
0309:     IF (opmG_UICacheIList > 0) THEN opm_CheckBox_ConfigCacheIList.Checked := TRUE ELSE opm_CheckBox_ConfigCacheIList.Checked := FALSE;
0310:     IF (opmG_DBCompress > 0) THEN opm_CheckBox_ConfigCompress.Checked := TRUE ELSE opm_CheckBox_ConfigCompress.Checked := FALSE;
0311:     IF (opmG_UseProxy > 0) THEN opm_CheckBox_ConfigUseProxy.Checked := TRUE ELSE opm_CheckBox_ConfigUseProxy.Checked := FALSE;
0312:     opm_ComboBox_ConfigProxyApply.ItemIndex := opmG_ProxyApply;
0313:     IF (opmG_UseSSH > 0) THEN opm_CheckBox_ConfigUseSSH.Checked := TRUE ELSE opm_CheckBox_ConfigUseSSH.Checked := FALSE;
0314:     opm_SpinEdit_ConfigSSHLocalPort.Value := opmG_SSHLocalPort;
0315:     opm_ComboBox_ConfigSSHUsername.Text := opmG_SSHUsername;
0316:     opm_Edit_ConfigSSHPassword.Text := opmG_SSHPassword;
0317:     IF (opmG_DBStorePass > 0) THEN opm_CheckBox_ConfigStorePass.Checked := TRUE ELSE opm_CheckBox_ConfigStorePass.Checked := FALSE;
0318:     IF (opmG_UISilent > 0) THEN opm_CheckBox_ConfigSilent.Checked := TRUE ELSE opm_CheckBox_ConfigSilent.Checked := FALSE;
0319:     IF (FNopm_CheckSound = TRUE) THEN opm_CheckBox_ConfigSilent.Enabled := TRUE ELSE opm_CheckBox_ConfigSilent.Enabled := FALSE;
0320:     IF (opmG_UIConfirmDels > 0) THEN opm_CheckBox_ConfigConfirmDels.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmDels.Checked := FALSE;
0321:     IF (opmG_UIConfirmDrag > 0) THEN opm_CheckBox_ConfigConfirmDrag.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmDrag.Checked := FALSE;
0322:     IF (opmG_UIConfirmMods > 0) THEN opm_CheckBox_ConfigConfirmMods.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmMods.Checked := FALSE;
0323:     IF (opmG_UIAllowZeroPrice > 0) THEN opm_CheckBox_ConfigAllowZeroPrice.Checked := TRUE ELSE opm_CheckBox_ConfigAllowZeroPrice.Checked := FALSE;
0324:     IF (opmG_UIAllowEditImageName > 0) THEN opm_CheckBox_ConfigAllowEditImageName.Checked := TRUE ELSE opm_CheckBox_ConfigAllowEditImageName.Checked := FALSE;
0325:     IF (opmG_UIAllowNegativeQuantity > 0) THEN opm_CheckBox_ConfigAllowNegativeQuantity.Checked := TRUE ELSE opm_CheckBox_ConfigAllowNegativeQuantity.Checked := FALSE;
0326:     IF (opmG_UIAutoDownImg > 0) THEN opm_CheckBox_ConfigAutoDownImg.Checked := TRUE ELSE opm_CheckBox_ConfigAutoDownImg.Checked := FALSE;
0327:     opm_FontDialog_Config.Font.Name := opmG_UIFontName;
0328:     opm_FontDialog_Config.Font.Height := opmG_UIFontHeight;
0329:     opm_FontDialog_Config.Font.Charset := opmG_UIFontCharset;
0330:     opm_FontDialog_Config.Font.Style := opmC_DefaultFontStyle;
0331:     opm_Label_ConfigFontDetails.Font := opm_FontDialog_Config.Font;
0332:     opm_Label_ConfigFontDetails.Caption := opmG_UIFontName + ', ' +
0333:                                            INTTOSTR (ROUND ((opmG_UIFontHeight * -72) / opm_FontDialog_Config.Font.PixelsPerInch)) + ', ' +
0334:                                            opmG_CharsetList [opmG_UIFontCharset];
0335:     opm_SpinEdit_Config_ClipColSize.Value := opmG_Clip_ColSize;
0336:     IF (opmG_PRNDirectPrint > 0) THEN opm_CheckBox_ConfigPRNDirectPrint.Checked := TRUE ELSE opm_CheckBox_ConfigPRNDirectPrint.Checked := FALSE;
0337:     IF (opmG_WBNoCacheImg > 0) THEN opm_CheckBox_ConfigNoCacheImg.Checked := TRUE ELSE opm_CheckBox_ConfigNoCacheImg.Checked := FALSE;
0338:     IF (opmG_WBResizeImg > 0) THEN opm_CheckBox_ConfigResizeImg.Checked := TRUE ELSE opm_CheckBox_ConfigResizeImg.Checked := FALSE;
0339:     IF (opmG_WBPaddingImg > 0) THEN opm_CheckBox_ConfigPaddingImg.Checked := TRUE ELSE opm_CheckBox_ConfigPaddingImg.Checked := FALSE;
0340:     IF (opmG_WBKeepARImg > 0) THEN opm_CheckBox_ConfigKeepARImg.Checked := TRUE ELSE opm_CheckBox_ConfigKeepARImg.Checked := FALSE;
0341:     IF (opmG_UIConfirmExit > 0) THEN opm_CheckBox_ConfigConfirmExit.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmExit.Checked := FALSE;
0342:     IF (opmG_DBDebugLog > 0) THEN opm_CheckBox_ConfigDBDebugLog.Checked := TRUE ELSE opm_CheckBox_ConfigDBDebugLog.Checked := FALSE;
0343:     IF (opmG_UISSHDebug > 0) THEN opm_CheckBox_ConfigSSHDebug.Checked := TRUE ELSE opm_CheckBox_ConfigSSHDebug.Checked := FALSE;
0344:     IF (opmG_UIWBDebug > 0) THEN opm_CheckBox_ConfigWBDebug.Checked := TRUE ELSE opm_CheckBox_ConfigWBDebug.Checked := FALSE;
0345:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0346:       FOR UILang := 0 TO opm_ComboBox_ConfigUILang.Items.Count DO
0347:         IF (ANSIPOS ('(' + opmG_UIGUILang + ')', opm_ComboBox_ConfigUILang.Items[UILang]) > 0) THEN
0348:           BEGIN
0349:             opm_ComboBox_ConfigUILang.ItemIndex := UILang;
0350:             BREAK;
0351:           END;
0352:   end;
0353:   
0354:   
0355:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0356:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0357:   PROCEDURE Topm_Form_Config.FormShow(Sender: TObject);
0358:   BEGIN
0359:     opm_Form_Config.Caption := _('Settings of ') + opmC_AppShortName;
0360:     opm_ComboBox_ConfigUILang.Items.Clear;
0361:     DefaultInstance.GetListOfLanguages ('default', opm_ComboBox_ConfigUILang.Items);
0362:     opm_ComboBox_ConfigUILang.Sorted := TRUE;
0363:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0364:       BEGIN
0365:         DefaultInstance.BindtextdomainToFile ('isotolanguagenames', ExtractFilePath (Application.Exename) + 'locale/isotolanguagenames.mo');
0366:         DefaultInstance.TranslateProperties (opm_ComboBox_ConfigUILang, 'isotolanguagenames');
0367:         opm_ComboBox_ConfigUILang.Enabled := TRUE;
0368:       END
0369:     ELSE
0370:       opm_ComboBox_ConfigUILang.Enabled := FALSE;
0371:     opm_Label_ConfigUILangDesc.Caption := _('Do you want to contribute with a translation in your native language?') + #13#10 +
0372:                                           _('It is very easy, and you don''t have to be a programmer to do it.') + #13#10 +
0373:                                           _('Please visit the website for more information.');
0374:     PRopm_VarsToControls;
0375:     opm_Label_ConfigImgResize.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0376:     opm_CheckBox_ConfigPaddingImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0377:     opm_CheckBox_ConfigKeepARImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0378:     opm_SpinEdit_ConfigImgX.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0379:     opm_SpinEdit_ConfigImgY.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0380:     opm_Panel_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0381:     opm_BitBtn_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0382:     opm_SpinEdit_ConfigImgQ.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0383:     opm_Label_ConfigImgJPEGQuality.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0384:     opm_Label_ConfigJPEGQCategory.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0385:     opm_ComboBox_ConfigProxyApply.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0386:     opm_ComboBox_ConfigProxyHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0387:     opm_SpinEdit_ConfigProxyPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0388:     opm_BitBtn_ConfigProxyIE.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0389:     opm_Label_ConfigPHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0390:     opm_Label_ConfigPPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
0391:     opm_Edit_ConfigSSHPassword.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0392:     opm_SpinEdit_ConfigSSHLocalPort.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0393:     opm_ComboBox_ConfigSSHUsername.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0394:     opm_Label_ConfigSSHPassword.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0395:     opm_Label_ConfigSSHPort.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0396:     opm_Label_ConfigSSHUsername.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0397:     opm_SpinEdit_ConfigSSHConnWait.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0398:     opm_Label_ConfigSSHConnWait.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0399:     opm_BitBtn_ConfigTestSSH.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0400:     opm_Edit_ConfigPLinkCall.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0401:     PRopm_UpdateTunnelCall;
0402:     opm_BitBtn_ConfigModDel.Enabled := FALSE;
0403:     opm_BitBtn_ConfigModEdit.Enabled := FALSE;
0404:     opm_PRRefresh_ModuleList (-1);
0405:     opm_ListBox_ConfigMods.ScrollWidth := ROUND (opm_ListBox_ConfigMods.Width * 1.5);
0406:     opm_BitBtn_ConfigReportEdit.Enabled := FALSE;
0407:     opm_BitBtn_ConfigReportPreview.Enabled := FALSE;
0408:     opm_PRRefresh_ReportList (-1);
0409:     opm_ListBox_ConfigReports.ScrollWidth := ROUND (opm_ListBox_ConfigReports.Width * 1.5);
0410:     opm_Label_ConfigDBTable01.Caption := opmC_Def_DBTable_Categories;
0411:     opm_Label_ConfigDBTable02.Caption := opmC_Def_DBTable_Manufacturers;
0412:     opm_Label_ConfigDBTable03.Caption := opmC_Def_DBTable_Languages;
0413:     opm_Label_ConfigDBTable04.Caption := opmC_Def_DBTable_Products;
0414:     opm_Label_ConfigDBTable05.Caption := opmC_Def_DBTable_Specials;
0415:     opm_Label_ConfigDBTable06.Caption := opmC_Def_DBTable_ProductsDescription;
0416:     opm_Label_ConfigDBTable07.Caption := opmC_Def_DBTable_TaxClass;
0417:     opm_Label_ConfigDBTable08.Caption := opmC_Def_DBTable_Currencies;
0418:     opm_Label_ConfigDBTable09.Caption := opmC_Def_DBTable_Configuration;
0419:     opm_Label_ConfigDBTable10.Caption := opmC_Def_DBTable_ProductsToCategories;
0420:     opm_Label_ConfigDBTable11.Caption := opmC_Def_DBTable_CategoriesDescription;
0421:     opm_Label_ConfigDBTable13.Caption := opmC_Def_DBTable_TaxRates;
0422:     opm_Label_ConfigDBTable14.Caption := opmC_Def_DBTable_ManufacturersInfo;
0423:   END;
0424:   
0425:   
0426:   
0427:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0428:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0429:   PROCEDURE Topm_Form_Config.PRopm_ControlToVars;
0430:   VAR
0431:     LangUIStr : STRING;
0432:   BEGIN
0433:     opmG_DBHost := FNopm_CleanHostName (opm_ComboBox_ConfigHost.Text);
0434:     opmG_PDFAuthor := TRIM (opm_Edit_ConfigPDFAuthor.Text);
0435:     opmG_DBDatabase := TRIM (opm_ComboBox_ConfigDatabase.Text);
0436:     opmG_DBTable_Categories := TRIM (opm_Edit_ConfigDBTable01.Text);
0437:     opmG_DBTable_Manufacturers := TRIM (opm_Edit_ConfigDBTable02.Text);
0438:     opmG_DBTable_Languages := TRIM (opm_Edit_ConfigDBTable03.Text);
0439:     opmG_DBTable_Products := TRIM (opm_Edit_ConfigDBTable04.Text);
0440:     opmG_DBTable_Specials := TRIM (opm_Edit_ConfigDBTable05.Text);
0441:     opmG_DBTable_ProductsDescription := TRIM (opm_Edit_ConfigDBTable06.Text);
0442:     opmG_DBTable_TaxClass := TRIM (opm_Edit_ConfigDBTable07.Text);
0443:     opmG_DBTable_Currencies := TRIM (opm_Edit_ConfigDBTable08.Text);
0444:     opmG_DBTable_Configuration := TRIM (opm_Edit_ConfigDBTable09.Text);
0445:     opmG_DBTable_ProductsToCategories := TRIM (opm_Edit_ConfigDBTable10.Text);
0446:     opmG_DBTable_CategoriesDescription := TRIM (opm_Edit_ConfigDBTable11.Text);
0447:     opmG_DBTable_TaxRates := TRIM (opm_Edit_ConfigDBTable13.Text);
0448:     opmG_DBTable_ManufacturersInfo := TRIM (opm_Edit_ConfigDBTable14.Text);
0449:     opmG_DBUsername := TRIM (opm_ComboBox_ConfigUsername.Text);
0450:     opmG_DBPassword := TRIM (opm_Edit_ConfigPassword.Text);
0451:     opmG_WBImgURL := FNopm_FixURL (opm_ComboBox_ConfigImgURL.Text);
0452:     opmG_WBUploadURL := FNopm_FixURL (opm_ComboBox_ConfigUploadURL.Text);
0453:     opmG_WBProxyHost := FNopm_CleanHostName (opm_ComboBox_ConfigProxyHost.Text);
0454:     IF (opmG_WBImgURL[LENGTH (opmG_WBImgURL)] <> '/') THEN opmG_WBImgURL := opmG_WBImgURL + '/';
0455:     opmG_DBProtocol := TRIM (opm_ComboBox_ConfigProtocol.Text);
0456:     opmG_ETABase := FNopm_StrToInt (opm_ComboBox_ConfigETABase.Text);
0457:     opmG_DBPort := ABS (opm_SpinEdit_ConfigPort.Value);
0458:     opmG_WBProxyPort := ABS (opm_SpinEdit_ConfigProxyPort.Value);
0459:     opmG_DBConnWait := ABS (ROUND ((opm_SpinEdit_ConfigDBConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0460:     opmG_ModConnWait := ABS (ROUND ((opm_SpinEdit_ConfigModConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0461:     opmG_SSHConnWait := ABS (ROUND ((opm_SpinEdit_ConfigSSHConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0462:     opmG_HTTPConnWait := ABS (ROUND ((opm_SpinEdit_ConfigHTTPConnWait.Value + 1) / opmC_MiliSecIncrement) * opmC_MiliSecIncrement);
0463:     opmG_DBConnRetries := ABS (opm_SpinEdit_ConfigDBConnRetries.Value);
0464:     opmG_ModConnRetries := ABS (opm_SpinEdit_ConfigModConnRetries.Value);
0465:     opmG_WBImgX := ABS (opm_SpinEdit_ConfigImgX.Value);
0466:     opmG_WBImgY := ABS (opm_SpinEdit_ConfigImgY.Value);
0467:     opmG_WBImgQ := ABS (opm_SpinEdit_ConfigImgQ.Value);
0468:     IF (opm_CheckBox_ConfigHotTrack.Checked = TRUE) THEN opmG_UIHotTracking := 1 ELSE opmG_UIHotTracking := 0;
0469:     IF (opm_CheckBox_ConfigRemember.Checked = TRUE) THEN opmG_UIRememberDisplay := 1 ELSE opmG_UIRememberDisplay := 0;
0470:     IF (opm_CheckBox_ConfigAutoload.Checked = TRUE) THEN opmG_UIClickLoad := 1 ELSE opmG_UIClickLoad := 0;
0471:     IF (opm_CheckBox_ConfigDragDrop.Checked = TRUE) THEN opmG_UIDragDrop := 1 ELSE opmG_UIDragDrop := 0;
0472:     IF (opm_CheckBox_ConfigDragUps.Checked = TRUE) THEN opmG_UIImgDragDrop := 1 ELSE opmG_UIImgDragDrop := 0;
0473:     IF (opm_CheckBox_ConfigToolTips.Checked = TRUE) THEN opmG_UIToolTips := 1 ELSE opmG_UIToolTips := 0;
0474:     IF (opm_CheckBox_ConfigStripes.Checked = TRUE) THEN opmG_UIStripes := 1 ELSE opmG_UIStripes := 0;
0475:     IF (opm_CheckBox_ConfigCacheIList.Checked = TRUE) THEN opmG_UICacheIList := 1 ELSE opmG_UICacheIList := 0;
0476:     IF (opm_CheckBox_ConfigCompress.Checked = TRUE) THEN opmG_DBCompress := 1 ELSE opmG_DBCompress := 0;
0477:     IF (opm_CheckBox_ConfigUseProxy.Checked = TRUE) THEN opmG_UseProxy := 1 ELSE opmG_UseProxy := 0;
0478:     IF (opm_ComboBox_ConfigProxyApply.ItemIndex >= 0) THEN opmG_ProxyApply := opm_ComboBox_ConfigProxyApply.ItemIndex ELSE opmG_ProxyApply := opmC_Def_ProxyApply; 
0479:     IF (opm_CheckBox_ConfigUseSSH.Checked = TRUE) THEN opmG_UseSSH := 1 ELSE opmG_UseSSH := 0;
0480:     opmG_SSHLocalPort := ABS (opm_SpinEdit_ConfigSSHLocalPort.Value);
0481:     opmG_SSHUsername := TRIM (opm_ComboBox_ConfigSSHUsername.Text);
0482:     opmG_SSHPassword := TRIM (opm_Edit_ConfigSSHPassword.Text);
0483:     IF (opm_CheckBox_ConfigStorePass.Checked = TRUE) THEN opmG_DBStorePass := 1 ELSE opmG_DBStorePass := 0;
0484:     IF (opm_CheckBox_ConfigSilent.Checked = TRUE) THEN opmG_UISilent := 1 ELSE opmG_UISilent := 0;
0485:     IF (opm_CheckBox_ConfigConfirmDels.Checked = TRUE) THEN opmG_UIConfirmDels := 1 ELSE opmG_UIConfirmDels := 0;
0486:     IF (opm_CheckBox_ConfigConfirmDrag.Checked = TRUE) THEN opmG_UIConfirmDrag := 1 ELSE opmG_UIConfirmDrag := 0;
0487:     IF (opm_CheckBox_ConfigConfirmMods.Checked = TRUE) THEN opmG_UIConfirmMods := 1 ELSE opmG_UIConfirmMods := 0;
0488:     IF (opm_CheckBox_ConfigAllowZeroPrice.Checked = TRUE) THEN opmG_UIAllowZeroPrice := 1 ELSE opmG_UIAllowZeroPrice := 0;
0489:     IF (opm_CheckBox_ConfigAllowEditImageName.Checked = TRUE) THEN opmG_UIAllowEditImageName := 1 ELSE opmG_UIAllowEditImageName := 0;
0490:     IF (opm_CheckBox_ConfigAllowNegativeQuantity.Checked = TRUE) THEN opmG_UIAllowNegativeQuantity := 1 ELSE opmG_UIAllowNegativeQuantity := 0;
0491:     IF (opm_CheckBox_ConfigAutoDownImg.Checked = TRUE) THEN opmG_UIAutoDownImg := 1 ELSE opmG_UIAutoDownImg := 0;
0492:     opmG_UIFontName := opm_FontDialog_Config.Font.Name;
0493:     opmG_UIFontHeight := opm_FontDialog_Config.Font.Height;
0494:     opmG_UIFontCharset := opm_FontDialog_Config.Font.Charset;
0495:     opmG_Clip_ColSize := ABS (opm_SpinEdit_Config_ClipColSize.Value);
0496:     IF (opm_CheckBox_ConfigPRNDirectPrint.Checked = TRUE) THEN opmG_PRNDirectPrint := 1 ELSE opmG_PRNDirectPrint := 0;
0497:     IF (opm_CheckBox_ConfigNoCacheImg.Checked = TRUE) THEN opmG_WBNoCacheImg := 1 ELSE opmG_WBNoCacheImg := 0;
0498:     IF (opm_CheckBox_ConfigResizeImg.Checked = TRUE) THEN opmG_WBResizeImg := 1 ELSE opmG_WBResizeImg := 0;
0499:     IF (opm_CheckBox_ConfigPaddingImg.Checked = TRUE) THEN opmG_WBPaddingImg := 1 ELSE opmG_WBPaddingImg := 0;
0500:     IF (opm_CheckBox_ConfigKeepARImg.Checked = TRUE) THEN opmG_WBKeepARImg := 1 ELSE opmG_WBKeepARImg := 0;
0501:     IF (opm_CheckBox_ConfigConfirmExit.Checked = TRUE) THEN opmG_UIConfirmExit := 1 ELSE opmG_UIConfirmExit := 0;
0502:     IF (opm_CheckBox_ConfigDBDebugLog.Checked = TRUE) THEN opmG_DBDebugLog := 1 ELSE opmG_DBDebugLog := 0;
0503:     IF (opm_CheckBox_ConfigSSHDebug.Checked = TRUE) THEN opmG_UISSHDebug := 1 ELSE opmG_UISSHDebug := 0;
0504:     IF (opm_CheckBox_ConfigWBDebug.Checked = TRUE) THEN opmG_UIWBDebug := 1 ELSE opmG_UIWBDebug := 0;
0505:     LangUIStr := opm_ComboBox_ConfigUILang.Items[opm_ComboBox_ConfigUILang.ItemIndex];
0506:     IF (opm_ComboBox_ConfigUILang.Items.Count > 0) THEN
0507:       opmG_UIGUILang := COPY (LangUIStr, ANSIPOS ('(', LangUIStr) + 1, ANSIPOS (')', LangUIStr) - ANSIPOS ('(', LangUIStr) - 1)
0508:     ELSE
0509:       opmG_UIGUILang := opmC_Def_GUILang;
0510:   END;
0511:   
0512:   
0513:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0514:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0515:   procedure Topm_Form_Config.opm_BitBtn_ConfigOkClick(Sender: TObject);
0516:   begin
0517:     PRopm_ControlToVars;
0518:     PRReg_WriteSetting ('OSCHost', opmG_DBHost, opmC_RegistryKey, opmC_RKConfig);
0519:     PRReg_WriteSetting ('OSCProtocol', opmG_DBProtocol, opmC_RegistryKey, opmC_RKConfig);
0520:     PRReg_WriteSetting ('OSCETABase', INTTOSTR (opmG_ETABase), opmC_RegistryKey, opmC_RKConfig);
0521:     PRReg_WriteSetting ('OSCPDFAuthor', opmG_PDFAuthor, opmC_RegistryKey, opmC_RKConfig);
0522:     PRReg_WriteSetting ('OSCDatabase', opmG_DBDatabase, opmC_RegistryKey, opmC_RKConfig);
0523:     PRReg_WriteSetting ('OSCTable01', opmG_DBTable_Categories, opmC_RegistryKey, opmC_RKConfig);
0524:     PRReg_WriteSetting ('OSCTable02', opmG_DBTable_Manufacturers, opmC_RegistryKey, opmC_RKConfig);
0525:     PRReg_WriteSetting ('OSCTable03', opmG_DBTable_Languages, opmC_RegistryKey, opmC_RKConfig);
0526:     PRReg_WriteSetting ('OSCTable04', opmG_DBTable_Products, opmC_RegistryKey, opmC_RKConfig);
0527:     PRReg_WriteSetting ('OSCTable05', opmG_DBTable_Specials, opmC_RegistryKey, opmC_RKConfig);
0528:     PRReg_WriteSetting ('OSCTable06', opmG_DBTable_ProductsDescription, opmC_RegistryKey, opmC_RKConfig);
0529:     PRReg_WriteSetting ('OSCTable07', opmG_DBTable_TaxClass, opmC_RegistryKey, opmC_RKConfig);
0530:     PRReg_WriteSetting ('OSCTable08', opmG_DBTable_Currencies, opmC_RegistryKey, opmC_RKConfig);
0531:     PRReg_WriteSetting ('OSCTable09', opmG_DBTable_Configuration, opmC_RegistryKey, opmC_RKConfig);
0532:     PRReg_WriteSetting ('OSCTable10', opmG_DBTable_ProductsToCategories, opmC_RegistryKey, opmC_RKConfig);
0533:     PRReg_WriteSetting ('OSCTable11', opmG_DBTable_CategoriesDescription, opmC_RegistryKey, opmC_RKConfig);
0534:     PRReg_WriteSetting ('OSCTable13', opmG_DBTable_TaxRates, opmC_RegistryKey, opmC_RKConfig);
0535:     PRReg_WriteSetting ('OSCTable14', opmG_DBTable_ManufacturersInfo, opmC_RegistryKey, opmC_RKConfig);
0536:     PRReg_WriteSetting ('OSCUsername', opmG_DBUsername, opmC_RegistryKey, opmC_RKConfig);
0537:     IF (opmG_DBStorePass > 0) THEN
0538:       PRReg_WriteSetting ('OSCPassword', opmG_DBPassword, opmC_RegistryKey, opmC_RKConfig)
0539:     ELSE
0540:       PRReg_WriteSetting ('OSCPassword', '', opmC_RegistryKey, opmC_RKConfig);
0541:     PRReg_WriteSetting ('OSCImgURL', opmG_WBImgURL, opmC_RegistryKey, opmC_RKConfig);
0542:     PRReg_WriteSetting ('OSCUploadURL', opmG_WBUploadURL, opmC_RegistryKey, opmC_RKConfig);
0543:     PRReg_WriteSetting ('OSCProxyHost', opmG_WBProxyHost, opmC_RegistryKey, opmC_RKConfig);
0544:     PRReg_WriteSetting ('OSCPort', IntToStr (opmG_DBPort), opmC_RegistryKey, opmC_RKConfig);
0545:     PRReg_WriteSetting ('OSCProxyPort', IntToStr (opmG_WBProxyPort), opmC_RegistryKey, opmC_RKConfig);
0546:     PRReg_WriteSetting ('OSCDBConnWait', IntToStr (opmG_DBConnWait), opmC_RegistryKey, opmC_RKConfig);
0547:     PRReg_WriteSetting ('OSCModConnWait', IntToStr (opmG_ModConnWait), opmC_RegistryKey, opmC_RKConfig);
0548:     PRReg_WriteSetting ('OSCSSHConnWait', IntToStr (opmG_SSHConnWait), opmC_RegistryKey, opmC_RKConfig);
0549:     PRReg_WriteSetting ('OSCHTTPConnWait', IntToStr (opmG_HTTPConnWait), opmC_RegistryKey, opmC_RKConfig);
0550:     PRReg_WriteSetting ('OSCDBConnRetries', IntToStr (opmG_DBConnRetries), opmC_RegistryKey, opmC_RKConfig);
0551:     PRReg_WriteSetting ('OSCModConnRetries', IntToStr (opmG_ModConnRetries), opmC_RegistryKey, opmC_RKConfig);
0552:     PRReg_WriteSetting ('OSCImgX', IntToStr (opmG_WBImgX), opmC_RegistryKey, opmC_RKConfig);
0553:     PRReg_WriteSetting ('OSCImgY', IntToStr (opmG_WBImgY), opmC_RegistryKey, opmC_RKConfig);
0554:     PRReg_WriteSetting ('OSCImgQ', IntToStr (opmG_WBImgQ), opmC_RegistryKey, opmC_RKConfig);
0555:     PRReg_WriteSetting ('OSCPaddingColor', IntToStr (opmG_WBPaddingColor), opmC_RegistryKey, opmC_RKConfig);
0556:     PRReg_WriteSetting ('OSCHotTracking', IntToStr (opmG_UIHotTracking), opmC_RegistryKey, opmC_RKConfig);
0557:     PRReg_WriteSetting ('OSCAutoLoad', IntToStr (opmG_UIClickLoad), opmC_RegistryKey, opmC_RKConfig);
0558:     PRReg_WriteSetting ('OSCDragDrop', IntToStr (opmG_UIDragDrop), opmC_RegistryKey, opmC_RKConfig);
0559:     PRReg_WriteSetting ('OSCImgDragDrop', IntToStr (opmG_UIImgDragDrop), opmC_RegistryKey, opmC_RKConfig);
0560:     PRReg_WriteSetting ('OSCToolTips', IntToStr (opmG_UIToolTips), opmC_RegistryKey, opmC_RKConfig);
0561:     PRReg_WriteSetting ('OSCStripes', IntToStr (opmG_UIStripes), opmC_RegistryKey, opmC_RKConfig);
0562:     PRReg_WriteSetting ('OSCCacheIList', IntToStr (opmG_UICacheIList), opmC_RegistryKey, opmC_RKConfig);
0563:     PRReg_WriteSetting ('OSCCompress', IntToStr (opmG_DBCompress), opmC_RegistryKey, opmC_RKConfig);
0564:     PRReg_WriteSetting ('OSCUseProxy', IntToStr (opmG_UseProxy), opmC_RegistryKey, opmC_RKConfig);
0565:     PRReg_WriteSetting ('OSCProxyApply', IntToStr (opmG_ProxyApply), opmC_RegistryKey, opmC_RKConfig);
0566:     PRReg_WriteSetting ('OSCUseSSH', IntToStr (opmG_UseSSH), opmC_RegistryKey, opmC_RKConfig);
0567:     PRReg_WriteSetting ('OSCSSHUsername', opmG_SSHUsername, opmC_RegistryKey, opmC_RKConfig);
0568:     IF (opmG_DBStorePass > 0) THEN
0569:       PRReg_WriteSetting ('OSCSSHPassword', opmG_SSHPassword, opmC_RegistryKey, opmC_RKConfig)
0570:     ELSE
0571:       PRReg_WriteSetting ('OSCSSHPassword', '', opmC_RegistryKey, opmC_RKConfig);
0572:     PRReg_WriteSetting ('OSCSSHLocalPort', IntToStr (opmG_SSHLocalPort), opmC_RegistryKey, opmC_RKConfig);
0573:     PRReg_WriteSetting ('OSCStorePass', IntToStr (opmG_DBStorePass), opmC_RegistryKey, opmC_RKConfig);
0574:     PRReg_WriteSetting ('OSCSilent', IntToStr (opmG_UISilent), opmC_RegistryKey, opmC_RKConfig);
0575:     PRReg_WriteSetting ('OSCConfirmDels', IntToStr (opmG_UIConfirmDels), opmC_RegistryKey, opmC_RKConfig);
0576:     PRReg_WriteSetting ('OSCConfirmDrag', IntToStr (opmG_UIConfirmDrag), opmC_RegistryKey, opmC_RKConfig);
0577:     PRReg_WriteSetting ('OSCConfirmMods', IntToStr (opmG_UIConfirmMods), opmC_RegistryKey, opmC_RKConfig);
0578:     PRReg_WriteSetting ('OSCAllowZeroPrice', IntToStr (opmG_UIAllowZeroPrice), opmC_RegistryKey, opmC_RKConfig);
0579:     PRReg_WriteSetting ('OSCAllowEditImageName', IntToStr (opmG_UIAllowEditImageName), opmC_RegistryKey, opmC_RKConfig);
0580:     PRReg_WriteSetting ('OSCAllowNegativeQuantity', IntToStr (opmG_UIAllowNegativeQuantity), opmC_RegistryKey, opmC_RKConfig);
0581:     PRReg_WriteSetting ('OSCAutoDownImg', IntToStr (opmG_UIAutoDownImg), opmC_RegistryKey, opmC_RKConfig);
0582:     PRReg_WriteSetting ('UIFontName', opmG_UIFontName, opmC_RegistryKey, opmC_RKVisual);
0583:     PRReg_WriteSetting ('UIFontHeight', INTTOSTR (opmG_UIFontHeight), opmC_RegistryKey, opmC_RKVisual);
0584:     PRReg_WriteSetting ('UIFontCharset', INTTOSTR (opmG_UIFontCharset), opmC_RegistryKey, opmC_RKVisual);
0585:     PRReg_WriteSetting ('Clip_ColSize', IntToStr (opmG_Clip_ColSize), opmC_RegistryKey, opmC_RKVisual);
0586:     PRReg_WriteSetting ('PRNDirectPrint', IntToStr (opmG_PRNDirectPrint), opmC_RegistryKey, opmC_RKVisual);
0587:     PRReg_WriteSetting ('PastAvailDate', INTTOSTR (opmG_Past_PAvailDate), opmC_RegistryKey, opmC_RKVisual);
0588:     PRReg_WriteSetting ('PastManufacturer', INTTOSTR (opmG_Past_PManufacturer), opmC_RegistryKey, opmC_RKVisual);
0589:     PRReg_WriteSetting ('PastTaxClass', INTTOSTR (opmG_Past_PTaxClass), opmC_RegistryKey, opmC_RKVisual);
0590:     PRReg_WriteSetting ('PastImageDir', opmG_Past_PImageDir, opmC_RegistryKey, opmC_RKVisual);
0591:     PRReg_WriteSetting ('OSCNoCacheImg', IntToStr (opmG_WBNoCacheImg), opmC_RegistryKey, opmC_RKConfig);
0592:     PRReg_WriteSetting ('OSCResizeImg', IntToStr (opmG_WBResizeImg), opmC_RegistryKey, opmC_RKConfig);
0593:     PRReg_WriteSetting ('OSCPaddingImg', IntToStr (opmG_WBPaddingImg), opmC_RegistryKey, opmC_RKConfig);
0594:     PRReg_WriteSetting ('OSCKeepARImg', IntToStr (opmG_WBKeepARImg), opmC_RegistryKey, opmC_RKConfig);
0595:     PRReg_WriteSetting ('OSCConfirmExit', IntToStr (opmG_UIConfirmExit), opmC_RegistryKey, opmC_RKConfig);
0596:     PRReg_WriteSetting ('OSCDBDebugLog', IntToStr (opmG_DBDebugLog), opmC_RegistryKey, opmC_RKConfig);
0597:     PRReg_WriteSetting ('OSCSSHDebug', IntToStr (opmG_UISSHDebug), opmC_RegistryKey, opmC_RKConfig);
0598:     PRReg_WriteSetting ('OSCWBDebug', IntToStr (opmG_UIWBDebug), opmC_RegistryKey, opmC_RKConfig);
0599:     PRReg_WriteSetting ('OSCRememberPosition', IntToStr (opmG_UIRememberDisplay), opmC_RegistryKey, opmC_RKConfig);
0600:     PRReg_WritePastList ('Host', opmC_RegistryKey, opmC_RKServers, opmG_DBHost, opmG_PastHost_BoxList, opmC_MaxPast_Servers);
0601:     PRReg_WritePastList ('Database', opmC_RegistryKey, opmC_RKServers, opmG_DBDatabase, opmG_PastDatabase_BoxList, opmC_MaxPast_Databases);
0602:     PRReg_WritePastList ('Username', opmC_RegistryKey, opmC_RKServers, opmG_DBUsername, opmG_PastUsername_BoxList, opmC_MaxPast_Usernames);
0603:     PRReg_WritePastList ('SSHUsername', opmC_RegistryKey, opmC_RKServers, opmG_SSHUsername, opmG_PastSSHUsername_BoxList, opmC_MaxPast_SSHUsernames);
0604:     PRReg_WritePastList ('ImgURL', opmC_RegistryKey, opmC_RKServers, opmG_WBImgURL, opmG_PastImgURL_BoxList, opmC_MaxPast_ImgURL);
0605:     PRReg_WritePastList ('UploadURL', opmC_RegistryKey, opmC_RKServers, opmG_WBUploadURL, opmG_PastUploadURL_BoxList, opmC_MaxPast_UploadURL);
0606:     PRReg_WritePastList ('Proxy', opmC_RegistryKey, opmC_RKServers, opmG_WBProxyHost, opmG_PastProxy_BoxList, opmC_MaxPast_Proxy);
0607:   end;
0608:   
0609:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0610:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0611:   procedure Topm_Form_Config.FormCreate(Sender: TObject);
0612:   begin
0613:     opm_SpinEdit_ConfigPort.MinValue := opmC_Min_Port;
0614:     opm_SpinEdit_ConfigPort.MaxValue := opmC_Max_Port;
0615:     opm_SpinEdit_ConfigProxyPort.MinValue := opmC_Min_ProxyPort;
0616:     opm_SpinEdit_ConfigProxyPort.MaxValue := opmC_Max_ProxyPort;
0617:     opm_SpinEdit_ConfigDBConnWait.MinValue := opmC_Min_DBConnWait;
0618:     opm_SpinEdit_ConfigDBConnWait.MaxValue := opmC_Max_DBConnWait;
0619:     opm_SpinEdit_ConfigDBConnWait.Increment := opmC_MiliSecIncrement;
0620:     opm_SpinEdit_ConfigModConnWait.MinValue := opmC_Min_ModConnWait;
0621:     opm_SpinEdit_ConfigModConnWait.MaxValue := opmC_Max_ModConnWait;
0622:     opm_SpinEdit_ConfigModConnWait.Increment := opmC_MiliSecIncrement;
0623:     opm_SpinEdit_ConfigSSHConnWait.MinValue := opmC_Min_SSHConnWait;
0624:     opm_SpinEdit_ConfigSSHConnWait.MaxValue := opmC_Max_SSHConnWait;
0625:     opm_SpinEdit_ConfigSSHConnWait.Increment := opmC_MiliSecIncrement;
0626:     opm_SpinEdit_ConfigHTTPConnWait.MinValue := opmC_Min_HTTPConnWait;
0627:     opm_SpinEdit_ConfigHTTPConnWait.MaxValue := opmC_Max_HTTPConnWait;
0628:     opm_SpinEdit_ConfigHTTPConnWait.Increment := opmC_MiliSecIncrement;
0629:     opm_SpinEdit_ConfigDBConnRetries.MinValue := opmC_Min_DBConnRetries;
0630:     opm_SpinEdit_ConfigDBConnRetries.MaxValue := opmC_Max_DBConnRetries;
0631:     opm_SpinEdit_ConfigModConnRetries.MinValue := opmC_Min_ModConnRetries;
0632:     opm_SpinEdit_ConfigModConnRetries.MaxValue := opmC_Max_ModConnRetries;
0633:     opm_SpinEdit_ConfigImgX.MinValue := opmC_Min_ImgX;
0634:     opm_SpinEdit_ConfigImgX.MaxValue := opmC_Max_ImgX;
0635:     opm_SpinEdit_ConfigImgY.MinValue := opmC_Min_ImgY;
0636:     opm_SpinEdit_ConfigImgY.MaxValue := opmC_Max_ImgY;
0637:     opm_SpinEdit_ConfigImgQ.MinValue := opmC_Min_ImgQ;
0638:     opm_SpinEdit_ConfigImgQ.MaxValue := opmC_Max_ImgQ;
0639:     opm_ComboBox_ConfigProtocol.Items.Text := opmC_SQLBackends;
0640:     opm_ComboBox_ConfigETABase.Items.Text := opmC_ETABitrates;
0641:     opm_ComboBox_ConfigProxyApply.Items.Text := _('For all web connections') + #13#10 + _('For OSCPM script only') + #13#10 + _('To check updates only') + #13#10;
0642:     opm_Edit_ConfigPassword.PasswordChar := opmC_PasswordChar;
0643:     opm_Edit_ConfigSSHPassword.PasswordChar := opmC_PasswordChar;
0644:     opm_Edit_ConfigPLinkCall.BorderStyle := bsNone;
0645:     opm_FontDialog_Config.MinFontSize := opmC_Min_FontHeight;
0646:     opm_FontDialog_Config.MaxFontSize := opmC_Max_FontHeight;
0647:     opm_SpinEdit_Config_ClipColSize.MinValue := opmC_Min_Clip_ColSize;
0648:     opm_SpinEdit_Config_ClipColSize.MaxValue := opmC_Max_Clip_ColSize;
0649:     IF (opmG_UIHotTracking > 0) THEN
0650:       opm_PageControl_Config.HotTrack := TRUE
0651:     ELSE
0652:       opm_PageControl_Config.HotTrack := FALSE;
0653:     TranslateComponent (self);
0654:   end;
0655:   
0656:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0657:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0658:   procedure Topm_Form_Config.opm_BitBtn_ConfigResetClick(Sender: TObject);
0659:   begin
0660:     IF (opmC_Def_HotTracking > 0) THEN opm_CheckBox_ConfigHotTrack.Checked := TRUE ELSE opm_CheckBox_ConfigHotTrack.Checked := FALSE;
0661:     IF (opmC_Def_RememberDisplay > 0) THEN opm_CheckBox_ConfigRemember.Checked := TRUE ELSE opm_CheckBox_ConfigRemember.Checked := FALSE;
0662:     IF (opmC_Def_AutoLoad > 0) THEN opm_CheckBox_ConfigAutoload.Checked := TRUE ELSE opm_CheckBox_ConfigAutoload.Checked := FALSE;
0663:     IF (opmC_Def_DragDrop > 0) THEN opm_CheckBox_ConfigDragDrop.Checked := TRUE ELSE opm_CheckBox_ConfigDragDrop.Checked := FALSE;
0664:     IF (opmC_Def_ImgDragDrop > 0) THEN opm_CheckBox_ConfigDragUps.Checked := TRUE ELSE opm_CheckBox_ConfigDragUps.Checked := FALSE;
0665:     IF (opmC_Def_Tooltips > 0) THEN opm_CheckBox_ConfigTooltips.Checked := TRUE ELSE opm_CheckBox_ConfigTooltips.Checked := FALSE;
0666:     IF (opmC_Def_Stripes > 0) THEN opm_CheckBox_ConfigStripes.Checked := TRUE ELSE opm_CheckBox_ConfigStripes.Checked := FALSE;
0667:     IF (opmC_Def_CacheIList > 0) THEN opm_CheckBox_ConfigCacheIList.Checked := TRUE ELSE opm_CheckBox_ConfigCacheIList.Checked := FALSE;
0668:     IF (opmC_Def_ConfirmDels > 0) THEN opm_CheckBox_ConfigConfirmDels.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmDels.Checked := FALSE;
0669:     IF (opmC_Def_ConfirmDrag > 0) THEN opm_CheckBox_ConfigConfirmDrag.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmDrag.Checked := FALSE;
0670:     IF (opmC_Def_ConfirmMods > 0) THEN opm_CheckBox_ConfigConfirmMods.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmMods.Checked := FALSE;
0671:     IF (opmC_Def_AllowZeroPrice > 0) THEN opm_CheckBox_ConfigAllowZeroPrice.Checked := TRUE ELSE opm_CheckBox_ConfigAllowZeroPrice.Checked := FALSE;
0672:     IF (opmC_Def_AllowEditImageName > 0) THEN opm_CheckBox_ConfigAllowEditImageName.Checked := TRUE ELSE opm_CheckBox_ConfigAllowEditImageName.Checked := FALSE;
0673:     IF (opmC_Def_AllowNegativeQuantity > 0) THEN opm_CheckBox_ConfigAllowNegativeQuantity.Checked := TRUE ELSE opm_CheckBox_ConfigAllowNegativeQuantity.Checked := FALSE;
0674:     IF (opmC_Def_AutoDownImg > 0) THEN opm_CheckBox_ConfigAutoDownImg.Checked := TRUE ELSE opm_CheckBox_ConfigAutoDownImg.Checked := FALSE;
0675:     IF (opmC_Def_NoCacheImg > 0) THEN opm_CheckBox_ConfigNoCacheImg.Checked := TRUE ELSE opm_CheckBox_ConfigNoCacheImg.Checked := FALSE;
0676:     IF (opmC_Def_ConfirmExit > 0) THEN opm_CheckBox_ConfigConfirmExit.Checked := TRUE ELSE opm_CheckBox_ConfigConfirmExit.Checked := FALSE;
0677:     IF (opmC_Def_DBDebugLog > 0) THEN opm_CheckBox_ConfigDBDebugLog.Checked := TRUE ELSE opm_CheckBox_ConfigDBDebugLog.Checked := FALSE;
0678:     IF (opmC_Def_SSHDebug > 0) THEN opm_CheckBox_ConfigSSHDebug.Checked := TRUE ELSE opm_CheckBox_ConfigSSHDebug.Checked := FALSE;
0679:     IF (opmC_Def_WBDebug > 0) THEN opm_CheckBox_ConfigWBDebug.Checked := TRUE ELSE opm_CheckBox_ConfigWBDebug.Checked := FALSE;
0680:   end;
0681:   
0682:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0683:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0684:   procedure Topm_Form_Config.opm_CheckBox_ConfigResizeImgClick (Sender: TObject);
0685:   begin
0686:     opm_Label_ConfigImgResize.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0687:     opm_CheckBox_ConfigPaddingImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0688:     opm_CheckBox_ConfigKeepARImg.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0689:     opm_SpinEdit_ConfigImgX.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0690:     opm_SpinEdit_ConfigImgY.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0691:     opm_Panel_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0692:     opm_BitBtn_ConfigColSel.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0693:     opm_SpinEdit_ConfigImgQ.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0694:     opm_Label_ConfigImgJPEGQuality.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0695:     opm_Label_ConfigJPEGQCategory.Enabled := opm_CheckBox_ConfigResizeImg.Checked;
0696:   end;
0697:   
0698:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0699:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0700:   procedure Topm_Form_Config.opm_BitBtn_ConfigSaveINIClick(Sender: TObject);
0701:   begin
0702:     opm_SaveDialog_ConfigINI.DefaultExt := opmC_Def_SaveINIExt;
0703:     opm_SaveDialog_ConfigINI.FileName := opmC_Def_SaveINIFilename;
0704:     opm_SaveDialog_ConfigINI.Filter := _('Configuration files') + ' (' + opmC_Def_SaveINIFilter + ')|' + opmC_Def_SaveINIFilter + '|' + _('All files (*.*)');
0705:     opm_SaveDialog_ConfigINI.Title := _('Saving configuration file...');
0706:     opm_SaveDialog_ConfigINI.InitialDir := ExtractFilePath (Application.Exename);
0707:     IF (opm_SaveDialog_ConfigINI.Execute = TRUE) THEN
0708:       BEGIN
0709:         PRopm_ControlToVars;
0710:         PRINI_WriteSetting ('OSCHost', opmG_DBHost, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0711:         PRINI_WriteSetting ('OSCProtocol', opmG_DBProtocol, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0712:         PRINI_WriteSetting ('OSCETABase', INTTOSTR (opmG_ETABase), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0713:         PRINI_WriteSetting ('OSCPDFAuthor', opmG_PDFAuthor, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0714:         PRINI_WriteSetting ('OSCDatabase', opmG_DBDatabase, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0715:         PRINI_WriteSetting ('OSCTable01', opmG_DBTable_Categories, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0716:         PRINI_WriteSetting ('OSCTable02', opmG_DBTable_Manufacturers, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0717:         PRINI_WriteSetting ('OSCTable03', opmG_DBTable_Languages, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0718:         PRINI_WriteSetting ('OSCTable04', opmG_DBTable_Products, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0719:         PRINI_WriteSetting ('OSCTable05', opmG_DBTable_Specials, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0720:         PRINI_WriteSetting ('OSCTable06', opmG_DBTable_ProductsDescription, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0721:         PRINI_WriteSetting ('OSCTable07', opmG_DBTable_TaxClass, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0722:         PRINI_WriteSetting ('OSCTable08', opmG_DBTable_Currencies, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0723:         PRINI_WriteSetting ('OSCTable09', opmG_DBTable_Configuration, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0724:         PRINI_WriteSetting ('OSCTable10', opmG_DBTable_ProductsToCategories, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0725:         PRINI_WriteSetting ('OSCTable11', opmG_DBTable_CategoriesDescription, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0726:         PRINI_WriteSetting ('OSCTable13', opmG_DBTable_TaxRates, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0727:         PRINI_WriteSetting ('OSCTable14', opmG_DBTable_ManufacturersInfo, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0728:         PRINI_WriteSetting ('OSCUsername', opmG_DBUsername, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0729:         IF (opmG_DBStorePass > 0) THEN
0730:           PRINI_WriteSetting ('OSCPassword', opmG_DBPassword, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig)
0731:         ELSE
0732:           PRINI_WriteSetting ('OSCPassword', '', opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0733:         PRINI_WriteSetting ('OSCImgURL', opmG_WBImgURL, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0734:         PRINI_WriteSetting ('OSCUploadURL', opmG_WBUploadURL, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0735:         PRINI_WriteSetting ('OSCProxyHost', opmG_WBProxyHost, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0736:         PRINI_WriteSetting ('OSCPort', IntToStr (opmG_DBPort), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0737:         PRINI_WriteSetting ('OSCProxyPort', IntToStr (opmG_WBProxyPort), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0738:         PRINI_WriteSetting ('OSCDBConnWait', IntToStr (opmG_DBConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0739:         PRINI_WriteSetting ('OSCModConnWait', IntToStr (opmG_ModConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0740:         PRINI_WriteSetting ('OSCSSHConnWait', IntToStr (opmG_SSHConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0741:         PRINI_WriteSetting ('OSCHTTPConnWait', IntToStr (opmG_HTTPConnWait), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0742:         PRINI_WriteSetting ('OSCDBConnRetries', IntToStr (opmG_DBConnRetries), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0743:         PRINI_WriteSetting ('OSCModConnRetries', IntToStr (opmG_ModConnRetries), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0744:         PRINI_WriteSetting ('OSCImgX', IntToStr (opmG_WBImgX), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0745:         PRINI_WriteSetting ('OSCImgY', IntToStr (opmG_WBImgY), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0746:         PRINI_WriteSetting ('OSCImgQ', IntToStr (opmG_WBImgQ), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0747:         PRINI_WriteSetting ('OSCPaddingColor', IntToStr (opmG_WBPaddingColor), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0748:         PRINI_WriteSetting ('OSCHotTracking', IntToStr (opmG_UIHotTracking), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0749:         PRINI_WriteSetting ('OSCAutoLoad', IntToStr (opmG_UIClickLoad), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0750:         PRINI_WriteSetting ('OSCDragDrop', IntToStr (opmG_UIDragDrop), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0751:         PRINI_WriteSetting ('OSCImgDragDrop', IntToStr (opmG_UIImgDragDrop), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0752:         PRINI_WriteSetting ('OSCToolTips', IntToStr (opmG_UIToolTips), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0753:         PRINI_WriteSetting ('OSCStripes', IntToStr (opmG_UIStripes), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0754:         PRINI_WriteSetting ('OSCCacheIList', IntToStr (opmG_UICacheIList), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0755:         PRINI_WriteSetting ('OSCCompress', IntToStr (opmG_DBCompress), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0756:         PRINI_WriteSetting ('OSCUseProxy', IntToStr (opmG_UseProxy), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0757:         PRINI_WriteSetting ('OSCProxyApply', IntToStr (opmG_ProxyApply), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0758:         PRINI_WriteSetting ('OSCUseSSH', IntToStr (opmG_UseSSH), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0759:         PRINI_WriteSetting ('OSCSSHUsername', opmG_SSHUsername, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0760:         IF (opmG_DBStorePass > 0) THEN
0761:           PRINI_WriteSetting ('OSCSSHPassword', opmG_SSHPassword, opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig)
0762:         ELSE
0763:           PRINI_WriteSetting ('OSCSSHPassword', '', opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0764:         PRINI_WriteSetting ('OSCSSHLocalPort', IntToStr (opmG_SSHLocalPort), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0765:         PRINI_WriteSetting ('OSCStorePass', IntToStr (opmG_DBStorePass), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0766:         PRINI_WriteSetting ('OSCSilent', IntToStr (opmG_UISilent), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0767:         PRINI_WriteSetting ('OSCConfirmDels', IntToStr (opmG_UIConfirmDels), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0768:         PRINI_WriteSetting ('OSCConfirmDrag', IntToStr (opmG_UIConfirmDrag), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0769:         PRINI_WriteSetting ('OSCConfirmMods', IntToStr (opmG_UIConfirmMods), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0770:         PRINI_WriteSetting ('OSCAllowZeroPrice', IntToStr (opmG_UIAllowZeroPrice), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0771:         PRINI_WriteSetting ('OSCAllowEditImageName', IntToStr (opmG_UIAllowEditImageName), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0772:         PRINI_WriteSetting ('OSCAllowNegativeQuantity', IntToStr (opmG_UIAllowNegativeQuantity), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0773:         PRINI_WriteSetting ('OSCAutoDownImg', IntToStr (opmG_UIAutoDownImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0774:         PRINI_WriteSetting ('UIFontName', opmG_UIFontName, opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0775:         PRINI_WriteSetting ('UIFontHeight', INTTOSTR (opmG_UIFontHeight), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0776:         PRINI_WriteSetting ('UIFontCharset', INTTOSTR (opmG_UIFontCharset), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0777:         PRINI_WriteSetting ('Clip_ColSize', IntToStr (opmG_PRNDirectPrint), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0778:         PRINI_WriteSetting ('PRNDirectPrint', IntToStr (opmG_PRNDirectPrint), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0779:         PRINI_WriteSetting ('PastAvailDate', INTTOSTR (opmG_Past_PAvailDate), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0780:         PRINI_WriteSetting ('PastManufacturer', INTTOSTR (opmG_Past_PManufacturer), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0781:         PRINI_WriteSetting ('PastTaxClass', INTTOSTR (opmG_Past_PTaxClass), opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0782:         PRINI_WriteSetting ('PastImageDir', opmG_Past_PImageDir, opm_SaveDialog_ConfigINI.FileName, opmC_RKVisual);
0783:         PRINI_WriteSetting ('OSCNoCacheImg', IntToStr (opmG_WBNoCacheImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0784:         PRINI_WriteSetting ('OSCResizeImg', IntToStr (opmG_WBResizeImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0785:         PRINI_WriteSetting ('OSCPaddingImg', IntToStr (opmG_WBPaddingImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0786:         PRINI_WriteSetting ('OSCKeepARImg', IntToStr (opmG_WBKeepARImg), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0787:         PRINI_WriteSetting ('OSCConfirmExit', IntToStr (opmG_UIConfirmExit), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0788:         PRINI_WriteSetting ('OSCDBDebugLog', IntToStr (opmG_DBDebugLog), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0789:         PRINI_WriteSetting ('OSCSSHDebug', IntToStr (opmG_UISSHDebug), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0790:         PRINI_WriteSetting ('OSCWBDebug', IntToStr (opmG_UIWBDebug), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0791:         PRINI_WriteSetting ('OSCRememberPosition', IntToStr (opmG_UIRememberDisplay), opm_SaveDialog_ConfigINI.FileName, opmC_RKConfig);
0792:       END;
0793:   end;
0794:   
0795:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0796:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0797:   procedure Topm_Form_Config.opm_BitBtn_ConfigLoadINIClick(Sender: TObject);
0798:   begin
0799:     opm_OpenDialog_ConfigINI.DefaultExt := opmC_Def_LoadINIExt;
0800:     opm_OpenDialog_ConfigINI.FileName := '';
0801:     opm_OpenDialog_ConfigINI.Filter := _('Configuration files') + ' (' + opmC_Def_LoadINIFilter + ')|' + opmC_Def_LoadINIFilter + '|' + _('All files (*.*)');
0802:     opm_OpenDialog_ConfigINI.Title := _('Loading configuration file...');
0803:     opm_OpenDialog_ConfigINI.InitialDir := ExtractFilePath (Application.Exename);
0804:     IF (opm_OpenDialog_ConfigINI.Execute = TRUE) THEN
0805:       BEGIN
0806:         opmG_DBHost := FNopm_CleanHostName (FNINI_ReadSetting ('OSCHost', opmC_Def_Host, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0807:         opmG_DBPort := FNopm_StrToInt (FNINI_ReadSetting ('OSCPort', INTTOSTR (opmC_Def_Port), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0808:         opmG_DBProtocol := FNINI_ReadSetting ('OSCProtocol', opmC_Def_Protocol, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0809:         opmG_ETABase := FNopm_StrToInt (FNINI_ReadSetting ('OSCETABase', opmC_Def_ETABase, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0810:         opmG_PDFAuthor := FNINI_ReadSetting ('OSCPDFAuthor', opmC_Def_PDFAuthor, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0811:         opmG_DBDatabase := FNINI_ReadSetting ('OSCDatabase', opmC_Def_Database, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0812:         opmG_DBTable_Categories := FNINI_ReadSetting ('OSCTable01', opmC_Def_DBTable_Categories, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0813:         opmG_DBTable_Manufacturers := FNINI_ReadSetting ('OSCTable02', opmC_Def_DBTable_Manufacturers, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0814:         opmG_DBTable_Languages := FNINI_ReadSetting ('OSCTable03', opmC_Def_DBTable_Languages, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0815:         opmG_DBTable_Products := FNINI_ReadSetting ('OSCTable04', opmC_Def_DBTable_Products, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0816:         opmG_DBTable_Specials := FNINI_ReadSetting ('OSCTable05', opmC_Def_DBTable_Specials, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0817:         opmG_DBTable_ProductsDescription := FNINI_ReadSetting ('OSCTable06', opmC_Def_DBTable_ProductsDescription, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0818:         opmG_DBTable_TaxClass := FNINI_ReadSetting ('OSCTable07', opmC_Def_DBTable_TaxClass, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0819:         opmG_DBTable_Currencies := FNINI_ReadSetting ('OSCTable08', opmC_Def_DBTable_Currencies, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0820:         opmG_DBTable_Configuration := FNINI_ReadSetting ('OSCTable09', opmC_Def_DBTable_Configuration, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0821:         opmG_DBTable_ProductsToCategories := FNINI_ReadSetting ('OSCTable10', opmC_Def_DBTable_ProductsToCategories, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0822:         opmG_DBTable_CategoriesDescription := FNINI_ReadSetting ('OSCTable11', opmC_Def_DBTable_CategoriesDescription, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0823:         opmG_DBTable_TaxRates := FNINI_ReadSetting ('OSCTable13', opmC_Def_DBTable_TaxRates, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0824:         opmG_DBTable_ManufacturersInfo := FNINI_ReadSetting ('OSCTable14', opmC_Def_DBTable_ManufacturersInfo, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0825:         opmG_DBUsername := FNINI_ReadSetting ('OSCUsername', opmC_Def_Username, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0826:         opmG_DBPassword := FNINI_ReadSetting ('OSCPassword', opmC_Def_Password, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0827:         opmG_WBImgURL := FNINI_ReadSetting ('OSCImgURL', opmC_Def_ImgURL, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0828:         opmG_WBUploadURL := FNINI_ReadSetting ('OSCUploadURL', opmC_Def_UploadURL, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0829:         opmG_WBProxyHost := FNopm_CleanHostName (FNINI_ReadSetting ('OSCProxyHost', opmC_Def_ProxyHost, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0830:         opmG_WBProxyPort := FNopm_StrToInt (FNINI_ReadSetting ('OSCProxyPort', INTTOSTR (opmC_Def_ProxyPort), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0831:         opmG_DBConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCDBConnWait', INTTOSTR (opmC_Def_DBConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0832:         opmG_ModConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCModConnWait', INTTOSTR (opmC_Def_ModConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0833:         opmG_SSHConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCSSHConnWait', INTTOSTR (opmC_Def_SSHConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0834:         opmG_HTTPConnWait := FNopm_StrToInt (FNINI_ReadSetting ('OSCHTTPConnWait', INTTOSTR (opmC_Def_HTTPConnWait), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0835:         opmG_DBConnRetries := FNopm_StrToInt (FNINI_ReadSetting ('OSCDBConnRetries', INTTOSTR (opmC_Def_DBConnRetries), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0836:         opmG_ModConnRetries := FNopm_StrToInt (FNINI_ReadSetting ('OSCModConnRetries', INTTOSTR (opmC_Def_ModConnRetries), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0837:         opmG_WBImgX := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgX', INTTOSTR (opmC_Def_ImgX), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0838:         opmG_WBImgY := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgY', INTTOSTR (opmC_Def_ImgY), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0839:         opmG_WBImgQ := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgQ', INTTOSTR (opmC_Def_ImgQ), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0840:         opmG_WBPaddingColor := FNopm_StrToInt (FNINI_ReadSetting ('OSCPaddingColor', INTTOSTR (opmC_Def_PaddingColor), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0841:         IF (opmG_WBImgURL[LENGTH (opmG_WBImgURL)] <> '/') THEN opmG_WBImgURL := opmG_WBImgURL + '/';
0842:         opmG_UIHotTracking := FNopm_StrToInt (FNINI_ReadSetting ('OSCHotTracking', INTTOSTR (opmC_Def_HotTracking), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0843:         opmG_UIClickLoad := FNopm_StrToInt (FNINI_ReadSetting ('OSCAutoLoad', INTTOSTR (opmC_Def_AutoLoad), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0844:         opmG_UIDragDrop := FNopm_StrToInt (FNINI_ReadSetting ('OSCDragDrop', INTTOSTR (opmC_Def_DragDrop), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0845:         opmG_UIImgDragDrop := FNopm_StrToInt (FNINI_ReadSetting ('OSCImgDragDrop', INTTOSTR (opmC_Def_ImgDragDrop), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0846:         opmG_UIToolTips := FNopm_StrToInt (FNINI_ReadSetting ('OSCToolTips', INTTOSTR (opmC_Def_ToolTips), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0847:         opmG_UIStripes := FNopm_StrToInt (FNINI_ReadSetting ('OSCStripes', INTTOSTR (opmC_Def_Stripes), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0848:         opmG_UICacheIList := FNopm_StrToInt (FNINI_ReadSetting ('OSCCacheIList', INTTOSTR (opmC_Def_CacheIList), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0849:         opmG_DBCompress := FNopm_StrToInt (FNINI_ReadSetting ('OSCCompress', INTTOSTR (opmC_Def_Compress), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0850:         opmG_UseProxy := FNopm_StrToInt (FNINI_ReadSetting ('OSCUseProxy', INTTOSTR (opmC_Def_UseProxy), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0851:         opmG_ProxyApply := FNopm_StrToInt (FNINI_ReadSetting ('OSCProxyApply', INTTOSTR (opmC_Def_ProxyApply), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0852:         opmG_UseSSH := FNopm_StrToInt (FNINI_ReadSetting ('OSCUseSSH', INTTOSTR (opmC_Def_UseSSH), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0853:         opmG_SSHUsername := FNINI_ReadSetting ('OSCSSHUsername', opmC_Def_SSHUsername, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0854:         opmG_SSHPassword := FNINI_ReadSetting ('OSCSSHPassword', opmC_Def_SSHPassword, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0855:         opmG_SSHLocalPort := FNopm_StrToInt (FNINI_ReadSetting ('OSCSSHLocalPort', INTTOSTR (opmC_Def_SSHLocalPort), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0856:         opmG_DBStorePass := FNopm_StrToInt (FNINI_ReadSetting ('OSCStorePass', INTTOSTR (opmC_Def_StorePass), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0857:         opmG_UISilent := FNopm_StrToInt (FNINI_ReadSetting ('OSCSilent', INTTOSTR (opmC_Def_Silent), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0858:         opmG_UIConfirmDels := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmDels', INTTOSTR (opmC_Def_ConfirmDels), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0859:         opmG_UIConfirmDrag := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmDrag', INTTOSTR (opmC_Def_ConfirmDrag), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0860:         opmG_UIConfirmMods := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmMods', INTTOSTR (opmC_Def_ConfirmMods), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0861:         opmG_UIAllowZeroPrice := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowZeroPrice', INTTOSTR (opmC_Def_AllowZeroPrice), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0862:         opmG_UIAllowEditImageName := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowEditImageName', INTTOSTR (opmC_Def_AllowEditImageName), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0863:         opmG_UIAllowNegativeQuantity := FNopm_StrToInt (FNINI_ReadSetting ('OSCAllowNegativeQuantity', INTTOSTR (opmC_Def_AllowNegativeQuantity), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0864:         opmG_UIAutoDownImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCAutoDownImg', INTTOSTR (opmC_Def_AutoDownImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0865:         opmG_UIFontName := FNReg_ReadSetting ('UIFontName', opmC_DefaultFont, opmC_RegistryKey, opmC_RKVisual);
0866:         opmG_UIFontHeight := FNopm_StrToInt (FNReg_ReadSetting ('UIFontHeight', INTTOSTR (opmC_DefaultFontHeight), opmC_RegistryKey, opmC_RKVisual));
0867:         opmG_UIFontCharset := FNopm_StrToInt (FNReg_ReadSetting ('UIFontCharset', INTTOSTR (opmC_DefaultFontCharset), opmC_RegistryKey, opmC_RKVisual));
0868:         opmG_Clip_ColSize := FNopm_StrToInt (FNReg_ReadSetting ('Clip_ColSize', INTTOSTR (opmC_Def_Clip_ColSize), opmC_RegistryKey, opmC_RKVisual));
0869:         opmG_PRNDirectPrint := FNopm_StrToInt (FNReg_ReadSetting ('PRNDirectPrint', INTTOSTR (opmC_Def_PRNDirectPrint), opmC_RegistryKey, opmC_RKVisual));
0870:         opmG_Past_PAvailDate := FNopm_StrToInt (FNReg_ReadSetting ('PastAvailDate', INTTOSTR (opmC_Def_Past_PAvailDate), opmC_RegistryKey, opmC_RKVisual));
0871:         opmG_Past_PManufacturer := FNopm_StrToInt (FNReg_ReadSetting ('PastManufacturer', INTTOSTR (opmC_Def_Past_PManufacturer), opmC_RegistryKey, opmC_RKVisual));
0872:         opmG_Past_PTaxClass := FNopm_StrToInt (FNReg_ReadSetting ('PastTaxClass', INTTOSTR (opmC_Def_Past_PTaxClass), opmC_RegistryKey, opmC_RKVisual));
0873:         opmG_Past_PImageDir := FNReg_ReadSetting ('PastImageDir', opmC_Def_Past_PImageDir, opmC_RegistryKey, opmC_RKVisual);
0874:         opmG_WBNoCacheImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCNoCacheImg', INTTOSTR (opmC_Def_NoCacheImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0875:         opmG_WBResizeImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCResizeImg', INTTOSTR (opmC_Def_ResizeImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0876:         opmG_WBPaddingImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCPaddingImg', INTTOSTR (opmC_Def_PaddingImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0877:         opmG_WBKeepARImg := FNopm_StrToInt (FNINI_ReadSetting ('OSCKeepARImg', INTTOSTR (opmC_Def_KeepARImg), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0878:         opmG_UIConfirmExit := FNopm_StrToInt (FNINI_ReadSetting ('OSCConfirmExit', INTTOSTR (opmC_Def_ConfirmExit), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0879:         opmG_DBDebugLog := FNopm_StrToInt (FNINI_ReadSetting ('OSCDBDebugLog', INTTOSTR (opmC_Def_DBDebugLog), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0880:         opmG_UISSHDebug := FNopm_StrToInt (FNINI_ReadSetting ('OSCSSHDebug', INTTOSTR (opmC_Def_SSHDebug), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0881:         opmG_UIWBDebug := FNopm_StrToInt (FNINI_ReadSetting ('OSCWBDebug', INTTOSTR (opmC_Def_WBDebug), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0882:         opmG_UIGUILang := FNINI_ReadSetting ('OSCGUILang', opmC_Def_GUILang, opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig);
0883:         IF (FNopm_CheckLanguage (opmG_UIGUILang) = FALSE) THEN opmG_UIGUILang := opmC_Def_GUILang;
0884:         opmG_UIRememberDisplay := FNopm_StrToInt (FNINI_ReadSetting ('OSCRememberPosition', INTTOSTR (opmC_Def_RememberDisplay), opm_OpenDialog_ConfigINI.FileName, opmC_RKConfig));
0885:         PRopm_VarsToControls;
0886:         PRopm_UpdateTunnelCall;
0887:       END;
0888:   end;
0889:   
0890:   
0891:   
0892:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0893:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0894:   procedure Topm_Form_Config.opm_SpinEdit_ConfigImgQChange (Sender: TObject);
0895:   begin
0896:     opm_Label_ConfigJPEGQCategory.Caption := FNopm_QualityExplain (opm_SpinEdit_ConfigImgQ.Value);
0897:   end;
0898:   
0899:   
0900:   
0901:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0902:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0903:   PROCEDURE Topm_Form_Config.opm_PRRefresh_ModuleList (LastIndex : INTEGER);
0904:   VAR
0905:     ModCounter : LONGINT;
0906:   BEGIN
0907:     opm_PRLoad_ModuleList;
0908:     opm_ListBox_ConfigMods.Items.Clear;
0909:     FOR ModCounter := 0 TO (opm_TotalModules - 1) DO
0910:       opm_ListBox_ConfigMods.Items.Add (opmG_ModuleList[ModCounter].Name);
0911:     IF ((LastIndex + 1) < opm_TotalModules) THEN
0912:       opm_ListBox_ConfigMods.ItemIndex := LastIndex
0913:     ELSE opm_ListBox_ConfigMods.ItemIndex := (opm_TotalModules - 1);
0914:   END;
0915:   
0916:   
0917:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0918:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0919:   procedure Topm_Form_Config.opm_ListBox_ConfigModsClick(Sender: TObject);
0920:   begin
0921:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
0922:       BEGIN
0923:         opm_BitBtn_ConfigModDel.Enabled := TRUE;
0924:         opm_BitBtn_ConfigModEdit.Enabled := TRUE;
0925:       END
0926:     ELSE
0927:       BEGIN
0928:         opm_BitBtn_ConfigModDel.Enabled := FALSE;
0929:         opm_BitBtn_ConfigModEdit.Enabled := FALSE;
0930:       END;
0931:   end;
0932:   
0933:   
0934:   
0935:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0936:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0937:   procedure Topm_Form_Config.opm_BitBtn_ConfigColSelClick(Sender: TObject);
0938:   begin
0939:     opm_Form_ColorSel.opmG_ColorChoosed := FNopm_DecColorToColor (opmG_WBPaddingColor);
0940:     IF (opm_Form_ColorSel.ShowModal = mrOk) THEN
0941:       BEGIN
0942:         opmG_WBPaddingColor := opm_Form_ColorSel.opmG_ColorChoosedDec;
0943:         opm_Panel_ConfigColSel.Color := opm_Form_ColorSel.opmG_ColorChoosed;
0944:         opm_Panel_ConfigColSel.Caption := FNopm_ColorToRGB (opm_Panel_ConfigColSel.Color);
0945:       END;
0946:   end;
0947:   
0948:   
0949:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0950:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0951:   procedure Topm_Form_Config.opm_CheckBox_ConfigUseSSHClick(Sender: TObject);
0952:   begin
0953:     opm_Edit_ConfigSSHPassword.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0954:     opm_SpinEdit_ConfigSSHLocalPort.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0955:     opm_ComboBox_ConfigSSHUsername.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0956:     opm_Label_ConfigSSHPassword.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0957:     opm_Label_ConfigSSHPort.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0958:     opm_Label_ConfigSSHUsername.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0959:     opm_SpinEdit_ConfigSSHConnWait.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0960:     opm_Label_ConfigSSHConnWait.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0961:     opm_BitBtn_ConfigTestSSH.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0962:     opm_Edit_ConfigPLinkCall.Enabled := opm_CheckBox_ConfigUseSSH.Checked;
0963:     PRopm_UpdateTunnelCall;
0964:   end;
0965:   
0966:   
0967:   
0968:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0969:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0970:   procedure Topm_Form_Config.opm_BitBtn_ConfigProxyIEClick(Sender: TObject);
0971:   VAR
0972:     PHost : STRING;
0973:     PPort : LONGINT;
0974:   begin
0975:     PRopm_GetIEProxyData (PHost, PPort);
0976:     IF ((PHost <> '') AND (PPort > 0)) THEN
0977:       BEGIN
0978:         opm_ComboBox_ConfigProxyHost.Text := PHost;
0979:         opm_SpinEdit_ConfigProxyPort.Value := PPort;
0980:       END
0981:     ELSE
0982:       FNopm_Message (_('Cannot find the proxy settings automatically.'), mtWarning, [mbOK], opmG_UISilent);
0983:   end;
0984:   
0985:   
0986:   
0987:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0988:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0989:   procedure Topm_Form_Config.opm_BitBtn_ConfigTestSSHClick(Sender: TObject);
0990:   begin
0991:     IF (FNopm_Message (_('This test will close any SSH tunnel currently active. Are you sure you want to proceed with the test?'), mtConfirmation, [mbYes, mbNo], opmG_UISilent) = mrYes) THEN
0992:       BEGIN
0993:         PRopm_StopExternalAppByName (opmC_Def_SSHExe);
0994:         IF (FNopm_OpenSSHTunnel (opmC_Def_SSHLocalHost, TRIM (opm_ComboBox_ConfigHost.Text), ABS (opm_SpinEdit_ConfigSSHLocalPort.Value),
0995:                                  ABS (opm_SpinEdit_ConfigPort.Value), TRIM (opm_ComboBox_ConfigSSHUsername.Text),
0996:                                  TRIM (opm_Edit_ConfigSSHPassword.Text), 1) = FALSE) THEN
0997:           BEGIN
0998:             FNopm_Message (_('Cannot launch SSH tunnel auxiliar application!'), mtWarning	, [mbOk], opmG_UISilent);
0999:           END;
1000:       END;
1001:   end;
1002:   
1003:   
1004:   
1005:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1006:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1007:   procedure Topm_Form_Config.opm_BitBtn_ConfigFontClick (Sender: TObject);
1008:   begin
1009:     IF (opm_FontDialog_Config.Execute = TRUE) THEN
1010:       BEGIN
1011:         opm_Label_ConfigFontDetails.Caption := opm_FontDialog_Config.Font.Name + ', ' +
1012:                                                INTTOSTR (ROUND ((opm_FontDialog_Config.Font.Height * -72) / opm_FontDialog_Config.Font.PixelsPerInch)) + ', ' +
1013:                                                opmG_CharsetList [opm_FontDialog_Config.Font.Charset];
1014:         FNopm_Message (_('The font will change until you restart the application.'), mtInformation, [mbOk], opmG_UISilent);
1015:       END
1016:     ELSE
1017:       BEGIN
1018:         opm_FontDialog_Config.Font.Name := opmG_UIFontName;
1019:         opm_FontDialog_Config.Font.Height := opmG_UIFontHeight;
1020:         opm_FontDialog_Config.Font.Charset := opmG_UIFontCharset;
1021:         opm_FontDialog_Config.Font.Style := opmC_DefaultFontStyle;
1022:       END;
1023:   end;
1024:   
1025:   
1026:   
1027:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1028:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1029:   procedure Topm_Form_Config.opm_CheckBox_ConfigUseProxyClick (Sender: TObject);
1030:   begin
1031:     opm_ComboBox_ConfigProxyApply.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1032:     opm_ComboBox_ConfigProxyHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1033:     opm_SpinEdit_ConfigProxyPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1034:     opm_BitBtn_ConfigProxyIE.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1035:     opm_Label_ConfigPHost.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1036:     opm_Label_ConfigPPort.Enabled := opm_CheckBox_ConfigUseProxy.Checked;
1037:   end;
1038:   
1039:   
1040:   
1041:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1042:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1043:   procedure Topm_Form_Config.opm_BitBtn_ConfigDBResetClick(Sender: TObject);
1044:   begin
1045:     opm_Edit_ConfigDBTable01.Text := opmC_Def_DBTable_Categories;
1046:     opm_Edit_ConfigDBTable02.Text := opmC_Def_DBTable_Manufacturers;
1047:     opm_Edit_ConfigDBTable03.Text := opmC_Def_DBTable_Languages;
1048:     opm_Edit_ConfigDBTable04.Text := opmC_Def_DBTable_Products;
1049:     opm_Edit_ConfigDBTable05.Text := opmC_Def_DBTable_Specials;
1050:     opm_Edit_ConfigDBTable06.Text := opmC_Def_DBTable_ProductsDescription;
1051:     opm_Edit_ConfigDBTable07.Text := opmC_Def_DBTable_TaxClass;
1052:     opm_Edit_ConfigDBTable08.Text := opmC_Def_DBTable_Currencies;
1053:     opm_Edit_ConfigDBTable09.Text := opmC_Def_DBTable_Configuration;
1054:     opm_Edit_ConfigDBTable10.Text := opmC_Def_DBTable_ProductsToCategories;
1055:     opm_Edit_ConfigDBTable11.Text := opmC_Def_DBTable_CategoriesDescription;
1056:     opm_Edit_ConfigDBTable13.Text := opmC_Def_DBTable_TaxRates;
1057:     opm_Edit_ConfigDBTable14.Text := opmC_Def_DBTable_ManufacturersInfo;
1058:   end;
1059:   
1060:   
1061:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1062:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1063:   procedure Topm_Form_Config.opm_ListBox_ConfigReportsClick(Sender: TObject);
1064:   begin
1065:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
1066:       BEGIN
1067:         opm_BitBtn_ConfigReportEdit.Enabled := TRUE;
1068:         opm_BitBtn_ConfigReportPreview.Enabled := TRUE;
1069:       END
1070:     ELSE
1071:       BEGIN
1072:         opm_BitBtn_ConfigReportEdit.Enabled := FALSE;
1073:         opm_BitBtn_ConfigReportPreview.Enabled := FALSE;
1074:       END;
1075:   end;
1076:   
1077:   
1078:   
1079:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1080:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1081:   procedure Topm_Form_Config.opm_BitBtn_ConfigReportEditClick(Sender: TObject);
1082:   begin
1083:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
1084:       BEGIN
1085:         TRY
1086:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
1087:           opm_frReport_Config.DesignReport;
1088:         EXCEPT
1089:           ON E : Exception DO
1090:             BEGIN
1091:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
1092:             END;
1093:         END;
1094:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
1095:       END;
1096:   end;
1097:   
1098:   
1099:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1100:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1101:   PROCEDURE Topm_Form_Config.opm_PRRefresh_ReportList (LastIndex : INTEGER);
1102:   VAR
1103:     DirRecord : TSearchRec;
1104:     RepCount : LONGINT;
1105:   BEGIN
1106:     RepCount := 0;
1107:     opm_ListBox_ConfigReports.Items.Clear;
1108:     IF (SysUtils.FINDFIRST (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + '*.' + opmC_Def_ReportExt, faAnyFile, DirRecord) = 0) THEN
1109:       BEGIN
1110:         REPEAT
1111:           opm_ListBox_ConfigReports.Items.Add (TRIM (DirRecord.Name));
1112:           INC (RepCount);
1113:         UNTIL (SysUtils.FINDNEXT (DirRecord) <> 0);
1114:         SysUtils.FINDCLOSE (DirRecord);
1115:         IF (LastIndex < RepCount) THEN
1116:           opm_ListBox_ConfigReports.ItemIndex := LastIndex
1117:         ELSE opm_ListBox_ConfigReports.ItemIndex := (RepCount - 1);
1118:       END;
1119:   END;
1120:   
1121:   
1122:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1123:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1124:   procedure Topm_Form_Config.opm_frReport_ConfigGetValue (const ParName: String; var ParValue: Variant);
1125:   begin
1126:     ParValue := _('Test data') + ' ' + INTTOSTR (opm_frUserDataset_Config.RecNo);
1127:   end;
1128:   
1129:   
1130:   
1131:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1132:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1133:   procedure Topm_Form_Config.opm_frUserDataset_ConfigCheckEOF (Sender: TObject; var Eof: Boolean);
1134:   begin
1135:     EOF := (opm_frUserDataset_Config.RecNo > 100);
1136:   end;
1137:   
1138:   
1139:   
1140:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1141:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1142:   procedure Topm_Form_Config.opm_BitBtn_ConfigReportPreviewClick(Sender: TObject);
1143:   begin
1144:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
1145:       BEGIN
1146:         TRY
1147:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
1148:           opm_frReport_Config.ShowReport;
1149:         EXCEPT
1150:           ON E : Exception DO
1151:             BEGIN
1152:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
1153:             END;
1154:         END;
1155:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
1156:       END;
1157:   end;
1158:   
1159:   
1160:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1161:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1162:   procedure Topm_Form_Config.opm_BitBtn_ConfigModEditClick(Sender: TObject);
1163:   begin
1164:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
1165:       BEGIN
1166:         opm_Form_ConfigMod.MC_Name := TRIM (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
1167:         opm_Form_ConfigMod.MC_AddEdit := FALSE;
1168:         IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1169:       END;
1170:   end;
1171:   
1172:   
1173:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1174:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1175:   procedure Topm_Form_Config.opm_BitBtn_ConfigModAddClick(Sender: TObject);
1176:   begin
1177:     opm_Form_ConfigMod.MC_Name := '';
1178:     opm_Form_ConfigMod.MC_AddEdit := TRUE;
1179:     IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1180:   end;
1181:   
1182:   
1183:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1184:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1185:   procedure Topm_Form_Config.opm_BitBtn_ConfigModDelClick(Sender: TObject);
1186:   begin
1187:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
1188:       IF (FNopm_Message (_('Are you sure you want to delete this module configuration?') +
1189:                          ' [' + opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + ']', mtConfirmation, [mbYes, mbNo], opmG_UISilent) = mrYes) THEN
1190:         BEGIN
1191:           opm_PRDelete_ModuleData (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
1192:           opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1193:         END;
1194:   end;
1195:   
1196:   
1197:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1198:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1199:   procedure Topm_Form_Config.opm_ListBox_ConfigModsDblClick(Sender: TObject);
1200:   begin
1201:     IF (opm_ListBox_ConfigMods.ItemIndex >= 0) THEN
1202:       BEGIN
1203:         opm_Form_ConfigMod.MC_Name := TRIM (opm_ListBox_ConfigMods.Items[opm_ListBox_ConfigMods.ItemIndex] + '.' + opmC_Def_ModulesExt);
1204:         opm_Form_ConfigMod.MC_AddEdit := FALSE;
1205:         IF (opm_Form_ConfigMod.ShowModal = mrOK) THEN opm_PRRefresh_ModuleList (opm_ListBox_ConfigMods.ItemIndex);
1206:       END;
1207:   end;
1208:   
1209:   
1210:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1211:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1212:   PROCEDURE Topm_Form_Config.PRopm_UpdateTunnelCall;
1213:   BEGIN
1214:     opm_Edit_ConfigPLinkCall.Text := opmC_Def_SSHExe + ' ' +
1215:                                      FNopm_BuildTunnelCall (opmC_Def_SSHLocalHost, TRIM (opm_ComboBox_ConfigHost.Text),
1216:                                                             ABS (opm_SpinEdit_ConfigSSHLocalPort.Value), ABS (opm_SpinEdit_ConfigPort.Value),
1217:                                                             TRIM (opm_ComboBox_ConfigSSHUsername.Text),
1218:                                                             STRINGOFCHAR (opmC_PasswordChar, LENGTH (opm_Edit_ConfigSSHPassword.Text)),
1219:                                                             opm_CheckBox_ConfigCompress.Checked);
1220:   END;
1221:   
1222:   
1223:   
1224:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1225:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1226:   procedure Topm_Form_Config.opm_ComboBox_ConfigSSHUsernameExit (Sender: TObject);
1227:   begin
1228:     PRopm_UpdateTunnelCall;
1229:   end;
1230:   
1231:   
1232:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1233:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1234:   procedure Topm_Form_Config.opm_CheckBox_ConfigCompressClick (Sender: TObject);
1235:   begin
1236:     PRopm_UpdateTunnelCall;
1237:   end;
1238:   
1239:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1240:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
1241:   procedure Topm_Form_Config.opm_ListBox_ConfigReportsDblClick(Sender: TObject);
1242:   begin
1243:     IF (opm_ListBox_ConfigReports.ItemIndex >= 0) THEN
1244:       BEGIN
1245:         TRY
1246:           opm_frReport_Config.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DirReports + '/' + opm_ListBox_ConfigReports.Items[opm_ListBox_ConfigReports.ItemIndex]);
1247:           opm_frReport_Config.DesignReport;
1248:         EXCEPT
1249:           ON E : Exception DO
1250:             BEGIN
1251:               FNopm_Message (_('Error while editing report') + #13#10 + E.Message, mtError, [mbOk], opmG_UISilent);
1252:             END;
1253:         END;
1254:         opm_PRRefresh_ReportList (opm_ListBox_ConfigReports.ItemIndex);
1255:       END;
1256:   end;
1257:   
1258:   
1259:   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