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