Projektdateien hinzufügen.
This commit is contained in:
parent
b6bdcf9b1f
commit
b2efa36fe1
29
Connect_Netzlaufwerk/ApplicationEvents.vb
Normal file
29
Connect_Netzlaufwerk/ApplicationEvents.vb
Normal file
@ -0,0 +1,29 @@
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
|
||||
Namespace My
|
||||
' The following events are available for MyApplication:
|
||||
' Startup: Raised when the application starts, before the startup form is created.
|
||||
' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
|
||||
' UnhandledException: Raised if the application encounters an unhandled exception.
|
||||
' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
|
||||
' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
|
||||
|
||||
' **NEW** ApplyApplicationDefaults: Raised when the application queries default values to be set for the application.
|
||||
|
||||
' Example:
|
||||
' Private Sub MyApplication_ApplyApplicationDefaults(sender As Object, e As ApplyApplicationDefaultsEventArgs) Handles Me.ApplyApplicationDefaults
|
||||
'
|
||||
' ' Setting the application-wide default Font:
|
||||
' e.Font = New Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular)
|
||||
'
|
||||
' ' Setting the HighDpiMode for the Application:
|
||||
' e.HighDpiMode = HighDpiMode.PerMonitorV2
|
||||
'
|
||||
' ' If a splash dialog is used, this sets the minimum display time:
|
||||
' e.MinimumSplashScreenDisplayTime = 4000
|
||||
' End Sub
|
||||
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
32
Connect_Netzlaufwerk/Connect_Netzlaufwerk.vbproj
Normal file
32
Connect_Netzlaufwerk/Connect_Netzlaufwerk.vbproj
Normal file
@ -0,0 +1,32 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<StartupObject>Sub Main</StartupObject>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<MyType>WindowsForms</MyType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="My Project\Application.Designer.vb">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
98
Connect_Netzlaufwerk/Form1.Designer.vb
generated
Normal file
98
Connect_Netzlaufwerk/Form1.Designer.vb
generated
Normal file
@ -0,0 +1,98 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class Form1
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<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
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
lblConnect = New Label()
|
||||
lblDriveCaption = New Label()
|
||||
ComboDrive = New ComboBox()
|
||||
Button1 = New Button()
|
||||
Button2 = New Button()
|
||||
SuspendLayout()
|
||||
'
|
||||
' lblConnect
|
||||
'
|
||||
lblConnect.AutoSize = True
|
||||
lblConnect.Location = New Point(25, 19)
|
||||
lblConnect.Name = "lblConnect"
|
||||
lblConnect.Size = New Size(41, 15)
|
||||
lblConnect.TabIndex = 0
|
||||
lblConnect.Text = "Label1"
|
||||
'
|
||||
' lblDriveCaption
|
||||
'
|
||||
lblDriveCaption.AutoSize = True
|
||||
lblDriveCaption.Location = New Point(25, 52)
|
||||
lblDriveCaption.Name = "lblDriveCaption"
|
||||
lblDriveCaption.Size = New Size(41, 15)
|
||||
lblDriveCaption.TabIndex = 1
|
||||
lblDriveCaption.Text = "Label1"
|
||||
'
|
||||
' ComboDrive
|
||||
'
|
||||
ComboDrive.FormattingEnabled = True
|
||||
ComboDrive.Location = New Point(121, 52)
|
||||
ComboDrive.Name = "ComboDrive"
|
||||
ComboDrive.Size = New Size(121, 23)
|
||||
ComboDrive.TabIndex = 2
|
||||
'
|
||||
' Button1
|
||||
'
|
||||
Button1.Location = New Point(25, 100)
|
||||
Button1.Name = "Button1"
|
||||
Button1.Size = New Size(75, 23)
|
||||
Button1.TabIndex = 3
|
||||
Button1.Text = "Connect"
|
||||
Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
' Button2
|
||||
'
|
||||
Button2.Location = New Point(121, 100)
|
||||
Button2.Name = "Button2"
|
||||
Button2.Size = New Size(75, 23)
|
||||
Button2.TabIndex = 4
|
||||
Button2.Text = "Disconnect"
|
||||
Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
' Form1
|
||||
'
|
||||
AutoScaleDimensions = New SizeF(7F, 15F)
|
||||
AutoScaleMode = AutoScaleMode.Font
|
||||
ClientSize = New Size(800, 450)
|
||||
Controls.Add(Button2)
|
||||
Controls.Add(Button1)
|
||||
Controls.Add(ComboDrive)
|
||||
Controls.Add(lblDriveCaption)
|
||||
Controls.Add(lblConnect)
|
||||
Name = "Form1"
|
||||
Text = "Form1"
|
||||
ResumeLayout(False)
|
||||
PerformLayout()
|
||||
End Sub
|
||||
|
||||
Friend WithEvents lblConnect As Label
|
||||
Friend WithEvents lblDriveCaption As Label
|
||||
Friend WithEvents ComboDrive As ComboBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
|
||||
End Class
|
||||
120
Connect_Netzlaufwerk/Form1.resx
Normal file
120
Connect_Netzlaufwerk/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
124
Connect_Netzlaufwerk/Form1.vb
Normal file
124
Connect_Netzlaufwerk/Form1.vb
Normal file
@ -0,0 +1,124 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class Form1
|
||||
Dim strUserName As String ' UserName für Anmelden beim Netzlaufwerk
|
||||
Dim strUserPassword As String ' Password für die Anmeldung
|
||||
Dim strDrive As String ' Laufwerksbuchstabe
|
||||
|
||||
' Dieser Source stammt von http://www.activevb.de
|
||||
' und kann frei verwendet werden. Für eventuelle Schäden
|
||||
' wird nicht gehaftet.
|
||||
|
||||
' Um Fehler oder Fragen zu klären, nutzen Sie bitte unser Forum.
|
||||
' Ansonsten viel Spaß und Erfolg mit diesem Source !
|
||||
|
||||
' Deklaration: Globale Form API-Konstanten
|
||||
' Private Const RESOURCETYPE_DISK As Int32 = &H1
|
||||
Const RESOURCETYPE_DISK = &H1
|
||||
|
||||
' Deklaration: Globale Form API-Typen
|
||||
Public Structure NETRESOURCE
|
||||
Public dwScope As Integer
|
||||
Public dwType As Integer
|
||||
Public dwDisplayType As Integer
|
||||
Public dwUsage As Integer
|
||||
Public lpLocalName As String
|
||||
Public lpRemoteName As String
|
||||
Public lpComment As String
|
||||
Public lpProvider As String
|
||||
|
||||
End Structure
|
||||
' Deklaration: Globale Form API-Funktionen
|
||||
Private Declare Function WNetAddConnection2 Lib "mpr.dll" _
|
||||
Alias "WNetAddConnection2A" (
|
||||
ByRef lpNetResource As NETRESOURCE,
|
||||
ByVal lpPassword As String,
|
||||
ByVal lpUserName As String,
|
||||
ByVal dwFlags As Integer) As Integer
|
||||
|
||||
Private Declare Function WNetCancelConnection2 Lib "mpr.dll" _
|
||||
Alias "WNetCancelConnection2A" (
|
||||
ByVal lpName As String,
|
||||
ByVal dwFlags As Integer,
|
||||
ByVal fForce As Integer) As Integer
|
||||
|
||||
Dim udtNetzResource As NETRESOURCE
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
lblConnect.Text = "Es ist keine Verbindung hergestellt."
|
||||
|
||||
' Freien Laufwerks-Buchstaben ermitteln
|
||||
Dim i As Integer
|
||||
|
||||
Dim sDrives As String = Join(Directory.GetLogicalDrives(), "")
|
||||
Dim sNextDrive As String = ""
|
||||
|
||||
For i = 68 To 90
|
||||
|
||||
If Not sDrives.Contains(Chr(i) & ":") Then
|
||||
sNextDrive = Chr(i) & ":"
|
||||
ComboDrive.Items.Add(sNextDrive)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
' R1 = Rechnername, C_SYSTEM = Name des zuzuweisenden Laufwerks
|
||||
udtNetzResource.lpRemoteName = "\\SDD-VMP03-VM09\DataFiles$\Digital Data\EnvelopeGenerator\EnvelopeGeneratorExport"
|
||||
|
||||
' Username & Passwort (anhängig vom Freigabestatus des Laufwerks). Inhalt ist
|
||||
' bestenfalls egal
|
||||
strUserName = "dd-san01\Administrator"
|
||||
strUserPassword = "##25!45!3_works"
|
||||
|
||||
udtNetzResource.dwType = RESOURCETYPE_DISK
|
||||
lblDriveCaption.Text = ""
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
' Abfrage ob ein Laufwerksbuchstabe ausgewählt wurde
|
||||
If ComboDrive.Text = "" Then
|
||||
|
||||
MsgBox("Es wurde kein freier Laufwerks-Buchstabe ausgewählt.")
|
||||
|
||||
Else
|
||||
|
||||
' gewählter Laufwerksbuchstabe sichern für die Trennung
|
||||
strDrive = ComboDrive.Text
|
||||
|
||||
udtNetzResource.lpLocalName = ComboDrive.Text
|
||||
|
||||
Dim lngResult As Integer
|
||||
|
||||
' Hier wird verbunden
|
||||
' dwFlag muss 1 sein
|
||||
lngResult = WNetAddConnection2(udtNetzResource, strUserPassword, strUserName, 1)
|
||||
|
||||
If lngResult = 0 Then
|
||||
lblConnect.Text = "Verbunden."
|
||||
|
||||
Else
|
||||
|
||||
lblConnect.Text = "Verbindung nicht möglich."
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
' gewählter Laufwerksbuchstabe sichern für die Trennung
|
||||
strDrive = ComboDrive.Text
|
||||
|
||||
udtNetzResource.lpLocalName = ComboDrive.Text
|
||||
|
||||
Dim lngResult As Integer
|
||||
|
||||
lngResult = WNetCancelConnection2(strDrive, 0, True)
|
||||
|
||||
If lngResult = 0 Then
|
||||
lblConnect.Text = "Getrennt."
|
||||
|
||||
Else
|
||||
|
||||
lblConnect.Text = "Trennung nicht möglich."
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
37
Connect_Netzlaufwerk/My Project/Application.Designer.vb
generated
Normal file
37
Connect_Netzlaufwerk/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,37 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' 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 = Form1
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
Connect_Netzlaufwerk/My Project/Application.myapp
Normal file
10
Connect_Netzlaufwerk/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>true</MySubMain>
|
||||
<MainForm>Form1</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
31
signFLOW_Folder_sync.sln
Normal file
31
signFLOW_Folder_sync.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32929.385
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "signFLOW_Folder_sync", "signFLOW_Folder_sync\signFLOW_Folder_sync.vbproj", "{B362E61A-A4BF-4A95-A4D6-8FA79B476126}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Connect_Netzlaufwerk", "Connect_Netzlaufwerk\Connect_Netzlaufwerk.vbproj", "{323640B0-C044-48A9-AE27-B95D267CE87F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B362E61A-A4BF-4A95-A4D6-8FA79B476126}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B362E61A-A4BF-4A95-A4D6-8FA79B476126}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B362E61A-A4BF-4A95-A4D6-8FA79B476126}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B362E61A-A4BF-4A95-A4D6-8FA79B476126}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{323640B0-C044-48A9-AE27-B95D267CE87F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{323640B0-C044-48A9-AE27-B95D267CE87F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{323640B0-C044-48A9-AE27-B95D267CE87F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{323640B0-C044-48A9-AE27-B95D267CE87F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {BE72D76C-04FF-4D49-9958-63AAA43C5161}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
35
signFLOW_Folder_sync/App.config
Normal file
35
signFLOW_Folder_sync/App.config
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="signFLOW_Folder_sync.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="signFLOW_Folder_sync.My.MySettings.DD_ECM_CS" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<applicationSettings>
|
||||
<signFLOW_Folder_sync.My.MySettings>
|
||||
<setting name="TimerIntervall" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="Select_Status1_Send" serializeAs="String">
|
||||
<value>SELECT GUID, [ENVELOPE_UUID]
|
||||
FROM [DD_ECM].[dbo].[TBSIG_ENVELOPE] where STATUS = 1004 and DMZ_MOVED = 0</value>
|
||||
</setting>
|
||||
<setting name="NetUse_Usr" serializeAs="String">
|
||||
<value>sd</value>
|
||||
</setting>
|
||||
<setting name="NetUse_PW" serializeAs="String">
|
||||
<value>sd</value>
|
||||
</setting>
|
||||
<setting name="DEBUG" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</signFLOW_Folder_sync.My.MySettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
13
signFLOW_Folder_sync/My Project/Application.Designer.vb
generated
Normal file
13
signFLOW_Folder_sync/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' 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
signFLOW_Folder_sync/My Project/Application.myapp
Normal file
10
signFLOW_Folder_sync/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>3</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
signFLOW_Folder_sync/My Project/AssemblyInfo.vb
Normal file
35
signFLOW_Folder_sync/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 einer Assembly zugeordnet sind.
|
||||
|
||||
' Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("signFLOW_Folder_sync")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("signFLOW_Folder_sync")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
<Assembly: Guid("352e77bd-ba80-4e26-87eb-68e00b63960e")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.6.0.0")>
|
||||
62
signFLOW_Folder_sync/My Project/Resources.Designer.vb
generated
Normal file
62
signFLOW_Folder_sync/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.42000
|
||||
'
|
||||
' 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("signFLOW_Folder_sync.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
signFLOW_Folder_sync/My Project/Resources.resx
Normal file
117
signFLOW_Folder_sync/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>
|
||||
130
signFLOW_Folder_sync/My Project/Settings.Designer.vb
generated
Normal file
130
signFLOW_Folder_sync/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,130 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </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", "17.3.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 "Automatische My.Settings-Speicherfunktion"
|
||||
#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(sender As Global.System.Object, 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
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("1")> _
|
||||
Public ReadOnly Property TimerIntervall() As Integer
|
||||
Get
|
||||
Return CType(Me("TimerIntervall"),Integer)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security "& _
|
||||
"Info=True;User ID=sa;Password=dd")> _
|
||||
Public ReadOnly Property DD_ECM_CS() As String
|
||||
Get
|
||||
Return CType(Me("DD_ECM_CS"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("SELECT GUID, [ENVELOPE_UUID]"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" FROM [DD_ECM].[dbo].[TBSIG_ENVELOPE] where STATUS"& _
|
||||
" = 1004 and DMZ_MOVED = 0")> _
|
||||
Public ReadOnly Property Select_Status1_Send() As String
|
||||
Get
|
||||
Return CType(Me("Select_Status1_Send"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("sd")> _
|
||||
Public ReadOnly Property NetUse_Usr() As String
|
||||
Get
|
||||
Return CType(Me("NetUse_Usr"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("sd")> _
|
||||
Public ReadOnly Property NetUse_PW() As String
|
||||
Get
|
||||
Return CType(Me("NetUse_PW"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
|
||||
Public ReadOnly Property DEBUG() As Boolean
|
||||
Get
|
||||
Return CType(Me("DEBUG"),Boolean)
|
||||
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.signFLOW_Folder_sync.My.MySettings
|
||||
Get
|
||||
Return Global.signFLOW_Folder_sync.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
30
signFLOW_Folder_sync/My Project/Settings.settings
Normal file
30
signFLOW_Folder_sync/My Project/Settings.settings
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="TimerIntervall" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="DD_ECM_CS" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="Select_Status1_Send" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">SELECT GUID, [ENVELOPE_UUID]
|
||||
FROM [DD_ECM].[dbo].[TBSIG_ENVELOPE] where STATUS = 1004 and DMZ_MOVED = 0</Value>
|
||||
</Setting>
|
||||
<Setting Name="NetUse_Usr" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">sd</Value>
|
||||
</Setting>
|
||||
<Setting Name="NetUse_PW" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">sd</Value>
|
||||
</Setting>
|
||||
<Setting Name="DEBUG" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
48
signFLOW_Folder_sync/ProjectInstaller.Designer.vb
generated
Normal file
48
signFLOW_Folder_sync/ProjectInstaller.Designer.vb
generated
Normal file
@ -0,0 +1,48 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
'Installer überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<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 Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller()
|
||||
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller()
|
||||
'
|
||||
'ServiceProcessInstaller1
|
||||
'
|
||||
Me.ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService
|
||||
Me.ServiceProcessInstaller1.Password = Nothing
|
||||
Me.ServiceProcessInstaller1.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.Description = "Syncronizes all folders between DMZ and network"
|
||||
Me.ServiceInstaller1.DisplayName = "DDsignFLOW_FolderSync"
|
||||
Me.ServiceInstaller1.ServiceName = "DDsignFLOW_FolderSync"
|
||||
Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ServiceProcessInstaller1 As ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller1 As ServiceProcess.ServiceInstaller
|
||||
End Class
|
||||
129
signFLOW_Folder_sync/ProjectInstaller.resx
Normal file
129
signFLOW_Folder_sync/ProjectInstaller.resx
Normal file
@ -0,0 +1,129 @@
|
||||
<?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>
|
||||
<metadata name="ServiceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
16
signFLOW_Folder_sync/ProjectInstaller.vb
Normal file
16
signFLOW_Folder_sync/ProjectInstaller.vb
Normal file
@ -0,0 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
Public Class ProjectInstaller
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
'Initialisierungscode nach dem Aufruf von InitializeComponent hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
52
signFLOW_Folder_sync/Service1.Designer.vb
generated
Normal file
52
signFLOW_Folder_sync/Service1.Designer.vb
generated
Normal file
@ -0,0 +1,52 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class MyService
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
'UserService ü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
|
||||
|
||||
' Der Haupteinstiegspunkt für den Prozess
|
||||
<MTAThread()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Shared Sub Main()
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' Innerhalb eines Prozesses können mehrere NT-Dienste ausgeführt werden. Um einen
|
||||
' weiteren Dienst zu diesem Prozess hinzuzufügen, ändern Sie die folgende Zeile,
|
||||
' um ein zweites Dienstobjekt zu erstellen. Zum Beispiel
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
|
||||
'
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New MyService}
|
||||
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
' Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
'
|
||||
'MyService
|
||||
'
|
||||
Me.AutoLog = False
|
||||
Me.ServiceName = "DDsignFLOW_FolderSync"
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
123
signFLOW_Folder_sync/Service1.resx
Normal file
123
signFLOW_Folder_sync/Service1.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
245
signFLOW_Folder_sync/Service1.vb
Normal file
245
signFLOW_Folder_sync/Service1.vb
Normal file
@ -0,0 +1,245 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Text
|
||||
|
||||
Public Class MyService
|
||||
#Region "+++++ variables +++++"
|
||||
Private _threadRunner As BackgroundWorker
|
||||
Private MyLogger As LogConfig
|
||||
Private Logger As Logger
|
||||
Private Database_ECM As MSSQLServer = Nothing
|
||||
Private DT_CONFIG As DataTable
|
||||
Private oENVELOPE_ID As Integer = 0
|
||||
Private oENVELOPE_UUID As String = ""
|
||||
Private Directory2Delete As String = ""
|
||||
Private DOCUMENT_PATH_MOVE_AFTSEND As String = ""
|
||||
Private DOCUMENT_PATH As String = ""
|
||||
Private FILE_NAME As String = ""
|
||||
#End Region
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
Try
|
||||
MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, "Digital Data", "DDsignFLOWFolderSync")
|
||||
Logger = MyLogger.GetLogger
|
||||
MyLogger.Debug = My.Settings.DEBUG
|
||||
Database_ECM = New MSSQLServer(MyLogger, My.Settings.DD_ECM_CS)
|
||||
If Database_ECM.DBInitialized = False Then
|
||||
Logger.Warn("ATTENTION: No Connection was established - Check Config")
|
||||
Else
|
||||
DT_CONFIG = Database_ECM.GetDatatable("SELECT * FROM TBSIG_CONFIG ")
|
||||
DOCUMENT_PATH_MOVE_AFTSEND = DT_CONFIG.Rows(0).Item("DOCUMENT_PATH_MOVE_AFTSEND")
|
||||
DOCUMENT_PATH = DT_CONFIG.Rows(0).Item("DOCUMENT_PATH")
|
||||
'### Thread für das nachträgliche Setzen von Rechten generieren
|
||||
_threadRunner = New BackgroundWorker()
|
||||
_threadRunner.WorkerReportsProgress = True
|
||||
_threadRunner.WorkerSupportsCancellation = True
|
||||
AddHandler _threadRunner.DoWork, AddressOf RUN_THREAD
|
||||
AddHandler _threadRunner.RunWorkerCompleted, AddressOf Thread1_Completed
|
||||
'### Den Timer generieren
|
||||
Dim Timer_Durchlauf As New System.Timers.Timer()
|
||||
'Das Event hinterlegen welches bei "Tick" ausgelöst wird
|
||||
AddHandler Timer_Durchlauf.Elapsed, AddressOf Thread_Run
|
||||
' Set the Interval
|
||||
Timer_Durchlauf.Interval = (My.Settings.TimerIntervall * 60000)
|
||||
Timer_Durchlauf.Enabled = True
|
||||
Logger.Debug("...Timer started.")
|
||||
' Und den Durchlauf das erste Mal starten
|
||||
_threadRunner.RunWorkerAsync()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub Thread_Run()
|
||||
If Not _threadRunner.IsBusy Then
|
||||
_threadRunner.RunWorkerAsync()
|
||||
End If
|
||||
End Sub
|
||||
Public Sub RUN_THREAD(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
|
||||
Try
|
||||
Work_Envelopes()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Work_Envelopes()
|
||||
Try
|
||||
Dim oDT_Envelopes As DataTable = Database_ECM.GetDatatable(My.Settings.Select_Status1_Send)
|
||||
oENVELOPE_ID = 0
|
||||
If Not IsNothing(oDT_Envelopes) Then
|
||||
|
||||
For Each oRow As DataRow In oDT_Envelopes.Rows
|
||||
oENVELOPE_ID = 0
|
||||
oENVELOPE_UUID = ""
|
||||
oENVELOPE_UUID = oRow.Item("ENVELOPE_UUID")
|
||||
oENVELOPE_ID = oRow.Item("GUID")
|
||||
Logger.Info($"Working on Envelope-UUID [{oENVELOPE_UUID}] - ENVELOPE_ID: {oENVELOPE_ID}")
|
||||
Dim oSourcePath As String
|
||||
Dim oDestinationPath As String
|
||||
Dim oDT_Files As DataTable = Database_ECM.GetDatatable("SELECT * FROM TBSIG_ENVELOPE_DOCUMENT where ENVELOPE_ID = " & oENVELOPE_ID)
|
||||
If oDT_Files.Rows.Count > 0 Then
|
||||
Logger.Debug("Working on [{0}] file(s) ", oDT_Files.Rows.Count)
|
||||
For Each ofileRow As DataRow In oDT_Files.Rows
|
||||
FILE_NAME = ""
|
||||
FILE_NAME = ofileRow.Item("FILENAME")
|
||||
oSourcePath = IO.Path.Combine(DOCUMENT_PATH, oENVELOPE_UUID, FILE_NAME)
|
||||
oDestinationPath = IO.Path.Combine(DOCUMENT_PATH_MOVE_AFTSEND, oENVELOPE_UUID)
|
||||
If CopyFileWithNetUse(oSourcePath, oDestinationPath) = True Then
|
||||
Database_ECM.ExecuteNonQuery($"UPDATE TBSIG_ENVELOPE SET DMZ_MOVED = 1 WHERE GUID = {oENVELOPE_ID}")
|
||||
If Directory2Delete <> String.Empty Then
|
||||
Logger.Debug("Now Deleting SourcePath: {0} ...", Directory2Delete)
|
||||
Try
|
||||
System.IO.Directory.Delete(Directory2Delete, True)
|
||||
Logger.Debug("Successfully deleted Sourcepath!")
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"Unexpected Error while deleting SourcePath {Directory2Delete}")
|
||||
Logger.Warn("ErrorMessage: {0}", ex.Message)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Shared key As String = "$xzBvyPETUS&amm8)D8x#)f;4%;?[BPd" ' Passwort-Schlüssel (16, 24, or 32 bytes)
|
||||
Private Shared iv As String = "1wN&e[zrQ6_B7X/0" ' Initialisierungsvektor (16 bytes)
|
||||
|
||||
|
||||
' Entschlüsselungsfunktion
|
||||
Private Function Decrypt(cipherText As String) As String
|
||||
'Logger.Debug("cipherText: {0}", cipherText)
|
||||
' Logger.Debug("Aes.Create ...")
|
||||
Dim aesAlg As Aes = Aes.Create()
|
||||
' Logger.Debug("Encoding UTF8 GetBytes key ...")
|
||||
aesAlg.Key = Encoding.UTF8.GetBytes(key)
|
||||
'Logger.Debug("Encoding UTF8 GetBytes iv ...")
|
||||
aesAlg.IV = Encoding.UTF8.GetBytes(iv)
|
||||
'Logger.Debug("aesAlg.CreateDecryptor ...")
|
||||
Dim decryptor As ICryptoTransform = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV)
|
||||
'Logger.Debug("Convert.FromBase64String ...")
|
||||
Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
|
||||
|
||||
Dim msDecrypt As New IO.MemoryStream(cipherBytes)
|
||||
Using csDecrypt As New CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)
|
||||
Using srDecrypt As New IO.StreamReader(csDecrypt)
|
||||
Return srDecrypt.ReadToEnd()
|
||||
End Using
|
||||
End Using
|
||||
End Function
|
||||
Private Function CopyFileWithNetUse(pSourcePath As String, pDestinationPath As String) As Boolean
|
||||
Logger.Debug("EXECUTING CopyFileWithNetUse for " & pDestinationPath)
|
||||
Dim oDirectoryExists As Boolean = False
|
||||
Try
|
||||
If Directory.Exists(DOCUMENT_PATH_MOVE_AFTSEND) Then
|
||||
Logger.Debug($"Access to [{DOCUMENT_PATH_MOVE_AFTSEND}] already succeeded!")
|
||||
oDirectoryExists = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn("CopyFileWithNetUse - path not accessible or existing: {0}", ex.Message)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
Logger.Debug("CopyFileWithNetUse - Folder accessible [{0}]", oDirectoryExists.ToString)
|
||||
|
||||
If oDirectoryExists = False Then
|
||||
Dim oDectryptedPW = Decrypt(My.Settings.NetUse_PW)
|
||||
Logger.Debug("Successfully decrypted PW!")
|
||||
Dim netUseCommand As String = $"net use {DOCUMENT_PATH_MOVE_AFTSEND} /user:{My.Settings.NetUse_Usr} {oDectryptedPW}"
|
||||
Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
|
||||
processInfo.RedirectStandardOutput = True
|
||||
processInfo.RedirectStandardInput = True
|
||||
processInfo.UseShellExecute = False
|
||||
processInfo.CreateNoWindow = True
|
||||
Using oProcess As Process = Process.Start(processInfo)
|
||||
oProcess.WaitForExit()
|
||||
' Prüfe den Rückgabewert des net use Befehls
|
||||
If oProcess.ExitCode = 0 Then
|
||||
' Verschiebe die Datei
|
||||
Try
|
||||
Dim oReturn = COPY_TO_DMZ(pSourcePath, pDestinationPath)
|
||||
oProcess.Close()
|
||||
Return oReturn
|
||||
Catch ex As Exception
|
||||
oProcess.Close()
|
||||
Logger.Warn($"Unexpected error in CopyFileWithNetUse [" & pDestinationPath + "]")
|
||||
Logger.Warn(ex.Message)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Else
|
||||
Logger.Warn("Error while connecting to network-path: " & pDestinationPath)
|
||||
Return False
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Return COPY_TO_DMZ(pSourcePath, pDestinationPath)
|
||||
End If
|
||||
End Function
|
||||
Private Function COPY_TO_DMZ(pSourcePath As String, pDestinationPath As String) As Boolean
|
||||
Try
|
||||
Logger.Debug("EXECUTING COPY_TO_DMZ {0} ...", pDestinationPath)
|
||||
Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
|
||||
Dim oFilePath As String = pSourcePath
|
||||
Dim oSourceDirectory As String = Path.GetDirectoryName(oFilePath)
|
||||
|
||||
Dim split As String() = oFilePath.Split("\")
|
||||
Dim parentFolder As String = split(split.Length - 2)
|
||||
If Not pDestinationPath.EndsWith(parentFolder) Then
|
||||
pDestinationPath &= "\" + parentFolder
|
||||
Logger.Debug("new oSourceDirectory = {0} ...", pDestinationPath)
|
||||
End If
|
||||
|
||||
If Not System.IO.Directory.Exists(pDestinationPath) Then
|
||||
Logger.Debug("Creating Folder {0} ...", pDestinationPath)
|
||||
System.IO.Directory.CreateDirectory(pDestinationPath)
|
||||
Logger.Debug("...Folder successfully created!")
|
||||
End If
|
||||
If Not System.IO.Directory.Exists(pDestinationPath) Then
|
||||
Logger.Warn("Folder {0} could not be created!", pDestinationPath)
|
||||
Return False
|
||||
End If
|
||||
pDestinationPath &= "\" + oFilename
|
||||
If File.Exists(pDestinationPath) Then
|
||||
File.Delete(pDestinationPath)
|
||||
End If
|
||||
Logger.Debug("Now copying file ...")
|
||||
Logger.Debug("from [{0}] ", pSourcePath)
|
||||
Logger.Debug("to [{0}]... ", pDestinationPath)
|
||||
System.IO.File.Copy(pSourcePath, pDestinationPath)
|
||||
Logger.Info($"Successfully copied file to DMZ [{pDestinationPath}]")
|
||||
Directory2Delete = oSourceDirectory
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Warn("COPY_TO_DMZ - Unexpected error {0}", ex.Message)
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Protected Overrides Sub OnStop()
|
||||
' Hier Code zum Ausführen erforderlicher Löschvorgänge zum Beenden des Dienstes einfügen.
|
||||
Logger.Info("## Service was stopped manually. ##")
|
||||
End Sub
|
||||
Private Sub Thread1_Completed(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) 'Handles threadDateiimport.RunWorkerCompleted
|
||||
'This event fires when the DoWork event completes
|
||||
Try
|
||||
Dim result As String = ""
|
||||
If e.Cancelled Then
|
||||
EventLog.WriteEntry("DDsignFLOWFolderSync", "The thread was cancelled!", EventLogEntryType.Error)
|
||||
Logger.Warn("## The thread was cancelled.")
|
||||
ElseIf e.Error IsNot Nothing Then
|
||||
EventLog.WriteEntry("DDsignFLOWFolderSync", "Unexpected error in thread!", EventLogEntryType.Error)
|
||||
Logger.Warn("Unexpected error in thread: " & e.Error.Message)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
4
signFLOW_Folder_sync/packages.config
Normal file
4
signFLOW_Folder_sync/packages.config
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
</packages>
|
||||
141
signFLOW_Folder_sync/signFLOW_Folder_sync.vbproj
Normal file
141
signFLOW_Folder_sync/signFLOW_Folder_sync.vbproj
Normal file
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" 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>{B362E61A-A4BF-4A95-A4D6-8FA79B476126}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>signFLOW_Folder_sync.MyService</StartupObject>
|
||||
<RootNamespace>signFLOW_Folder_sync</RootNamespace>
|
||||
<AssemblyName>signFLOW_Folder_sync</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>signFLOW_Folder_sync.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>signFLOW_Folder_sync.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="DigitalData.Modules.Database">
|
||||
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</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" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.Designer.vb">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.Designer.vb">
|
||||
<DependentUpon>Service1.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<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>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Service1.resx">
|
||||
<DependentUpon>Service1.vb</DependentUpon>
|
||||
</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" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user