Source code of file oscpmwin_v0.1.2.189/currupd.pas from the
osCommerce Product Manager for Windows.


0000:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001:   osCommerce Product Manager for Windows (oscpmwin).
0002:   Copyright �2003,2004,2005 by Mario A. Valdez-Ramirez.
0003:   
0004:   You can contact Mario A. Valdez-Ramirez
0005:   by email at mario@mariovaldez.org or paper mail at
0006:   Olmos 809, San Nicolas, NL. 66495, Mexico.
0007:   
0008:   This program is free software; you can redistribute it and/or modify
0009:   it under the terms of the GNU General Public License as published by
0010:   the Free Software Foundation; either version 2 of the License, or (at
0011:   your option) any later version.
0012:   
0013:   This program is distributed in the hope that it will be useful, but
0014:   WITHOUT ANY WARRANTY; without even the implied warranty of
0015:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016:   General Public License for more details.
0017:   
0018:   You should have received a copy of the GNU General Public License
0019:   along with this program; if not, write to the Free Software
0020:   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0021:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0022:   unit currupd;
0023:   
0024:   interface
0025:   
0026:   uses
0027:     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
0028:     Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, modules, Menus;
0029:   
0030:   type
0031:     Topm_Form_Currupd = class(TForm)
0032:       opm_ListView_CurrUpdConfirm: TListView;
0033:       opm_BitBtn_CurrUpdConfirm: TBitBtn;
0034:       opm_BitBtn_CurrUpdCancel: TBitBtn;
0035:       opm_StatusBar_PEdit: TStatusBar;
0036:       procedure FormShow(Sender: TObject);
0037:       procedure FormCreate(Sender: TObject);
0038:     private
0039:     public
0040:     end;
0041:   
0042:   var
0043:     opm_Form_Currupd : Topm_Form_Currupd;
0044:   
0045:   
0046:   
0047:   implementation
0048:   
0049:   Uses gnugettext, main, oscpmdata, balloons, dataman, clipbrd, network;
0050:   
0051:   {$R *.dfm}
0052:   
0053:   
0054:   
0055:   
0056:   
0057:   
0058:   
0059:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0060:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0061:   PROCEDURE Topm_Form_Currupd.FormShow (Sender: TObject);
0062:   VAR
0063:     CurCurr : LONGINT;
0064:     CurItem : TListItem;
0065:   BEGIN
0066:     opm_Form_Currupd.Caption := _('Currency update confirmation');
0067:     opm_ListView_CurrUpdConfirm.Items.BeginUpdate;
0068:     opm_ListView_CurrUpdConfirm.Items.Clear;
0069:     FOR CurCurr := 0 TO (opm_TotalCurrencies - 1) DO
0070:       BEGIN
0071:         IF (opmG_CurrencyList[CurCurr].Default = FALSE) THEN
0072:           BEGIN
0073:             CurItem := opm_ListView_CurrUpdConfirm.Items.Add;
0074:             IF (opmG_CurrencyList[CurCurr].NewValue = 0) THEN CurItem.ImageIndex := 2
0075:             ELSE IF (opmG_CurrencyList[CurCurr].NewValue = -1) THEN CurItem.ImageIndex := 1
0076:             ELSE IF (opmG_CurrencyList[CurCurr].Value = opmG_CurrencyList[CurCurr].NewValue) THEN CurItem.ImageIndex := 3
0077:             ELSE CurItem.ImageIndex := 4;
0078:             CurItem.SubItems.Add (opmG_CurrencyList[CurCurr].Name);
0079:             CurItem.SubItems.Add (CURRTOSTR (opmG_CurrencyList[CurCurr].Value));
0080:             IF (opmG_CurrencyList[CurCurr].NewValue <= 0) THEN CurItem.SubItems.Add ('???')
0081:             ELSE CurItem.SubItems.Add (CURRTOSTR (opmG_CurrencyList[CurCurr].NewValue));
0082:           END;
0083:       END;
0084:     opm_ListView_CurrUpdConfirm.Items.EndUpdate;
0085:   END;
0086:   
0087:   
0088:   
0089:   
0090:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0091:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0092:   procedure Topm_Form_Currupd.FormCreate(Sender: TObject);
0093:   begin
0094:     opm_ListView_CurrupdConfirm.Columns.Clear;
0095:     opm_ListView_CurrupdConfirm.Checkboxes := FALSE;
0096:     opm_ListView_CurrupdConfirm.ReadOnly := TRUE;
0097:     opm_ListView_CurrupdConfirm.DoubleBuffered := TRUE;
0098:     opm_ListView_CurrupdConfirm.ViewStyle := vsReport;
0099:     opm_ListView_CurrupdConfirm.Columns.Add;
0100:     opm_ListView_CurrupdConfirm.Columns.Add;
0101:     opm_ListView_CurrupdConfirm.Columns.Add;
0102:     opm_ListView_CurrupdConfirm.Columns.Add;
0103:     opm_ListView_CurrupdConfirm.Columns.Items[0].Caption := '';
0104:     opm_ListView_CurrupdConfirm.Columns.Items[1].Caption := _('Currency');
0105:     opm_ListView_CurrupdConfirm.Columns.Items[2].Caption := _('Old value');
0106:     opm_ListView_CurrupdConfirm.Columns.Items[3].Caption := _('New value');
0107:     opm_ListView_CurrupdConfirm.Columns.Items[1].Alignment := opmC_Def_Col20Align;
0108:     opm_ListView_CurrupdConfirm.Columns.Items[2].Alignment := opmC_Def_Col21Align;
0109:     opm_ListView_CurrupdConfirm.Columns.Items[3].Alignment := opmC_Def_Col22Align;
0110:     IF (opmG_UIHotTracking > 0) THEN
0111:       BEGIN
0112:         opm_ListView_CurrupdConfirm.HotTrack := FALSE;
0113:         opm_ListView_CurrupdConfirm.HotTrackStyles := [htHandPoint, htUnderlineHot];
0114:       END
0115:     ELSE
0116:       BEGIN
0117:         opm_ListView_CurrupdConfirm.HotTrack := FALSE;
0118:         opm_ListView_CurrupdConfirm.HotTrackStyles := [];
0119:       END;
0120:     IF (opmG_UIRememberDisplay > 0) THEN
0121:       BEGIN
0122:         opm_ListView_CurrupdConfirm.Column[0].Width := opmG_UICol0X;
0123:         opm_ListView_CurrupdConfirm.Column[1].Width := opmG_UICol20X;
0124:         opm_ListView_CurrupdConfirm.Column[2].Width := opmG_UICol21X;
0125:         opm_ListView_CurrupdConfirm.Column[3].Width := opmG_UICol22X;
0126:       END
0127:     ELSE
0128:       BEGIN
0129:         opm_ListView_CurrupdConfirm.Column[0].Width := opmC_Def_Col0X;
0130:         opm_ListView_CurrupdConfirm.Column[1].Width := opmC_Def_Col20X;
0131:         opm_ListView_CurrupdConfirm.Column[2].Width := opmC_Def_Col21X;
0132:         opm_ListView_CurrupdConfirm.Column[3].Width := opmC_Def_Col22X;
0133:       END;
0134:     TranslateComponent (self);
0135:   end;
0136:   
0137:   
0138:   
0139:   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