Region Project Attributes
#ApplicationLabel:ThreeToThirteen
'
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations:
#iPadOrientations: LandscapeRight
#Target: iPad
#ATSEnabled: False
#MinVersion: 8
#version: 1.2.5
'#If RELEASE
'#CertificateFile:ios_distribution.cer
'#ProvisionFile:AppStore_PF.mobileprovision
'#else
'#CertificateFile:ios_development.cer
'#ProvisionFile:Dev_ProvisionFile.mobileprovision
'#End If
#End Region
Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private WelcomePge As Page
Private PlayersPge As Page
Private ScorePge As Page
Private RulesPge As Page
Private StatsPge As Page
Private InfoPge As Page
Private Ticks1 As Long
Private xui As XUI
Private comma As String = ","
Private txt_score As TextField
Private TA_8 As TextView 'Edit Scren
Private gameFile As String = "gFN"
Private gmeBgnTme As String
'Private pickerlistDead As Boolean
'Private TrysToLoad As Int
'Private TrsToLoad As Int
'Private doingDemo As Boolean
Private Btn_ScoreDone As Button ' The NEXT Button on The Scoring Screen
'Private Btn_AddNames As Button ' Players scrn
'''Private Btn_AddNewName As Button ' Players scrn
'Private Btn_RemoveName As Button ' Players scrn
'Private Btn_RmveNames As Button ' Players scrn
Private Btn_ChoosePlyr As Button ' Players scrn
Private BTN_new As Button ' Players scrn
Private BtnClearAll As Button ' Players scrn
Private Btn_ClearTF As Button ' Players scrn
Private Btn_Done As Button ' Players scrn
Private Btn_select As Button ' Players scrn
Private Btn_restore As Button ' Players scrn
Private Btn_sve As Button ' Save Game Button on Game Screen
Private Btn_Get As Button ' Get Saved Game on Game Screen
Private Btn_Home As Button ' Go Home Button on Game Screen Editor
Private BtnEmergency As Button 'Last game played
Private btn_Dn As Button:Private btn_Up As Button ' score up and down
'''Private Label1 As Label ' Players scrn
'''Private Label2 As Label ' Players scrn
'''Private Label3 As Label ' Players scrn
'''Private Panel1 As Panel ' Players scrn
Private Player_1 As Label ' Players scrn
Private Player_2 As Label ' Players scrn
Private Player_3 As Label ' Players scrn
Private Player_4 As Label ' Players scrn
Private Player_5 As Label ' Players scrn
Private Player_6 As Label ' Players scrn
' Private Hand_1 As Label ' score scrn
' Private Hand_2 As Label ' score scrn
' Private Hand_3 As Label ' score scrn
' Private Hand_4 As Label ' score scrn
' Private Hand_5 As Label ' score scrn
' Private Hand_6 As Label ' score scrn
' Private Hand_7 As Label ' score scrn
' Private Hand_8 As Label ' score scrn
' Private Hand_9 As Label ' score scrn
' Private Hand_10 As Label ' score scrn
' Private Hand_11 As Label ' score scrn
Private Lbl_PlayerNick As Label ' The Name on Scoring Screen
Private lbl_scr_1 As Label ' The Quantity for number of Aces on Scoring Screen
Private lbl_scr_10 As Label ' The Quantity for number of 10s on Scoring Screen
Private lbl_scr_2 As Label ' The Quantity for number of 2s on Scoring Screen
Private Lbl_scr_3 As Label ' The Quantity for number of 3s on Scoring Screen
Private lbl_scr_4 As Label ' The Quantity for number of 4s on Scoring Screen
Private lbl_scr_5 As Label ' The Quantity for number of 5s on Scoring Screen
Private lbl_scr_6 As Label ' The Quantity for number of 6s on Scoring Screen
Private lbl_scr_7 As Label ' The Quantity for number of 7s on Scoring Screen
Private lbl_scr_8 As Label ' The Quantity for number of 8s on Scoring Screen
Private lbl_scr_9 As Label ' The Quantity for number of 9s on Scoring Screen
Private lbl_scr_J As Label ' The Quantity for number of Jacks on Scoring Screen
Private lbl_scr_K As Label ' The Quantity for number of Kings on Scoring Screen
Private Lbl_scr_Q As Label ' The Quantity for number of Queens on Scoring Screen
Private lbl_Scr_Tot As Label ' Screen Total on Scoring Screen
Private lcl_scr_W As Label ' The Quantity OF Wild Cards on Scoring Screen
Private Txt_FirstName As TextField 'Players Screen, first name of a player in player pool
Private Txt_LastName As TextField 'Players Screen, last name of a player in player pool
Private Txt_NickName As TextField 'Players Screen, nickname of a player in player pool
Private ImageView1 As ImageView ' Scoreboard Page (side Cards) Hand 1 /3
Private ImageView2 As ImageView ' Scoreboard Page (side Cards) Hand 2 /4
Private ImageView3 As ImageView ' Scoreboard Page (side Cards) Hand 3 /5
Private ImageView4 As ImageView ' Scoreboard Page (side Cards) Hand 4 /6
Private ImageView5 As ImageView ' Scoreboard Page (side Cards) Hand 5 /7
Private ImageView6 As ImageView ' Scoreboard Page (side Cards) Hand 6 /8
Private ImageView7 As ImageView ' Scoreboard Page (side Cards) Hand 7 /9
Private ImageView8 As ImageView ' Scoreboard Page (side Cards) Hand 8 /10
Private ImageView9 As ImageView ' Scoreboard Page (side Cards) Hand 9 /JACK
Private ImageView10 As ImageView ' Scoreboard Page (side Cards) Hand 10 /OUEEN
Private ImageView11 As ImageView ' Scoreboard Page (side Cards) Hand 11 /KING
'''Private ImageView12 As ImageView ' Scoreboard Page (side Cards)
'''Private ImageView13 As ImageView ' Scoreboard Page (side Cards)
Private Img_CrdView_1 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_2 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_3 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_4 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_5 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_6 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_7 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_8 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_9 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_10 As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_J As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_K As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_Q As ImageView 'Scoring Page (Card Image)
Private Img_CrdView_W As ImageView 'Scoring Page (Card Image)
Private IV_StartScreen As ImageView ' Welcome Screen
'Private img_Slider_4 As ImageView ' ON WELCOME sCREEN --->Stats Page
Private ImageView25 As ImageView ' On Scoring Paaage, holds image of current Wild Card
'Private img_Slider_9 As ImageView ' On info Page --->GamePge_
Private img_goback As ImageView ' On Statistics --->Welcome Page
'Private img_Slider_41 As ImageView ' on Players Page --->Scoring Page
Private img_reDo As ImageView ' On Scoring Screen ---> Sets the first Player to mgo out snf hides scoring cards
'Private img_help As ImageView ' On Welcome Page --->Info Page
Private b As ImageView ' Used a target for SENDER
Private wc_txt As TextField ' WildCard Card
Private ScorePanel As Panel ' panel that contains hand total labels (LXXXX)
'Private backPanel As Panel
'Private contentPanel As Panel
Private Editor As Panel
'''Private PanelDB As Panel
Private WCeditorSel As String
Private WildCardResults As Int ' Accumulator for Wild Cards Used
Dim PlyrPntr As Int ' Pointer to the Current Player of interest
'''Private Game_ As Int
Private Welcome_ As Int
Private Players_ As Int
Private Rules_ As Int
Private Stats_ As Int
Private Scoring_ As Int
Dim Info_ As Int
Dim pageNum As Int
Private counter As Int
'''Private WelcomePage As Int
'Private ScorePage As Int
''Private ScoreCard As Int
Private curHand As Int
Private numPlayers As Int
Private ScoreCardResult As Int
Private LHand As Int
Private wcSel As Int
Private cardCount As Int
Private Wilds(7, 14) As Int ' Wild Card Totals for each Player each hand
Private Scores(7, 14) As Int ' Score totals for each Player each hand
Private Total(7, 2) As Int ' Total Holder for scores snd Wild Cards
Private outF(13) As Int ' PlayerPntr to the plsyer who went out first
Private scoreIn(8, 14) As Int ' Contains True if Player Pointer has had score taken
Private sT(12) As String ' Two lines of comments for who went out first snd with how many wild cards
''Private r As Int ' Players scrn points to selected name on Picker1
Private hours As Label
Private PageList(8) As String
Private PageInit(8) As String
Private Plyrs(8) As String
Private PlayerPoolFileName As String= "x313PlayerPool.txt"
Private CurPlayers As String = "CurrentPlayers.txt"
Private statsData As String = "statsData.txt"
Private FirstOut(12) As String ' name of player that is first out Displayed in comments
Private cellx As String ' Edit Screen Array Pointer To Column
Private celly As String ' Edit Screen Array Pointer To Row
Private WCcoments(12) As String
Private gameInProgressRec As String
Private gameInProgressFN As String = "CurrentGame"
Private gameRescueFN As String = "RescueGame"
Private T As String
'''Private Picker1 As Picker ' Used to select players from database list
Private PickerList As List
Private ans As List
Private ans2 As List
''Private GIPList As List
'Private nxt As Boolean ' used in scoring to progress between payers
Private restoreData As Boolean
Private exitroutine As Boolean
''''Private useKeyPd As Boolean
Private sc As Label
Private lastWild As Label:Private lbl_P_1 As Label:Private lbl_P_2 As Label:Private lbl_P_3 As Label:Private lbl_P_4 As Label:Private lbl_P_5 As Label:Private lbl_P_6 As Label
Private L1001 As Label:Private L1002 As Label:Private L1003 As Label:Private L1004 As Label:Private L1005 As Label:Private L1006 As Label:Private L1007 As Label:Private L101 As Label:Private L102 As Label:Private L103 As Label
Private L104 As Label:Private L105 As Label:Private L106 As Label:Private L107 As Label:Private L2001 As Label:Private L2002 As Label:Private L2003 As Label:Private L2004 As Label:Private L2005 As Label
Private L2006 As Label:Private L2007 As Label:Private L201 As Label:Private L202 As Label:Private L203 As Label:Private L204 As Label:Private L205 As Label:Private L206 As Label:Private L207 As Label:Private L3001 As Label
Private L3002 As Label:Private L3003 As Label:Private L3004 As Label:Private L3005 As Label:Private L3006 As Label:Private L3007 As Label:Private L301 As Label:Private L302 As Label:Private L303 As Label
Private L304 As Label:Private L305 As Label:Private L306 As Label:Private L4001 As Label:Private L4002 As Label:Private L4003 As Label:Private L4004 As Label:Private L4005 As Label:Private L4006 As Label
Private L4007 As Label:Private L5001 As Label:Private L5002 As Label:Private L5003 As Label:Private L5004 As Label:Private L5005 As Label:Private L5006 As Label:Private L5007 As Label:Private L6001 As Label
Private L6002 As Label:Private L6003 As Label:Private L6004 As Label:Private L6005 As Label:Private L6006 As Label:Private L6007 As Label:Private L7001 As Label:Private L7002 As Label:Private L7003 As Label
Private L7004 As Label:Private L7005 As Label:Private L7006 As Label:Private L7007 As Label:Private L8001 As Label:Private L8002 As Label:Private L8003 As Label:Private L8004 As Label:Private L8005 As Label
Private L8006 As Label:Private L8007 As Label:Private L9001 As Label:Private L9002 As Label:Private L9003 As Label:Private L9004 As Label:Private L9005 As Label:Private L9006 As Label:Private L9007 As Label
Private A_lbl As Label:Private oldLabel As Label:Private lbl_Done As Label:Private InfoWebView As WebView:Private RulesWeb As WebView:Private lastVisibleFieldLeft As Int:Private lbl_Version As Label
Private lbl_hand As Label:Private lv_1 As Label:Private lv_2 As Label:Private lv_3 As Label:Private lv_4 As Label:Private lv_5 As Label:Private lv_6 As Label:Private ScoreCell As Label
Private wc_lbl_1 As Label:Private wc_lbl_2 As Label:Private wc_lbl_3 As Label:Private wc_lbl_4 As Label:Private wc_lbl_5 As Label:Private wc_lbl_6 As Label:Private lbl_progress As Label
'Private Button1 As Button:Private Button10 As Button:Private Button2 As Button:Private Button3 As Button:Private Button4 As Button:Private Button5 As Button:Private Button6 As Button:Private Button7 As Button:Private Button8 As Button:Private Button9 As Button
'Private Switch1 As Switch
'Private pnl_keypd As Panel
'Private Button11 As Button
Private Label8 As Label
Private TheStats As TextView
Private Btn_DeleteStatsFiles As Button
Private endGame As Boolean
Private lbl_wcPlayer As Label:Private RowLabels(14, 7) As Label
Private SBPnl As Panel
Private tprd(13) As String
Private btn_wcAccept As Button
Private btn_wcE_OK As Button
Private wcEditor As Panel
Private wcFirstOut As Button
Private fn_array(12) As String
Private onPlayerPage As Boolean
Private frstouts(12) As Int
Private wildCardDeck As List
Private tabAnalysis As Label
Private tabRAW As Label
Private WebView1 As WebView
Private dbFileList As List
Private endLineD As String = "---------------------------------------"
Private TheStatsBkUp As String
Private welcme_btn_1 As Button
Private welcome_Btn_2 As Button
Private welcome_btn_3 As Button
Private welcome_btn_4 As Button
Private welcome_btn_5 As Button
Private curPge As Page = WelcomePge
Private GoBackHome_btn As Button
Private Back2Game_btn As Button
Private WCRDWILD(12) As String
Private TimeLble As Label
Private Timer_1 As Timer
Private enableTimer As Boolean
Private tmr_pause As Switch
Private tmr_Show As Boolean
Private tmr_offset As Long
Private PlayerPanel As Panel
Private tmx(12) As String
Private outMsg(12) As String
Private LList(12) As Label
Private PrivacyPanel As Panel
Private FilesList As List
Private FilterPicker As Picker
Private StrtTime As Long
Private offset1(7) As Int
Private AllPlayers As TextView
Private PickerALL As Picker
Private PickerNOW As Picker
Private btn_xfer As Button
Private PlayerlistView As CustomListView
Private lbl_GamePlkayers As Label
Private Btn_clear_player As Button
Private Btn_AddNames As Button
Private FMData_IV As ImageView
Private RData_IV As ImageView
Private ImageView12 As ImageView
Private ImageView13 As ImageView
Private ImageView14 As ImageView
Private ImageView26 As ImageView
Private Label1 As Label
Private Label10 As Label
Private Label2 As Label
Private Label3 As Label
Private Label4 As Label
Private Label5 As Label
Private Label6 As Label
Private Label7 As Label
Private Label9 As Label
Private Panel1 As Panel
Private Panel2 As Panel
End Sub
' =========================================== GENERAL OPERATION ============================================
Private Sub Application_Start (Nav As NavigationController)
offset1(2) = 360
offset1(3) = 260
offset1(4) = 220
offset1(5) = 180
offset1(6) = 140
txt_score.Initialize("txt_score")
WCRDWILD(1) = "- 3's"
WCRDWILD(2) = "- 4's"
WCRDWILD(3) = "- 5's"
WCRDWILD(4) = "- 6's"
WCRDWILD(5) = "- 7's"
WCRDWILD(6) = "- 8's"
WCRDWILD(7) = "- 9's"
WCRDWILD(8) = "- 10's"
WCRDWILD(9) = "- J's"
WCRDWILD(10) = "- Q's"
WCRDWILD(11) = "- K's"
tprd(1) = "first":tprd(2) = "second":tprd(3) = "third":tprd(4) ="fourth":tprd(5) ="fifth":tprd(6) = "sixth":tprd(7) = "seventh":tprd(8) = "eighth":tprd(9) = "ninth":tprd(10) = "tenth":tprd(11) = "eleventh"
ScoreCell.Initialize("ScoreCell")
ans.initialize
ans2.initialize
PickerList.initialize
PageList(0) = "Welcome":PageInit(0) = "WELCOME":pageNum = 0:Welcome_ = 0
WelcomePge.Initialize(PageInit(pageNum))
WelcomePge.RootPanel.LoadLayout(PageList(pageNum))
PageInit(1) = "CHOOSE":PageList(1) = "ChoosePlayers":pageNum = 1:Players_ = 1
PlayersPge.Initialize(PageInit(pageNum))
PlayersPge.RootPanel.LoadLayout(PageList(pageNum))
PageList(4) = "Info":PageInit(4) = "INFO":pageNum = 4:Info_ = 4
RulesPge.Initialize(PageInit(pageNum))
RulesPge.RootPanel.LoadLayout(PageList(pageNum))
PageList(5) = "Rules":PageInit(5) = "RULES":pageNum = 5:Rules_ = 5
RulesPge.Initialize(PageInit(pageNum))
RulesPge.RootPanel.LoadLayout(PageList(pageNum))
PageList(6) = "statistics":PageInit(6) = "STATS":pageNum = 6:Stats_ = 6
StatsPge.Initialize(PageInit(pageNum))
StatsPge.RootPanel.LoadLayout(PageList(pageNum))
PageList(7) = "newScoreboard":PageInit(7) = "scoring":pageNum = 7:Scoring_= 7
ScorePge.Initialize(PageInit(pageNum))
ScorePge.RootPanel.LoadLayout(PageList(pageNum))
NavControl = Nav:displayPage(WelcomePge)
split("three.png,three.png,four.png,five.png,six.png,seven.png,eight.png,nine.png,ten.png,jack.png,queen.png,king.png")
wildCardDeck.Initialize
wildCardDeck.AddAll(ans)
End Sub
'Sub AppName As String
' Dim no As NativeObject
' no = no.Initialize("NSBundle").RunMethod("mainBundle", Null)
' Dim name As Object = no.RunMethod("objectForInfoDictionaryKey:", Array("CFBundleDisplayName"))
' Return name
'End Sub
Sub AppVersion As String
Dim no As NativeObject
Dim version As Object
no = no.Initialize("NSBundle").RunMethod("mainBundle", Null)
version = no.RunMethod("objectForInfoDictionaryKey:", Array("CFBundleShortVersionString"))
Return version
End Sub
'Private Sub KeyBoardUtil
' pnl_keypd.Visible = useKeyPd
' lbl_scr_J.Visible = Not(useKeyPd)
' Lbl_scr_Q.Visible = Not(useKeyPd)
' lbl_scr_K.Visible = Not(useKeyPd)
' Img_CrdView_J.Visible = Not(useKeyPd)
' Img_CrdView_Q.Visible = Not(useKeyPd)
' Img_CrdView_K.Visible = Not(useKeyPd)
'End Sub
Private Sub tROUBLE
'''' lbl_P_1.text = Plyrs(1)
'''' lbl_P_2.text = Plyrs(2)
'''' lastVisibleFieldLeft = lbl_P_6.Left + lbl_P_6.Width + 2
'''' Select numPlayers
'''' Case 2
'''' panelF_visible (False):panelE_visible (False):panelD_visible (False):panelC_visible (False)
'''' Case 3
'''' panelF_visible (False):panelE_visible (False):panelD_visible (False):panelC_visible (True):lbl_P_3.Visible = True:lbl_P_3.text = Plyrs(3)
'''' Case 4
'''' panelF_visible (False):panelE_visible (False):panelD_visible (True):panelC_visible (True):lbl_P_3.Visible = True:lbl_P_3.text = Plyrs(3):lbl_P_4.Visible = True:lbl_P_4.text = Plyrs(4)
'''' Case 5
'''' panelF_visible (False):panelE_visible (True):panelD_visible (True):panelC_visible (True):lbl_P_3.Visible = True:lbl_P_3.text = Plyrs(3):lbl_P_4.Visible = True:lbl_P_4.text = Plyrs(4):lbl_P_5.Visible = True:lbl_P_5.text = Plyrs(5)
'''' Case 6
'''' panelF_visible (True):panelE_visible (True):panelD_visible (True):panelC_visible (True):lbl_P_3.Visible = True:lbl_P_3.text = Plyrs(3):lbl_P_4.Visible = True:lbl_P_4.text = Plyrs(4):lbl_P_5.Visible = True:lbl_P_5.text = Plyrs(5):lbl_P_6.text = Plyrs(6)
'''' End Select
'''' lastVisibleFieldLeft = lastVisibleFieldLeft + 5
End Sub
Private Sub displayPage(Pge As Page)
Select Pge
Case WelcomePge
pageNum = 0:Welcome_ = 0
Case PlayersPge
pageNum = 1:Players_ = 1
Case InfoPge
pageNum = 4:Info_ = 4
Case RulesPge
pageNum = 5:Rules_ = 5
Case StatsPge
pageNum = 6:Stats_ = 6
Case ScorePge
pageNum = 7:Scoring_ = 7
End Select
curPge = Pge
If Not(Pge.IsInitialized) Then
Pge.Initialize(PageInit(pageNum)) ' Control.RemoveCurrentPage
Pge.RootPanel.LoadLayout(PageList(pageNum))
End If
onPlayerPage = False
Select Pge
Case PlayersPge
BtnClearAll.visible = True
clearPlyrs
Case StatsPge
Dim lst As List
Dim x, y As Int
Dim lne As String
Dim gameline, nxtup As String
lst.initialize
Dim x As Int
Dim htmlString As String = File.ReadString(File.DirAssets,"stats.txt")
Dim tableCell As String = "<td><center><i>PPTD</center></i></td>"
Dim dataCell_1 As String = "<td><left>"
Dim dataCell_2 As String = "</left></td>"
lne = "<h2>PlayerPool:<BR></h2>"
For x = 0 To PickerList.Size - 1
lne = lne & PickerList.Get(x) & "<BR>"
Next
htmlString = htmlString.Replace("<PLAYERPOOLDB>", lne)
dbFileList.Initialize
If File.Exists(File.DirDocuments, statsData) Then
dbFileList = File.ReadList(File.DirDocuments, statsData)
End If
gameline = "<center>"
lne = ""
split2("games,won,% won,1st outs,wildcards,wc won, full name", comma)
For x = 0 To dbFileList.Size - 1
split(dbFileList.Get(x))
gameline = gameline & dataCell_1 & "<B>" & ans.Get(0) & "</B>" & dataCell_2
' 0 1 2 3 4 5 6 7 8 9 10 11
' NickName, (LstName FirstName), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
' 0 2 3 4 5 6 7 8
' player,games,won,% won,1st outs,wildcards,wc won,player full
For y = 2 To 7
gameline = gameline & "<center>"
If y = 4 Then
If ans.Get(y) = "1" Then ans.set(y, "0.999")
End If
gameline = gameline & dataCell_1 & ans.Get(y) & dataCell_2
Next
Dim nm As String = ans.Get(1)
nm = nm.Replace( ")", "" )
nm = nm.Replace( "(", "" )
gameline = gameline & "<B>" & dataCell_1 & nm & "</B>" & dataCell_2
gameline = "<tr>" & gameline & dataCell_2 & "</tr>"
Next
nxtup = ""
split2("player,games,won,% won,1st outs,wildcards,wc won,full name", comma)
For x = 0 To ans2.Size - 1
nxtup = nxtup & tableCell.Replace("PPTD", "<B>" & ans2.Get(x) & "</B>")
Next
htmlString = htmlString.Replace("<PLAYERPOOLDATA>", nxtup)
htmlString = htmlString.Replace("<PLAYERPOOLDATA2>", gameline)
WebView1.LoadHtml( htmlString )
Dim chra, chrb As Int
For gameNum = 1 To 5000
If File.Exists(File.DirDocuments, gameFile & gameNum) Then
Dim lne As String
lne = File.ReadString(File.DirDocuments, gameFile & gameNum)
lne = lne.replace("|", "")
chra = lne.LastIndexOf("DatePlayed:") + 11
chrb = lne.LastIndexOf("^")
If chrb = -1 Then chrb =chra + 12
Dim lne2 As String = lne.substring2(chra, chrb)
' FPList.Add(lne2)
TheStats.Text = TheStats.Text & lne
TheStatsBkUp = TheStats.Text
Else
gameNum = 15000
End If
Next
Case ScorePge
RowLabels(1, 1) = L1001:RowLabels(1, 2) = L1002:RowLabels(1, 3) = L1003:RowLabels(1, 4) = L1004:RowLabels(1, 5) = L1005:RowLabels(1, 6) = L1006
RowLabels(2, 1) = L2001:RowLabels(2, 2) = L2002:RowLabels(2, 3) = L2003:RowLabels(2, 4) = L2004:RowLabels(2, 5) = L2005:RowLabels(2, 6) = L2006
RowLabels(3, 1) = L3001:RowLabels(3, 2) = L3002:RowLabels(3, 3) = L3003:RowLabels(3, 4) = L3004:RowLabels(3, 5) = L3005:RowLabels(3, 6) = L3006
RowLabels(4, 1) = L4001:RowLabels(4, 2) = L4002:RowLabels(4, 3) = L4003:RowLabels(4, 4) = L4004:RowLabels(4, 5) = L4005:RowLabels(4, 6) = L4006
RowLabels(5, 1) = L5001:RowLabels(5, 2) = L5002:RowLabels(5, 3) = L5003:RowLabels(5, 4) = L5004:RowLabels(5, 5) = L5005:RowLabels(5, 6) = L5006
RowLabels(6, 1) = L6001:RowLabels(6, 2) = L6002:RowLabels(6, 3) = L6003:RowLabels(6, 4) = L6004:RowLabels(6, 5) = L6005:RowLabels(6, 6) = L6006
RowLabels(7, 1) = L7001:RowLabels(7, 2) = L7002:RowLabels(7, 3) = L7003:RowLabels(7, 4) = L7004:RowLabels(7, 5) = L7005:RowLabels(7, 6) = L7006
RowLabels(8, 1) = L8001:RowLabels(8, 2) = L8002:RowLabels(8, 3) = L8003:RowLabels(8, 4) = L8004:RowLabels(8, 5) = L8005:RowLabels(8, 6) = L8006
RowLabels(9, 1) = L9001:RowLabels(9, 2) = L9002:RowLabels(9, 3) = L9003:RowLabels(9, 4) = L9004:RowLabels(9, 5) = L9005:RowLabels(9, 6) = L9006
RowLabels(10, 1) = L101:RowLabels(10, 2) = L102:RowLabels(10, 3) = L103:RowLabels(10, 4) = L104:RowLabels(10, 5) = L105:RowLabels(10, 6) = L106
RowLabels(11, 1) = L201:RowLabels(11, 2) = L202:RowLabels(11, 3) = L203:RowLabels(11, 4) = L204:RowLabels(11, 5) = L205:RowLabels(11, 6) = L206
End Select
NavControl.NavigationBarVisible = False
Pge.RootPanel.Color = 0xFFFAEBD7
NavControl.ShowPage(Pge) ' animated display transition = ShowPage2(Pge, animation)
nextsub
End Sub
Private Sub nextsub
Select pageNum
Case Welcome_
If Not(lbl_Version.isinitialized) Then lbl_Version.Initialize("lbl_Version")
lbl_Version.Text = "v" & AppVersion
Case Players_
Dim lne As String
Dim x As Int
onPlayerPage = True
''' If restoreData Then
''' File.Delete(File.dirDocuments, PlayerPoolFileName)
''' File.Delete(File.dirDocuments, CurPlayers)
''' End If
If File.Exists(File.dirDocuments, PlayerPoolFileName) Then
PickerList = File.ReadList(File.dirDocuments, PlayerPoolFileName)
If PickerList.Size<2 Then
'pickerlistDead = True
End If
Else
'pickerlistDead = True
PickerList.Clear
File.WriteList(File.dirDocuments, PlayerPoolFileName, PickerList)
PickerList.clear
PickerList= File.ReadList(File.dirDocuments, PlayerPoolFileName)
PickerList.SortCaseInsensitive(True)
PickerALL.SetItems(0, PickerList)
Dim lst As List
lst.initialize
clearPlyrs
'TrsToLoad = TrsToLoad + 1
'If pickerlistDead Then
'If TrsToLoad<2 Then
'GeneralMessage("The current players list is empty. It looks like it is the first time you are using this app." & CRLF & "We will add two demo players so that you can progress on your tour" & CRLF & "To erase the demo players tap 'Clear Players for next game' and add your own names.")
'Plyrs(1) = "Bob"
'Plyrs(2) = "Wanda"
'lst.add(Plyrs(1))
'lst.add(Plyrs(2))
'pickerlistDead = False
'File.WriteList(File.DirDocuments,CurPlayers,lst)
'doingDemo = True
'numPlayers = 2
'End If
'End If
If File.Exists(File.DirDocuments,CurPlayers) Then
lst = File.ReadList(File.DirDocuments,CurPlayers)
numPlayers = lst.Size
UpdatePlayers
For x = 1 To lst.Size
Plyrs(x) = lst.Get(x-1)
Next
Else
Dim lne2 As String = "-,(-,-)^-,(-,-)^-,(-,-)^-,(-,-)^-,(-,-)^-,(-,-)"
lne = ""
For x = 0 To PickerList.Size - 1
lne = lne & PickerList.Get(x) & "^"
Next
ans.Clear
lne = lne & lne2
split2(lne, "^")
For x = 0 To 5
TakeApartData(ans2.Get(x))
Plyrs(x + 1) = ans2.Get(0) 'POSSIBLE BUG
Next
End If
Player_1.text = Plyrs(1):Player_2.text = Plyrs(2):Player_3.text = Plyrs(3):Player_4.text = Plyrs(4):Player_5.text = Plyrs(5):Player_6.text = Plyrs(6)
If File.Exists(File.DirDocuments, gameInProgressFN) Then
gameInProgressRec = File.ReadString(File.DirDocuments, gameInProgressFN)
split(gameInProgressRec)
End If
'''If numPlayers>0 Then numPlayers = numPlayers-1
Case Info_
Dim htmlString As String = File.ReadString(File.DirAssets, "Info.html")
InfoWebView.Color = ( 0xFFFAEBD7 )
InfoWebView.LoadHtml( htmlString )
Case Rules_
Dim htmlString As String = File.ReadString(File.DirAssets, "GameRules.html")
RulesWeb.LoadHtml(htmlString )
Case Stats_
RData_IV_Click
ScoreCardResult = 0
WildCardResults = 0
txt_score.text = "0"
lv_1.Text = Plyrs(1):lv_2.Text = Plyrs(2):lv_3.Text = Plyrs(3):lv_4.Text = Plyrs(4):lv_5.Text = Plyrs(5):lv_6.Text = Plyrs(6)
lbl_wcPlayer.Text = "select player "
Lbl_PlayerNick.Text= "" ' Name on Scoring Screen
LblUt(lbl_scr_1)
LblUt(lbl_scr_2)
LblUt(Lbl_scr_3)
LblUt(lbl_scr_4)
LblUt(lbl_scr_5)
LblUt(lbl_scr_6)
LblUt(lbl_scr_7)
LblUt(lbl_scr_8)
LblUt(lbl_scr_9)
LblUt(lbl_scr_10)
LblUt(lbl_scr_J)
LblUt(Lbl_scr_Q)
LblUt(lbl_scr_K)
LblUt(lcl_scr_W)
cardCount= 0
lbl_Scr_Tot.Text= "0/0" ' Screen Total on Scoring Screen
If curHand = 0 Then curHand = 1
PrintScores
Case Scoring_
cardCount = cardCount
''' If doingDemo Then
''' Dim x, y, scre As Int
''' doingDemo = False
''' For y = 1 To 2
''' For x = 1 To 10
''' Scores(y,x)= Y
''' Next
''' Next
''' numPlayers = 2
''' End If
End If
End Select
End Sub
Private Sub LblUt(L As Label)
L.Text = "0"`
L.Visible = False
End Sub
Private Sub clearPlyrs
Dim x As Int
For x = 1 To 6
Plyrs(x) = ""
Next
Player_1.Text = ""
Player_2.Text = ""
Player_3.Text = ""
Player_4.Text = ""
Player_5.Text = ""
Player_6.Text = "
End Sub