{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% osCommerce Product Manager for Windows (oscpmwin). Copyright ©2003-2006 by Mario A. Valdez-Ramirez. You can contact Mario A. Valdez-Ramirez by email at mario@mariovaldez.org or paper mail at Olmos 809, San Nicolas, NL. 66495, Mexico. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public SQLLog as published by the Free Software Foundation; either version 2 of the SQLLog, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public SQLLog for more details. You should have received a copy of the GNU General Public SQLLog along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} unit sqllog; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons; type Topm_Form_SQLLog = class(TForm) opm_Memo_SQLLog: TMemo; opm_BitBtn_SQLLogOk: TBitBtn; opm_BitBtn_SQLLogClear: TBitBtn; procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure opm_BitBtn_SQLLogClearClick(Sender: TObject); private { Private declarations } public end; var opm_Form_SQLLog: Topm_Form_SQLLog; implementation uses gnugettext, main, oscpmdata, balloons, network; {$R *.dfm} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_SQLLog.FormCreate(Sender: TObject); begin TranslateComponent (self); end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_SQLLog.FormShow(Sender: TObject); begin TRY opm_Memo_SQLLog.Lines.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DebugFile); EXCEPT opm_Memo_SQLLog.Clear; END; opm_Form_SQLLog.Caption := _('SQL query log') + ' (' + INTTOSTR (opm_Memo_SQLLog.Lines.Count) + ' ' + _('lines') + ')'; end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_SQLLog.FormClose(Sender: TObject; var Action: TCloseAction); begin opm_Memo_SQLLog.Clear; end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_SQLLog.opm_BitBtn_SQLLogClearClick(Sender: TObject); begin PRopm_ResetLog; TRY opm_Memo_SQLLog.Lines.LoadFromFile (ExtractFilePath (Application.Exename) + opmC_DebugFile); EXCEPT opm_Memo_SQLLog.Clear; END; opm_Form_SQLLog.Caption := _('SQL query log') + ' (' + INTTOSTR (opm_Memo_SQLLog.Lines.Count) + ' ' + _('lines') + ')'; end; end.