Merge Commit
This commit is contained in:
commit
6ddb48ec07
BIN
.vs/ToolCollection/v17/.wsuo
Normal file
BIN
.vs/ToolCollection/v17/.wsuo
Normal file
Binary file not shown.
14
.vs/ToolCollection/v17/ResourceExplorer/settings.json
Normal file
14
.vs/ToolCollection/v17/ResourceExplorer/settings.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"ShowEmptyProjects": false,
|
||||
"SelectedGroups": [],
|
||||
"ExpandedProjects": [],
|
||||
"EnableSpellChecker": true,
|
||||
"ColumnOrder": [
|
||||
"name",
|
||||
"type"
|
||||
],
|
||||
"VisibleColumnKeys": [
|
||||
"name",
|
||||
"neutral-value"
|
||||
]
|
||||
}
|
||||
1
NIService/.vs/NIService.csproj.dtbcache.json
Normal file
1
NIService/.vs/NIService.csproj.dtbcache.json
Normal file
@ -0,0 +1 @@
|
||||
{"RootPath":"E:\\OlgunR\\Visual Studio\\GIT\\3_FunctionalModule\\ToolCollection\\NIService","ProjectFileName":"NIService.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Service1.cs"},{"SourceFile":"Service1.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.ServiceProcess.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"E:\\OlgunR\\Visual Studio\\GIT\\3_FunctionalModule\\ToolCollection\\NIService\\bin\\Debug\\NIService.exe","OutputItemRelativePath":"NIService.exe"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]}
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31005.135
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36203.30 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ToolCollection", "ToolCollection\ToolCollection.vbproj", "{AC6B3398-DE0E-4580-9422-6E4D97FA4494}"
|
||||
EndProject
|
||||
@ -20,6 +20,7 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC6B3398-DE0E-4580-9422-6E4D97FA4494}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{AC6B3398-DE0E-4580-9422-6E4D97FA4494}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{AC6B3398-DE0E-4580-9422-6E4D97FA4494}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{AC6B3398-DE0E-4580-9422-6E4D97FA4494}.Debug|x64.Build.0 = Debug|x64
|
||||
{AC6B3398-DE0E-4580-9422-6E4D97FA4494}.Debug|x86.ActiveCfg = Debug|x86
|
||||
|
||||
1
ToolCollection/.vs/ToolCollection.vbproj.dtbcache.json
Normal file
1
ToolCollection/.vs/ToolCollection.vbproj.dtbcache.json
Normal file
File diff suppressed because one or more lines are too long
@ -85,6 +85,10 @@ Public Class ClassDIProfile
|
||||
' gibt ein einzelnes Profil-Objekt zurück
|
||||
Public Shared Function getProfilByName(ByVal profilname As String) As ClassDIProfil
|
||||
|
||||
If _profiles Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
' alle Profile durchlaufen
|
||||
For Each profil As ClassDIProfil In _profiles
|
||||
|
||||
|
||||
@ -349,6 +349,10 @@ Public Class ClassNIProfile
|
||||
' gibt ein einzelnes Profil-Objekt zurück
|
||||
Public Shared Function getProfilByName(ByVal profilname As String) As ClassNIProfil
|
||||
|
||||
If _profiles Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
' alle Profile durchlaufen
|
||||
For Each profil As ClassNIProfil In _profiles
|
||||
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.9.6.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.6.0")>
|
||||
<Assembly: AssemblyVersion("2.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.8.0")>
|
||||
|
||||
59
ToolCollection/My Project/Settings.Designer.vb
generated
59
ToolCollection/My Project/Settings.Designer.vb
generated
@ -1,10 +1,10 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
@ -15,14 +15,14 @@ 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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.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"
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
@ -710,6 +710,53 @@ Namespace My
|
||||
Return CType(Me("WM_PERS_LOGIN"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
|
||||
Public Property vDeleteLogsTime() As Date
|
||||
Get
|
||||
Return CType(Me("vDeleteLogsTime"),Date)
|
||||
End Get
|
||||
Set
|
||||
Me("vDeleteLogsTime") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
|
||||
Public Property vAutoDeleteLogs() As Boolean
|
||||
Get
|
||||
Return CType(Me("vAutoDeleteLogs"),Boolean)
|
||||
End Get
|
||||
Set
|
||||
Me("vAutoDeleteLogs") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property Setting() As String
|
||||
Get
|
||||
Return CType(Me("Setting"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("Setting") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("01/01/0001 03:00:00")> _
|
||||
Public Property vDefaultDeleteLogsTime() As Date
|
||||
Get
|
||||
Return CType(Me("vDefaultDeleteLogsTime"),Date)
|
||||
End Get
|
||||
Set
|
||||
Me("vDefaultDeleteLogsTime") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -175,5 +175,17 @@
|
||||
<Setting Name="WM_PERS_LOGIN" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">@Domain#@User#@PW</Value>
|
||||
</Setting>
|
||||
<Setting Name="vDeleteLogsTime" Type="System.DateTime" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="vAutoDeleteLogs" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="Setting" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="vDefaultDeleteLogsTime" Type="System.DateTime" Scope="User">
|
||||
<Value Profile="(Default)">01/01/0001 03:00:00</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -86,17 +86,23 @@
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.Desktop.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Printing.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Sparkline.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DigitalData.Modules.Config">
|
||||
<HintPath>..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Database">
|
||||
<HintPath>..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Filesystem">
|
||||
<HintPath>..\..\2_DLL Projekte\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Digital Data\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>packages\EntityFramework.6.0.2\lib\net45\EntityFramework.dll</HintPath>
|
||||
@ -137,6 +143,7 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\System.Data.SQLite.dll</HintPath>
|
||||
|
||||
@ -153,6 +153,18 @@
|
||||
<setting name="DI_RUNNING" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="vDeleteLogsTime" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="vAutoDeleteLogs" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="Setting" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="vDefaultDeleteLogsTime" serializeAs="String">
|
||||
<value>01/01/0001 03:00:00</value>
|
||||
</setting>
|
||||
</ToolCollection.My.MySettings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
|
||||
67
ToolCollection/frmGrundeinstellungen.Designer.vb
generated
67
ToolCollection/frmGrundeinstellungen.Designer.vb
generated
@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmGrundeinstellungen
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
@ -20,7 +20,7 @@ Partial Class frmGrundeinstellungen
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmGrundeinstellungen))
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
@ -28,6 +28,10 @@ Partial Class frmGrundeinstellungen
|
||||
Me.cmlLogart = New System.Windows.Forms.ComboBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.lblLogDeleteTime = New System.Windows.Forms.Label()
|
||||
Me.lblTimeDeleteLogs = New System.Windows.Forms.Label()
|
||||
Me.txtTimeDeleteLogs = New System.Windows.Forms.TextBox()
|
||||
Me.chkAutoDeleteLogs = New System.Windows.Forms.CheckBox()
|
||||
Me.TextBox4 = New System.Windows.Forms.TextBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
@ -91,6 +95,10 @@ Partial Class frmGrundeinstellungen
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.lblLogDeleteTime)
|
||||
Me.GroupBox1.Controls.Add(Me.lblTimeDeleteLogs)
|
||||
Me.GroupBox1.Controls.Add(Me.txtTimeDeleteLogs)
|
||||
Me.GroupBox1.Controls.Add(Me.chkAutoDeleteLogs)
|
||||
Me.GroupBox1.Controls.Add(Me.TextBox4)
|
||||
Me.GroupBox1.Controls.Add(Me.Label6)
|
||||
Me.GroupBox1.Controls.Add(Me.Label1)
|
||||
@ -102,11 +110,46 @@ Partial Class frmGrundeinstellungen
|
||||
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(470, 114)
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(470, 209)
|
||||
Me.GroupBox1.TabIndex = 6
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Log-Einstellungen:"
|
||||
'
|
||||
'lblLogDeleteTime
|
||||
'
|
||||
Me.lblLogDeleteTime.AutoSize = True
|
||||
Me.lblLogDeleteTime.Location = New System.Drawing.Point(6, 169)
|
||||
Me.lblLogDeleteTime.Name = "lblLogDeleteTime"
|
||||
Me.lblLogDeleteTime.Size = New System.Drawing.Size(211, 13)
|
||||
Me.lblLogDeleteTime.TabIndex = 11
|
||||
Me.lblLogDeleteTime.Text = "Logs werden automatisch gelöscht um: "
|
||||
'
|
||||
'lblTimeDeleteLogs
|
||||
'
|
||||
Me.lblTimeDeleteLogs.AutoSize = True
|
||||
Me.lblTimeDeleteLogs.Location = New System.Drawing.Point(229, 112)
|
||||
Me.lblTimeDeleteLogs.Name = "lblTimeDeleteLogs"
|
||||
Me.lblTimeDeleteLogs.Size = New System.Drawing.Size(209, 13)
|
||||
Me.lblTimeDeleteLogs.TabIndex = 10
|
||||
Me.lblTimeDeleteLogs.Text = "Zeitpunkt der automatischen Löschung"
|
||||
'
|
||||
'txtTimeDeleteLogs
|
||||
'
|
||||
Me.txtTimeDeleteLogs.Location = New System.Drawing.Point(232, 128)
|
||||
Me.txtTimeDeleteLogs.Name = "txtTimeDeleteLogs"
|
||||
Me.txtTimeDeleteLogs.Size = New System.Drawing.Size(84, 22)
|
||||
Me.txtTimeDeleteLogs.TabIndex = 9
|
||||
'
|
||||
'chkAutoDeleteLogs
|
||||
'
|
||||
Me.chkAutoDeleteLogs.AutoSize = True
|
||||
Me.chkAutoDeleteLogs.Location = New System.Drawing.Point(9, 130)
|
||||
Me.chkAutoDeleteLogs.Name = "chkAutoDeleteLogs"
|
||||
Me.chkAutoDeleteLogs.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkAutoDeleteLogs.TabIndex = 8
|
||||
Me.chkAutoDeleteLogs.Text = "Automatisches Löschen"
|
||||
Me.chkAutoDeleteLogs.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox4
|
||||
'
|
||||
Me.TextBox4.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "logolder_then", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
|
||||
@ -121,7 +164,7 @@ Partial Class frmGrundeinstellungen
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Location = New System.Drawing.Point(229, 63)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(198, 13)
|
||||
Me.Label6.Size = New System.Drawing.Size(199, 13)
|
||||
Me.Label6.TabIndex = 6
|
||||
Me.Label6.Text = "LogDateien löschen - ""Älter als""-Tage:"
|
||||
'
|
||||
@ -148,7 +191,7 @@ Partial Class frmGrundeinstellungen
|
||||
Me.GroupBox2.Controls.Add(Me.Label4)
|
||||
Me.GroupBox2.Controls.Add(Me.cmbCores)
|
||||
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(0, 114)
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(0, 209)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(470, 68)
|
||||
Me.GroupBox2.TabIndex = 7
|
||||
@ -178,7 +221,7 @@ Partial Class frmGrundeinstellungen
|
||||
Me.GroupBox3.Controls.Add(Me.txterrorIndex)
|
||||
Me.GroupBox3.Controls.Add(Me.Label5)
|
||||
Me.GroupBox3.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(0, 182)
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(0, 277)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(470, 67)
|
||||
Me.GroupBox3.TabIndex = 8
|
||||
@ -207,7 +250,7 @@ Partial Class frmGrundeinstellungen
|
||||
'
|
||||
Me.GroupBox4.Controls.Add(Me.TextBox3)
|
||||
Me.GroupBox4.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(0, 249)
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(0, 344)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(470, 50)
|
||||
Me.GroupBox4.TabIndex = 9
|
||||
@ -230,7 +273,7 @@ Partial Class frmGrundeinstellungen
|
||||
Me.GroupBox5.Controls.Add(Me.Label8)
|
||||
Me.GroupBox5.Controls.Add(Me.Label7)
|
||||
Me.GroupBox5.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(0, 299)
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(0, 394)
|
||||
Me.GroupBox5.Name = "GroupBox5"
|
||||
Me.GroupBox5.Size = New System.Drawing.Size(470, 100)
|
||||
Me.GroupBox5.TabIndex = 10
|
||||
@ -290,7 +333,7 @@ Partial Class frmGrundeinstellungen
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(470, 407)
|
||||
Me.ClientSize = New System.Drawing.Size(470, 590)
|
||||
Me.Controls.Add(Me.GroupBox5)
|
||||
Me.Controls.Add(Me.GroupBox4)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
@ -336,4 +379,8 @@ Partial Class frmGrundeinstellungen
|
||||
Friend WithEvents cmbSleeptill As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents Label9 As System.Windows.Forms.Label
|
||||
Friend WithEvents cmbSleepFrom As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents chkAutoDeleteLogs As CheckBox
|
||||
Friend WithEvents lblTimeDeleteLogs As Label
|
||||
Friend WithEvents txtTimeDeleteLogs As TextBox
|
||||
Friend WithEvents lblLogDeleteTime As Label
|
||||
End Class
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
Public Class frmGrundeinstellungen
|
||||
|
||||
Private Shared _Instance As frmGrundeinstellungen = Nothing
|
||||
Private _isLoading As Boolean = False
|
||||
|
||||
Public Shared Function Instance() As frmGrundeinstellungen
|
||||
If _Instance Is Nothing OrElse _Instance.IsDisposed = True Then
|
||||
_Instance = New frmGrundeinstellungen
|
||||
@ -20,7 +23,8 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmGrundeinstellungen_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
||||
Private Sub frmGrundeinstellungen_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
txtTimeDeleteLogs.Text = My.Settings.vDeleteLogsTime
|
||||
My.Settings.Save()
|
||||
End Sub
|
||||
|
||||
@ -56,4 +60,82 @@
|
||||
Private Sub txterrorIndex_TextChanged(sender As Object, e As EventArgs) Handles txterrorIndex.TextChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub chkAutoDeleteLogs_CheckedChanged(sender As Object, e As EventArgs) Handles chkAutoDeleteLogs.CheckedChanged
|
||||
If _isLoading Then Exit Sub
|
||||
|
||||
If chkAutoDeleteLogs.Checked Then
|
||||
|
||||
Dim dt As DateTime
|
||||
If Not DateTime.TryParse(txtTimeDeleteLogs.Text, dt) Then
|
||||
MsgBox("Ungültige Eingabe! Der Zeitpunkt für die Löschung wurde auf 03:00 Uhr gesetzt. Bitte geben Sie die Uhrzeit in folgendem Format ein: HH:mm.", MsgBoxStyle.Information)
|
||||
'chkAutoDeleteLogs.Checked = False
|
||||
'txtTimeDeleteLogs.Text = ""
|
||||
My.Settings.vAutoDeleteLogs = chkAutoDeleteLogs.Checked
|
||||
txtTimeDeleteLogs.Text = My.Settings.vDefaultDeleteLogsTime.ToShortTimeString
|
||||
My.Settings.Save()
|
||||
Else
|
||||
My.Settings.vDeleteLogsTime = txtTimeDeleteLogs.Text
|
||||
My.Settings.vAutoDeleteLogs = chkAutoDeleteLogs.Checked
|
||||
My.Settings.Save()
|
||||
lblLogDeleteTime.Text = "Logs werden automatisch gelöscht um: " & My.Settings.vDeleteLogsTime.ToShortTimeString & " Uhr."
|
||||
frmStart.Instance().ToolStripStatusLabel_LogDeleteTime.Text = "Logs werden automatisch gelöscht um: " & My.Settings.vDeleteLogsTime.ToShortTimeString & " Uhr."
|
||||
|
||||
frmStart.Instance().SetupTimerDeleteLogfiles()
|
||||
End If
|
||||
|
||||
Else
|
||||
txtTimeDeleteLogs.Text = ""
|
||||
My.Settings.vAutoDeleteLogs = chkAutoDeleteLogs.Checked
|
||||
My.Settings.Save()
|
||||
|
||||
lblLogDeleteTime.Text = "Automatisches Löschen von Logs ist inaktiv."
|
||||
frmStart.Instance().ToolStripStatusLabel_LogDeleteTime.Text = "Automatisches Löschen von Logs ist inaktiv."
|
||||
frmStart.Instance().TimerDeleteLogfiles.Stop()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FrmGrundeinstellungen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||
_isLoading = True
|
||||
|
||||
Try
|
||||
If My.Settings.vAutoDeleteLogs Then
|
||||
chkAutoDeleteLogs.Checked = My.Settings.vAutoDeleteLogs
|
||||
If String.IsNullOrWhiteSpace(My.Settings.vDeleteLogsTime.ToString) Then
|
||||
txtTimeDeleteLogs.Text = My.Settings.vDefaultDeleteLogsTime.ToShortTimeString
|
||||
lblLogDeleteTime.Text = "Logs werden automatisch gelöscht um: " & My.Settings.vDefaultDeleteLogsTime.ToShortTimeString & " Uhr."
|
||||
Else
|
||||
txtTimeDeleteLogs.Text = My.Settings.vDeleteLogsTime.ToShortTimeString
|
||||
lblLogDeleteTime.Text = "Logs werden automatisch gelöscht um: " & My.Settings.vDeleteLogsTime.ToShortTimeString & " Uhr."
|
||||
End If
|
||||
Else
|
||||
txtTimeDeleteLogs.Text = ""
|
||||
lblLogDeleteTime.Text = "Automatisches Löschen von Logs ist inaktiv."
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
_isLoading = False
|
||||
End Sub
|
||||
|
||||
Private Sub txtTimeDeleteLogs_TextChanged(sender As Object, e As EventArgs) Handles txtTimeDeleteLogs.TextChanged
|
||||
' Falls gerade geladen wird oder Checkbox nicht aktiv ist → nichts machen
|
||||
If _isLoading OrElse Not chkAutoDeleteLogs.Checked Then Exit Sub
|
||||
|
||||
Dim dt As DateTime
|
||||
' Prüfen, ob Eingabe im Format HH:mm gültig ist
|
||||
If DateTime.TryParseExact(txtTimeDeleteLogs.Text, "HH:mm", Nothing, Globalization.DateTimeStyles.None, dt) Then
|
||||
' Neuen Wert in Settings speichern
|
||||
My.Settings.vDeleteLogsTime = dt
|
||||
My.Settings.Save()
|
||||
|
||||
' Labels aktualisieren
|
||||
lblLogDeleteTime.Text = $"Logs werden automatisch gelöscht um: {dt:HH:mm} Uhr."
|
||||
frmStart.Instance().ToolStripStatusLabel_LogDeleteTime.Text = lblLogDeleteTime.Text
|
||||
|
||||
' Timer neu setzen
|
||||
frmStart.Instance().SetupTimerDeleteLogfiles()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
31
ToolCollection/frmStart.Designer.vb
generated
31
ToolCollection/frmStart.Designer.vb
generated
@ -28,6 +28,7 @@ Partial Class frmStart
|
||||
Me.Status_Machine = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.ToolStripStatusLabel2 = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.tslblVersion = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.ToolStripStatusLabel_LogDeleteTime = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.menHauptmenü = New System.Windows.Forms.MenuStrip()
|
||||
Me.DateiToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ÜbersichtToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@ -61,6 +62,7 @@ Partial Class frmStart
|
||||
Me.EinblendenAusblendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TimerNIRestart = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.TimerErrorLog = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.TimerDeleteLogfiles = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.StatusStrip1.SuspendLayout()
|
||||
Me.menHauptmenü.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
@ -73,8 +75,8 @@ Partial Class frmStart
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Status_Machine, Me.ToolStripStatusLabel2, Me.tslblVersion})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 708)
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Status_Machine, Me.ToolStripStatusLabel2, Me.tslblVersion, Me.ToolStripStatusLabel_LogDeleteTime})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 613)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode
|
||||
Me.StatusStrip1.ShowItemToolTips = True
|
||||
@ -91,7 +93,7 @@ Partial Class frmStart
|
||||
Me.Status_Machine.Image = CType(resources.GetObject("Status_Machine.Image"), System.Drawing.Image)
|
||||
Me.Status_Machine.Margin = New System.Windows.Forms.Padding(10, 3, 0, 2)
|
||||
Me.Status_Machine.Name = "Status_Machine"
|
||||
Me.Status_Machine.Size = New System.Drawing.Size(140, 20)
|
||||
Me.Status_Machine.Size = New System.Drawing.Size(139, 20)
|
||||
Me.Status_Machine.Text = "ToolStripStatusLabel1"
|
||||
Me.Status_Machine.ToolTipText = "Client-Name"
|
||||
'
|
||||
@ -102,7 +104,7 @@ Partial Class frmStart
|
||||
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
|
||||
Me.ToolStripStatusLabel2.Image = CType(resources.GetObject("ToolStripStatusLabel2.Image"), System.Drawing.Image)
|
||||
Me.ToolStripStatusLabel2.Name = "ToolStripStatusLabel2"
|
||||
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(140, 20)
|
||||
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(139, 20)
|
||||
Me.ToolStripStatusLabel2.Text = "ToolStripStatusLabel1"
|
||||
Me.ToolStripStatusLabel2.ToolTipText = "Aktueller Benutzer"
|
||||
'
|
||||
@ -112,10 +114,19 @@ Partial Class frmStart
|
||||
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _
|
||||
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
|
||||
Me.tslblVersion.Name = "tslblVersion"
|
||||
Me.tslblVersion.Size = New System.Drawing.Size(124, 20)
|
||||
Me.tslblVersion.Size = New System.Drawing.Size(123, 20)
|
||||
Me.tslblVersion.Text = "ToolStripStatusLabel1"
|
||||
Me.tslblVersion.ToolTipText = "Aktueller Benutzer"
|
||||
'
|
||||
'ToolStripStatusLabel_LogDeleteTime
|
||||
'
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.BorderSides = CType((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) _
|
||||
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) _
|
||||
Or System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom), System.Windows.Forms.ToolStripStatusLabelBorderSides)
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.Name = "ToolStripStatusLabel_LogDeleteTime"
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.Size = New System.Drawing.Size(270, 20)
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.Text = "Zeitpunkt der automatischen Löschung von Logs"
|
||||
'
|
||||
'menHauptmenü
|
||||
'
|
||||
Me.menHauptmenü.BackColor = System.Drawing.SystemColors.Control
|
||||
@ -232,7 +243,7 @@ Partial Class frmStart
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 24)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(163, 684)
|
||||
Me.Panel1.Size = New System.Drawing.Size(163, 589)
|
||||
Me.Panel1.TabIndex = 10
|
||||
'
|
||||
'btnNachbearbeitungAD
|
||||
@ -436,11 +447,15 @@ Partial Class frmStart
|
||||
'
|
||||
Me.TimerErrorLog.Interval = 60000
|
||||
'
|
||||
'TimerDeleteLogfiles
|
||||
'
|
||||
Me.TimerDeleteLogfiles.Interval = 1000
|
||||
'
|
||||
'frmStart
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1237, 733)
|
||||
Me.ClientSize = New System.Drawing.Size(1237, 638)
|
||||
Me.ContextMenuStrip = Me.ContextMenuStrip1
|
||||
Me.Controls.Add(Me.Panel1)
|
||||
Me.Controls.Add(Me.menHauptmenü)
|
||||
@ -501,4 +516,6 @@ Partial Class frmStart
|
||||
Friend WithEvents CriticalEmailTestToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents ToolStripStatusLabel2 As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents TimerErrorLog As Timer
|
||||
Friend WithEvents TimerDeleteLogfiles As Timer
|
||||
Friend WithEvents ToolStripStatusLabel_LogDeleteTime As ToolStripStatusLabel
|
||||
End Class
|
||||
|
||||
@ -159,7 +159,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO
|
||||
FAAAAk1TRnQBSQFMAgEBCQEAATABAwEwAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
FAAAAk1TRnQBSQFMAgEBCQEAAVgBAwFYAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -643,6 +643,9 @@
|
||||
<metadata name="TimerErrorLog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>920, 17</value>
|
||||
</metadata>
|
||||
<metadata name="TimerDeleteLogfiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1049, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>102</value>
|
||||
</metadata>
|
||||
|
||||
@ -21,44 +21,143 @@ Public Class frmStart
|
||||
' Delete_LogFiles()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
' CREATE INSTANCE
|
||||
Private Shared _Instance As frmStart = Nothing
|
||||
|
||||
Public Shared Function Instance() As frmStart
|
||||
If _Instance Is Nothing OrElse _Instance.IsDisposed Then
|
||||
_Instance = New frmStart()
|
||||
End If
|
||||
Return _Instance
|
||||
End Function
|
||||
|
||||
' DELETE LOGS
|
||||
Private Sub Delete_LogFiles()
|
||||
Try
|
||||
' Dim vDate = DateAdd("d", -CInt(My.Settings.logolder_then), Now)
|
||||
Dim directory As New DirectoryInfo(My.Application.Info.DirectoryPath & "\Log")
|
||||
_Logger.Debug($"Dateipfad geholt: {directory}")
|
||||
Dim oIntervall As Integer = 30
|
||||
Integer.TryParse(frmGrundeinstellungen.TextBox4.Text, oIntervall)
|
||||
_Logger.Debug($"Löschalter aus der Config geholt: {oIntervall}")
|
||||
|
||||
For Each file As FileInfo In directory.GetFiles
|
||||
_Logger.Debug($"Durchlaufe alle Dateien: {file.FullName}")
|
||||
Try
|
||||
Dim directory As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log")
|
||||
|
||||
For Each file As IO.FileInfo In directory.GetFiles
|
||||
If (Now - file.CreationTime).Days > 29 Then file.Delete()
|
||||
Next
|
||||
Dim oAgeOfFile As Integer = (Now - file.CreationTime).Days
|
||||
_Logger.Debug($"Alter der aktuellen Datei: {oAgeOfFile}")
|
||||
If oAgeOfFile >= oIntervall Then
|
||||
file.Delete()
|
||||
_Logger.Debug($"Lösche Datei, die älter ist als Löschalter: {file.FullName}")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
_Logger.Warn($"Could not delete file {file.Name}: {ex.Message}")
|
||||
End Try
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub SetupTimerDeleteLogfiles()
|
||||
Try
|
||||
Dim now As DateTime = DateTime.Now
|
||||
Dim startTime As DateTime
|
||||
|
||||
' Zeit aus den gespeicherten Settings lesen
|
||||
Dim timeString As String = My.Settings.vDeleteLogsTime
|
||||
|
||||
If String.IsNullOrWhiteSpace(timeString) Then
|
||||
timeString = "02:00"
|
||||
End If
|
||||
|
||||
Dim dt As DateTime
|
||||
If DateTime.TryParse(timeString, dt) Then
|
||||
'If timeString Then
|
||||
My.Settings.vDeleteLogsTime = timeString
|
||||
My.Settings.Save()
|
||||
startTime = New DateTime(now.Year, now.Month, now.Day, dt.Hour, dt.Minute, 0)
|
||||
If now > startTime Then startTime = startTime.AddDays(1)
|
||||
Else
|
||||
_Logger.Warn($"Ungültiges Zeitformat '{timeString}', Standard 02:00 wird verwendet.")
|
||||
startTime = New DateTime(now.Year, now.Month, now.Day, 2, 0, 0)
|
||||
If now > startTime Then startTime = startTime.AddDays(1)
|
||||
End If
|
||||
|
||||
Dim interval As TimeSpan = startTime - now
|
||||
Dim intervalMs As Double = interval.TotalMilliseconds
|
||||
|
||||
' Sicherheitscheck
|
||||
If intervalMs < 1000 Then
|
||||
intervalMs = 1000
|
||||
End If
|
||||
If intervalMs > Integer.MaxValue Then
|
||||
intervalMs = Integer.MaxValue
|
||||
End If
|
||||
|
||||
TimerDeleteLogfiles.Interval = CInt(intervalMs)
|
||||
|
||||
If My.Settings.vAutoDeleteLogs Then
|
||||
TimerDeleteLogfiles.Start()
|
||||
_Logger.Info($"TimerDeleteLogfiles startet in {interval.TotalMinutes:F1} Minuten (Zielzeit: {startTime:HH:mm}).")
|
||||
Else
|
||||
TimerDeleteLogfiles.Stop()
|
||||
_Logger.Info("Automatische Log-Löschung deaktiviert, Timer gestoppt.")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error("Fehler in SetupTimerDeleteLogfiles: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub TimerDeleteLogfiles_Tick(sender As Object, e As EventArgs) Handles TimerDeleteLogfiles.Tick
|
||||
Try
|
||||
Delete_Logfiles()
|
||||
' Nächstes Intervall wieder 24h
|
||||
TimerDeleteLogfiles.Interval = 24 * 60 * 60 * 1000
|
||||
Catch ex As Exception
|
||||
_Logger.Error("Fehler beim automatischen Löschen: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub FMStart_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
|
||||
Dim result As MsgBoxResult = MsgBox("Sind Sie sicher, dass sie " & Application.ProductName & " wirklich schließen wollen?" & vbNewLine & "Alle Vorgänge/Module werden gestoppt und nicht mehr ausgeführt!", MsgBoxStyle.YesNo, "Bestätigung erforderlich:")
|
||||
If result = MsgBoxResult.No Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FMStart_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||
|
||||
_Instance = Me
|
||||
|
||||
Try
|
||||
'Delete_LogFiles()
|
||||
|
||||
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName,
|
||||
My.Application.Info.ProductName)
|
||||
_Logger = _MyLogger.GetLogger()
|
||||
_MyLogger.Debug = Not My.Settings.vLogErrorsonly
|
||||
|
||||
CURR_Logger = _Logger
|
||||
CURR_LogConfig = _MyLogger
|
||||
Delete_LogFiles()
|
||||
|
||||
SetupTimerDeleteLogfiles()
|
||||
|
||||
'Aktueller Benutzer
|
||||
Me.tslblVersion.Text = Environment.UserName.ToString
|
||||
Me.Text = Application.CompanyName & "-" & Application.ProductName
|
||||
Me.tslblVersion.Text = "Version: " & My.Application.Info.Version.ToString
|
||||
'Aktuelle Machine
|
||||
Me.Status_Machine.Text = My.Computer.Name
|
||||
'Zeitpunkt der automatischen Löschung von Logs
|
||||
If My.Settings.vAutoDeleteLogs Then
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.Text = "Logs werden automatisch gelöscht um: " & My.Settings.vDeleteLogsTime.ToShortTimeString & " Uhr."
|
||||
Else
|
||||
Me.ToolStripStatusLabel_LogDeleteTime.Text = "Automatisches Löschen von Logs ist inaktiv."
|
||||
End If
|
||||
' timUhrzeit.Start()
|
||||
TimerErrorLog.Start()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user