?? logerror.vb
字號:
Public NotInheritable Class LogError
Private Const c_EventSource As String = "TaskVision"
Private Const c_LogName As String = "Application"
Public Shared Sub Write(ByVal errorMessage As String)
Try
'the event source should be created during the installation process
If EventLog.SourceExists(c_EventSource) Then
'write the message as an error
Dim msg As EventLog = New EventLog(c_LogName)
msg.Source = c_EventSource
msg.WriteEntry(errorMessage, EventLogEntryType.Error)
Else
'try to create the event source for the next error (this requires admin rights)
EventLog.CreateEventSource(c_EventSource, c_LogName)
End If
Catch
End Try
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -