42 lines
1.2 KiB
VB.net
42 lines
1.2 KiB
VB.net
Imports System.ComponentModel
|
|
Imports DigitalData.Modules.Logging
|
|
|
|
Public Class frmTest_SubForm
|
|
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)
|
|
|
|
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
|
|
|
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
|
DocumentViewer1.LoadFile(FilePath)
|
|
End Sub
|
|
End Class |