- compactddnsplusvnc.zip
- CompactDDNS
- CompactDDNS Setup
- CompactDDNS_Setup.vddproj
- CompactDDNS.sln
- CompactDDNS
- CompactDDNS.vbproj
- CompactDDNS.vbproj.user
- CompactVNC.exe
- ConfigurationInfo.bak
- ddns.ico
- DDNS_Configuration.vb
- frmMain.resx
- frmMain.vb
- frmOptions.resx
- frmOptions.vb
- Logger.vb
- modGlobals.vb
- modMain.vb
- modMainOpenNetCF.vb
- My Project
- resources
- active_sync.bmp
- active_sync_off.bmp
- add.bmp
- alarm.bmp
- alarm.gif
- alarm_event.bmp
- alarm_grey.bmp
- alarm_red.bmp
- alarm_yellow.bmp
- application.bmp
- back.bmp
- bluebox.bmp
- comms.bmp
- contact_closed.bmp
- contact_open.bmp
- contact_orange.bmp
- ddns.bmp
- ddns.ico
- delete.bmp
- delete_disabled.bmp
- device.bmp
- device_offline.bmp
- device_online.bmp
- eye.bmp
- go.bmp
- gprs_off.bmp
- gprs_off_disabled.bmp
- gprs_on.bmp
- guage.bmp
- home.bmp
- ie.bmp
- led_green2.bmp
- led_grey2.bmp
- led_red2.bmp
- net_connected.bmp
- net_disconnected.bmp
- network.bmp
- open_control.bmp
- pda.bmp
- power.bmp
- properties.bmp
- question.bmp
- refresh.bmp
- refresh_chart.bmp
- running.bmp
- save.bmp
- screen.bmp
- settings.bmp
- sip_off.bmp
- sip_on.bmp
- star_group.bmp
- start.bmp
- start_comms.bmp
- stop.bmp
- stop_comms.bmp
- stop_running.bmp
- stop_watch.bmp
- tools.bmp
- tree.bmp
- valid.bmp
- VNC_Svr.bmp
- watchdog.bmp
- WiFi.bmp
- wifi_0.bmp
- wifi_0_disabled.bmp
- wifi_1.bmp
- wifi_2.bmp
- wifi_3.bmp
- wifi_4.bmp
- wifi_5.bmp
- wifi_off.bmp
- wifi_off_disabled.bmp
- wifi_on.bmp
- workgroup.bmp
- ddns.bmp
- ddns.ico
- Desktop.ini
- PhoneLib
|
Imports System.IO
Imports System.Reflection
Module modMain
Public fMain As FrmMain
Public WithEvents ni As OpenNETCF.Windows.Forms.NotifyIcon
Sub Main()
Try
Globals.getIcons()
ni = New OpenNETCF.Windows.Forms.NotifyIcon()
AddHandler ni.Click, AddressOf TrayIcon_Click
ni.Icon = Globals.AppIcon
ni.Text = "CompactDDNS"
ni.Visible = True
fMain = New FrmMain
Application.Run(fMain)
RemoveHandler ni.Click, AddressOf TrayIcon_Click
ni.Dispose()
Catch ex As Exception
Debug.WriteLine("Error on Exit Main - " & ex.Message)
End Try
Application.Exit()
End Sub
Public Sub TrayIcon_Click(ByVal sender As Object, ByVal e As System.EventArgs)
fMain.Visible = True
fMain.Focus()
End Sub
Public Sub OnEx(ByVal ex As Exception)
If Logger.FileName = "" Then
SystemLogFile = AppPath & "Logs\SystemLog_" & Format(Now.Month, "0#") & Format(Now.Year - 2000, "0#") & ".txt"
Logger.SetFile(SystemLogFile, True, False)
End If
Logger.Log(ex)
End Sub
Public Sub Log(ByVal message As String)
Try
If LogNetworkEvents Then
If Logger.FileName = "" Then
SystemLogFile = AppPath & "Logs\SystemLog_" & Format(Now.Month, "0#") & Format(Now.Year - 2000, "0#") & ".txt"
Logger.SetFile(SystemLogFile, True, False)
End If
Logger.Log(message)
End If
Catch ex As Exception
Debug.WriteLine("Log error : " & ex.Message)
End Try
End Sub
Public Function IsFirstRun() As Boolean
If Not File.Exists(ConfigFile) Then
Try
File.Copy(AppPath & "ConfigurationInfo.bak", ConfigFile)
Return True
Catch ex As Exception
OnEx(ex)
Return True
End Try
End If
Return False
End Function
End Module
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Control systems engineer turned software developer.
Largely .NET developer with a strong focus on development for windows mobile devices.
Have also started an open source project called 'SCADA.Net' and have added some really cool libraries to the project. Once I get some documentation to go with the project it should be of some interest to anyone interested in control systems. This project can be found at http://sourceforge.net/projects/scadanet/