more fixes

This commit is contained in:
Jonathan Jenne
2020-03-16 15:34:47 +01:00
parent 1e945e4463
commit 3d94b192d8
7 changed files with 1044 additions and 1390 deletions

View File

@@ -11,37 +11,12 @@ Public Class frmStart
Public _lizenzManager As ClassLicenseManager
Dim loaded As Boolean = False
Dim WithEvents HotKey As New clsHotkey(Me)
'Public Sub SetLanguage()
' Dim de = System.Globalization.CultureInfo.CurrentUICulture
' 'Neue Sprache festlegen und entfernen aller Controls
' Thread.CurrentThread.CurrentUICulture = New CultureInfo(USER_LANGUAGE)
' Me.Controls.Clear()
' 'Me.Events.Dispose()
' InitializeComponent()
' tslblCultureInfo.Text = "Culture/Language: " & USER_LANGUAGE
' Try
' Dim Ic As Icon = New Icon(Application.StartupPath & "\DD_Icons_ICO_GLOBIX_128.ico")
' If Not IsNothing(Ic) Then
' Me.Icon = Ic
' End If
' Catch ex As Exception
' LOGGER.Info(">> Icon file could not be read: " & ex.Message)
' End Try
' 'Me.i()
' 'Wiederherstellen der Fensterposition
' 'Me.Size = sz
' 'Me.Location = pt
'End Sub
Private Const mSnapOffset As Integer = 35
Private Const WM_WINDOWPOSCHANGING As Integer = &H46
Private IndexForm As frmIndex
<StructLayout(LayoutKind.Sequential)>
Public Structure WINDOWPOS
Public hwnd As IntPtr
@@ -274,8 +249,8 @@ Public Class frmStart
If File.Exists(CURRENT_WORKFILE) = True And DTACTUAL_FILES.Rows.Count > 0 Then
Open_IndexDialog()
End If
Next
Show()
Catch ex As Exception
If Not ex.Message.StartsWith("Die Auflistung wurde geändert") Then
MsgBox("Unexpected Error in Check_Dropped_Files:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -286,12 +261,12 @@ Public Class frmStart
Sub Open_IndexDialog()
Try
Hide()
frmIndex.Show()
IndexForm.ShowDialog()
AddHandler frmIndex.FormClosed, Sub()
Show()
BringToFront()
End Sub
'AddHandler frmIndex.FormClosed, Sub()
' Show()
' BringToFront()
' End Sub
Catch ex As Exception
LOGGER.Error(ex)
@@ -320,7 +295,14 @@ Public Class frmStart
System.IO.File.Delete(_file)
Next
Catch ex As Exception
LOGGER.Error(ex)
End Try
Try
IndexForm.DisposeViewer()
IndexForm.Dispose()
Catch ex As Exception
LOGGER.Error(ex)
End Try
End Sub
@@ -337,7 +319,10 @@ Public Class frmStart
Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles Me.Load
Cursor = Cursors.WaitCursor
Try
IndexForm = New frmIndex()
'Lizenz abgellaufen, überprüfen ob User Admin ist
If LICENSE_COUNT < UserLoggedin Then
If USER_IS_ADMIN = True Then
@@ -666,8 +651,6 @@ Public Class frmStart
End Try
End If
End Sub
Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick
If LICENSE_EXPIRED = True Or LICENSE_COUNT < UserLoggedin Then
@@ -706,6 +689,7 @@ Public Class frmStart
Me.btnChoosefiles.Location = New Point(269, 37)
End Try
End Sub
Private Sub HistoryIndexierteDateienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HistoryIndexierteDateienToolStripMenuItem.Click
frmHistory.ShowDialog()
End Sub
@@ -716,10 +700,6 @@ Public Class frmStart
Me.TopMost = True
End Sub
Private Sub frmStart_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
End Sub
Private Sub TimerCheckDroppedFiles_Tick(sender As Object, e As EventArgs) Handles TimerCheckDroppedFiles.Tick
TimerCheckDroppedFiles.Stop()
Check_Dropped_Files()
@@ -755,4 +735,5 @@ Public Class frmStart
MsgBox("Unexpected Error in Choose Files for Indexing:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class