documentviewer test
This commit is contained in:
40
GUIs.Test.DocumentViewerTest/Form4.vb
Normal file
40
GUIs.Test.DocumentViewerTest/Form4.vb
Normal file
@@ -0,0 +1,40 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class Form4
|
||||
Public FilePath As String
|
||||
Private Key As String
|
||||
Private LogConfig As LogConfig
|
||||
Private Logger As Logger
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Key As String)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Me.LogConfig = LogConfig
|
||||
Me.Key = Key
|
||||
End Sub
|
||||
|
||||
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Logger = LogConfig.GetLogger
|
||||
Logger.Info("DocumentViewer Form Loaded")
|
||||
DocumentViewer1.Init(LogConfig, Key)
|
||||
DocumentViewer1.LoadFile(FilePath)
|
||||
Logger.Info("File Loaded")
|
||||
End Sub
|
||||
|
||||
Private Sub Form2_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
|
||||
Logger.Info("Form closed")
|
||||
End Sub
|
||||
|
||||
Private Sub Form2_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
|
||||
DocumentViewer1.Done()
|
||||
Logger.Info("Form closing")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user