Async Data Loading, use ConfigManager

This commit is contained in:
Jonathan Jenne
2019-07-15 15:09:48 +02:00
parent be1f74ceb0
commit 2e296a5267
14 changed files with 309 additions and 267 deletions

View File

@@ -117,14 +117,14 @@ Public Class frmResultSQL
End Sub
Private Sub frmResultDoc_Load(sender As Object, e As EventArgs) Handles Me.Load
If My.Settings.frmResultDataPosition.IsEmpty = False Then
If My.Settings.frmResultDataPosition.X > 0 And My.Settings.frmResultDataPosition.Y > 0 Then
Location = My.Settings.frmResultDataPosition
End If
End If
If My.Settings.frmResultDataSize.IsEmpty = False Then
Size = My.Settings.frmResultDataSize
If ConfigManager.Config.ResultDataWindowX > 0 And ConfigManager.Config.ResultDataWindowY > 0 Then
Dim oLocation As New Point(ConfigManager.Config.ResultDataWindowX, ConfigManager.Config.ResultDataWindowY)
Location = oLocation
End If
Dim oSize As New Size(ConfigManager.Config.ResultDataWindowWidth, ConfigManager.Config.ResultDataWindowHeight)
Size = oSize
Load_Searches()
End Sub
Sub Load_Searches()
@@ -147,10 +147,11 @@ Public Class frmResultSQL
End Sub
Private Sub frmResultDoc_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try
' Position und Größe speichern
My.Settings.frmResultDataSize = Me.Size
My.Settings.frmResultDataPosition = Me.Location
My.Settings.Save()
ConfigManager.Config.ResultDataWindowHeight = Size.Height
ConfigManager.Config.ResultDataWindowWidth = Size.Width
ConfigManager.Config.ResultDataWindowX = Location.X
ConfigManager.Config.ResultDataWindowY = Location.Y
ConfigManager.Save()
Catch ex As Exception
Logger.Error(ex)
Logger.Info("Error in Save FormLayout: " & ex.Message)