87 |
conName = cmdline.getArgument("setup") |
conName = cmdline.getArgument("setup") |
88 |
If conName <> "" Then |
If conName <> "" Then |
89 |
|
|
90 |
|
On Error Resume Next |
91 |
Set rasItem = RasEntries(conName) |
Set rasItem = RasEntries(conName) |
92 |
|
If Err.Number <> 0 Then |
93 |
|
MsgBox "Error while accessing RAS entry """ & conName & """." & vbCrLf & "Probably it does not exist?" |
94 |
|
End |
95 |
|
End If |
96 |
|
On Error GoTo 0 |
97 |
|
|
98 |
If cmdline.hasSwitch("gui") Then |
If cmdline.hasSwitch("gui") Then |
99 |
With Form_Credentials |
With Form_Credentials |
136 |
'RasRetrieveConnectionHandler conName |
'RasRetrieveConnectionHandler conName |
137 |
ConnectionName = conName |
ConnectionName = conName |
138 |
ConnectionOnline = RasIsOnline(conName) |
ConnectionOnline = RasIsOnline(conName) |
139 |
|
|
140 |
|
If cmdline.hasSwitch("gui") Then |
141 |
|
ShowTrayIcon Form_Main, getTrayIconTipText(ConnectionName, ConnectionOnline) |
142 |
|
End If |
143 |
|
|
144 |
MonitorRASStatusAsync |
MonitorRASStatusAsync |
145 |
End If |
End If |
146 |
|
|
169 |
rasItem.PhonebookPath = curEntry.PhonebookPath |
rasItem.PhonebookPath = curEntry.PhonebookPath |
170 |
rasItem.Win2000_SystemPhonebook = curEntry.Win2000_SystemPhonebook |
rasItem.Win2000_SystemPhonebook = curEntry.Win2000_SystemPhonebook |
171 |
|
|
172 |
|
'MsgBox rasItem.entryname |
173 |
|
On Error Resume Next |
174 |
RasEntries.add rasItem, rasItem.entryname |
RasEntries.add rasItem, rasItem.entryname |
175 |
|
If Err.Number = 457 Then |
176 |
|
MsgBox "Error: Duplicate RAS entry. Don't know what to dial. This error should not occour." |
177 |
|
End If |
178 |
|
On Error GoTo 0 |
179 |
Next i |
Next i |
180 |
|
|
181 |
End Sub |
End Sub |
227 |
End If |
End If |
228 |
|
|
229 |
ConnectionOnline = isOnline |
ConnectionOnline = isOnline |
230 |
|
|
231 |
|
UpdateTrayIcon getTrayIconTipText(ConnectionName, ConnectionOnline) |
232 |
|
|
233 |
End If |
End If |
234 |
End Sub |
End Sub |
235 |
|
|
236 |
|
Private Function getTrayIconTipText(conName As String, isOnline As Boolean) As String |
237 |
|
Dim TipText As String |
238 |
|
TipText = "VpnDial monitoring """ & conName & """: " |
239 |
|
If isOnline Then |
240 |
|
TipText = TipText & "online" |
241 |
|
Else |
242 |
|
TipText = TipText & "offline" |
243 |
|
End If |
244 |
|
getTrayIconTipText = TipText |
245 |
|
End Function |