1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?> 2*b1cdbd2cSJim Jagielski<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*b1cdbd2cSJim Jagielski<!--*********************************************************** 4*b1cdbd2cSJim Jagielski * 5*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 6*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 7*b1cdbd2cSJim Jagielski * distributed with this work for additional information 8*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 9*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 10*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 11*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 14*b1cdbd2cSJim Jagielski * 15*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 16*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 17*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 19*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 20*b1cdbd2cSJim Jagielski * under the License. 21*b1cdbd2cSJim Jagielski * 22*b1cdbd2cSJim Jagielski ***********************************************************--> 23*b1cdbd2cSJim Jagielski<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CommonLang" script:language="StarBasic">REM ***** BASIC ***** 24*b1cdbd2cSJim Jagielski 25*b1cdbd2cSJim Jagielski 26*b1cdbd2cSJim Jagielski' Column A has the index 1 27*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNNAME1 = 3 ' Stock names, sheet 1 28*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNID1 = 4 ' Stock ID, sheet 1 29*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQUANTITY1 = 5 ' Stock quantity sheet 1 30*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNRATE1 = 7 ' Price for stocks, sheet 1 31*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNNAME2 = 3 ' Stock names, sheet 2 32*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNDATE2 = 4 ' Transaction dates, sheet 2 33*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQUANTITY2 = 5 ' Transaction quantity, sheet 2 34*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNRATE2 = 6 ' Price for stocks, sheet 2 35*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVPERCENT2 = 7 ' Provision in %, sheet 2 36*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVMIN2 = 8 ' Minimum provision, sheet 2 37*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROVFIX2 = 9 ' Fixed provision, sheet 2 38*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPROCEEDS2 = 12 ' Profit, sheet 2 39*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQTYSOLD2 = 14 ' Quantity sold, sheet 2 40*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNQTYREST2 = 15 ' Quantity not sold yet, sheet 2 41*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNPRCREST2 = 16 ' Proportional proce for quantity not sold yet, sheet 2 42*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNREALPROC2 = 17 ' Realized proceeds, sheet 2 43*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNDIVIDEND2 = 18 ' Dividend paid, sheet 2 44*b1cdbd2cSJim JagielskiPublic Const SBCOLUMNREALPROFIT2 = 19 ' Realized profit, sheet 2 45*b1cdbd2cSJim JagielskiPublic Const SBROWFIRSTTRANSACT2 = 8 ' First data row, sheet 2 46*b1cdbd2cSJim JagielskiPublic Const SBROWHEADER1 = 6 ' Headline, sheet 1 47*b1cdbd2cSJim JagielskiPublic Const SBMSGOK = 0 48*b1cdbd2cSJim JagielskiPublic Const SBMSGYESNO = 4 49*b1cdbd2cSJim JagielskiPublic Const SBMSGSTOP = 16 50*b1cdbd2cSJim JagielskiPublic Const SBMSGQUESTION = 32 51*b1cdbd2cSJim JagielskiPublic Const SBMSGDEFAULTBTN2 = 256 52*b1cdbd2cSJim JagielskiPublic Const SBHASID = 1 ' 0 = no ID, 1 = stocks have an ID 53*b1cdbd2cSJim JagielskiPublic Const SBDIALOGSELL = 1 ' Step for main dialog 54*b1cdbd2cSJim JagielskiPublic Const SBDIALOGBUY = 2 ' Step for main dialog 55*b1cdbd2cSJim JagielskiPublic Const SBBINARY = 0 56*b1cdbd2cSJim JagielskiPublic TransactMode as Integer 57*b1cdbd2cSJim JagielskiPublic Const LIFO = -1 58*b1cdbd2cSJim JagielskiPublic Const FIFO = 1 59*b1cdbd2cSJim Jagielski 60*b1cdbd2cSJim JagielskiPublic Const HANDLEDIVIDEND = 1 61*b1cdbd2cSJim JagielskiPublic Const HANDLESPLIT = 2 62*b1cdbd2cSJim Jagielski 63*b1cdbd2cSJim JagielskiGlobal oDocument as Object 64*b1cdbd2cSJim JagielskiGlobal oDocFormats() as Object 65*b1cdbd2cSJim JagielskiGlobal oController as Object 66*b1cdbd2cSJim JagielskiGlobal oFirstSheet as Object 67*b1cdbd2cSJim JagielskiGlobal oBankSheet as Object 68*b1cdbd2cSJim JagielskiGlobal oMovementSheet as Object 69*b1cdbd2cSJim JagielskiGlobal sDocLanguage as String 70*b1cdbd2cSJim JagielskiGlobal sDocCountry as String 71*b1cdbd2cSJim JagielskiGlobal oSheets as Object 72*b1cdbd2cSJim JagielskiGlobal oDocLocale as New com.sun.star.lang.Locale 73*b1cdbd2cSJim JagielskiGlobal bEnableMarket as Boolean 74*b1cdbd2cSJim JagielskiGlobal bEnableInternet as Boolean 75*b1cdbd2cSJim JagielskiGlobal oMarketModel as Object 76*b1cdbd2cSJim JagielskiGlobal oInternetModel as Object 77*b1cdbd2cSJim Jagielski 78*b1cdbd2cSJim JagielskiGlobal sCurCurrency$, sCurExtension$, sCurChartSource$, sCurStockIDLabel$, sCurSeparator$ 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim JagielskiPublic oNumberFormatter as Object 81*b1cdbd2cSJim JagielskiPublic bDebugmode as Boolean 82*b1cdbd2cSJim JagielskiGlobal GlobListindex as Integer 83*b1cdbd2cSJim JagielskiPublic blabla() as String 84*b1cdbd2cSJim JagielskiPublic SplitDate as Date 85*b1cdbd2cSJim JagielskiPublic oChartSheet as Object 86*b1cdbd2cSJim JagielskiPublic oBackgroundSheet as Object 87*b1cdbd2cSJim JagielskiPublic Const SBDATECOLUMN = 3 88*b1cdbd2cSJim JagielskiPublic Const SBVALUECOLUMN = 4 89*b1cdbd2cSJim JagielskiPublic Const SBSTARTROW = 25 90*b1cdbd2cSJim JagielskiPublic Const SBCHARTPERIOD = 14 91*b1cdbd2cSJim JagielskiPublic Const SBINTERVAL = "d" 92*b1cdbd2cSJim JagielskiPublic sColumnHeader as String 93*b1cdbd2cSJim JagielskiPublic StartDate as Date 94*b1cdbd2cSJim JagielskiPublic EndDate as Date 95*b1cdbd2cSJim JagielskiPublic iCurRow as Integer 96*b1cdbd2cSJim JagielskiPublic iMaxRow as Integer 97*b1cdbd2cSJim JagielskiPublic iStartDay as Integer 98*b1cdbd2cSJim JagielskiPublic iStartMonth as Integer 99*b1cdbd2cSJim JagielskiPublic iStartYear as Integer 100*b1cdbd2cSJim JagielskiPublic iEndDay as Integer 101*b1cdbd2cSJim JagielskiPublic iEndMonth as Integer 102*b1cdbd2cSJim JagielskiPublic iEndYear as Integer 103*b1cdbd2cSJim JagielskiPublic oStatusLine as Object 104*b1cdbd2cSJim JagielskiPublic Today as Date 105*b1cdbd2cSJim JagielskiPublic sInterval as String 106*b1cdbd2cSJim JagielskiPublic ShortMonths(11,1) 107*b1cdbd2cSJim JagielskiPublic iStep as Integer 108*b1cdbd2cSJim JagielskiPublic sDepotCurrency as String 109*b1cdbd2cSJim JagielskiPublic iValueCol as Integer 110*b1cdbd2cSJim Jagielski 111*b1cdbd2cSJim JagielskiPublic DlgReference as Object 112*b1cdbd2cSJim JagielskiPublic DlgTransaction as Object 113*b1cdbd2cSJim JagielskiPublic DlgStockRates as Object 114*b1cdbd2cSJim JagielskiPublic DlgStartUp as Object 115*b1cdbd2cSJim JagielskiPublic TransactModel as Object 116*b1cdbd2cSJim JagielskiPublic StockRatesModel as Object 117*b1cdbd2cSJim JagielskiPublic StartUpModel as Object 118*b1cdbd2cSJim JagielskiPublic StockRatesTitle(1 To 3) 119*b1cdbd2cSJim JagielskiPublic TransactTitle(1 To 2) 120*b1cdbd2cSJim JagielskiPublic NullList() 121*b1cdbd2cSJim JagielskiPublic sStartupWelcome$, sStartupChooseMarket$, sStartupHint$ 122*b1cdbd2cSJim Jagielski 123*b1cdbd2cSJim JagielskiPublic sMarket(7,10) as String 124*b1cdbd2cSJim JagielskiPublic sCountryMarket(7,10) as String 125*b1cdbd2cSJim Jagielski 126*b1cdbd2cSJim JagielskiPublic cDlgCaption1$, cDlgCaption2$ 127*b1cdbd2cSJim JagielskiPublic sMsgError$, sMsgNoName$, sMsgNoQuantity$, sMsgNoDividend$, sMsgNoExchangeRate$ 128*b1cdbd2cSJim JagielskiPublic sMsgNoValidExchangeDate$, sMsgWrongExchangeDate$, sMsgSellTooMuch$, sMsgConfirm$ 129*b1cdbd2cSJim JagielskiPublic sMsgFreeStock$, sMsgTotalLoss$, sMsgEndDatebeforeNow$, sMsgStartDatebeforeEndDate$ 130*b1cdbd2cSJim Jagielski 131*b1cdbd2cSJim JagielskiPublic sOk$, sCancel$ 132*b1cdbd2cSJim JagielskiPublic sMsgAuthorization$, sMsgDeleteAll$ 133*b1cdbd2cSJim JagielskiPublic SellMethod$ 134*b1cdbd2cSJim JagielskiPublic cSplit$ 135*b1cdbd2cSJim JagielskiGlobal HistoryChartSource as String 136*b1cdbd2cSJim JagielskiPublic DateCellStyle as String 137*b1cdbd2cSJim JagielskiPublic CurrCellStyle as String 138*b1cdbd2cSJim JagielskiPublic sStartDate$, sEndDate$, sHistory$ 139*b1cdbd2cSJim JagielskiPublic sInsertStockname$ 140*b1cdbd2cSJim JagielskiPublic sProductname$, sTitle$ 141*b1cdbd2cSJim JagielskiPublic sInsertStocks$, sStockname$, sNoInternetUpdate$, sMarketplace$, sNoInternetDataAvailable$ 142*b1cdbd2cSJim JagielskiPublic sCheckInternetSettings as String 143*b1cdbd2cSJim Jagielski 144*b1cdbd2cSJim JagielskiSub LoadLanguage() 145*b1cdbd2cSJim Jagielski LoadDepotDialogs() 146*b1cdbd2cSJim Jagielski Select Case sDocLanguage 147*b1cdbd2cSJim Jagielski Case "de" 148*b1cdbd2cSJim Jagielski LoadGermanLanguage() 149*b1cdbd2cSJim Jagielski Case "en" 150*b1cdbd2cSJim Jagielski LoadEnglishLanguage() 151*b1cdbd2cSJim Jagielski Case "fr" 152*b1cdbd2cSJim Jagielski LoadFrenchLanguage() 153*b1cdbd2cSJim Jagielski Case "it" 154*b1cdbd2cSJim Jagielski LoadItalianLanguage() 155*b1cdbd2cSJim Jagielski Case "es" 156*b1cdbd2cSJim Jagielski LoadSpanishLanguage() 157*b1cdbd2cSJim Jagielski Case "sv" 158*b1cdbd2cSJim Jagielski LoadSwedishLanguage() 159*b1cdbd2cSJim Jagielski Case "ja" 160*b1cdbd2cSJim Jagielski LoadJapaneseLanguage() 161*b1cdbd2cSJim Jagielski Case "ko" 162*b1cdbd2cSJim Jagielski LoadKoreanLanguage() 163*b1cdbd2cSJim Jagielski Case "zh" 164*b1cdbd2cSJim Jagielski If sDocCountry = "CN" Then 165*b1cdbd2cSJim Jagielski LoadChineseSimpleLanguage() 166*b1cdbd2cSJim Jagielski Else 167*b1cdbd2cSJim Jagielski LoadChineseTradLanguage() 168*b1cdbd2cSJim Jagielski End If 169*b1cdbd2cSJim Jagielski End Select 170*b1cdbd2cSJim Jagielski InitializeStartUpModel() 171*b1cdbd2cSJim JagielskiEnd Sub 172*b1cdbd2cSJim Jagielski 173*b1cdbd2cSJim JagielskiSub CompleteMarketList() 174*b1cdbd2cSJim JagielskiDim EuroIndex as Integer 175*b1cdbd2cSJim JagielskiDim LocCountry as String 176*b1cdbd2cSJim JagielskiDim LocLanguage as String 177*b1cdbd2cSJim JagielskiDim sLangList() as String 178*b1cdbd2cSJim JagielskiDim sCountryList() as String 179*b1cdbd2cSJim JagielskiDim sExtensionList() as String 180*b1cdbd2cSJim JagielskiDim MaxIndex as Integer 181*b1cdbd2cSJim JagielskiDim bIsLocale as Boolean 182*b1cdbd2cSJim Jagielski 183*b1cdbd2cSJim Jagielski GlobListIndex = -1 184*b1cdbd2cSJim Jagielski For n = 0 To 5 185*b1cdbd2cSJim Jagielski LocLanguage = sMarket(n,6) 186*b1cdbd2cSJim Jagielski LocCountry = sMarket(n,7) 187*b1cdbd2cSJim Jagielski If Instr(1,LocLanguage,";",SBBINARY) = 0 Then 188*b1cdbd2cSJim Jagielski bIsLocale = CheckDocLocale(LocLanguage, LocCountry) 189*b1cdbd2cSJim Jagielski Else 190*b1cdbd2cSJim Jagielski EuroIndex = 0 191*b1cdbd2cSJim Jagielski sLangList() = ArrayoutofString(LocLanguage, ";", MaxIndex) 192*b1cdbd2cSJim Jagielski sCountryList() = ArrayoutofString(LocCountry, ";", MaxIndex) 193*b1cdbd2cSJim Jagielski sExtensionList() = ArrayoutofString(sMarket(n,8), ";", MaxIndex) 194*b1cdbd2cSJim Jagielski For m = 0 To MaxIndex 195*b1cdbd2cSJim Jagielski bIsLocale = CheckDocLocale(sLangList(m), sCountryList(m)) 196*b1cdbd2cSJim Jagielski If bIsLocale Then 197*b1cdbd2cSJim Jagielski EuroIndex = m 198*b1cdbd2cSJim Jagielski Exit For 199*b1cdbd2cSJim Jagielski End If 200*b1cdbd2cSJim Jagielski Next m 201*b1cdbd2cSJim Jagielski sMarket(n,6) = sLangList(EuroIndex) 202*b1cdbd2cSJim Jagielski sMarket(n,7) = sCountryList(EuroIndex) 203*b1cdbd2cSJim Jagielski sMarket(n,8) = sExtensionList(EuroIndex) 204*b1cdbd2cSJim Jagielski End If 205*b1cdbd2cSJim Jagielski If bIsLocale Then 206*b1cdbd2cSJim Jagielski GlobListIndex = n 207*b1cdbd2cSJim Jagielski Exit For 208*b1cdbd2cSJim Jagielski End If 209*b1cdbd2cSJim Jagielski Next n 210*b1cdbd2cSJim JagielskiEnd Sub 211*b1cdbd2cSJim Jagielski 212*b1cdbd2cSJim JagielskiSub LocalizedCurrencies() 213*b1cdbd2cSJim Jagielski If GlobListIndex = -1 Then 214*b1cdbd2cSJim Jagielski sCountryMarket(0,0) = "Euro" 215*b1cdbd2cSJim Jagielski sCountryMarket(0,1) = chr(8364) 216*b1cdbd2cSJim Jagielski sCountryMarket(0,2) = "Paris" 217*b1cdbd2cSJim Jagielski sCountryMarket(0,3) = "http://fr.finance.yahoo.com/d/quotes.csv?s=<StockID>.PA&f=s4l1t1c1ghov&e=.csv" 218*b1cdbd2cSJim Jagielski sCountryMarket(0,5) = "Code" 219*b1cdbd2cSJim Jagielski sCountryMarket(0,6) = "fr" 220*b1cdbd2cSJim Jagielski sCountryMarket(0,7) = "FR" 221*b1cdbd2cSJim Jagielski sCountryMarket(0,8) = "40C" 222*b1cdbd2cSJim Jagielski sCountryMarket(0,9) = "59/9" 223*b1cdbd2cSJim Jagielski sCountryMarket(0,10) = "1" 224*b1cdbd2cSJim Jagielski 225*b1cdbd2cSJim Jagielski sCountryMarket(1,0) = "Euro" 226*b1cdbd2cSJim Jagielski sCountryMarket(1,1) = chr(8364) 227*b1cdbd2cSJim Jagielski sCountryMarket(1,2) = "Milano" 228*b1cdbd2cSJim Jagielski sCountryMarket(1,3) = "http://it.finance.yahoo.com/d/quotes.csv?s=<StockID>.MI&f=sl1d1t1c1ohgv&e=.csv" 229*b1cdbd2cSJim Jagielski sCountryMarket(1,5) = "Codice" 230*b1cdbd2cSJim Jagielski sCountryMarket(1,6) = "it" 231*b1cdbd2cSJim Jagielski sCountryMarket(1,7) = "IT" 232*b1cdbd2cSJim Jagielski sCountryMarket(1,8) = "410" 233*b1cdbd2cSJim Jagielski sCountryMarket(1,9) = "44" 234*b1cdbd2cSJim Jagielski sCountryMarket(1,10) = "1" 235*b1cdbd2cSJim Jagielski 236*b1cdbd2cSJim Jagielski sCountryMarket(2,0) = "Euro" 237*b1cdbd2cSJim Jagielski sCountryMarket(2,1) = chr(8364) 238*b1cdbd2cSJim Jagielski sCountryMarket(2,2) = "Madrid" 239*b1cdbd2cSJim Jagielski sCountryMarket(2,3) = "http://es.finance.yahoo.com/d/quotes.csv?s=<StockID>&m=MC&f=sl1d1t1c1ohgv&e=.csv" 240*b1cdbd2cSJim Jagielski sCountryMarket(2,5) = "Simbolo" 241*b1cdbd2cSJim Jagielski sCountryMarket(2,6) = "es" 242*b1cdbd2cSJim Jagielski sCountryMarket(2,7) = "ES" 243*b1cdbd2cSJim Jagielski sCountryMarket(2,8) = "40A" 244*b1cdbd2cSJim Jagielski sCountryMarket(2,9) = "44" 245*b1cdbd2cSJim Jagielski sCountryMarket(2,10) = "1" 246*b1cdbd2cSJim Jagielski 247*b1cdbd2cSJim Jagielski sCountryMarket(3,0) = "Dansk krone" 248*b1cdbd2cSJim Jagielski sCountryMarket(3,1) = "kr" 249*b1cdbd2cSJim Jagielski sCountryMarket(3,2) = "København" 250*b1cdbd2cSJim Jagielski sCountryMarket(3,3) = "http://dk.finance.yahoo.com/d/quotes.csv?s=<StockID.CO&f=sl1d1t1c1ohgv&e=.csv" 251*b1cdbd2cSJim Jagielski sCountryMarket(3,5) = "Aktiesymbol" 252*b1cdbd2cSJim Jagielski sCountryMarket(3,6) = "da" 253*b1cdbd2cSJim Jagielski sCountryMarket(3,7) = "DK" 254*b1cdbd2cSJim Jagielski sCountryMarket(3,8) = "406" 255*b1cdbd2cSJim Jagielski sCountryMarket(3,9) = "44" 256*b1cdbd2cSJim Jagielski sCountryMarket(3,10) = "1" 257*b1cdbd2cSJim Jagielski 258*b1cdbd2cSJim Jagielski sCountryMarket(4,0) = "Svensk krona" 259*b1cdbd2cSJim Jagielski sCountryMarket(4,1) = "kr" 260*b1cdbd2cSJim Jagielski sCountryMarket(4,2) = "Stockholm" 261*b1cdbd2cSJim Jagielski sCountryMarket(4,3) = "http://se.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&f=sl1d1t1c1ohgv&e=.c" 262*b1cdbd2cSJim Jagielski sCountryMarket(4,5) = "Kod" 263*b1cdbd2cSJim Jagielski sCountryMarket(4,6) = "sv" 264*b1cdbd2cSJim Jagielski sCountryMarket(4,7) = "SE" 265*b1cdbd2cSJim Jagielski sCountryMarket(4,8) = "41D" 266*b1cdbd2cSJim Jagielski sCountryMarket(4,9) = "44" 267*b1cdbd2cSJim Jagielski sCountryMarket(4,10) = "1" 268*b1cdbd2cSJim Jagielski 269*b1cdbd2cSJim Jagielski ' Taiwan Dollar 270*b1cdbd2cSJim Jagielski sCountryMarket(5,0) = "新臺幣" 271*b1cdbd2cSJim Jagielski sCountryMarket(5,1) = "¥" 272*b1cdbd2cSJim Jagielski sCountryMarket(5,2) = "代號" 273*b1cdbd2cSJim Jagielski sCountryMarket(5,3) = "http://tw.finance.yahoo.com/d/quotes.csv?s=<StockID>.TW&f=sl1d1t1c1ohgv&e=.csv" 274*b1cdbd2cSJim Jagielski sCountryMarket(5,5) = "代號" 275*b1cdbd2cSJim Jagielski sCountryMarket(5,6) = "zh" 276*b1cdbd2cSJim Jagielski sCountryMarket(5,7) = "TW" 277*b1cdbd2cSJim Jagielski sCountryMarket(5,8) = "404" 278*b1cdbd2cSJim Jagielski sCountryMarket(5,9) = "44" 279*b1cdbd2cSJim Jagielski sCountryMarket(5,10) = "1" 280*b1cdbd2cSJim Jagielski 281*b1cdbd2cSJim Jagielski ' Chinese Yuan 282*b1cdbd2cSJim Jagielski sCountryMarket(6,0) = "人民币" 283*b1cdbd2cSJim Jagielski sCountryMarket(6,1) = "¥" 284*b1cdbd2cSJim Jagielski sCountryMarket(6,2) = "代号" 285*b1cdbd2cSJim Jagielski sCountryMarket(6,3) = "http://cn.finance.yahoo.com/d/quotes.csv?s=<StockID>.SS&f=sl1d1t1c1ohgv&e=.csv" 286*b1cdbd2cSJim Jagielski sCountryMarket(6,5) = "代号" 287*b1cdbd2cSJim Jagielski sCountryMarket(6,6) = "zh" 288*b1cdbd2cSJim Jagielski sCountryMarket(6,7) = "CN" 289*b1cdbd2cSJim Jagielski sCountryMarket(6,8) = "804" 290*b1cdbd2cSJim Jagielski sCountryMarket(6,9) = "44" 291*b1cdbd2cSJim Jagielski sCountryMarket(6,10) = "1" 292*b1cdbd2cSJim Jagielski 293*b1cdbd2cSJim Jagielski ' korean Won 294*b1cdbd2cSJim Jagielski sCountryMarket(7,0) = "한국 원화" 295*b1cdbd2cSJim Jagielski sCountryMarket(7,1) = "₩" 296*b1cdbd2cSJim Jagielski sCountryMarket(7,2) = "서울" 297*b1cdbd2cSJim Jagielski sCountryMarket(7,3) = "http://kr.finance.yahoo.com/d/quotes.csv?s=<StockID>.KS&f=snl1d1t1c1ohgv&e=.csv" 298*b1cdbd2cSJim Jagielski sCountryMarket(7,5) = "종목 코드" 299*b1cdbd2cSJim Jagielski sCountryMarket(7,6) = "ko" 300*b1cdbd2cSJim Jagielski sCountryMarket(7,7) = "KR" 301*b1cdbd2cSJim Jagielski sCountryMarket(7,8) = "412" 302*b1cdbd2cSJim Jagielski sCountryMarket(7,9) = "44" 303*b1cdbd2cSJim Jagielski sCountryMarket(7,10) = "2" 304*b1cdbd2cSJim Jagielski 305*b1cdbd2cSJim Jagielski 306*b1cdbd2cSJim Jagielski' sCountryMarket(5,0) = "Российский рубль" 307*b1cdbd2cSJim Jagielski' sCountryMarket(5,1) = "р." 308*b1cdbd2cSJim Jagielski' sCountryMarket(5,2) = "" 309*b1cdbd2cSJim Jagielski' sCountryMarket(5,3) = "" 310*b1cdbd2cSJim Jagielski' sCountryMarket(5,5) = "" 311*b1cdbd2cSJim Jagielski' sCountryMarket(5,6) = "ru" 312*b1cdbd2cSJim Jagielski' sCountryMarket(5,7) = "RU" 313*b1cdbd2cSJim Jagielski' sCountryMarket(5,8) = "-419" 314*b1cdbd2cSJim Jagielski' sCountryMarket(5,9) = "" 315*b1cdbd2cSJim Jagielski' 316*b1cdbd2cSJim Jagielski' sCountryMarket(6,0) = "Złoty polski" 317*b1cdbd2cSJim Jagielski' sCountryMarket(6,1) = "zł" 318*b1cdbd2cSJim Jagielski' sCountryMarket(6,2) = "" 319*b1cdbd2cSJim Jagielski' sCountryMarket(6,3) = "" 320*b1cdbd2cSJim Jagielski' sCountryMarket(6,5) = "" 'Still Todo!! 321*b1cdbd2cSJim Jagielski' sCountryMarket(6,6) = "pl" 322*b1cdbd2cSJim Jagielski' sCountryMarket(6,7) = "PL" 323*b1cdbd2cSJim Jagielski' sCountryMarket(6,8) = "-415" 324*b1cdbd2cSJim Jagielski' sCountryMarket(6,9) = "" 325*b1cdbd2cSJim Jagielski' 326*b1cdbd2cSJim Jagielski' sCountryMarket(7,0) = "Türkische Lira" 327*b1cdbd2cSJim Jagielski' sCountryMarket(7,1) = "TL" 328*b1cdbd2cSJim Jagielski' sCountryMarket(7,2) = "" 329*b1cdbd2cSJim Jagielski' sCountryMarket(7,3) = "" 330*b1cdbd2cSJim Jagielski' sCountryMarket(7,5) = "" 'Still Todo!! 331*b1cdbd2cSJim Jagielski' sCountryMarket(7,6) = "tr" 332*b1cdbd2cSJim Jagielski' sCountryMarket(7,7) = "TR" 333*b1cdbd2cSJim Jagielski' sCountryMarket(7,8) = "-41F" 334*b1cdbd2cSJim Jagielski' sCountryMarket(7,9) = "" 335*b1cdbd2cSJim Jagielski 336*b1cdbd2cSJim Jagielski Dim n as Integer 337*b1cdbd2cSJim Jagielski Dim m as Integer 338*b1cdbd2cSJim Jagielski' Dim sCountryMarket(6,9) as String 339*b1cdbd2cSJim Jagielski 340*b1cdbd2cSJim Jagielski For n = 0 To Ubound(sCountryMarket(),1) 341*b1cdbd2cSJim Jagielski If sDocLanguage = sCountryMarket(n,6) and sDocCountry = sCountryMarket(n,7) Then 342*b1cdbd2cSJim Jagielski GlobListIndex = 6 343*b1cdbd2cSJim Jagielski For m = 0 To 10 344*b1cdbd2cSJim Jagielski sMarket(6,m) = sCountryMarket(n,m) 345*b1cdbd2cSJim Jagielski Next m 346*b1cdbd2cSJim Jagielski Exit For 347*b1cdbd2cSJim Jagielski End If 348*b1cdbd2cSJim Jagielski Next n 349*b1cdbd2cSJim Jagielski End If 350*b1cdbd2cSJim JagielskiEnd Sub 351*b1cdbd2cSJim Jagielski 352*b1cdbd2cSJim JagielskiSub LoadDepotDialogs() 353*b1cdbd2cSJim Jagielski DlgTransaction = LoadDialog("Depot", "Dialog2") 354*b1cdbd2cSJim Jagielski DlgStockRates = LoadDialog("Depot", "Dialog3") 355*b1cdbd2cSJim Jagielski DlgStartUp = LoadDialog("Depot", "Dialog4") 356*b1cdbd2cSJim Jagielski TransactModel = DlgTransaction.Model 357*b1cdbd2cSJim Jagielski StockRatesModel = DlgStockRates.Model 358*b1cdbd2cSJim Jagielski StartUpModel = DlgStartUp.Model 359*b1cdbd2cSJim JagielskiEnd Sub 360*b1cdbd2cSJim Jagielski 361*b1cdbd2cSJim Jagielski 362*b1cdbd2cSJim JagielskiSub InitializeStartUpModel() 363*b1cdbd2cSJim Jagielski With StartUpModel 364*b1cdbd2cSJim Jagielski .lblWelcome.Label = sStartupWelcome & Chr(13) & chr(13) & sStartUpChooseMarket 365*b1cdbd2cSJim Jagielski sStartUpHint = ReplaceString(sStartUpHint, sHistory, "<History>") 366*b1cdbd2cSJim Jagielski .lblHint.Label = sStartupHint 367*b1cdbd2cSJim Jagielski' .cmdGoOn.Enabled = Ubound(StartUpModel.lstMarkets.SelectedItems()) <> -1 368*b1cdbd2cSJim Jagielski .cmdGoOn.Label = sOK 369*b1cdbd2cSJim Jagielski .cmdCancel.Label = sCancel 370*b1cdbd2cSJim Jagielski End With 371*b1cdbd2cSJim JagielskiEnd Sub</script:module> 372