diff --git a/GUIs.Test.TestGUI/TestGUI.vbproj b/GUIs.Test.TestGUI/TestGUI.vbproj index 27e979c6..2852a563 100644 --- a/GUIs.Test.TestGUI/TestGUI.vbproj +++ b/GUIs.Test.TestGUI/TestGUI.vbproj @@ -192,6 +192,12 @@ Form + + frmMsgBox.vb + + + Form + Form @@ -256,6 +262,9 @@ frmMail.vb + + frmMsgBox.vb + frmOld.vb @@ -307,6 +316,10 @@ {D20A6BF2-C7C6-4A7A-B34D-FA27D775A049} Common + + {ef29f400-be45-4283-9d18-ca7acd9accc9} + MessageBoxEx + {44982f9b-6116-44e2-85d0-f39650b1ef99} Config diff --git a/GUIs.Test.TestGUI/frmFilesystem.Designer.vb b/GUIs.Test.TestGUI/frmFilesystem.Designer.vb index defc9806..7c530ea3 100644 --- a/GUIs.Test.TestGUI/frmFilesystem.Designer.vb +++ b/GUIs.Test.TestGUI/frmFilesystem.Designer.vb @@ -22,16 +22,29 @@ Partial Class frmFilesystem 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() Me.SuspendLayout() ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(12, 12) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "Button1" + Me.Button1.UseVisualStyleBackColor = True + ' 'frmFilesystem ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Button1) Me.Name = "frmFilesystem" Me.Text = "frmFilesystem" Me.ResumeLayout(False) End Sub + + Friend WithEvents Button1 As Button End Class diff --git a/GUIs.Test.TestGUI/frmFilesystem.vb b/GUIs.Test.TestGUI/frmFilesystem.vb index 88808638..ad4cfa91 100644 --- a/GUIs.Test.TestGUI/frmFilesystem.vb +++ b/GUIs.Test.TestGUI/frmFilesystem.vb @@ -12,23 +12,28 @@ Public Class frmFilesystem LogConfig = New LogConfig(LogConfig.PathType.Temp) Filesystem = New DigitalData.Modules.Filesystem.File(LogConfig) - Using oWriter = IO.File.CreateText("E:\some_test_file.txt") - oWriter.WriteLine("bla bla bla") - End Using - IO.File.Copy(ShortName, LongName) + 'Using oWriter = IO.File.CreateText("E:\some_test_file.txt") + ' oWriter.WriteLine("bla bla bla") + 'End Using - Dim oVersion1 = Filesystem.GetVersionedFilename(LongName) - IO.File.Copy(ShortName, oVersion1) + 'IO.File.Copy(ShortName, LongName) - Dim oVersion2 = Filesystem.GetVersionedFilename(LongName) - IO.File.Copy(ShortName, oVersion2) + 'Dim oVersion1 = Filesystem.GetVersionedFilename(LongName) + 'IO.File.Copy(ShortName, oVersion1) + + 'Dim oVersion2 = Filesystem.GetVersionedFilename(LongName) + 'IO.File.Copy(ShortName, oVersion2) Catch ex As Exception Finally - IO.File.Delete(ShortName) - IO.File.Delete(LongName) + 'IO.File.Delete(ShortName) + 'IO.File.Delete(LongName) End Try End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Dim oDateString = Filesystem.CreateDateDirectory("E:\") + End Sub End Class \ No newline at end of file diff --git a/GUIs.Test.TestGUI/frmMsgBox.Designer.vb b/GUIs.Test.TestGUI/frmMsgBox.Designer.vb new file mode 100644 index 00000000..1c128ada --- /dev/null +++ b/GUIs.Test.TestGUI/frmMsgBox.Designer.vb @@ -0,0 +1,60 @@ + _ +Partial Class frmMsgBox + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() + Me.SimpleButton2 = New DevExpress.XtraEditors.SimpleButton() + Me.SuspendLayout() + ' + 'SimpleButton1 + ' + Me.SimpleButton1.Location = New System.Drawing.Point(12, 12) + Me.SimpleButton1.Name = "SimpleButton1" + Me.SimpleButton1.Size = New System.Drawing.Size(163, 23) + Me.SimpleButton1.TabIndex = 0 + Me.SimpleButton1.Text = "SimpleButton1" + ' + 'SimpleButton2 + ' + Me.SimpleButton2.Location = New System.Drawing.Point(181, 12) + Me.SimpleButton2.Name = "SimpleButton2" + Me.SimpleButton2.Size = New System.Drawing.Size(163, 23) + Me.SimpleButton2.TabIndex = 0 + Me.SimpleButton2.Text = "SimpleButton1" + ' + 'frmMsgBox + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.SimpleButton2) + Me.Controls.Add(Me.SimpleButton1) + Me.Name = "frmMsgBox" + Me.Text = "frmMsgBox" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton + Friend WithEvents SimpleButton2 As DevExpress.XtraEditors.SimpleButton +End Class diff --git a/GUIs.Test.TestGUI/frmMsgBox.resx b/GUIs.Test.TestGUI/frmMsgBox.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/GUIs.Test.TestGUI/frmMsgBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GUIs.Test.TestGUI/frmMsgBox.vb b/GUIs.Test.TestGUI/frmMsgBox.vb new file mode 100644 index 00000000..439dda5b --- /dev/null +++ b/GUIs.Test.TestGUI/frmMsgBox.vb @@ -0,0 +1,24 @@ +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging +Imports DigitalData.Controls.MessageBoxEx + +Public Class frmMsgBox + Private LogConfig As LogConfig + Private SQLServer As MSSQLServer + + Public Sub New(LogConfig As LogConfig, SQLServer As MSSQLServer) + InitializeComponent() + + Me.LogConfig = LogConfig + Me.SQLServer = SQLServer + End Sub + + Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click + Dim oMsgbox = New MsgBoxEx("Hallo Welt!", "Ein Titel") + oMsgbox.ShowDialog() + End Sub + + Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click + MsgBox("Hallo Welt", MsgBoxStyle.OkOnly, "EinTitel") + End Sub +End Class \ No newline at end of file diff --git a/GUIs.Test.TestGUI/frmStart.Designer.vb b/GUIs.Test.TestGUI/frmStart.Designer.vb index 8536eca0..e49647d7 100644 --- a/GUIs.Test.TestGUI/frmStart.Designer.vb +++ b/GUIs.Test.TestGUI/frmStart.Designer.vb @@ -31,6 +31,7 @@ Partial Class frmStart Me.Button7 = New System.Windows.Forms.Button() Me.Button8 = New System.Windows.Forms.Button() Me.Button9 = New System.Windows.Forms.Button() + Me.Button10 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Button1 @@ -114,11 +115,21 @@ Partial Class frmStart Me.Button9.Text = "SQL Editor" Me.Button9.UseVisualStyleBackColor = True ' + 'Button10 + ' + Me.Button10.Location = New System.Drawing.Point(254, 197) + Me.Button10.Name = "Button10" + Me.Button10.Size = New System.Drawing.Size(236, 55) + Me.Button10.TabIndex = 3 + Me.Button10.Text = "MsgBox" + Me.Button10.UseVisualStyleBackColor = True + ' 'frmStart ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Button10) Me.Controls.Add(Me.Button9) Me.Controls.Add(Me.Button6) Me.Controls.Add(Me.Button5) @@ -143,4 +154,5 @@ Partial Class frmStart Friend WithEvents Button7 As Button Friend WithEvents Button8 As Button Friend WithEvents Button9 As Button + Friend WithEvents Button10 As Button End Class diff --git a/GUIs.Test.TestGUI/frmStart.vb b/GUIs.Test.TestGUI/frmStart.vb index c690219b..684804d3 100644 --- a/GUIs.Test.TestGUI/frmStart.vb +++ b/GUIs.Test.TestGUI/frmStart.vb @@ -51,5 +51,8 @@ Public Class frmStart oForm.Show() End Sub - + Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click + Dim oForm As New frmMsgBox(LogConfig, Database) + oForm.Show() + End Sub End Class \ No newline at end of file