Sub mnuPagel_Click
Dim Map1 As Map
Map1.Initialize
Dim btmp As Bitmap
Dim Id As InputDialog
Dim ct1 As CustomToast
btmp.Initialize(File.DirAssets,"android48.png")
ct1.Initialize
'Id.PasswordMode = True
'Id.InputType =Id.INPUT_TYPE_DECIMAL_NUMBERS
'Id.InputType = Id.INPUT_TYPE_NUMBERS
'Id.InputType = Id.INPUT_TYPE_PHONE
Id.InputType = Id.INPUT_TYPE_text
Id.Input = ""
Id.Hint = "Skriv inn filnamnet!"
Id.HintColor = Colors.ARGB(196, 255, 140, 0)
ret = DialogResponse.CANCEL
ret = Id.Show("Skriv inn filnamnet", "Pulsdialog", "Ok", "Angre", "", bmp)
If ret = -1 Then
lagre = Id.Input
For i = 1 To 7
Map1.Put("Item #1","Makspuls" )
Map1.Put("Item #2","Bmi ")
Map1.Put("Item #3","Fitnesid")
Map1.Put("Item #4","Fitneskat")
Map1.Put("Item #5","pulssone lett")
Map1.Put("Item #6" ,"Pulsone At" , Round(at1)& " " & Round(at2) &"")
Map1.Put("item #7","Pulsone Vo2max" , Round(vo1)& " " & Round(vo2) &"")
Next
File.WriteMap(File.DirRootExternal & "/pulsdata", lagre & ".txt", Map1)
ct1.ShowBitmap(" Filen er lagra som " & lagre & ".txt",2000,Gravity.top,20,20,btmp)
End If
End Sub
'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Meny hente """""""""""""""""""""""""""""""""""""""""""""""""""
Sub mnuPage3_Click
Dim Map1 As Map
Dim sb As StringBuilder
Dim ret As Float
Dim fd As FileDialog
'Map1.Put("Item #1", "")
'Map1.Put("Item #2", "")
fd.FastScroll = True
'fd.ShowOnlyFolders = True
fd.FilePath = (File.DirRootExternal & "/pulsdata") ' also sets ChosenName to an emtpy string
'fd.ShowOnlyFolders = true
'fd.FileFilter = ".txt" ' for example or ".jpg,.png" for multiple file types
ret = fd.Show("Pulsdialog", "Ok", "", "", bmp)
opne= fd.ChosenName
If File.Exists(File.DirRootExternal & "/pulsdata", opne) = True Then
Map1.Put("Item #1","" )
Map1.Put("Item #2","")
Map1.Put("Item #3","")
Map1.Put("Item #4","")
Map1.Put("Item #5","")
Map1.Put("Item #6" ,"")
Map1.Put("item #7","")
Map1 = File.ReadMap2(File.DirRootExternal & "/pulsdata", opne,Map1)
sb.Initialize
sb.Append("Dine verdier er:").Append(CRLF).Append(CRLF)
For i = 0 To Map1.Size - 1
sb.Append("").Append(Map1.GetKeyAt(i)).Append(" = ")
sb.Append(Map1.GetValueAt(i)).Append(CRLF)
Next
Msgbox(sb.ToString,"")
End If
If ret = -2 Then
ToastMessageShow(" Helge T", False)
End If