This commit is contained in:
SchreiberM 2017-02-08 15:39:43 +01:00
parent be2c0c0f48
commit 3a2dadb3ee
15 changed files with 3367 additions and 3361 deletions

Binary file not shown.

View File

@ -1,165 +1,165 @@
Imports System.Xml
Imports System.IO
Public Class ClassWindowLocation
Public Shared Sub LoadFormLocationSize(ByRef form As Form, Optional Prefix As String = "")
Try
Dim LayoutPath As String
LayoutPath = Path.Combine(Application.UserAppDataPath(), Prefix & form.Name & "-PositionSize.xml")
Dim layout As ClassLayout = New ClassLayout(LayoutPath)
Dim settings As System.Collections.Generic.List(Of ClassSetting)
settings = layout.Load()
If settings.Count = 0 Then
settings.Add(New ClassSetting("PositionX", form.Location.X))
settings.Add(New ClassSetting("PositionY", form.Location.Y))
settings.Add(New ClassSetting("Width", form.Size.Width))
settings.Add(New ClassSetting("Height", form.Size.Height))
layout.Save(settings)
End If
For Each s As ClassSetting In settings
Dim x, y, w, h As Integer
Select Case s._name
Case "PositionX"
x = Integer.Parse(s._value)
Case "PositionY"
y = Integer.Parse(s._value)
Case "Width"
w = Integer.Parse(s._value)
Case "Height"
h = Integer.Parse(s._value)
End Select
If x = 5000 Then
form.WindowState = FormWindowState.Maximized
Else
If x > 0 Then
form.Location = New Point(x, y)
form.Size = New Size(w, h)
End If
End If
Next
Catch notFoundEx As System.IO.FileNotFoundException
ClassLogger.Add("Window Position & Size added for Form " & form.Name)
Catch ex As Exception
MsgBox("Error while loading Window Position!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Public Shared Sub SaveFormLocationSize(ByRef form As Form, Optional Prefix As String = "")
Try
Dim _path As String
_path = Path.Combine(Application.UserAppDataPath(), Prefix & form.Name & "-PositionSize.xml")
Dim layout As ClassLayout = New ClassLayout(_path)
Dim settings As System.Collections.Generic.List(Of ClassSetting) = New System.Collections.Generic.List(Of ClassSetting)
Dim width As Integer
Dim height As Integer
Dim x As Integer
Dim y As Integer
If form.WindowState = FormWindowState.Maximized Then
width = 5000
height = 5000
x = 5000
y = 5000
Else
width = form.Size.Width
height = form.Size.Height
x = form.Location.X
y = form.Location.Y
End If
settings.Add(New ClassSetting("PositionX", x))
settings.Add(New ClassSetting("PositionY", y))
settings.Add(New ClassSetting("Width", width))
settings.Add(New ClassSetting("Height", height))
layout.Save(settings)
Catch notFoundEx As System.IO.FileNotFoundException
ClassLogger.Add("Window Position & Size added for Form " & form.Name)
Catch ex As Exception
MsgBox("Error while saving Window Position!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class
'-------------------------------------------------------------------
Public Class ClassSetting
Public _name As String
Public _value As String
Public Sub New(name As String, value As String)
_name = name
_value = value
End Sub
End Class
Public Class ClassLayout
Private _filename As String
Private _reader As XmlReader
Private _settings As XmlWriterSettings
Public Sub New(filename As String)
_filename = filename
_settings = New XmlWriterSettings()
_settings.Encoding = System.Text.Encoding.UTF8
_settings.Indent = True
End Sub
Public Sub Save(settings As System.Collections.Generic.List(Of ClassSetting))
Dim w = XmlTextWriter.Create(_filename, _settings)
w.WriteStartDocument()
w.WriteStartElement("Settings")
For Each setting As ClassSetting In settings
w.WriteStartElement("Setting")
w.WriteAttributeString("name", setting._name)
w.WriteAttributeString("value", setting._value.ToString())
w.WriteEndElement()
Next
w.WriteEndElement()
w.WriteEndDocument()
w.Dispose()
w.Close()
End Sub
Public Function Load() As System.Collections.Generic.List(Of ClassSetting)
Dim Result As List(Of ClassSetting) = New List(Of ClassSetting)()
If Not File.Exists(_filename) Then
Return Result
End If
_reader = XmlReader.Create(_filename)
While _reader.Read()
If _reader.IsStartElement() Then
If _reader.Name = "Setting" Then
Dim name As String = _reader("name")
' Dim value As Integer = Integer.Parse(_reader("value"))
Dim setting As ClassSetting = New ClassSetting(name, _reader("value")) 'value)
Result.Add(setting)
End If
End If
End While
_reader.Dispose()
_reader.Close()
Return Result
End Function
End Class
Imports System.Xml
Imports System.IO
Public Class ClassWindowLocation
Public Shared Sub LoadFormLocationSize(ByRef form As Form, Optional Prefix As String = "")
Try
Dim LayoutPath As String
LayoutPath = Path.Combine(Application.UserAppDataPath(), Prefix & form.Name & "-PositionSize.xml")
Dim layout As ClassLayout = New ClassLayout(LayoutPath)
Dim settings As System.Collections.Generic.List(Of ClassSetting)
settings = layout.Load()
If settings.Count = 0 Then
settings.Add(New ClassSetting("PositionX", form.Location.X))
settings.Add(New ClassSetting("PositionY", form.Location.Y))
settings.Add(New ClassSetting("Width", form.Size.Width))
settings.Add(New ClassSetting("Height", form.Size.Height))
layout.Save(settings)
End If
For Each s As ClassSetting In settings
Dim x, y, w, h As Integer
Select Case s._name
Case "PositionX"
x = Integer.Parse(s._value)
Case "PositionY"
y = Integer.Parse(s._value)
Case "Width"
w = Integer.Parse(s._value)
Case "Height"
h = Integer.Parse(s._value)
End Select
If x = 5000 Then
form.WindowState = FormWindowState.Maximized
Else
If x > 0 Then
form.Location = New Point(x, y)
form.Size = New Size(w, h)
End If
End If
Next
Catch notFoundEx As System.IO.FileNotFoundException
ClassLogger.Add("Window Position & Size added for Form " & form.Name)
Catch ex As Exception
MsgBox("Error while loading Window Position!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Public Shared Sub SaveFormLocationSize(ByRef form As Form, Optional Prefix As String = "")
Try
Dim _path As String
_path = Path.Combine(Application.UserAppDataPath(), Prefix & form.Name & "-PositionSize.xml")
Dim layout As ClassLayout = New ClassLayout(_path)
Dim settings As System.Collections.Generic.List(Of ClassSetting) = New System.Collections.Generic.List(Of ClassSetting)
Dim width As Integer
Dim height As Integer
Dim x As Integer
Dim y As Integer
If form.WindowState = FormWindowState.Maximized Then
width = 5000
height = 5000
x = 5000
y = 5000
Else
width = form.Size.Width
height = form.Size.Height
x = form.Location.X
y = form.Location.Y
End If
settings.Add(New ClassSetting("PositionX", x))
settings.Add(New ClassSetting("PositionY", y))
settings.Add(New ClassSetting("Width", width))
settings.Add(New ClassSetting("Height", height))
layout.Save(settings)
Catch notFoundEx As System.IO.FileNotFoundException
ClassLogger.Add("Window Position & Size added for Form " & form.Name)
Catch ex As Exception
MsgBox("Error while saving Window Position!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class
'-------------------------------------------------------------------
Public Class ClassSetting
Public _name As String
Public _value As String
Public Sub New(name As String, value As String)
_name = name
_value = value
End Sub
End Class
Public Class ClassLayout
Private _filename As String
Private _reader As XmlReader
Private _settings As XmlWriterSettings
Public Sub New(filename As String)
_filename = filename
_settings = New XmlWriterSettings()
_settings.Encoding = System.Text.Encoding.UTF8
_settings.Indent = True
End Sub
Public Sub Save(settings As System.Collections.Generic.List(Of ClassSetting))
Dim w = XmlTextWriter.Create(_filename, _settings)
w.WriteStartDocument()
w.WriteStartElement("Settings")
For Each setting As ClassSetting In settings
w.WriteStartElement("Setting")
w.WriteAttributeString("name", setting._name)
w.WriteAttributeString("value", setting._value.ToString())
w.WriteEndElement()
Next
w.WriteEndElement()
w.WriteEndDocument()
w.Dispose()
w.Close()
End Sub
Public Function Load() As System.Collections.Generic.List(Of ClassSetting)
Dim Result As List(Of ClassSetting) = New List(Of ClassSetting)()
If Not File.Exists(_filename) Then
Return Result
End If
_reader = XmlReader.Create(_filename)
While _reader.Read()
If _reader.IsStartElement() Then
If _reader.Name = "Setting" Then
Dim name As String = _reader("name")
' Dim value As Integer = Integer.Parse(_reader("value"))
Dim setting As ClassSetting = New ClassSetting(name, _reader("value")) 'value)
Result.Add(setting)
End If
End If
End While
_reader.Dispose()
_reader.Close()
Return Result
End Function
End Class

View File

@ -46,6 +46,9 @@
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>KeyOutput_8167.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="DD_LIB_Standards, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -213,6 +216,10 @@
<ItemGroup>
<None Include="Resources\Annotation_New.png" />
</ItemGroup>
<ItemGroup>
<Content Include="KeyOutput_8167.ico" />
<None Include="Resources\KeyOutput_8167.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -1,35 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgenden
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
' die mit einer Assembly verknüpft sind.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("DD Clipboard Watcher for windream")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("DD Clipboard Watcher for windream")>
<Assembly: AssemblyCopyright("Copyright © 2017")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
<Assembly: Guid("0fff4783-c1b4-4d08-8ce2-7e1a4dbbaf8b")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Hauptversion
' Nebenversion
' Buildnummer
' Revision
'
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgenden
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
' die mit einer Assembly verknüpft sind.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("Clipboard Watcher for windream")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Clipboard Watcher for windream")>
<Assembly: AssemblyCopyright("Copyright ©2017")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
<Assembly: Guid("0fff4783-c1b4-4d08-8ce2-7e1a4dbbaf8b")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Hauptversion
' Nebenversion
' Buildnummer
' Revision
'
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.0.1")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@ -110,6 +110,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property KeyOutput_8167() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("KeyOutput_8167", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>

View File

@ -118,22 +118,25 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="KeyDown_8461" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\KeyDown_8461.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_Open_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder_Open_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GoToDefinition_5575" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GoToDefinition_5575.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="StatusAnnotations_Stop_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\StatusAnnotations_Stop_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="control_start_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\control_start_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Annotation_New" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Annotation_New.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="KeyDown_8461" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\KeyDown_8461.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_Open_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder_Open_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="control_start_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\control_start_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="KeyOutput_8167" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\KeyOutput_8167.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

View File

@ -173,6 +173,10 @@ TableAdapterManager is used to coordinate TableAdapters in the dataset to enable
<summary>
Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
</summary>
</member><member name="P:DD_Clipboard_Searcher.My.Resources.Resources.KeyOutput_8167">
<summary>
Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
</summary>
</member><member name="P:DD_Clipboard_Searcher.My.Resources.Resources.StatusAnnotations_Stop_16xLG">
<summary>
Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.

View File

@ -26,11 +26,11 @@ Partial Class frmMain
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.cmstrpNotifyIcon = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.btnAdminConfig = New System.Windows.Forms.Button()
Me.tslblUser = New System.Windows.Forms.ToolStripStatusLabel()
Me.btnUserConfig = New System.Windows.Forms.Button()
Me.tsmiChangeState = New System.Windows.Forms.ToolStripMenuItem()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.tslblUser = New System.Windows.Forms.ToolStripStatusLabel()
Me.btnAdminConfig = New System.Windows.Forms.Button()
Me.btnUserConfig = New System.Windows.Forms.Button()
Me.TimerClose = New System.Windows.Forms.Timer(Me.components)
Me.cmstrpNotifyIcon.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
@ -52,15 +52,29 @@ Partial Class frmMain
Me.cmstrpNotifyIcon.Name = "cmstrpNotifyIcon"
Me.cmstrpNotifyIcon.Size = New System.Drawing.Size(250, 26)
'
'tsmiChangeState
'
Me.tsmiChangeState.Image = Global.DD_Clipboard_Searcher.My.Resources.Resources.StatusAnnotations_Stop_16xLG
Me.tsmiChangeState.Name = "tsmiChangeState"
Me.tsmiChangeState.Size = New System.Drawing.Size(249, 22)
Me.tsmiChangeState.Tag = "stop"
Me.tsmiChangeState.Text = "Überwachung Clipboard stoppen"
'
'StatusStrip1
'
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblUser})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 54)
Me.StatusStrip1.Location = New System.Drawing.Point(0, 99)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(337, 22)
Me.StatusStrip1.Size = New System.Drawing.Size(455, 22)
Me.StatusStrip1.TabIndex = 3
Me.StatusStrip1.Text = "StatusStrip1"
'
'tslblUser
'
Me.tslblUser.Image = CType(resources.GetObject("tslblUser.Image"), System.Drawing.Image)
Me.tslblUser.Name = "tslblUser"
Me.tslblUser.Size = New System.Drawing.Size(16, 17)
'
'btnAdminConfig
'
Me.btnAdminConfig.Image = CType(resources.GetObject("btnAdminConfig.Image"), System.Drawing.Image)
@ -74,12 +88,6 @@ Partial Class frmMain
Me.btnAdminConfig.UseVisualStyleBackColor = True
Me.btnAdminConfig.Visible = False
'
'tslblUser
'
Me.tslblUser.Image = CType(resources.GetObject("tslblUser.Image"), System.Drawing.Image)
Me.tslblUser.Name = "tslblUser"
Me.tslblUser.Size = New System.Drawing.Size(16, 17)
'
'btnUserConfig
'
Me.btnUserConfig.Image = CType(resources.GetObject("btnUserConfig.Image"), System.Drawing.Image)
@ -92,14 +100,6 @@ Partial Class frmMain
Me.btnUserConfig.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnUserConfig.UseVisualStyleBackColor = True
'
'tsmiChangeState
'
Me.tsmiChangeState.Image = Global.DD_Clipboard_Searcher.My.Resources.Resources.StatusAnnotations_Stop_16xLG
Me.tsmiChangeState.Name = "tsmiChangeState"
Me.tsmiChangeState.Size = New System.Drawing.Size(249, 22)
Me.tsmiChangeState.Tag = "stop"
Me.tsmiChangeState.Text = "Überwachung Clipboard stoppen"
'
'TimerClose
'
Me.TimerClose.Interval = 10000
@ -108,7 +108,7 @@ Partial Class frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(337, 76)
Me.ClientSize = New System.Drawing.Size(455, 121)
Me.Controls.Add(Me.btnAdminConfig)
Me.Controls.Add(Me.StatusStrip1)
Me.Controls.Add(Me.btnUserConfig)

View File

@ -1,182 +1,164 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmSplash
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSplash))
Me.Copyright = New System.Windows.Forms.Label()
Me.Version = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.ApplicationTitle = New System.Windows.Forms.Label()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.lblStatus = New System.Windows.Forms.Label()
Me.pbStatus = New System.Windows.Forms.ProgressBar()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TableLayoutPanel1.SuspendLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Copyright
'
Me.Copyright.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Copyright.BackColor = System.Drawing.Color.Transparent
Me.Copyright.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.Copyright.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Copyright.Location = New System.Drawing.Point(3, 21)
Me.Copyright.Name = "Copyright"
Me.Copyright.Size = New System.Drawing.Size(185, 21)
Me.Copyright.TabIndex = 2
Me.Copyright.Text = "Copyright"
Me.Copyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Version
'
Me.Version.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Version.BackColor = System.Drawing.Color.Transparent
Me.Version.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.Version.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Version.Location = New System.Drawing.Point(3, 0)
Me.Version.Name = "Version"
Me.Version.Size = New System.Drawing.Size(185, 21)
Me.Version.TabIndex = 1
Me.Version.Text = "Version {0}.{1:00}"
Me.Version.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Label1.Location = New System.Drawing.Point(299, 102)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(182, 13)
Me.Label1.TabIndex = 12
Me.Label1.Text = "This software is in parts based on:"
'
'ApplicationTitle
'
Me.ApplicationTitle.BackColor = System.Drawing.Color.Transparent
Me.ApplicationTitle.Font = New System.Drawing.Font("Segoe UI", 18.0!)
Me.ApplicationTitle.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.ApplicationTitle.Location = New System.Drawing.Point(12, 4)
Me.ApplicationTitle.Name = "ApplicationTitle"
Me.ApplicationTitle.Size = New System.Drawing.Size(469, 33)
Me.ApplicationTitle.TabIndex = 6
Me.ApplicationTitle.Text = "Anwendungstitel"
Me.ApplicationTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft
'
'PictureBox1
'
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.PictureBox1.Location = New System.Drawing.Point(304, 118)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(109, 38)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox1.TabIndex = 10
Me.PictureBox1.TabStop = False
'
'TableLayoutPanel1
'
Me.TableLayoutPanel1.ColumnCount = 1
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle())
Me.TableLayoutPanel1.Controls.Add(Me.Copyright, 0, 1)
Me.TableLayoutPanel1.Controls.Add(Me.Version, 0, 0)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(304, 51)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
Me.TableLayoutPanel1.RowCount = 2
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TableLayoutPanel1.Size = New System.Drawing.Size(200, 42)
Me.TableLayoutPanel1.TabIndex = 9
'
'lblStatus
'
Me.lblStatus.AutoSize = True
Me.lblStatus.BackColor = System.Drawing.SystemColors.Control
Me.lblStatus.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.lblStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.lblStatus.Location = New System.Drawing.Point(9, 157)
Me.lblStatus.Name = "lblStatus"
Me.lblStatus.Size = New System.Drawing.Size(79, 15)
Me.lblStatus.TabIndex = 8
Me.lblStatus.Text = "Statusanzeige"
Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'pbStatus
'
Me.pbStatus.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pbStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.pbStatus.Location = New System.Drawing.Point(0, 179)
Me.pbStatus.Name = "pbStatus"
Me.pbStatus.Size = New System.Drawing.Size(540, 23)
Me.pbStatus.TabIndex = 7
'
'PictureBox2
'
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
Me.PictureBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.PictureBox2.Location = New System.Drawing.Point(12, 51)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(276, 103)
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage
Me.PictureBox2.TabIndex = 11
Me.PictureBox2.TabStop = False
'
'frmSplash
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(540, 202)
Me.ControlBox = False
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ApplicationTitle)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.TableLayoutPanel1)
Me.Controls.Add(Me.lblStatus)
Me.Controls.Add(Me.pbStatus)
Me.Controls.Add(Me.PictureBox2)
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "frmSplash"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "frmSplash"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.TableLayoutPanel1.ResumeLayout(False)
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Copyright As System.Windows.Forms.Label
Friend WithEvents Version As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ApplicationTitle As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
Friend WithEvents lblStatus As System.Windows.Forms.Label
Friend WithEvents pbStatus As System.Windows.Forms.ProgressBar
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
End Class
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmSplash
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSplash))
Me.Copyright = New System.Windows.Forms.Label()
Me.Version = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.ApplicationTitle = New System.Windows.Forms.Label()
Me.lblStatus = New System.Windows.Forms.Label()
Me.pbStatus = New System.Windows.Forms.ProgressBar()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Copyright
'
Me.Copyright.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Copyright.BackColor = System.Drawing.Color.Transparent
Me.Copyright.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.Copyright.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Copyright.Location = New System.Drawing.Point(12, 119)
Me.Copyright.Name = "Copyright"
Me.Copyright.Size = New System.Drawing.Size(185, 21)
Me.Copyright.TabIndex = 2
Me.Copyright.Text = "Copyright"
Me.Copyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Version
'
Me.Version.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Version.BackColor = System.Drawing.Color.Transparent
Me.Version.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.Version.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Version.Location = New System.Drawing.Point(12, 98)
Me.Version.Name = "Version"
Me.Version.Size = New System.Drawing.Size(185, 21)
Me.Version.TabIndex = 1
Me.Version.Text = "Version {0}.{1:00}"
Me.Version.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Label1.Location = New System.Drawing.Point(298, 102)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(182, 13)
Me.Label1.TabIndex = 12
Me.Label1.Text = "This software is in parts based on:"
'
'ApplicationTitle
'
Me.ApplicationTitle.BackColor = System.Drawing.Color.Transparent
Me.ApplicationTitle.Font = New System.Drawing.Font("Tahoma", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ApplicationTitle.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.ApplicationTitle.Location = New System.Drawing.Point(11, 59)
Me.ApplicationTitle.Name = "ApplicationTitle"
Me.ApplicationTitle.Size = New System.Drawing.Size(469, 33)
Me.ApplicationTitle.TabIndex = 6
Me.ApplicationTitle.Text = "Anwendungstitel"
Me.ApplicationTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft
'
'lblStatus
'
Me.lblStatus.AutoSize = True
Me.lblStatus.BackColor = System.Drawing.SystemColors.Control
Me.lblStatus.Font = New System.Drawing.Font("Segoe UI", 9.0!)
Me.lblStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.lblStatus.Location = New System.Drawing.Point(9, 157)
Me.lblStatus.Name = "lblStatus"
Me.lblStatus.Size = New System.Drawing.Size(79, 15)
Me.lblStatus.TabIndex = 8
Me.lblStatus.Text = "Statusanzeige"
Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'pbStatus
'
Me.pbStatus.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pbStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.pbStatus.Location = New System.Drawing.Point(0, 179)
Me.pbStatus.Name = "pbStatus"
Me.pbStatus.Size = New System.Drawing.Size(508, 23)
Me.pbStatus.TabIndex = 7
'
'PictureBox1
'
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.PictureBox1.Location = New System.Drawing.Point(301, 119)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(109, 38)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox1.TabIndex = 10
Me.PictureBox1.TabStop = False
'
'PictureBox2
'
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
Me.PictureBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.PictureBox2.Location = New System.Drawing.Point(12, 12)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(480, 44)
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox2.TabIndex = 11
Me.PictureBox2.TabStop = False
'
'frmSplash
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(508, 202)
Me.ControlBox = False
Me.Controls.Add(Me.Copyright)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Version)
Me.Controls.Add(Me.ApplicationTitle)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.lblStatus)
Me.Controls.Add(Me.pbStatus)
Me.Controls.Add(Me.PictureBox2)
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "frmSplash"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "frmSplash"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Copyright As System.Windows.Forms.Label
Friend WithEvents Version As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ApplicationTitle As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents lblStatus As System.Windows.Forms.Label
Friend WithEvents pbStatus As System.Windows.Forms.ProgressBar
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
End Class

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +1,122 @@
Imports System.ComponentModel
Public NotInheritable Class frmSplash
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
Private InitSteps As Integer = 6
Private bw As New BackgroundWorker()
Private mainForm As Form
Private Sub frmSplash_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
End Sub
Private Sub frmSplash_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.Escape Then
ESC_Hidden = True
End If
End Sub
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
'TODO: Die Assemblyinformationen der Anwendung im Bereich "Anwendung" des Dialogfelds für die
' Projekteigenschaften (im Menü "Projekt") anpassen.
'Anwendungstitel
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'Wenn der Anwendungstitel fehlt, Anwendungsnamen ohne Erweiterung verwenden
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
'Verwenden Sie zum Formatieren der Versionsinformationen den Text, der zur Entwurfszeit in der Versionskontrolle festgelegt wurde, als
' Formatierungszeichenfolge. Dies ermöglicht ggf. eine effektive Lokalisierung.
' Build- und Revisionsinformationen können durch Verwendung des folgenden Codes und durch Ändern
' des Entwurfszeittexts der Versionskontrolle in "Version {0}.{1:00}.{2}.{3}" oder einen ähnlichen Text eingeschlossen werden. Weitere Informationen erhalten Sie unter
' String.Format() in der Hilfe.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
'Copyrightinformationen
Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
Me.BringToFront()
InitProgram()
End Sub
Private Sub InitProgram()
bw.WorkerReportsProgress = True
AddHandler bw.DoWork, AddressOf bw_DoWork
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
' mainForm = My.Forms.frmMain
bw.RunWorkerAsync()
End Sub
Private Function CalcProgress(_step As Integer)
Return _step * (100 / InitSteps)
End Function
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
Try
Dim Init = New ClassInit()
bw.ReportProgress(CalcProgress(1), "Initializing Logger")
Init.InitLogger()
System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(2), "Initializing Database")
Init.InitBasics()
If Init.InitDatabase() = True Then
System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration")
If ClassInit.InitUserLogin = False Then
ERROR_INIT = "INVALID USER"
End If
System.Threading.Thread.Sleep(500)
'bw.ReportProgress(CalcProgress(5), "Initializing Addons")
'Init.InitAddons()
'System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(6), "Initializing Frontend")
' InitInterface wurde in frmMain integriert
'Init.InitInterface(mainForm)
System.Threading.Thread.Sleep(500)
Else
ERROR_INIT = "DATABASE"
End If
Catch ex As Exception
MsgBox("Unexpected Error in bw_DoWork: " & vbNewLine, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub bw_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs)
pbStatus.Value = e.ProgressPercentage
lblStatus.Text = e.UserState.ToString()
End Sub
Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
' Bei Fehler MsgBox anzeigen und Programm beenden
If e.Error IsNot Nothing Then
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Unexpected Error in frmSplash")
Application.Exit()
End If
' Wenn kein Fehler, Splashscreen schließen
Me.Close()
End Sub
End Class
Imports System.ComponentModel
Public NotInheritable Class frmSplash
'TODO: Dieses Formular kann einfach als Begrüßungsbildschirm für die Anwendung festgelegt werden, indem Sie zur Registerkarte "Anwendung"
' des Projekt-Designers wechseln (Menü "Projekt", Option "Eigenschaften").
Private InitSteps As Integer = 6
Private bw As New BackgroundWorker()
Private mainForm As Form
Private Sub frmSplash_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
End Sub
Private Sub frmSplash_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.Escape Then
ESC_Hidden = True
End If
End Sub
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Richten Sie den Dialogtext zur Laufzeit gemäß den Assemblyinformationen der Anwendung ein.
'TODO: Die Assemblyinformationen der Anwendung im Bereich "Anwendung" des Dialogfelds für die
' Projekteigenschaften (im Menü "Projekt") anpassen.
'Anwendungstitel
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'Wenn der Anwendungstitel fehlt, Anwendungsnamen ohne Erweiterung verwenden
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
'Verwenden Sie zum Formatieren der Versionsinformationen den Text, der zur Entwurfszeit in der Versionskontrolle festgelegt wurde, als
' Formatierungszeichenfolge. Dies ermöglicht ggf. eine effektive Lokalisierung.
' Build- und Revisionsinformationen können durch Verwendung des folgenden Codes und durch Ändern
' des Entwurfszeittexts der Versionskontrolle in "Version {0}.{1:00}.{2}.{3}" oder einen ähnlichen Text eingeschlossen werden. Weitere Informationen erhalten Sie unter
' String.Format() in der Hilfe.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
'Copyrightinformationen
Copyright.Text = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
Me.BringToFront()
InitProgram()
End Sub
Private Sub InitProgram()
bw.WorkerReportsProgress = True
AddHandler bw.DoWork, AddressOf bw_DoWork
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
' mainForm = My.Forms.frmMain
bw.RunWorkerAsync()
End Sub
Private Function CalcProgress(_step As Integer)
Return _step * (100 / InitSteps)
End Function
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
Try
Dim Init = New ClassInit()
bw.ReportProgress(CalcProgress(1), "Initializing Logger")
Init.InitLogger()
System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(2), "Initializing Database")
Init.InitBasics()
If Init.InitDatabase() = True Then
System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration")
If ClassInit.InitUserLogin = False Then
ERROR_INIT = "INVALID USER"
End If
System.Threading.Thread.Sleep(500)
'bw.ReportProgress(CalcProgress(5), "Initializing Addons")
'Init.InitAddons()
'System.Threading.Thread.Sleep(500)
bw.ReportProgress(CalcProgress(6), "Initializing Frontend")
' InitInterface wurde in frmMain integriert
'Init.InitInterface(mainForm)
System.Threading.Thread.Sleep(500)
Else
ERROR_INIT = "DATABASE"
End If
Catch ex As Exception
MsgBox("Unexpected Error in bw_DoWork: " & vbNewLine, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub bw_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs)
pbStatus.Value = e.ProgressPercentage
lblStatus.Text = e.UserState.ToString()
End Sub
Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
' Bei Fehler MsgBox anzeigen und Programm beenden
If e.Error IsNot Nothing Then
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Unexpected Error in frmSplash")
Application.Exit()
End If
' Wenn kein Fehler, Splashscreen schließen
Me.Close()
End Sub
End Class