basemainform.FormBorderStyle = Windows.Forms.FormBorderStyle.None
ApplicationMenu.Visible = False '隐藏主主菜单栏
BaseMainForm.Controls("C1StatusBar1").Visible = False
BaseMainForm.Controls("C1Ribbon1").Visible = False
basemainform.ShowInTaskBar = False
basemainform.Opacity = 0
Dim url1 As String = "http://api.k780.com:88/?app=life.time&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json"
Dim hc1 As New HttpClient(url1)
Dim str1 As String = hc1.GetData()
Output.Show(str1)
Dim jo1 As JObject = JObject.Parse(str1)
Dim d1 As Date = jo1("result")("datetime_1")
Dim t1 As Date = Date.Today.AddDays(+1)
If t1 < d1 Then
msgbox("系统时间有误,请修改系统时间!")
syscmd.project.Exit()
Else
Dim ComputeId As String = ComputerId
Dim usecount As Integer = GetConfigValue("试用次数",0)
'Dim RegOk As Boolean = GetConfigValue("注册状态",False)
Dim RegOk As Boolean = GetConfigValue("注册状态" & ComputeId ,False)
If GetConfigValue("试用起始日",#6/4/2018#) = #6/4/2018# Then
SaveConfigValue("试用起始日",#6/4/2018#)
End If
If regok = False Then
Forms("注册").open
Else
SaveConfigValue("注册状态" & ComputeId, True)
Dim url As String = "http://api.k780.com:88/?app=life.time&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json"
Dim hc As New HttpClient(url)
Dim str As String = hc.GetData()
Output.Show(str)
Dim jo As JObject = JObject.Parse(str)
Dim d As Date = jo("result")("datetime_1")
Dim t As Date = Date.Today.AddDays(+1)
If t < d Then
msgbox("时间有误,您不能进入系统!")
syscmd.project.Exit() '强制退出系统
Else
Dim usetoday As Date = GetConfigValue("试用日期",Date.today)
Dim startday As Date = GetConfigValue("试用起始日",#6/4/2018#)
If Date.Today < startday.AddDays(365) Then
Forms("登录窗口").open
FileSys.CreateDirectory("Report")
FileSys.CreateDirectory("Reports")
FileSys.CreateDirectory("Reportsjpg")
FileSys.CreateDirectory("Reportspdf")
Else
msgbox("使用时间已结束,您不能进入系统!")
syscmd.project.Exit()
End If
End If
End If
End If