diff --git a/GUIs.Test.TestGUI/My Project/Application.Designer.vb b/GUIs.Test.TestGUI/My Project/Application.Designer.vb index 9942632e..647fa3d6 100644 --- a/GUIs.Test.TestGUI/My Project/Application.Designer.vb +++ b/GUIs.Test.TestGUI/My Project/Application.Designer.vb @@ -32,7 +32,7 @@ Namespace My _ Protected Overrides Sub OnCreateMainForm() - Me.MainForm = Global.TestGUI.frmDocViewPure + Me.MainForm = Global.TestGUI.frmDocView End Sub End Class End Namespace diff --git a/GUIs.Test.TestGUI/My Project/Application.myapp b/GUIs.Test.TestGUI/My Project/Application.myapp index 19b75e50..bc0296a8 100644 --- a/GUIs.Test.TestGUI/My Project/Application.myapp +++ b/GUIs.Test.TestGUI/My Project/Application.myapp @@ -1,7 +1,7 @@  true - frmDocViewPure + frmDocView false 0 true diff --git a/GUIs.Test.TestGUI/frmDocView.Designer.vb b/GUIs.Test.TestGUI/frmDocView.Designer.vb index b6da649b..cbb52374 100644 --- a/GUIs.Test.TestGUI/frmDocView.Designer.vb +++ b/GUIs.Test.TestGUI/frmDocView.Designer.vb @@ -22,25 +22,18 @@ Partial Class frmDocView 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() - Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer() Me.Panel1 = New System.Windows.Forms.Panel() - Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() + Me.TextBox1 = New System.Windows.Forms.TextBox() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() + Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' - 'DocumentViewer1 - ' - Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Bottom - Me.DocumentViewer1.FileLoaded = False - Me.DocumentViewer1.Location = New System.Drawing.Point(0, 43) - Me.DocumentViewer1.Name = "DocumentViewer1" - Me.DocumentViewer1.Size = New System.Drawing.Size(1079, 463) - Me.DocumentViewer1.TabIndex = 0 - ' 'Panel1 ' + Me.Panel1.Controls.Add(Me.Button2) Me.Panel1.Controls.Add(Me.Button1) Me.Panel1.Controls.Add(Me.TextBox1) Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill @@ -49,12 +42,14 @@ Partial Class frmDocView Me.Panel1.Size = New System.Drawing.Size(1079, 43) Me.Panel1.TabIndex = 1 ' - 'TextBox1 + 'Button2 ' - Me.TextBox1.Location = New System.Drawing.Point(12, 12) - Me.TextBox1.Name = "TextBox1" - Me.TextBox1.Size = New System.Drawing.Size(846, 20) - Me.TextBox1.TabIndex = 0 + Me.Button2.Location = New System.Drawing.Point(992, 10) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(75, 23) + Me.Button2.TabIndex = 1 + Me.Button2.Text = "Unload File" + Me.Button2.UseVisualStyleBackColor = True ' 'Button1 ' @@ -65,10 +60,26 @@ Partial Class frmDocView Me.Button1.Text = "Open File" Me.Button1.UseVisualStyleBackColor = True ' + 'TextBox1 + ' + Me.TextBox1.Location = New System.Drawing.Point(12, 12) + Me.TextBox1.Name = "TextBox1" + Me.TextBox1.Size = New System.Drawing.Size(846, 20) + Me.TextBox1.TabIndex = 0 + ' 'OpenFileDialog1 ' Me.OpenFileDialog1.FileName = "OpenFileDialog1" ' + 'DocumentViewer1 + ' + Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Bottom + Me.DocumentViewer1.FileLoaded = False + Me.DocumentViewer1.Location = New System.Drawing.Point(0, 43) + Me.DocumentViewer1.Name = "DocumentViewer1" + Me.DocumentViewer1.Size = New System.Drawing.Size(1079, 463) + Me.DocumentViewer1.TabIndex = 0 + ' 'frmDocView ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -89,4 +100,5 @@ Partial Class frmDocView Friend WithEvents Button1 As Button Friend WithEvents TextBox1 As TextBox Friend WithEvents OpenFileDialog1 As OpenFileDialog + Friend WithEvents Button2 As Button End Class diff --git a/GUIs.Test.TestGUI/frmDocView.vb b/GUIs.Test.TestGUI/frmDocView.vb index 0c51674e..0769482b 100644 --- a/GUIs.Test.TestGUI/frmDocView.vb +++ b/GUIs.Test.TestGUI/frmDocView.vb @@ -13,4 +13,8 @@ Public Class frmDocView LogConfig = New LogConfig(LogConfig.PathType.Temp) DocumentViewer1.Init(LogConfig, "21182889975216572111813147150675976632") End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + DocumentViewer1.Done() + End Sub End Class \ No newline at end of file diff --git a/GUIs.Test.TestGUI/frmDocViewPure.Designer.vb b/GUIs.Test.TestGUI/frmDocViewPure.Designer.vb index fdbabb49..b00c6a6a 100644 --- a/GUIs.Test.TestGUI/frmDocViewPure.Designer.vb +++ b/GUIs.Test.TestGUI/frmDocViewPure.Designer.vb @@ -28,7 +28,7 @@ Partial Class frmDocViewPure ' 'SpreadsheetControl1 ' - Me.SpreadsheetControl1.Location = New System.Drawing.Point(228, 101) + Me.SpreadsheetControl1.Location = New System.Drawing.Point(349, 187) Me.SpreadsheetControl1.Name = "SpreadsheetControl1" Me.SpreadsheetControl1.Size = New System.Drawing.Size(400, 200) Me.SpreadsheetControl1.TabIndex = 0 diff --git a/GUIs.Test.TestGUI/frmDocViewPure.vb b/GUIs.Test.TestGUI/frmDocViewPure.vb index 012a6d02..2fa3fe66 100644 --- a/GUIs.Test.TestGUI/frmDocViewPure.vb +++ b/GUIs.Test.TestGUI/frmDocViewPure.vb @@ -7,9 +7,10 @@ Public Class frmDocViewPure End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click - SpreadsheetControl1.Document.Dispose() - SpreadsheetControl1.Dispose() - SpreadsheetControl1 = Nothing - + 'SpreadsheetControl1.Document.Dispose() + 'SpreadsheetControl1.Dispose() + 'SpreadsheetControl1 = Nothing + SpreadsheetControl1.CreateNewDocument() + GC.Collect() End Sub End Class \ No newline at end of file