/[cvs]/joko/ToolBox/Windows/VpnDial/src/Module_Main.bas
ViewVC logotype

Diff of /joko/ToolBox/Windows/VpnDial/src/Module_Main.bas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by joko, Sat Oct 8 01:01:45 2005 UTC revision 1.8 by joko, Sun Oct 9 18:42:25 2005 UTC
# Line 87  Sub Main() Line 87  Sub Main()
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
# Line 130  Sub Main() Line 136  Sub Main()
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    
# Line 158  Private Sub ReadRasEntries() Line 169  Private Sub ReadRasEntries()
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
# Line 210  Public Sub detectOnlineOfflineChange() Line 227  Public Sub detectOnlineOfflineChange()
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

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed