#Region Project Attributes
#ApplicationLabel: C2Stek
#Version: 2.2.2
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait
#iPadOrientations: Portrait
' #If RELEASE
' #CertificateFile: ios_distribution.cer
' #ProvisionFile: store.mobileprovision
' #ELSE
' #ProvisionFile: iOS_Development.mobileprovision
' #END IF
#PlistExtra:<key>NSLocationWhenInUseUsageDescription</key><string>Used to display the current navigation data.</string>
#PlistExtra:<key>NSLocationUsageDescription</key><string>Used to display the current navigation data.</string>
#End Region
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
zoomgroup = True
Page1.Initialize("Principale")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
Page1.RootPanel.LoadLayout("Principale")
NavControl.ShowPage(Page1)
App.KeyController = NavControl
NavControl.NavigationBarVisible = False
ms.Initialize ("OK")
Constats.ipadsino = App.iPadDevice
LocManager.Initialize("LocManager")
txtsearch.Initialize("TextField1")
Dim LV As LayoutValues = GetDeviceLayoutValues
lstUtenti.Initialize
lstUtentiNome.Initialize
t.Initialize("Eventi",30000 )
tmrMapBing.Initialize ("tmrMapBing",300)
Mess.Initialize ("ScaricaMessaggi", 60000)
Mess.Enabled = False
radb1.Initialize(Me, pnlradb4, "radb") : radb1.Text = "keep me logged in"
BingGestionePunti.Initialize("BingGestionePunti",1000)
BingGestionePunti.Enabled = False
tvis.Initialize("VisMarc",2000)
VisMarcBing.Initialize("VisMarcBing",2000)
'objMenu.showMenu(Page1, arrIcones, LV.Width/2, LV.Height/2)
'objMessage.ShowMessage(Page1,"OK","Menu",True)
SQL1.Initialize(File.DirDocuments, "database.db" , True)
Try
Dim ssel As String
ssel = "Drop Table MEZZISTORIA"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
Dim ssel As String
ssel = " CREATE TABLE MEZZISTORIA ([strTEID] VARCHAR(1000),nTime varchar(50), [strCarNum] varcHAR(5),[dbLon] VARCHAR(5), [dbLat] varcHAR(5),"
ssel = ssel & "[Speed] VARCHAR(5), "
ssel = ssel & "nDirection VARCHAR(1000), "
ssel = ssel & "nTEType VARCHAR(1000), "
ssel = ssel & "nGSMSignal VARCHAR(1000), "
ssel = ssel & "nGPSSignal VARCHAR(1000), "
ssel = ssel & "nFuel VARCHAR(1000), "
ssel = ssel & "nMileage VARCHAR(1000), "
ssel = ssel & "nTemp VARCHAR(1000), "
ssel = ssel & "nCarState VARCHAR(1000), "
ssel = ssel & "nTEState VARCHAR(1000), "
ssel = ssel & "nAlarmState VARCHAR(1000), Address VARCHAR(1000), Country VARCHAR(1000), "
ssel = ssel & " [id] INTEGER Not Null PRIMARY KEY AUTOINCREMENT)"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
Dim ssel As String
ssel = "Drop Table MEZZI"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
Dim ssel As String
ssel = " CREATE TABLE MEZZI ([strTEID] VARCHAR(1000),nTime varchar(50), [strCarNum] varcHAR(5),[dbLon] VARCHAR(5), [dbLat] varcHAR(5),"
ssel = ssel & "[Speed] VARCHAR(5), "
ssel = ssel & "nDirection VARCHAR(1000), "
ssel = ssel & "nTEType VARCHAR(1000), "
ssel = ssel & "nGSMSignal VARCHAR(1000), "
ssel = ssel & "nGPSSignal VARCHAR(1000), "
ssel = ssel & "nFuel VARCHAR(1000), "
ssel = ssel & "nMileage VARCHAR(1000), "
ssel = ssel & "nTemp VARCHAR(1000), "
ssel = ssel & "nCarState VARCHAR(1000), "
ssel = ssel & "nTEState VARCHAR(1000), "
ssel = ssel & "nAlarmState VARCHAR(1000), Address VARCHAR(1000), Country VARCHAR(1000), "
ssel = ssel & " [id] INTEGER Not Null PRIMARY KEY AUTOINCREMENT)"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
Dim ssel As String
ssel = "Drop Table GetUserOwnCar"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
ssel = " CREATE TABLE GetUserOwnCar ([strTEID] VARCHAR(1000),strUser VARCHAR(1000))"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Dim ssel As String
Try
ssel = " CREATE TABLE Messaggi (Messaggio VARCHAR(1000),nCreateTime varchar(50), [id] VARCHAR(1000))"
SQL1.ExecNonQuery (ssel)
Catch
End Try
Try
ssel = " CREATE TABLE LastLogin (Utente VARCHAR(1000),Memorizza VARCHAR (1), Password VARCHAR(1000),Profilo VARCHAR(10) DEFAULT 'N' ,"
ssel = ssel & "strName varchar(31),strTel varchar(23),strCompany varchar(47),strAddress varchar(47),strEmail nvarchar(47),"
ssel = ssel & "strRemark varchar(47), nTimeout INTEGER,"
ssel = ssel & "[id] INTEGER Not Null PRIMARY KEY AUTOINCREMENT)"
SQL1.ExecNonQuery (ssel)
Catch
End Try
ssel = "Select * from LastLogin "
Dim cc As ResultSet
cc = SQL1.ExecQuery( ssel)
Dim i As Int
i = 0
Do While cc.NextRow
i = 1
If cc.GetString ("Memorizza") = "S" Then
txtUser.Text = cc.GetString ("Utente")
txtPassword.Text = cc.GetString ("Password")
radb1.Checked = True
memorizzapassword = True
End If
If cc.GetString ("Profilo") = "bing" Then
bing = True
mostraprofilo = False
Else If cc.GetString ("Profilo") = "google" Then
bing = False
mostraprofilo = False
Else
mostraprofilo = True
End If
Loop
cc.Close
If i = 0 Then
mostraprofilo = True
End If
End Sub