Starten und Stoppen der NI mit einzelnen Profilen - frmNIHauptseite
This commit is contained in:
parent
f9aacb19cc
commit
49bfc4b40b
14
ToolCollection/My Project/Settings.Designer.vb
generated
14
ToolCollection/My Project/Settings.Designer.vb
generated
@ -585,7 +585,7 @@ Namespace My
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("01;02;03;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23")> _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("01;02;03;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23")> _
|
||||
Public ReadOnly Property NI_WORKING_HOURS() As String
|
||||
Get
|
||||
Return CType(Me("NI_WORKING_HOURS"),String)
|
||||
@ -769,6 +769,18 @@ Namespace My
|
||||
Me("vNIRunning") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
|
||||
Public Property vNIsingleProfileRunning() As Boolean
|
||||
Get
|
||||
Return CType(Me("vNIsingleProfileRunning"),Boolean)
|
||||
End Get
|
||||
Set
|
||||
Me("vNIsingleProfileRunning") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="NI_WORKING_HOURS" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">01;02;03;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23</Value>
|
||||
<Value Profile="(Default)">01;02;03;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23</Value>
|
||||
</Setting>
|
||||
<Setting Name="FB_DATASOURCE" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
@ -190,5 +190,8 @@
|
||||
<Setting Name="vNIRunning" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="vNIsingleProfileRunning" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -168,6 +168,9 @@
|
||||
<setting name="vNIRunning" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="vNIsingleProfileRunning" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</ToolCollection.My.MySettings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
@ -194,7 +197,7 @@
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="NI_WORKING_HOURS" serializeAs="String">
|
||||
<value>01;02;03;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23</value>
|
||||
<value>01;02;03;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23</value>
|
||||
</setting>
|
||||
<setting name="FB_DATASOURCE" serializeAs="String">
|
||||
<value />
|
||||
|
||||
@ -120,9 +120,6 @@
|
||||
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>248, 56</value>
|
||||
</metadata>
|
||||
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>248, 56</value>
|
||||
</metadata>
|
||||
<data name="Label6.Text" xml:space="preserve">
|
||||
<value>Es wird empfohlen, das Intervall nicht auf weniger als 30 Minuten zu setzen, da der nächste Nachindexierungsdurchlauf nur gestartet werden kann, wenn der vorherige beendet wurde. Wenn zu erwarten ist, dass viele Dokumente nachindexiert werden sollen, sollte der Intervall für diesen Durchlauf entsprechend hoch gesetzt werden ( > 2 Stunden).</value>
|
||||
</data>
|
||||
|
||||
@ -635,7 +635,7 @@ Public Class frmNIHauptseite
|
||||
' nächstes Profil an ProgressBar1
|
||||
bwProfil.ReportProgress(-2)
|
||||
Next
|
||||
_singleProfileRun = ""
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
|
||||
@ -664,11 +664,24 @@ Public Class frmNIHauptseite
|
||||
_Logger.Info("")
|
||||
|
||||
End If
|
||||
|
||||
Dim actdatetime = Now
|
||||
Dim newrun_dt As DateTime = actdatetime.AddMinutes(Me.numIntervall.Value)
|
||||
Me.lblStatus.Text = $"(Status: WARTEN auf den nächsten Durchlauf: {newrun_dt.ToString})"
|
||||
tslblStatus.Text = $"Status: WARTEN auf den nächsten Durchlauf: {newrun_dt.ToString}"
|
||||
Me.tslblStatus.Visible = True
|
||||
|
||||
If My.Settings.vNIRunning Then
|
||||
Me.lblStatus.Text = $"(Status: WARTEN auf den nächsten Durchlauf: {newrun_dt.ToString})"
|
||||
tslblStatus.Text = $"Status: WARTEN auf den nächsten Durchlauf: {newrun_dt.ToString}"
|
||||
Me.tslblStatus.Visible = True
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(_singleProfileRun) Then
|
||||
_singleProfileRun = ""
|
||||
My.Settings.vNIsingleProfileRunning = False
|
||||
My.Settings.vNIRunning = False
|
||||
Me.lblStatus.Text = $"(Status: Nachindexieren beendet)"
|
||||
tslblStatus.Text = "Status: Nachindexieren beendet"
|
||||
btnStartStop.Text = "Nachindexierung starten"
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@ -2768,7 +2781,9 @@ Public Class frmNIHauptseite
|
||||
End If
|
||||
manually_cancel = False
|
||||
Me.timRun.Interval = Me.numIntervall.Value * 60 * 1000
|
||||
Me.timRun.Start()
|
||||
If My.Settings.vNIRunning Then
|
||||
Me.timRun.Start()
|
||||
End If
|
||||
'Variable für den Fall Programmabbruch und Neustart!
|
||||
bwProfil = New BackgroundWorker
|
||||
bwsearch = New BackgroundWorker
|
||||
@ -2866,19 +2881,19 @@ Public Class frmNIHauptseite
|
||||
Else
|
||||
TimerRefresh.Stop()
|
||||
End If
|
||||
If My.Settings.vNIRunning Then
|
||||
If My.Settings.vNIRunning Or My.Settings.vNIsingleProfileRunning 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()
|
||||
Abbruch_NI("Manueller Abbruch 1 durch User " & Environment.UserName, False, False)
|
||||
Me.btnStartStop.Text = "Nachindexierung starten"
|
||||
Me.btnStartProfile.Enabled = True
|
||||
Else
|
||||
Start_NachindexierungThreads()
|
||||
My.Settings.vNIRunning = True
|
||||
My.Settings.Save()
|
||||
Start_NachindexierungThreads()
|
||||
Me.btnStartStop.Text = "Nachindexierung stoppen"
|
||||
Me.btnStartProfile.Enabled = False
|
||||
End If
|
||||
@ -2888,19 +2903,8 @@ Public Class frmNIHauptseite
|
||||
'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.", MsgBoxStyle.Information)
|
||||
Me.btnStartProfile.Enabled = False
|
||||
Else
|
||||
|
||||
Dim view As DevExpress.XtraGrid.Views.Grid.GridView = TryCast(gridProfileOverview.MainView, DevExpress.XtraGrid.Views.Grid.GridView)
|
||||
@ -2912,12 +2916,12 @@ Public Class frmNIHauptseite
|
||||
Dim profilname As String = Convert.ToString(view.GetRowCellValue(view.FocusedRowHandle, "Name"))
|
||||
If Not String.IsNullOrWhiteSpace(profilname) Then
|
||||
_singleProfileRun = profilname
|
||||
Start_NachindexierungThreads()
|
||||
My.Settings.vNIRunning = True
|
||||
My.Settings.vNIsingleProfileRunning = True
|
||||
My.Settings.Save()
|
||||
Start_NachindexierungThreads()
|
||||
btnStartStop.Text = "Nachindexierung stoppen"
|
||||
btnStartProfile.Enabled = False
|
||||
MsgBox($"Nachindexierung mit dem Profil: {profilname} gestartet.", MsgBoxStyle.Information)
|
||||
Me.tcmain.SelectedTab = tpMain
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user