Profile aus Profilübersicht editieren und speichern - frmNIHauptseite

This commit is contained in:
OlgunR 2025-10-22 17:00:36 +02:00
parent 4c27896b69
commit 73de4042ab
6 changed files with 99 additions and 3 deletions

View File

@ -757,6 +757,18 @@ Namespace My
Me("vInstanceName") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
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

View File

@ -187,5 +187,8 @@
<Setting Name="vInstanceName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="vNIRunning" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -165,6 +165,9 @@
<setting name="vInstanceName" serializeAs="String">
<value />
</setting>
<setting name="vNIRunning" serializeAs="String">
<value>False</value>
</setting>
</ToolCollection.My.MySettings>
</userSettings>
<applicationSettings>

View File

@ -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

View File

@ -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)

View File

@ -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