Initial commit
This commit is contained in:
20
Coldstrt/Backup/Coldstrt.sln
Normal file
20
Coldstrt/Backup/Coldstrt.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Coldstrt", "Coldstrt\Coldstrt.vbproj", "{02D43006-2DED-40BD-9D87-6E7AEBCDA661}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{02D43006-2DED-40BD-9D87-6E7AEBCDA661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02D43006-2DED-40BD-9D87-6E7AEBCDA661}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02D43006-2DED-40BD-9D87-6E7AEBCDA661}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02D43006-2DED-40BD-9D87-6E7AEBCDA661}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
Coldstrt/Backup/Coldstrt.v11.suo
Normal file
BIN
Coldstrt/Backup/Coldstrt.v11.suo
Normal file
Binary file not shown.
400
Coldstrt/Backup/Coldstrt/Coldstart.vb
Normal file
400
Coldstrt/Backup/Coldstrt/Coldstart.vb
Normal file
@@ -0,0 +1,400 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
|
||||
Module Coldstart
|
||||
|
||||
Dim edk_User As String
|
||||
Dim edk_Password As String
|
||||
Dim edk_DocID As String
|
||||
Dim edk_Folder As String
|
||||
Dim edk_Datum As String
|
||||
Dim edk_Auftragnr As String
|
||||
Dim edk_Dokumenttyp As String
|
||||
Dim edk_Belegart As String
|
||||
|
||||
Dim str_URL As String
|
||||
Dim cold_Server As String
|
||||
|
||||
Dim arr_Args() As String
|
||||
Dim g_oIE As SHDocVw.InternetExplorer 'Benötigt Verweis "Microsoft Internet Controls" (shdocvw.dll)
|
||||
Dim Conn As New DB_Connection
|
||||
Dim ErrCD As Integer
|
||||
|
||||
'Fallback für alte Version DDE
|
||||
Dim viewmode As String 'ODWEK (Internet Explorer) oder DDE (coldstrt_old.exe)
|
||||
Dim appPath As String = Path.GetDirectoryName([Assembly].GetEntryAssembly().Location)
|
||||
Dim coldGui As String
|
||||
Dim coldSystem As String
|
||||
|
||||
Sub Main(ByVal CmdArgs() As String)
|
||||
'test()
|
||||
'Exit Sub
|
||||
ErrCD = 0
|
||||
Parse_Commandline(CmdArgs)
|
||||
Start_ODWEK()
|
||||
Environment.Exit(ErrCD)
|
||||
End Sub
|
||||
|
||||
Sub test()
|
||||
|
||||
Dim shellWindows As SHDocVw.ShellWindows = New SHDocVw.ShellWindows
|
||||
Dim i As Integer
|
||||
For i = 0 To shellWindows.Count
|
||||
MsgBox(shellWindows.Item(i).ToString)
|
||||
Next
|
||||
'IE Aufruf
|
||||
g_oIE = New SHDocVw.InternetExplorer
|
||||
g_oIE.AddressBar = False
|
||||
'g_oIE.PutProperty()
|
||||
g_oIE.Navigate("http://www.shub.ch", shellWindows, , )
|
||||
g_oIE.PutProperty("LocationName", "Hallo")
|
||||
|
||||
'g_oIE.Navigate(str_URL, vFlags, vTarget, vPost, vHeaders)
|
||||
g_oIE.Visible = True
|
||||
Exit Sub
|
||||
Process.Start("http://www.shub.ch")
|
||||
g_oIE = New SHDocVw.InternetExplorer
|
||||
str_URL = "http://www.shub.ch"
|
||||
g_oIE.Navigate(str_URL)
|
||||
g_oIE.Visible = True
|
||||
Exit Sub
|
||||
Dim cpostdata As String
|
||||
|
||||
Dim aByte(0) As Byte
|
||||
ReDim aByte(0)
|
||||
Dim cSep As String = "&"
|
||||
PackBytes(aByte, cpostdata)
|
||||
|
||||
'Vorbereitung IE Aufruf
|
||||
Dim vPost As Object = aByte
|
||||
Dim vFlags As Object = Nothing
|
||||
Dim vTarget As Object = Nothing
|
||||
Dim vHeaders As Object
|
||||
vHeaders = "Content-Type: application/x-www-form-urlencoded" + Chr(10) + Chr(13)
|
||||
'IE Aufruf
|
||||
g_oIE = New SHDocVw.InternetExplorer
|
||||
str_URL = "http://www.shub.ch"
|
||||
g_oIE.Navigate(str_URL, vFlags, vTarget, vPost, vHeaders)
|
||||
g_oIE.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub Start_ODWEK()
|
||||
'DB Verbindung für Settings
|
||||
Try
|
||||
Dim Sqlcmd As SqlCommand = New SqlCommand()
|
||||
Sqlcmd.CommandText = "Select viewmode from applikation_odwek"
|
||||
Sqlcmd.CommandType = CommandType.Text
|
||||
Dim dtToReturn As DataTable
|
||||
Dim dtToReturn2 As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter
|
||||
Dim sdaAdapter2 As SqlDataAdapter = New SqlDataAdapter(Sqlcmd)
|
||||
Sqlcmd.Connection = New SqlConnection(conn.scoDBConnection)
|
||||
sdaAdapter2.Fill(dtToReturn2)
|
||||
|
||||
viewmode = dtToReturn2.Rows(0).Item("viewmode")
|
||||
|
||||
'Sqlcmd.Connection.Close()
|
||||
sdaAdapter2 = Nothing
|
||||
' Sqlcmd = Nothing
|
||||
dtToReturn = Nothing
|
||||
' Dim Sqlcmd As SqlCommand = New SqlCommand()
|
||||
If FolderExist("c:\os") Then
|
||||
Sqlcmd.CommandText = "Select coldgui, coldsystem from applikation where Applikationsnr = 2"
|
||||
Else
|
||||
Sqlcmd.CommandText = "Select coldgui, coldsystem from applikation where Applikationsnr = 1"
|
||||
End If
|
||||
Sqlcmd.CommandType = CommandType.Text
|
||||
dtToReturn = New DataTable()
|
||||
sdaAdapter = New SqlDataAdapter(Sqlcmd)
|
||||
'Sqlcmd.Connection = New SqlConnection(Conn.scoDBConnection)
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
coldgui = dtToReturn.Rows(0).Item("coldgui")
|
||||
coldSystem = dtToReturn.Rows(0).Item("coldsystem")
|
||||
Sqlcmd.Connection.Close()
|
||||
sdaAdapter = Nothing
|
||||
Sqlcmd = Nothing
|
||||
dtToReturn = Nothing
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim Einlesen der Programmparameter von der Datenbank")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Environment.Exit(1)
|
||||
End Try
|
||||
Select Case UCase(viewmode)
|
||||
Case "DDE"
|
||||
'Coldstrtold.exe aufrufen (aus EdokaApp übernommen)
|
||||
Try
|
||||
Dim rc As Integer 'Return Code
|
||||
Select Case edk_Belegart
|
||||
Case "HOST"
|
||||
'Nova
|
||||
rc = Shell(appPath + "\coldstrtold.exe" + " /e " + coldGui + " /S " + coldSystem + " /U " + edk_User + " /P " + edk_Password + " /f " + edk_Folder + " /d " + edk_DocID + " /t " + edk_Datum + " /b HOST", AppWinStyle.Hide, False)
|
||||
Exit Sub
|
||||
Case "UVM"
|
||||
rc = Shell(appPath + "\coldstrtold.exe" + " /e " + coldGui + " /S " + coldSystem + " /U " + edk_User + " /P " + edk_Password + " /f " + edk_Folder + " /d " + edk_DocID + " /t " + edk_Datum + " /b UVM /a " + Trim(edk_Auftragnr) + " /g " + Trim(edk_Dokumenttyp), AppWinStyle.Hide, False)
|
||||
Exit Sub
|
||||
Case "ZV"
|
||||
rc = Shell(appPath + "\coldstrtold.exe" + " /e " + coldGui + " /S " + coldSystem + " /U " + edk_User + " /P " + edk_Password + " /f " + edk_Folder + " /d " + edk_DocID + " /t " + edk_Datum + " /b ZV /a " + Trim(edk_Auftragnr) + " /g " + Trim(edk_Dokumenttyp), AppWinStyle.Hide, False)
|
||||
Exit Sub
|
||||
Case Else 'EDOKA
|
||||
rc = Shell(appPath + "\coldstrtold.exe" + " /e " + coldGui + " /S " + coldSystem + " /U " + edk_User + " /P " + edk_Password + " /f " + edk_Folder + " /d " + edk_DocID + " /t " + edk_Datum, AppWinStyle.Hide, False)
|
||||
Exit Sub
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("DDE Version Error: " + ex.Message)
|
||||
'MsgBox("Error: " + ex.Message)
|
||||
End Try
|
||||
|
||||
Case Else
|
||||
'Oeffnen des Browsers mit den entsprechenden Parametern
|
||||
Try
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_Migration_ODWEK"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = New SqlConnection(Conn.scoDBConnection)
|
||||
|
||||
Dim aByte(0) As Byte
|
||||
ReDim aByte(0)
|
||||
Dim cSep As String = "&"
|
||||
|
||||
' Vorbereitung der Parameter
|
||||
Dim cFunction As String = "_function=retrieve"
|
||||
Dim cUser As String = "_user=" + edk_User
|
||||
Dim cPassword As String = "_password=" + edk_Password
|
||||
Dim cLogoff As String = "_logoff=1"
|
||||
'Dim cLogoff As String = "_function=logoff"
|
||||
Dim cServer As String = ""
|
||||
|
||||
|
||||
Dim cpostdata As String
|
||||
Dim cFolder As String
|
||||
'Unterscheidung Belegart
|
||||
Select Case UCase(Trim(edk_Belegart))
|
||||
Case "HOST"
|
||||
|
||||
' KC 29.05.2008
|
||||
' CHECK for MIGRATION
|
||||
|
||||
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Belegart", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, UCase(Trim(edk_Belegart))))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, "01.01.2008"))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@DokumentID", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_DocID))
|
||||
|
||||
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
str_URL = dtToReturn.Rows(0).Item("URL")
|
||||
cold_Server = dtToReturn.Rows(0).Item("server")
|
||||
viewmode = dtToReturn.Rows(0).Item("viewmode")
|
||||
|
||||
cServer = "_server=" + cold_Server
|
||||
'Basis String erstellen
|
||||
cpostdata = cFunction & cSep & cLogoff & cSep & cServer & cSep & cUser & cSep & cPassword & cSep
|
||||
cFolder = "_folder=" + dtToReturn.Rows(0).Item("HOST")
|
||||
If cFolder = "_folder=TGKB Kundenoutput ab 01.08.2008" Then
|
||||
cpostdata = cpostdata & cSep & "Dokumenten-Id=" & edk_DocID & cSep & cFolder & cSep _
|
||||
& "Erstellung od. Valuta Datum=" & edk_Datum & cSep & "Erstellung od. Valuta Datum2=" & edk_Datum
|
||||
Else
|
||||
cpostdata = cpostdata & cSep & "Dokument-Id=" & edk_DocID & cSep & cFolder & cSep _
|
||||
& "Erstellung od. Valuta Datum=" & edk_Datum & cSep & "Erstellung od. Valuta Datum2=" & edk_Datum
|
||||
End If
|
||||
|
||||
cpostdata = cpostdata & cSep & "Dokument-Id=" & edk_DocID & cSep & cFolder & cSep _
|
||||
& "Erstellung od. Valuta Datum=" & edk_Datum & cSep & "Erstellung od. Valuta Datum2=" & edk_Datum
|
||||
|
||||
|
||||
Case "UVM"
|
||||
|
||||
' KC 29.05.2008
|
||||
' CHECK for MIGRATION
|
||||
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Belegart", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, UCase(Trim(edk_Belegart))))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_Datum))
|
||||
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
str_URL = dtToReturn.Rows(0).Item("URL")
|
||||
cold_Server = dtToReturn.Rows(0).Item("server")
|
||||
viewmode = dtToReturn.Rows(0).Item("viewmode")
|
||||
|
||||
cServer = "_server=" + cold_Server
|
||||
'Basis String erstellen
|
||||
cpostdata = cFunction & cSep & cLogoff & cSep & cServer & cSep & cUser & cSep & cPassword
|
||||
cFolder = "_folder=" + dtToReturn.Rows(0).Item("UVM")
|
||||
|
||||
cpostdata = cpostdata & cSep & "Auftrag-Nr.=" & edk_Auftragnr & cSep & "Dokumenttyp=" & edk_Dokumenttyp _
|
||||
& cSep & cFolder & cSep & "Dokument-ID=" & edk_DocID & cSep & "Erfassungsdatum=" & edk_Datum & cSep _
|
||||
& "Erfassungsdatum2=" & edk_Datum
|
||||
|
||||
Case "ZV"
|
||||
' KC 29.05.2008
|
||||
' CHECK for MIGRATION
|
||||
|
||||
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Belegart", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, UCase(Trim(edk_Belegart))))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@DokumentID", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, "''"))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ZVnrdot", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_Dokumenttyp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ZVnrdoc", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_DocID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ZVnrauf", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_Auftragnr))
|
||||
|
||||
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
str_URL = dtToReturn.Rows(0).Item("URL")
|
||||
cold_Server = dtToReturn.Rows(0).Item("server")
|
||||
viewmode = dtToReturn.Rows(0).Item("viewmode")
|
||||
|
||||
cServer = "_server=" + cold_Server
|
||||
'Basis String erstellen
|
||||
cpostdata = cFunction & cSep & cLogoff & cSep & cServer & cSep & cUser & cSep & cPassword
|
||||
cFolder = "_folder=" + dtToReturn.Rows(0).Item("ZV")
|
||||
|
||||
cpostdata = cpostdata & cSep & "Auftrag-Nr.=" & edk_Auftragnr & cSep & "Dokumenttyp=" & edk_Dokumenttyp _
|
||||
& cSep & cFolder & cSep & "Paginator=" & edk_DocID
|
||||
'RGL 20080325 Kein Datum bei ZV Belegen
|
||||
'& cSep & cFolder & cSep & "Paginator=" & edk_DocID & cSep & "Valuta od. Archiv Datum=" & edk_Datum _
|
||||
'& cSep & "Valuta od. Archiv Datum2=" & edk_Datum
|
||||
Case Else 'EDOKA
|
||||
' KC 29.05.2008
|
||||
' CHECK for MIGRATION
|
||||
|
||||
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Belegart", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, "EDOKA"))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@DokumentID", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, edk_DocID))
|
||||
|
||||
|
||||
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
str_URL = dtToReturn.Rows(0).Item("URL")
|
||||
cold_Server = dtToReturn.Rows(0).Item("server")
|
||||
viewmode = dtToReturn.Rows(0).Item("viewmode")
|
||||
|
||||
cServer = "_server=" + cold_Server
|
||||
'Basis String erstellen
|
||||
cpostdata = cFunction & cSep & cLogoff & cSep & cServer & cSep & cUser & cSep & cPassword
|
||||
cFolder = "_folder=" + dtToReturn.Rows(0).Item("EDOKAFolder")
|
||||
|
||||
cpostdata = cpostdata & cSep & "Dokument-Id=" & edk_DocID & cSep & cFolder & cSep & "Archiv-Datum=" _
|
||||
& edk_Datum & cSep & "Archiv-Datum2=" & edk_Datum
|
||||
End Select
|
||||
'DB aufräumen
|
||||
scmCmdToExecute.Connection.Close()
|
||||
sdaAdapter.Dispose()
|
||||
sdaAdapter = Nothing
|
||||
scmCmdToExecute.Dispose()
|
||||
scmCmdToExecute = Nothing
|
||||
dtToReturn.Dispose()
|
||||
dtToReturn = Nothing
|
||||
|
||||
'Packen für POST
|
||||
PackBytes(aByte, cpostdata)
|
||||
|
||||
'Vorbereitung IE Aufruf
|
||||
Dim vPost As Object = aByte
|
||||
Dim vFlags As Object = Nothing
|
||||
Dim vTarget As Object = Nothing
|
||||
Dim vHeaders As Object
|
||||
vPost = ASCIIEncoding.ASCII.GetBytes(cpostdata)
|
||||
|
||||
'vHeaders = "Content-Type: application/x-www-form-urlencoded" + Chr(10) + Chr(13)
|
||||
vHeaders = "Content-Type: application/x-www-form-urlencoded, Cache-Control: no-cache"
|
||||
'IE Aufruf
|
||||
g_oIE = New SHDocVw.InternetExplorer
|
||||
g_oIE.AddressBar = False
|
||||
'g_oIE.Navigate2(str_URL + cpostdata)
|
||||
|
||||
'g_oIE.Navigate2(str_URL, Nothing, Nothing, vPost, vHeaders)
|
||||
g_oIE.Visible = True
|
||||
Catch ex As Exception
|
||||
|
||||
Console.WriteLine("Fehler beim öffnen des Internet Explorers")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Environment.Exit(1)
|
||||
Finally
|
||||
g_oIE = Nothing
|
||||
End Try
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub PackBytes(ByRef out_ByteArray() As Byte, ByVal in_PostData As String)
|
||||
Try
|
||||
Dim Byte_tmp = Len(in_PostData) - 1 ' Get rid of the null termination
|
||||
If Byte_tmp < 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
ReDim out_ByteArray(Byte_tmp)
|
||||
Dim i As Integer
|
||||
Dim str_tmp As String
|
||||
For i = 0 To Byte_tmp
|
||||
str_tmp = Mid(in_PostData, i + 1, 1)
|
||||
If str_tmp = Space(1) Then
|
||||
str_tmp = "+"
|
||||
End If
|
||||
out_ByteArray(i) = Asc(str_tmp)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim packen der POST Daten")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Environment.Exit(1)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Parse_Commandline(ByVal str_args() As String)
|
||||
Try
|
||||
Dim str_tmp As String = ""
|
||||
Dim i, ii As Integer
|
||||
For ii = 0 To UBound(str_args)
|
||||
str_tmp = str_tmp & str_args(ii) & " "
|
||||
Next
|
||||
If InStr(str_tmp, "/?") > 0 Or InStr(str_tmp, "-?") > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
arr_Args = Split(str_tmp, "/")
|
||||
For i = LBound(arr_Args) To UBound(arr_Args)
|
||||
Select Case LCase(Left(arr_Args(i), 2))
|
||||
Case "? "
|
||||
End
|
||||
Case "u "
|
||||
edk_User = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "p "
|
||||
edk_Password = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "f "
|
||||
edk_Folder = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "d "
|
||||
edk_DocID = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "t "
|
||||
edk_datum = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "b "
|
||||
edk_Belegart = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "g "
|
||||
edk_Dokumenttyp = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case "a "
|
||||
edk_Auftragnr = Trim(Right(arr_Args(i), Len(arr_Args(i)) - 2))
|
||||
Case Else
|
||||
'ErrCD = 9
|
||||
End Select
|
||||
Next i
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim Auslesen der Befehlszeilen Argumente")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Environment.Exit(1)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function FolderExist(ByVal dn As String) As Boolean
|
||||
Try
|
||||
If System.IO.Directory.Exists(dn) Then FolderExist = True Else FolderExist = False
|
||||
Catch
|
||||
FolderExist = False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Module
|
||||
137
Coldstrt/Backup/Coldstrt/Coldstrt.vbproj
Normal file
137
Coldstrt/Backup/Coldstrt/Coldstrt.vbproj
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{02D43006-2DED-40BD-9D87-6E7AEBCDA661}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>Coldstrt.Coldstart</StartupObject>
|
||||
<RootNamespace>Coldstrt</RootNamespace>
|
||||
<AssemblyName>Coldstrt</AssemblyName>
|
||||
<MyType>Console</MyType>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<ManifestCertificateThumbprint>FDA52E3BB58DD05EADFC9FBD9EA40954A86CA95F</ManifestCertificateThumbprint>
|
||||
<ManifestKeyFile>Coldstrt_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
<SignManifests>true</SignManifests>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationVersion>2.1.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Coldstrt.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Coldstrt.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Coldstart.vb" />
|
||||
<Compile Include="Crypto.vb" />
|
||||
<Compile Include="db_connection.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="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Coldstrt_TemporaryKey.pfx" />
|
||||
<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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="SHDocVw">
|
||||
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>1</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\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>
|
||||
23
Coldstrt/Backup/Coldstrt/Coldstrt.vbproj.user
Normal file
23
Coldstrt/Backup/Coldstrt/Coldstrt.vbproj.user
Normal file
@@ -0,0 +1,23 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<StartArguments>"/b ZV /a TG0508100140000001 /g ZVS003-Erfassungsdaten /u tgsystkb /p tgsystkb /f TGKB ZV-Scanning Belege /t 31.07.08"</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<StartArguments>"/b ZV /a TG0508100140000001 /g ZVS003-Erfassungsdaten /u tgsystkb /p tgsystkb /f TGKB ZV-Scanning Belege /t 31.07.08"</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<FallbackCulture>de-DE</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
BIN
Coldstrt/Backup/Coldstrt/Coldstrt_TemporaryKey.pfx
Normal file
BIN
Coldstrt/Backup/Coldstrt/Coldstrt_TemporaryKey.pfx
Normal file
Binary file not shown.
47
Coldstrt/Backup/Coldstrt/Crypto.vb
Normal file
47
Coldstrt/Backup/Coldstrt/Crypto.vb
Normal file
@@ -0,0 +1,47 @@
|
||||
Module Crypto
|
||||
Public Function EncryptText(ByVal strText As String, ByVal strPwd As String)
|
||||
Dim i As Integer, c As Integer
|
||||
Dim strBuff As String
|
||||
strBuff = ""
|
||||
Try
|
||||
strPwd = UCase$(strPwd)
|
||||
If Len(strPwd) Then
|
||||
For i = 1 To Len(strText)
|
||||
c = Asc(Mid$(strText, i, 1))
|
||||
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
|
||||
strBuff = strBuff & Chr(c And &HFF)
|
||||
Next i
|
||||
Else
|
||||
strBuff = strText
|
||||
End If
|
||||
EncryptText = strBuff
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim Verschlüsseln")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Return strBuff
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function DecryptText(ByVal strText As String, ByVal strPwd As String)
|
||||
Dim i As Integer, c As Integer
|
||||
Dim strBuff As String
|
||||
strBuff = ""
|
||||
Try
|
||||
strPwd = UCase$(strPwd)
|
||||
If Len(strPwd) Then
|
||||
For i = 1 To Len(strText)
|
||||
c = Asc(Mid$(strText, i, 1))
|
||||
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
|
||||
strBuff = strBuff & Chr(c And &HFF)
|
||||
Next i
|
||||
Else
|
||||
strBuff = strText
|
||||
End If
|
||||
DecryptText = strBuff
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim Entschlüsseln")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Return strBuff
|
||||
End Try
|
||||
End Function
|
||||
End Module
|
||||
13
Coldstrt/Backup/Coldstrt/My Project/Application.Designer.vb
generated
Normal file
13
Coldstrt/Backup/Coldstrt/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.832
|
||||
'
|
||||
' 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
|
||||
|
||||
10
Coldstrt/Backup/Coldstrt/My Project/Application.myapp
Normal file
10
Coldstrt/Backup/Coldstrt/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
Coldstrt/Backup/Coldstrt/My Project/AssemblyInfo.vb
Normal file
35
Coldstrt/Backup/Coldstrt/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("Coldstrt")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("DEVNET")>
|
||||
<Assembly: AssemblyProduct("Coldstrt")>
|
||||
<Assembly: AssemblyCopyright("Copyright © DEVNET 2008")>
|
||||
<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("02be6d28-5072-40a1-9f85-2db3f072034e")>
|
||||
|
||||
' 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("2.1.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.1.0.0")>
|
||||
62
Coldstrt/Backup/Coldstrt/My Project/Resources.Designer.vb
generated
Normal file
62
Coldstrt/Backup/Coldstrt/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.832
|
||||
'
|
||||
' 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", "2.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("Coldstrt.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
Coldstrt/Backup/Coldstrt/My Project/Resources.resx
Normal file
117
Coldstrt/Backup/Coldstrt/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
Coldstrt/Backup/Coldstrt/My Project/Settings.Designer.vb
generated
Normal file
73
Coldstrt/Backup/Coldstrt/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.832
|
||||
'
|
||||
' 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", "8.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.Coldstrt.My.MySettings
|
||||
Get
|
||||
Return Global.Coldstrt.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
Coldstrt/Backup/Coldstrt/My Project/Settings.settings
Normal file
7
Coldstrt/Backup/Coldstrt/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>
|
||||
35
Coldstrt/Backup/Coldstrt/db_connection.vb
Normal file
35
Coldstrt/Backup/Coldstrt/db_connection.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class DB_Connection
|
||||
|
||||
Dim sConnectionString As String
|
||||
|
||||
Property scoDBConnection()
|
||||
Get
|
||||
Return Me.sConnectionString
|
||||
End Get
|
||||
Set(ByVal value)
|
||||
Me.sConnectionString = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
Try
|
||||
Dim fc As Integer = 0
|
||||
Dim oread As System.IO.StreamReader
|
||||
Dim mypath As String = Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) 'Benötigt System.Reflection
|
||||
oread = File.OpenText(mypath + "\" + "edokaconn.cfg")
|
||||
sConnectionString = oread.ReadLine
|
||||
sConnectionString = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
sConnectionString = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
oread.Close()
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("Fehler beim öffnen der Datei edokaconn.cfg")
|
||||
Console.WriteLine("Error: " + ex.Message)
|
||||
Environment.Exit(1)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user