You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
6.1 KiB

Imports System.IO
Public Class frmOfficePreview
Inherits System.Windows.Forms.Form
#Region " Vom Windows Form Designer generierter Code "
Public Sub New()
MyBase.New()
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
End Sub
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
' Für Windows Form-Designer erforderlich
Private components As System.ComponentModel.IContainer
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
'Sie kann mit dem Windows Form-Designer modifiziert werden.
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
Friend WithEvents ToolBarButton1 As System.Windows.Forms.ToolBarButton
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents webOCWrapper As WebOCHostCtrl
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmOfficePreview))
Me.ToolBar1 = New System.Windows.Forms.ToolBar()
Me.ToolBarButton1 = New System.Windows.Forms.ToolBarButton()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.webOCWrapper = New WebOCHostCtrl()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'ToolBar1
'
Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.ToolBarButton1})
Me.ToolBar1.DropDownArrows = True
Me.ToolBar1.ImageList = Me.ImageList1
Me.ToolBar1.Name = "ToolBar1"
Me.ToolBar1.ShowToolTips = True
Me.ToolBar1.Size = New System.Drawing.Size(880, 25)
Me.ToolBar1.TabIndex = 13
'
'ToolBarButton1
'
Me.ToolBarButton1.ImageIndex = 0
'
'ImageList1
'
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
'
'GroupBox1
'
Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.ListBox1})
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Left
Me.GroupBox1.Location = New System.Drawing.Point(0, 25)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(208, 596)
Me.GroupBox1.TabIndex = 14
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Generierte Dokumente"
'
'ListBox1
'
Me.ListBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.ListBox1.Location = New System.Drawing.Point(3, 16)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(202, 576)
Me.ListBox1.TabIndex = 0
'
'webOCWrapper
'
Me.webOCWrapper.BrowserContextMenu = False
Me.webOCWrapper.Dock = System.Windows.Forms.DockStyle.Fill
Me.webOCWrapper.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.webOCWrapper.Location = New System.Drawing.Point(208, 25)
Me.webOCWrapper.Name = "webOCWrapper"
Me.webOCWrapper.Size = New System.Drawing.Size(672, 596)
Me.webOCWrapper.TabIndex = 15
Me.webOCWrapper.TabStop = False
'
'frmOfficePreview
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(880, 621)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.webOCWrapper, Me.GroupBox1, Me.ToolBar1})
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmOfficePreview"
Me.Text = "Dokument-Vorschau"
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Public Sub New(ByVal gd As Collection)
MyBase.New()
InitializeComponent()
Dim i As Integer
For i = 1 To gd.Count
Me.ListBox1.Items.Add(gd.Item(i))
Next
End Sub
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
Me.Close()
End Sub
Private Sub frmOfficePreview_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.ListBox1.SelectedIndex = 0
Application.DoEvents()
MyMsg.show_standardmessage(724, MsgBoxStyle.Information)
'Try
' webOCWrapper.Navigate(Me.ListBox1.SelectedItem.Text)
'Catch
'End Try
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Try
webOCWrapper.Navigate(Me.ListBox1.SelectedItem)
Catch
End Try
End Sub
Private Sub frmOfficePreview_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Dim i As Integer
Try
webOCWrapper.Navigate("")
Catch
End Try
For i = 0 To Me.ListBox1.Items.Count - 1
Try
File.Delete(Me.ListBox1.Items(i))
Catch
End Try
Next
End Sub
End Class