From 73de4042ab60867abdf24527b23bb34af87eeb9c Mon Sep 17 00:00:00 2001 From: OlgunR Date: Wed, 22 Oct 2025 17:00:36 +0200 Subject: [PATCH] =?UTF-8?q?Profile=20aus=20Profil=C3=BCbersicht=20editiere?= =?UTF-8?q?n=20und=20speichern=20-=20frmNIHauptseite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../My Project/Settings.Designer.vb | 12 ++++ ToolCollection/My Project/Settings.settings | 3 + ToolCollection/app.config | 3 + ToolCollection/frmNIHauptseite.Designer.vb | 25 ++++++++ ToolCollection/frmNIHauptseite.vb | 57 ++++++++++++++++++- ToolCollection/frmNIProfileigenschaften.resx | 2 +- 6 files changed, 99 insertions(+), 3 deletions(-) diff --git a/ToolCollection/My Project/Settings.Designer.vb b/ToolCollection/My Project/Settings.Designer.vb index 21e5005..145764b 100644 --- a/ToolCollection/My Project/Settings.Designer.vb +++ b/ToolCollection/My Project/Settings.Designer.vb @@ -757,6 +757,18 @@ Namespace My Me("vInstanceName") = value End Set End Property + + _ + Public Property vNIRunning() As Boolean + Get + Return CType(Me("vNIRunning"),Boolean) + End Get + Set + Me("vNIRunning") = value + End Set + End Property End Class End Namespace diff --git a/ToolCollection/My Project/Settings.settings b/ToolCollection/My Project/Settings.settings index 9399d37..87f1bd8 100644 --- a/ToolCollection/My Project/Settings.settings +++ b/ToolCollection/My Project/Settings.settings @@ -187,5 +187,8 @@ + + False + \ No newline at end of file diff --git a/ToolCollection/app.config b/ToolCollection/app.config index 31cb7d1..81903c3 100644 --- a/ToolCollection/app.config +++ b/ToolCollection/app.config @@ -165,6 +165,9 @@ + + False + diff --git a/ToolCollection/frmNIHauptseite.Designer.vb b/ToolCollection/frmNIHauptseite.Designer.vb index 2c9c43c..0565f5b 100644 --- a/ToolCollection/frmNIHauptseite.Designer.vb +++ b/ToolCollection/frmNIHauptseite.Designer.vb @@ -49,6 +49,8 @@ Partial Class frmNIHauptseite Me.Label4 = New System.Windows.Forms.Label() Me.numIntervall = New System.Windows.Forms.NumericUpDown() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.btnEdit = New System.Windows.Forms.Button() + Me.btnStartProfile = New System.Windows.Forms.Button() Me.gridProfileOverview = New DevExpress.XtraGrid.GridControl() Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.RepositoryItemCheckEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit() @@ -345,6 +347,8 @@ Partial Class frmNIHauptseite ' 'TabPage2 ' + Me.TabPage2.Controls.Add(Me.btnEdit) + Me.TabPage2.Controls.Add(Me.btnStartProfile) Me.TabPage2.Controls.Add(Me.gridProfileOverview) Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Name = "TabPage2" @@ -354,6 +358,24 @@ Partial Class frmNIHauptseite Me.TabPage2.Text = "Profilübersicht" Me.TabPage2.UseVisualStyleBackColor = True ' + 'btnEdit + ' + Me.btnEdit.Location = New System.Drawing.Point(530, 487) + Me.btnEdit.Name = "btnEdit" + Me.btnEdit.Size = New System.Drawing.Size(110, 23) + Me.btnEdit.TabIndex = 2 + Me.btnEdit.Text = "Profil Bearbeiten" + Me.btnEdit.UseVisualStyleBackColor = True + ' + 'btnStartProfile + ' + Me.btnStartProfile.Location = New System.Drawing.Point(646, 487) + Me.btnStartProfile.Name = "btnStartProfile" + Me.btnStartProfile.Size = New System.Drawing.Size(110, 23) + Me.btnStartProfile.TabIndex = 1 + Me.btnStartProfile.Text = "Profil Starten" + Me.btnStartProfile.UseVisualStyleBackColor = True + ' 'gridProfileOverview ' Me.gridProfileOverview.Dock = System.Windows.Forms.DockStyle.Fill @@ -376,6 +398,7 @@ Partial Class frmNIHauptseite Me.GridView1.OptionsSelection.EnableAppearanceFocusedCell = False Me.GridView1.OptionsView.EnableAppearanceEvenRow = True Me.GridView1.OptionsView.ShowAutoFilterRow = True + Me.GridView1.OptionsView.ShowFooter = True Me.GridView1.OptionsView.ShowGroupPanel = False ' 'RepositoryItemCheckEdit1 @@ -538,4 +561,6 @@ Partial Class frmNIHauptseite Friend WithEvents RepositoryItemCheckEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit Friend WithEvents RepositoryItemGridLookUpEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit Friend WithEvents RepositoryItemGridLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents btnEdit As Button + Friend WithEvents btnStartProfile As Button End Class diff --git a/ToolCollection/frmNIHauptseite.vb b/ToolCollection/frmNIHauptseite.vb index 51e9352..29cfbd9 100644 --- a/ToolCollection/frmNIHauptseite.vb +++ b/ToolCollection/frmNIHauptseite.vb @@ -96,7 +96,9 @@ Public Class frmNIHauptseite End Sub Private Sub frmNIHauptseite_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing + My.Settings.vNIRunning = False My.Settings.Save() + Me.btnStartProfile.Enabled = True NI_OPENED = False 'If e.CloseReason = CloseReason.UserClosing Then ' _Logger.Info("Nachindexierung Hauptformular wird durch User geschlossen.") @@ -115,6 +117,9 @@ Public Class frmNIHauptseite If AUTOSTART_FIH Then Start_NachindexierungThreads() + My.Settings.vNIRunning = True + My.Settings.Save() + Me.btnStartProfile.Enabled = False _Logger.Info("AUTOSTART_FIH = True - Nachindexierung wird gestartet.") AUTOSTART_FIH = False Else @@ -2838,21 +2843,54 @@ Public Class frmNIHauptseite End Try End Sub + + 'NI Starten aus NIHauptseite Private Sub btnStartStop_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStartStop.Click If TimerRefresh.Enabled = False Then TimerRefresh.Start() Else TimerRefresh.Stop() End If - If Me.btnStartStop.Text = "Nachindexierung stoppen" Then + If My.Settings.vNIRunning Then If timRun.Enabled = True Then timRun.Stop() End If Abbruch_NI("Manueller Abbruch 1 durch User " & Environment.UserName, False, False) + My.Settings.vNIRunning = False + My.Settings.Save() Me.btnStartStop.Text = "Nachindexierung starten" + Me.btnStartProfile.Enabled = True Else - Me.btnStartStop.Text = "Nachindexierung stoppen" Start_NachindexierungThreads() + My.Settings.vNIRunning = True + My.Settings.Save() + Me.btnStartStop.Text = "Nachindexierung stoppen" + Me.btnStartProfile.Enabled = False + End If + manuallyRun = False + End Sub + + 'NI Starten aus Profilübersicht + Private Sub btnStartProfile_Click(sender As Object, e As EventArgs) Handles btnStartProfile.Click + If TimerRefresh.Enabled = False Then + TimerRefresh.Start() + Else + TimerRefresh.Stop() + End If + If My.Settings.vNIRunning Then + 'If timRun.Enabled = True Then + ' timRun.Stop() + 'End If + 'Abbruch_NI("Manueller Abbruch 1 durch User " & Environment.UserName, False, False) + 'Me.btnStartStop.Text = "Nachindexierung starten" + Me.btnStartProfile.Enabled = True + MsgBox("Nachindexierung läuft bereits.") + Else + Start_NachindexierungThreads() + My.Settings.vNIRunning = True + My.Settings.Save() + Me.btnStartStop.Text = "Nachindexierung stoppen" + Me.btnStartProfile.Enabled = False End If manuallyRun = False End Sub @@ -3024,6 +3062,21 @@ Public Class frmNIHauptseite End Try End Function + Private Sub btnEdit_Click(sender As Object, e As EventArgs) Handles btnEdit.Click + + Dim view As DevExpress.XtraGrid.Views.Grid.GridView = TryCast(gridProfileOverview.MainView, DevExpress.XtraGrid.Views.Grid.GridView) + If view Is Nothing OrElse view.FocusedRowHandle < 0 Then + MsgBox("Bitte wählen Sie ein Profil aus.", "Hinweis", MsgBoxStyle.Information) + End If + + Dim profilname As String = Convert.ToString(view.GetRowCellValue(view.FocusedRowHandle, "Name")) + If Not String.IsNullOrWhiteSpace(profilname) Then + frmNIProfileigenschaften.Lade_Profil(profilname) + frmNIProfileigenschaften.Show() + frmNIProfileigenschaften.BringToFront() + End If + + End Sub Private Function CrFolderForIndex(fullfilename As String, pFileName As String) diff --git a/ToolCollection/frmNIProfileigenschaften.resx b/ToolCollection/frmNIProfileigenschaften.resx index f785c8c..a443c18 100644 --- a/ToolCollection/frmNIProfileigenschaften.resx +++ b/ToolCollection/frmNIProfileigenschaften.resx @@ -161,7 +161,7 @@ einen Startindex erhält, der nicht in der Datenbank existiert. Diese Kennzeichn AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK - CQAAAk1TRnQBSQFMAgEBAgEAAagBAAGoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAgEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA