MS
This commit is contained in:
parent
77864646a7
commit
eecaea85f3
@ -190,6 +190,7 @@ Public Class ClassInit
|
|||||||
Try
|
Try
|
||||||
WMSESSION_STARTSTOP_STARTUP = DT.Rows(0).Item("WMSESSION_STARTSTOP_STARTUP")
|
WMSESSION_STARTSTOP_STARTUP = DT.Rows(0).Item("WMSESSION_STARTSTOP_STARTUP")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("Unexpected Error in Settings_LoadBasicConfig: " & ex.Message, True)
|
||||||
WMSESSION_STARTSTOP_STARTUP = False
|
WMSESSION_STARTSTOP_STARTUP = False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|||||||
@ -130,34 +130,34 @@ Public Class ClassWindream_allgemein
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function Start_WMCC_andCo()
|
Public Function Start_WMCC_andCo()
|
||||||
|
Try
|
||||||
|
If WMSESSION_STARTSTOP_STARTUP = True Then
|
||||||
|
ClassLogger.Add(">> WINDREAM-Start on ApplicationStart is active!", False)
|
||||||
|
|
||||||
If WMSESSION_STARTSTOP_STARTUP = True Then
|
|
||||||
Try
|
|
||||||
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
||||||
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
||||||
owindreamControlCenter.StartVFSService(1)
|
owindreamControlCenter.StartVFSService(1)
|
||||||
|
System.Threading.Thread.Sleep(1000)
|
||||||
owindreamIndexService.Start()
|
owindreamIndexService.Start()
|
||||||
System.Threading.Thread.Sleep(1500)
|
System.Threading.Thread.Sleep(1500)
|
||||||
Create_Session()
|
End If
|
||||||
Catch ex As Exception
|
Create_Session()
|
||||||
ClassLogger.Add("Error while starting up WMCC and IndexService: " & ex.Message, True)
|
Catch ex As Exception
|
||||||
End Try
|
ClassLogger.Add("Error while starting up WMCC and IndexService: " & ex.Message, True)
|
||||||
|
End Try
|
||||||
|
|
||||||
End If
|
|
||||||
End Function
|
End Function
|
||||||
Public Function Stop_WMCC_andCo()
|
Public Function Stop_WMCC_andCo()
|
||||||
If WMSESSION_STARTSTOP_STARTUP = True Then
|
Try
|
||||||
Try
|
If WMSESSION_STARTSTOP_STARTUP = True Then
|
||||||
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
||||||
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
||||||
owindreamControlCenter.StartVFSService(0)
|
owindreamControlCenter.StartVFSService(0)
|
||||||
owindreamIndexService.Shutdown()
|
owindreamIndexService.Shutdown()
|
||||||
owindreamControlCenter.ExitCC(0)
|
owindreamControlCenter.ExitCC(0)
|
||||||
Catch ex As Exception
|
End If
|
||||||
ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True)
|
Catch ex As Exception
|
||||||
End Try
|
ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True)
|
||||||
End If
|
End Try
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Public Class frmMain
|
|||||||
Private GRID_INV_COL_REMOVED As Boolean = False
|
Private GRID_INV_COL_REMOVED As Boolean = False
|
||||||
Private _windream As New ClassWindream_allgemein
|
Private _windream As New ClassWindream_allgemein
|
||||||
|
|
||||||
Private Sub frmProfiles_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||||
Try
|
Try
|
||||||
' Position und Größe speichern
|
' Position und Größe speichern
|
||||||
My.Settings.frmMainSize = Me.Size
|
My.Settings.frmMainSize = Me.Size
|
||||||
@ -48,14 +48,14 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmProfiles_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
|
Private Sub frmMain_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
|
||||||
Select Case e.KeyCode
|
Select Case e.KeyCode
|
||||||
Case Keys.F12
|
Case Keys.F12
|
||||||
frmLicense.ShowDialog()
|
frmLicense.ShowDialog()
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmProfiles_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Sub frmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Initializing MainForm....", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Initializing MainForm....", False)
|
||||||
Try
|
Try
|
||||||
UserLookAndFeel.Default.SetSkinStyle("VS2010")
|
UserLookAndFeel.Default.SetSkinStyle("VS2010")
|
||||||
@ -120,23 +120,34 @@ Public Class frmMain
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Fehler bei Laden des Formulars: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
MsgBox("Fehler bei Laden des Formulars: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||||
End Try
|
End Try
|
||||||
If UniversalViewer = "" And Viewer = "uviewer" Then
|
|
||||||
MsgBox("Definieren Sie wo UniversalViewer abgelegt wurde!", MsgBoxStyle.Critical, "Fehlende Konfiguration")
|
Try
|
||||||
frmKonfig.ShowDialog()
|
If UniversalViewer = "" And Viewer = "uviewer" Then
|
||||||
End If
|
MsgBox("Definieren Sie wo UniversalViewer abgelegt wurde!", MsgBoxStyle.Critical, "Fehlende Konfiguration")
|
||||||
If TimerRefresh.Enabled = False Then
|
frmKonfig.ShowDialog()
|
||||||
TimerRefresh.Start()
|
End If
|
||||||
End If
|
If TimerRefresh.Enabled = False Then
|
||||||
|
TimerRefresh.Start()
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Unexpected Error in LoadForm - Step 4: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||||
|
End Try
|
||||||
|
|
||||||
Load_Profile_items()
|
Load_Profile_items()
|
||||||
|
|
||||||
Check_Timer_Notification()
|
Check_Timer_Notification()
|
||||||
Restore_Form_Position()
|
Restore_Form_Position()
|
||||||
_windreamPM = New ClassPMWindream
|
Try
|
||||||
_windreamPM.Start_WMCC_andCo()
|
_windreamPM = New ClassPMWindream
|
||||||
If _windreamPM.oSession.aLoggedin = False Then
|
_windreamPM.Start_WMCC_andCo()
|
||||||
MsgBox("Login on windream was not possible. Please check the log." & vbNewLine & "Application will close now!", MsgBoxStyle.Critical)
|
If _windreamPM.oSession.aLoggedin = False Then
|
||||||
Me.Close()
|
MsgBox("Login on windream was not possible. Please check the log." & vbNewLine & "Application will close now!", MsgBoxStyle.Critical)
|
||||||
End If
|
Me.Close()
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||||
|
End Try
|
||||||
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> MainForm initialized!", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> MainForm initialized!", False)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user