-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
frmCargando.frm
176 lines (157 loc) · 5.58 KB
/
frmCargando.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.ocx"
Begin VB.Form frmCargando
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Caption = "Argentum"
ClientHeight = 3180
ClientLeft = 1410
ClientTop = 3000
ClientWidth = 6585
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 267.49
ScaleMode = 0 'User
ScaleWidth = 439
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin ComctlLib.ProgressBar cargar
Height = 255
Left = 120
TabIndex = 2
Top = 2880
Width = 3855
_ExtentX = 6800
_ExtentY = 450
_Version = 327682
Appearance = 1
Min = 1e-4
End
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 2895
Left = 0
ScaleHeight = 2895
ScaleWidth = 6615
TabIndex = 0
Top = 0
Width = 6615
Begin InetCtlsObjects.Inet Inet1
Left = 1440
Top = 1200
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Cargando, por favor espere..."
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 195
Index = 3
Left = 2160
TabIndex = 1
Top = 2280
Width = 2535
End
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = " aa"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 195
Index = 2
Left = 6000
TabIndex = 3
Top = 2880
Width = 375
End
End
Attribute VB_Name = "frmCargando"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Argentum Online 0.12.2
'Copyright (C) 2002 Marquez Pablo Ignacio
'
'This program is free software; you can redistribute it and/or modify
'it under the terms of the Affero General Public License;
'either version 1 of the License, or any later version.
'
'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'Affero General Public License for more details.
'
'You should have received a copy of the Affero General Public License
'along with this program; if not, you can find it at http://www.affero.org/oagpl.html
'
'Argentum Online is based on Baronsoft's VB6 Online RPG
'You can contact the original creator of ORE at aaron@baronsoft.com
'for more information about ORE please visit http://www.baronsoft.com/
'
'
'You can contact me at:
'morgolock@speedy.com.ar
'www.geocities.com/gmorgolock
'Calle 3 numero 983 piso 7 dto A
'La Plata - Pcia, Buenos Aires - Republica Argentina
'Codigo Postal 1900
'Pablo Ignacio Marquez
Option Explicit
Private VersionNumberMaster As String
Private VersionNumberLocal As String
Private Sub Form_Load()
Label1(2).Caption = GetVersionOfTheServer()
Picture1.Picture = LoadPicture(App.Path & "\logo.jpg")
Me.VerifyIfUsingLastVersion
End Sub
Function VerifyIfUsingLastVersion()
On Error Resume Next
If Not (CheckIfRunningLastVersion) Then
If MsgBox("Tu version no es la actual, Deseas ejecutar el actualizador?. - Tu version: " & VersionNumberLocal & " Ultima version: " & VersionNumberMaster & " -- Your version is not up to date, open the launcher to update? ", vbYesNo) = vbYes Then
Call ShellExecute(Me.hWnd, "open", App.Path & "\Autoupdate.exe", "", "", 1)
End
End If
End If
End Function
Private Function CheckIfRunningLastVersion() As Boolean
Dim responseGithub As String
Dim JsonObject As Object
responseGithub = Inet1.OpenURL("https://api.github.com/repos/ao-libre/ao-server/releases/latest")
If Len(responseGithub) = 0 Then Exit Function
Set JsonObject = JSON.parse(responseGithub)
VersionNumberMaster = JsonObject.Item("tag_name")
VersionNumberLocal = GetVar(App.Path & "\Server.ini", "INIT", "VersionTagRelease")
If VersionNumberMaster = VersionNumberLocal Then
CheckIfRunningLastVersion = True
Else
CheckIfRunningLastVersion = False
End If
End Function