MS
This commit is contained in:
6
app/VERSION_CHECKER/App.config
Normal file
6
app/VERSION_CHECKER/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
85
app/VERSION_CHECKER/ClassInit.vb
Normal file
85
app/VERSION_CHECKER/ClassInit.vb
Normal file
@@ -0,0 +1,85 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports DD_LIB_Standards
|
||||
Public Class ClassInit
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Sub InitLogger()
|
||||
ClassLogger.Init("", "VersionChecker")
|
||||
clsLogger.LOGFILE_PATH = ClassLogger.logDateiname
|
||||
End Sub
|
||||
|
||||
Public Function InitDatabase()
|
||||
Try
|
||||
Dim dbResult As Boolean
|
||||
clsDatabase.GUI = True
|
||||
If MyConnectionString <> String.Empty Then
|
||||
dbResult = clsDatabase.Init(MyConnectionString)
|
||||
Return dbResult
|
||||
Else
|
||||
|
||||
Return False
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Init Database:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Sub InitBasics()
|
||||
Try
|
||||
Dim sql = String.Format("SELECT * FROM TBPMO_KONFIGURATION WHERE GUID = 1")
|
||||
Dim KONFIG_DT As DataTable = clsDatabase.Return_Datatable(sql, False)
|
||||
If KONFIG_DT.Rows.Count = 1 Then
|
||||
Try
|
||||
MyServer_UpdatePath = KONFIG_DT.Rows(0).Item("UPDATE_PATH")
|
||||
VERSION_SERVER = KONFIG_DT.Rows(0).Item("VERSION_CLIENT")
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in InitBasics:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function InitUserLogin(Optional _User As String = "")
|
||||
Try
|
||||
Dim sql = ""
|
||||
USER_USERNAME = Environment.UserName
|
||||
sql = String.Format("SELECT * FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('{0}'))", USER_USERNAME)
|
||||
Dim USER_DT As DataTable = clsDatabase.Return_Datatable(sql, True)
|
||||
If USER_DT.Rows.Count = 0 Then
|
||||
ClassLogger.Add(" - User '" & USER_USERNAME & "' not listed in Useradministration!", False)
|
||||
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||
'Me.Close()
|
||||
Dim msg = String.Format("You are not listed in the Useradministration." & vbNewLine & "Please contact the admin.")
|
||||
MsgBox(msg, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
Else
|
||||
USER_GUID = USER_DT.Rows(0).Item("GUID")
|
||||
sql = String.Format("SELECT UPDATE_PATH FROM TBPMO_USER_UPDATE_PATH WHERE USER_ID = {0}", USER_GUID)
|
||||
Dim USER_UPDATE_PATH = clsDatabase.Execute_Scalar(sql)
|
||||
If Not IsNothing(USER_UPDATE_PATH) Then
|
||||
If USER_UPDATE_PATH <> String.Empty Then
|
||||
MyServer_UpdatePath = USER_UPDATE_PATH
|
||||
End If
|
||||
End If
|
||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '1.0.0.0' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '')", USER_GUID)
|
||||
VERSION_USER = clsDatabase.Execute_Scalar(sql)
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in InitUserLogin: " & ex.Message, True)
|
||||
MsgBox("Unexpected Error in InitUserLogin: " & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
200
app/VERSION_CHECKER/ClassLogger.vb
Normal file
200
app/VERSION_CHECKER/ClassLogger.vb
Normal file
@@ -0,0 +1,200 @@
|
||||
Imports System.IO
|
||||
Public Class ClassLogger
|
||||
Public Shared DateiSpeicherort As String = Nothing
|
||||
Public Shared DateiPrefix As String = ""
|
||||
Public Shared Datei As IO.File = Nothing
|
||||
Public Shared logDateiname As String = ""
|
||||
Private Shared StreamWriter As IO.StreamWriter = Nothing
|
||||
Private Shared HasInformedAboutError As Boolean = False
|
||||
' eine Art Konstruktor
|
||||
Public Shared Sub Init(ByVal speicherort As String, Optional ByVal prefix As String = "", Optional ByVal appendFile As Boolean = True)
|
||||
' initialisiert den Speicherort
|
||||
ClassLogger.SetSpeicherort(speicherort)
|
||||
' wenn ein Prfix gesetzt wurde
|
||||
If Not prefix = "" Then
|
||||
' initialisiert das Prefix
|
||||
ClassLogger.SetPrefix(prefix)
|
||||
End If
|
||||
Dim str As String = ClassLogger.DateiSpeicherort & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
|
||||
Dim anz As Integer = 1
|
||||
Do While File.Exists(str)
|
||||
Dim info As New FileInfo(str)
|
||||
Dim length As Long = info.Length
|
||||
If length > 5000000 Then
|
||||
str = IO.Path.GetDirectoryName(str)
|
||||
str = str & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & "(" & anz.ToString & ").txt"
|
||||
anz = anz + 1
|
||||
Else
|
||||
Exit Do
|
||||
End If
|
||||
Loop
|
||||
ClassLogger.logDateiname = str
|
||||
If Not appendFile Then
|
||||
' der Versuch die Datei zu löschen
|
||||
My.Computer.FileSystem.WriteAllText(ClassLogger.logDateiname, String.Empty, False)
|
||||
End If
|
||||
' testen ob sich die Datei öffnen und beschreiben lässt
|
||||
'ClassNILogger.CheckIsLogWritable()
|
||||
End Sub
|
||||
|
||||
' legt den Speicherort fest
|
||||
Public Shared Sub SetSpeicherort(ByVal speicherort As String)
|
||||
Dim f As String = Application.UserAppDataPath() & "\Log"
|
||||
|
||||
If speicherort = "" Then
|
||||
If IO.Directory.Exists(f) = False Then
|
||||
IO.Directory.CreateDirectory(f)
|
||||
End If
|
||||
ClassLogger.DateiSpeicherort = f
|
||||
Else
|
||||
ClassLogger.DateiSpeicherort = speicherort
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' legt das Prefix für den Dateinamen fest
|
||||
Public Shared Sub SetPrefix(ByVal prefix As String)
|
||||
ClassLogger.DateiPrefix = prefix
|
||||
End Sub
|
||||
|
||||
Public Shared Sub Add(ByVal information As String, Optional ByVal ACHTUNG As Boolean = True)
|
||||
If ClassLogger.OpenFile Then
|
||||
Try
|
||||
If ACHTUNG Then
|
||||
ClassLogger.StreamWriter.WriteLine("#ATTENTION# (" & System.DateTime.Now & "): " & information)
|
||||
Else
|
||||
ClassLogger.StreamWriter.WriteLine(information)
|
||||
End If
|
||||
ClassLogger.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLogger.ShowErrorMessage()
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.ShowErrorMessage()
|
||||
End If
|
||||
End Sub
|
||||
'Public Shared Sub Add(ByVal ex As Exception)
|
||||
' If ClassLogger.OpenFile Then
|
||||
' Try
|
||||
' ClassLogger.StreamWriter.WriteLine("##### Exception (" & System.DateTime.Now & ")")
|
||||
' ClassLogger.StreamWriter.WriteLine("##### Error: " & ex.Message & " Source [" & ex.Source & "]")
|
||||
' ClassLogger.CloseFile()
|
||||
' Catch e As Exception
|
||||
' ClassLogger.ShowErrorMessage()
|
||||
' End Try
|
||||
' Else
|
||||
' ClassLogger.ShowErrorMessage()
|
||||
' End If
|
||||
'End Sub
|
||||
' öffnet eine Datei zum Schreiben
|
||||
Private Shared Function OpenFile()
|
||||
Try
|
||||
' wenn ein Speicherort festgelegt wurde
|
||||
If Not ClassLogger.DateiSpeicherort = Nothing Then
|
||||
' den Dateienamen definieren
|
||||
Dim dateiname As String = ClassLogger.logDateiname
|
||||
' Datei anlegen wenn noch nicht vorhanden
|
||||
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
|
||||
' die Datei zum Schreiben öffnen
|
||||
ClassLogger.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
|
||||
End If
|
||||
' wenn die Datei erfolgreich geöffnet wurde
|
||||
If ClassLogger.StreamWriter IsNot Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
' öffnet eine Datei zum Schreiben
|
||||
Private Shared Function OpenFile(ByVal DateiSpeicherort As String, ByVal DateiPrefix As String)
|
||||
|
||||
Try
|
||||
|
||||
' wenn ein Speicherort festgelegt wurde
|
||||
If Not DateiSpeicherort = Nothing And ClassLogger.CheckIsLogWritable() Then
|
||||
|
||||
' den Dateienamen definieren
|
||||
Dim dateiname As String = ClassLogger.logDateiname
|
||||
' Datei anlegen wenn noch nicht vorhanden
|
||||
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
|
||||
|
||||
' die Datei zum Schreiben öffnen
|
||||
ClassLogger.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
|
||||
End If
|
||||
|
||||
' wenn die Datei erfolgreich geöffnet wurde
|
||||
If ClassLogger.StreamWriter IsNot Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
' schliesst die geöffnete Datei
|
||||
Private Shared Sub CloseFile()
|
||||
|
||||
' wenn eine Datei geöffnet ist
|
||||
If ClassLogger.StreamWriter IsNot Nothing Then
|
||||
' die Datei schliessen
|
||||
ClassLogger.StreamWriter.Close()
|
||||
ClassLogger.StreamWriter = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Function CheckIsLogWritable()
|
||||
|
||||
If ClassLogger.OpenFile Then
|
||||
Try
|
||||
ClassLogger.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLogger.ShowErrorMessage()
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.ShowErrorMessage()
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function CheckIsLogWritable(ByVal vDateiSpeicherort As String, ByVal vDateiPrefix As String)
|
||||
|
||||
If ClassLogger.OpenFile(vDateiSpeicherort, vDateiPrefix) Then
|
||||
Try
|
||||
ClassLogger.CloseFile()
|
||||
Catch e As Exception
|
||||
ClassLogger.ShowErrorMessage()
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.ShowErrorMessage()
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Private Shared Sub ShowErrorMessage()
|
||||
If Not ClassLogger.HasInformedAboutError Then
|
||||
MsgBox("Please make sure You can access the logpath and are able to write to the file. This may be due to security privileges or storage place in the drive." & _
|
||||
vbNewLine & vbNewLine & "A logfile won't be written from now on." & vbNewLine & vbNewLine & "You won't be informed about further logdetails from now on.", _
|
||||
MsgBoxStyle.Information, "Error opening Logfile")
|
||||
ClassLogger.HasInformedAboutError = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
179
app/VERSION_CHECKER/ModuleMySettings.vb
Normal file
179
app/VERSION_CHECKER/ModuleMySettings.vb
Normal file
@@ -0,0 +1,179 @@
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports DD_LIB_Standards
|
||||
Module ModuleMySettings
|
||||
Public PATH_FileExclusions As String = Path.Combine(Application.UserAppDataPath(), "FileExclusions.xml")
|
||||
Dim ConfigPath As String = Path.Combine(Application.UserAppDataPath(), "UserConfig.xml")
|
||||
|
||||
Public DTEXCLUDE_FILES As DataTable
|
||||
Public USER_USERNAME As String = ""
|
||||
Public USER_GUID As Integer
|
||||
|
||||
Public MyConnectionString As String = ""
|
||||
Public MyServer_UpdatePath As String = ""
|
||||
Public VERSION_SERVER As String = ""
|
||||
Public VERSION_USER As String = "1.0.0.0"
|
||||
Public FOLDER_TEMP As String
|
||||
Public LogErrorsOnly As Boolean = True
|
||||
|
||||
Public Function LoadFileExclusion()
|
||||
Dim rowresult As String = ""
|
||||
Try
|
||||
'if file doesn't exist, create the file with its default xml table
|
||||
If Not File.Exists(path_FileExclusions) Then
|
||||
DTEXCLUDE_FILES = CreateExclusionTable()
|
||||
DTEXCLUDE_FILES.WriteXml(path_FileExclusions)
|
||||
End If
|
||||
DTEXCLUDE_FILES = GetTablefromXML(PATH_FileExclusions)
|
||||
|
||||
'For Each Row As DataRow In DT.Rows
|
||||
' rowresult &= Row.Item("FILE_CONTAIN")
|
||||
' Select Case Row.Item("FILE_CONTAIN")
|
||||
|
||||
' End Select
|
||||
|
||||
'Next
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadFileExclusion" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function CreateExclusionTable() As DataTable
|
||||
Try
|
||||
' Create sample Customers table, in order
|
||||
' to demonstrate the behavior of the DataTableReader.
|
||||
Dim table As New DataTable
|
||||
table.TableName = "TBEXCLUSION"
|
||||
|
||||
' Create two columns, ID and Name.
|
||||
table.Columns.Add("FILE_CONTAIN", GetType(System.String))
|
||||
Dim newRow As DataRow = table.NewRow()
|
||||
newRow("FILE_CONTAIN") = "Thumbs"
|
||||
table.Rows.Add(newRow)
|
||||
Dim newRow1 As DataRow = table.NewRow()
|
||||
newRow1("FILE_CONTAIN") = "\~$"
|
||||
table.Rows.Add(newRow1)
|
||||
Dim newRow2 As DataRow = table.NewRow()
|
||||
newRow2("FILE_CONTAIN") = ".db"
|
||||
table.Rows.Add(newRow2)
|
||||
Dim newRow3 As DataRow = table.NewRow()
|
||||
newRow3("FILE_CONTAIN") = "desktop.ini"
|
||||
table.Rows.Add(newRow3)
|
||||
table.AcceptChanges()
|
||||
Return table
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in CreateExclusionTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function MySettings_Load()
|
||||
Try
|
||||
Dim rowresult As String = ""
|
||||
Dim DT As DataTable
|
||||
ConfigPath = ConfigPath.Replace("VERSION_CHECKER\VersionCheck", "Digital Data\ADDI - Akte der Dinge")
|
||||
'if file doesn't exist, create the file with its default xml table
|
||||
If Not File.Exists(ConfigPath) Then
|
||||
Return False
|
||||
End If
|
||||
DT = GetTablefromXML(ConfigPath)
|
||||
If DT Is Nothing Then
|
||||
MsgBox("Configuration could not be loaded!! Check LogFile!", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
For Each Row As DataRow In DT.Rows
|
||||
rowresult &= Row.Item("ConfigName")
|
||||
Select Case Row.Item("ConfigName")
|
||||
Case "MyConnectionString"
|
||||
Dim connstring As String
|
||||
'Den ConnectonString mit verschlüsseltem PW laden
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = Row.Item("Value")
|
||||
If Not csb.ConnectionString = "" Then
|
||||
If csb.ConnectionString.Contains("Password=") Then
|
||||
'sa-
|
||||
'Jetzt das Passwort entschlüsseln
|
||||
Dim PWplainText As String
|
||||
Dim wrapper As New clsEncryption("!35452didalog=")
|
||||
' DecryptData throws if the wrong password is used.
|
||||
Try
|
||||
PWplainText = wrapper.DecryptData(csb.Password)
|
||||
connstring = Row.Item("Value").ToString.Replace(csb.Password, PWplainText)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("- the Password '" & csb.Password & "' could not be decrypted", False)
|
||||
connstring = ""
|
||||
End Try
|
||||
|
||||
Else
|
||||
'Windows-Auth
|
||||
connstring = Row.Item("Value").ToString
|
||||
End If
|
||||
|
||||
MyConnectionString = connstring
|
||||
Else
|
||||
MyConnectionString = ""
|
||||
End If
|
||||
Case "LogErrorsOnly"
|
||||
LogErrorsOnly = CBool(Row.Item("Value"))
|
||||
clsCURRENT.LOG_ERRORS_ONLY = LogErrorsOnly
|
||||
End Select
|
||||
Next
|
||||
LoadFileExclusion()
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Error in LoadMyConfig: " & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function GetTablefromXML(path As String)
|
||||
Try
|
||||
Dim DS As New DataSet
|
||||
DS.ReadXml(path)
|
||||
Return DS.Tables(0)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in GetTablefromXML" & vbNewLine & ex.Message & vbNewLine & "ConfigPath: " & vbNewLine & path, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Error in GetTablefromXML: " & ex.Message, True)
|
||||
ClassLogger.Add(">> ConfigPath: " & ConfigPath, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Private Function CreateConfigTable() As DataTable
|
||||
Try
|
||||
' Create sample Customers table, in order
|
||||
' to demonstrate the behavior of the DataTableReader.
|
||||
Dim table As New DataTable
|
||||
table.TableName = "MyConfig"
|
||||
|
||||
' Create two columns, ID and Name.
|
||||
Dim idColumn As DataColumn = table.Columns.Add("ID", _
|
||||
GetType(System.Int32))
|
||||
|
||||
idColumn.AutoIncrement = True
|
||||
idColumn.AutoIncrementSeed = 0
|
||||
idColumn.AutoIncrementStep = 1
|
||||
table.Columns.Add("ConfigName", GetType(System.String))
|
||||
table.Columns.Add("Value", GetType(System.String))
|
||||
'Set the ID column as the primary key column.
|
||||
table.PrimaryKey = New DataColumn() {idColumn}
|
||||
Dim newRow As DataRow = table.NewRow()
|
||||
newRow("ConfigName") = "MyConnectionString"
|
||||
newRow("Value") = ""
|
||||
table.Rows.Add(newRow)
|
||||
Dim newRow1 As DataRow = table.NewRow()
|
||||
newRow1("ConfigName") = "LogErrorsOnly"
|
||||
newRow1("Value") = "True"
|
||||
table.Rows.Add(newRow1)
|
||||
table.AcceptChanges()
|
||||
Return table
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in CreateConfigTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
End Module
|
||||
38
app/VERSION_CHECKER/My Project/Application.Designer.vb
generated
Normal file
38
app/VERSION_CHECKER/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.36366
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.VERSION_CHECKER.frmVersionCheck
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
app/VERSION_CHECKER/My Project/Application.myapp
Normal file
10
app/VERSION_CHECKER/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>frmVersionCheck</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
app/VERSION_CHECKER/My Project/AssemblyInfo.vb
Normal file
35
app/VERSION_CHECKER/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +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("Digital Data - ADDI")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("VersionCheck")>
|
||||
<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("e7ddda8e-3304-4845-a610-700bc7717461")>
|
||||
|
||||
' 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.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
app/VERSION_CHECKER/My Project/Resources.Designer.vb
generated
Normal file
62
app/VERSION_CHECKER/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.36366
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VERSION_CHECKER.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
app/VERSION_CHECKER/My Project/Resources.resx
Normal file
117
app/VERSION_CHECKER/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
app/VERSION_CHECKER/My Project/Settings.Designer.vb
generated
Normal file
73
app/VERSION_CHECKER/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.36366
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.VERSION_CHECKER.My.MySettings
|
||||
Get
|
||||
Return Global.VERSION_CHECKER.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
app/VERSION_CHECKER/My Project/Settings.settings
Normal file
7
app/VERSION_CHECKER/My Project/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
1
app/VERSION_CHECKER/My Project/licenses.licx
Normal file
1
app/VERSION_CHECKER/My Project/licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
142
app/VERSION_CHECKER/VERSION_CHECKER.vbproj
Normal file
142
app/VERSION_CHECKER/VERSION_CHECKER.vbproj
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{BD9ADB52-06CA-401C-84C7-1D94BC3E07E7}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>VERSION_CHECKER.My.MyApplication</StartupObject>
|
||||
<RootNamespace>VERSION_CHECKER</RootNamespace>
|
||||
<AssemblyName>VERSION_CHECKER</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>VERSION_CHECKER.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>VERSION_CHECKER.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DD_LIB_Standards">
|
||||
<HintPath>..\..\..\DDLibStandards\DD_LIB_Standards\bin\Debug\DD_LIB_Standards.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Sparkline.v15.2.Core, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="ClassLogger.vb" />
|
||||
<Compile Include="frmVersionCheck.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmVersionCheck.Designer.vb">
|
||||
<DependentUpon>frmVersionCheck.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ModuleMySettings.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="frmVersionCheck.resx">
|
||||
<DependentUpon>frmVersionCheck.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
72
app/VERSION_CHECKER/frmVersionCheck.Designer.vb
generated
Normal file
72
app/VERSION_CHECKER/frmVersionCheck.Designer.vb
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmVersionCheck
|
||||
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(frmVersionCheck))
|
||||
Me.lblStatus = New System.Windows.Forms.Label()
|
||||
Me.pbStatus = New System.Windows.Forms.ProgressBar()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'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(-1, 19)
|
||||
Me.lblStatus.Name = "lblStatus"
|
||||
Me.lblStatus.Size = New System.Drawing.Size(163, 15)
|
||||
Me.lblStatus.TabIndex = 3
|
||||
Me.lblStatus.Text = "Checking for newer version...."
|
||||
Me.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'pbStatus
|
||||
'
|
||||
Me.pbStatus.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.pbStatus.Location = New System.Drawing.Point(2, 37)
|
||||
Me.pbStatus.Name = "pbStatus"
|
||||
Me.pbStatus.Size = New System.Drawing.Size(546, 23)
|
||||
Me.pbStatus.TabIndex = 2
|
||||
'
|
||||
'frmVersionCheck
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(551, 92)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.lblStatus)
|
||||
Me.Controls.Add(Me.pbStatus)
|
||||
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmVersionCheck"
|
||||
Me.Text = "Checking for newer version of ADDI"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lblStatus As System.Windows.Forms.Label
|
||||
Friend WithEvents pbStatus As System.Windows.Forms.ProgressBar
|
||||
|
||||
End Class
|
||||
154
app/VERSION_CHECKER/frmVersionCheck.resx
Normal file
154
app/VERSION_CHECKER/frmVersionCheck.resx
Normal file
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAIAEBAQAAEABAAoAQAAJgAAABAQAAABAAgAaAUAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
|
||||
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAD///////8AAPd3d3d3fwAA93d3d3d/AAD3d3d3
|
||||
d38AAPd3d3d3fwD/93d3d3d/Dzj3d3d3d38Pg/f/////f///93d3/39/8z////d//3////D//3d3fw+D
|
||||
//OP////Dzjz+D8AAAAA//P/8AAAAAAA//AAAAAA//8AAPAAAADwAAAA8AAAAPAAAADwAAAAwAAAAIAA
|
||||
AACAAAAAAAAAAAAAAAAEAAAAgAAAAIA/AADAfwAA8f8AACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAA
|
||||
AAAAAAAAAAEAAAABAAAAAAAAQkJCABp9wgAohcUAhIODAIaGhgCkyeMA6O7zAPHv8AD29vYA+Pj4AAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQkJCQkJCQkJCQkAAAAACQEBAQEB
|
||||
AQEBAQEJAAAAAAkBAQEBAQEBAQEBCQAAAAAJAQEBAQEBAQEBAQkAAAAACQEBAQEBAQEBAQEJAAAJCQkB
|
||||
AQEBAQEBAQEBCQAJAwYJAQEBAQEBAQEBAQkACgYDBwEICAgICAgICAEJCQkJBwkBAQEBBAgIAQgBCQkC
|
||||
AgkJCQkJCQQECAgIAQkJCQkHCgAKBwkJBAEBAQEJAAkGAwcJBwMGCQkJCQkJCQAJAwYJAgkGAwkAAAAA
|
||||
AAAAAAkJCQIJCQkAAAAAAAAAAAAAAAkJCQAAAAAAAAAAAP//AADwAAAA8AAAAPAAAADwAAAA8AAAAMAA
|
||||
AACAAAAAgAAAAAAAAAAAAAAABAAAAIAAAACAPwAAwH8AAPH/AAA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
155
app/VERSION_CHECKER/frmVersionCheck.vb
Normal file
155
app/VERSION_CHECKER/frmVersionCheck.vb
Normal file
@@ -0,0 +1,155 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmVersionCheck
|
||||
Private InitSteps As Integer = 6
|
||||
Private bw As New BackgroundWorker()
|
||||
Private mainForm As Form
|
||||
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(200)
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing MySettings")
|
||||
MySettings_Load()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(2), "Initializing Database")
|
||||
If Init.InitDatabase() = True Then
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing Basic-Configuration")
|
||||
Init.InitBasics()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration")
|
||||
If ClassInit.InitUserLogin = False Then
|
||||
Exit Sub
|
||||
Else
|
||||
If VERSION_USER = VERSION_SERVER Then
|
||||
Exit Sub
|
||||
End If
|
||||
If MyServer_UpdatePath <> String.Empty Then
|
||||
If Directory.Exists(MyServer_UpdatePath) Then
|
||||
GetTempFolderGuid()
|
||||
If FOLDER_TEMP <> String.Empty Then
|
||||
bw.ReportProgress(CalcProgress(5), "Copying files to tempfolder")
|
||||
' Make a reference to a directory.
|
||||
Dim di As New DirectoryInfo(MyServer_UpdatePath)
|
||||
' Get a reference to each file in that directory.
|
||||
Dim fiArr As FileInfo() = di.GetFiles()
|
||||
' Display the names of the files.
|
||||
Dim fri As FileInfo
|
||||
Dim error_while_copying = False
|
||||
For Each fri In fiArr
|
||||
If error_while_copying = True Then
|
||||
Exit For
|
||||
End If
|
||||
Dim no_work = False
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If fri.Name.Contains(content) Then
|
||||
no_work = True
|
||||
End If
|
||||
Next
|
||||
If no_work = False Then 'Copy the file to tempFolder
|
||||
Try
|
||||
System.IO.File.Copy(fri.FullName, Path.Combine(FOLDER_TEMP, fri.Name))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format("Error while copying file {0} to {1}: " & ex.Message, fri.FullName, Path.Combine(FOLDER_TEMP, fri.Name)))
|
||||
error_while_copying = True
|
||||
End Try
|
||||
If error_while_copying = False Then
|
||||
|
||||
End If
|
||||
End If
|
||||
Console.WriteLine(fri.Name)
|
||||
Next fri
|
||||
Try
|
||||
'Delete the tempfolder and all data
|
||||
System.IO.Directory.Delete(FOLDER_TEMP, True)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
System.Threading.Thread.Sleep(200)
|
||||
|
||||
bw.ReportProgress(CalcProgress(6), "Initializing Frontend")
|
||||
' InitInterface wurde in frmMain integriert
|
||||
'Init.InitInterface(mainForm)
|
||||
System.Threading.Thread.Sleep(200)
|
||||
Else
|
||||
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in Init Classes: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
'End Try
|
||||
End Sub
|
||||
Sub Start_RO()
|
||||
Try
|
||||
Dim ProductionPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "RightManager", "RecordOrganizer_RightManager.exe")
|
||||
Dim DevelPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "RecordOrganizer_RightManager\bin\Debug", "RecordOrganizer_RightManager.exe")
|
||||
|
||||
Dim startInfo As New ProcessStartInfo()
|
||||
startInfo.Arguments = """" & MyConnectionString & """"
|
||||
|
||||
If System.IO.File.Exists(ProductionPath) Then
|
||||
startInfo.FileName = ProductionPath
|
||||
Else
|
||||
startInfo.FileName = DevelPath
|
||||
End If
|
||||
|
||||
Process.Start(startInfo)
|
||||
Catch ex As Exception
|
||||
MsgBox("Could not find Right manager: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Function GetTempFolderGuid() As String
|
||||
Try
|
||||
Dim folder As String = Path.Combine(Path.GetTempPath, Guid.NewGuid.ToString)
|
||||
If Not Directory.Exists(folder) Then
|
||||
Directory.CreateDirectory(folder)
|
||||
End If
|
||||
FOLDER_TEMP = folder
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format("Error while Creating tempfolder: " & ex.Message))
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
Private Sub frmVersionCheck_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
InitProgram()
|
||||
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
|
||||
Reference in New Issue
Block a user