MS New Properties
This commit is contained in:
@@ -10,6 +10,7 @@ Imports DevExpress.XtraCharts
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports System.Threading
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmMain
|
||||
'Private _windreamPM As ClassPMWindream
|
||||
@@ -44,12 +45,16 @@ Public Class frmMain
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error in Save FormLayout: " & ex.Message)
|
||||
End Try
|
||||
If WINDREAM?.oSession?.aLoggedin = True Then
|
||||
WINDREAM.Stop_WMCC_andCo()
|
||||
If IDB_ACTIVE = False Then
|
||||
Try
|
||||
If WINDREAM?.oSession?.aLoggedin = True Then
|
||||
WINDREAM.Stop_WMCC_andCo()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
'If _windreamPM.oSession.aLoggedin = True Then
|
||||
' _windreamPM.Stop_WMCC_andCo()
|
||||
'End If
|
||||
|
||||
Try
|
||||
ClassAllgemeineFunktionen.LoginOut("LOGOUT")
|
||||
@@ -72,12 +77,12 @@ Public Class frmMain
|
||||
Private Sub frmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
formopenClose = True
|
||||
LOGGER.Debug("Initializing MainForm....")
|
||||
Try
|
||||
UserLookAndFeel.Default.SetSkinStyle("VS2010")
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
'Try
|
||||
' UserLookAndFeel.Default.SetSkinStyle("VS2010")
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
|
||||
End Try
|
||||
'End Try
|
||||
|
||||
' Create helper to save/load expanded GroupColumns at runtime
|
||||
RefreshHelper = New RefreshHelper(GridView_Docs, "GUID")
|
||||
@@ -142,10 +147,6 @@ Public Class frmMain
|
||||
|
||||
|
||||
Try
|
||||
If VIEWER_UNIVERSAL = "" And VIEWER_ALL = "uviewer" Then
|
||||
MsgBox("Definieren Sie wo UniversalViewer abgelegt wurde!", MsgBoxStyle.Critical, "Fehlende Konfiguration")
|
||||
frmKonfig.ShowDialog()
|
||||
End If
|
||||
If TimerRefresh.Enabled = False Then
|
||||
TimerRefresh.Start()
|
||||
End If
|
||||
@@ -970,17 +971,17 @@ Public Class frmMain
|
||||
'Try
|
||||
'Me.Visible = False
|
||||
CURRENT_ProfilGUID = ID
|
||||
CURRENT_ProfilName = ClassDatabase.Execute_Scalar("SELECT NAME FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID, CONNECTION_STRING)
|
||||
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE_SEARCHES_DOC = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_SEARCH where PROFILE_ID = {0} AND TYPE = 'DOC' AND ACTIVE = 1 ORDER BY TAB_INDEX", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE_SEARCHES_SQL = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_SEARCH where PROFILE_ID = {0} AND TYPE = 'SQL' AND ACTIVE = 1 ORDER BY TAB_INDEX", CURRENT_ProfilGUID))
|
||||
My.Settings.Save()
|
||||
CURRENT_ProfilName = ClassDatabase.Execute_Scalar("SELECT NAME FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID, CONNECTION_STRING)
|
||||
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE_SEARCHES_DOC = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_SEARCH where PROFILE_ID = {0} AND TYPE = 'DOC' AND ACTIVE = 1 ORDER BY TAB_INDEX", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE_SEARCHES_SQL = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_SEARCH where PROFILE_ID = {0} AND TYPE = 'SQL' AND ACTIVE = 1 ORDER BY TAB_INDEX", CURRENT_ProfilGUID))
|
||||
My.Settings.Save()
|
||||
|
||||
If TimerRefresh.Enabled Then
|
||||
TimerRefresh.Stop()
|
||||
End If
|
||||
If TimerRefresh.Enabled Then
|
||||
TimerRefresh.Stop()
|
||||
End If
|
||||
|
||||
frmValidator.ShowDialog()
|
||||
frmValidator.Show()
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Profil_from_Grid: ")
|
||||
@@ -1023,85 +1024,85 @@ Public Class frmMain
|
||||
'Try
|
||||
'GridView_Docs.EndSelection()
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||
|
||||
Dim groupRowText
|
||||
Dim PROFIL_ID
|
||||
If hitInfo.InGroupRow Then
|
||||
GridViewItem_Clicked = "GROUP"
|
||||
groupRowText = GridView_Docs.GetGroupRowDisplayText(hitInfo.RowHandle)
|
||||
PROFIL_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hitInfo.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
||||
ElseIf hitInfo.InDataRow Then
|
||||
GridViewItem_Clicked = "ROW"
|
||||
If GRID_LOAD_TYPE = "OVERVIEW" Then
|
||||
groupRowText = GridView_Docs.GetGroupRowDisplayText(GridView_Docs.GetParentRowHandle(hitInfo.RowHandle))
|
||||
PROFIL_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(GridView_Docs.GetParentRowHandle(hitInfo.RowHandle)), GridView_Docs.Columns("PROFILE_ID"))
|
||||
Else
|
||||
PROFIL_ID = CURRENT_CLICKED_PROFILE_ID
|
||||
End If
|
||||
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
Dim PROFIL_TITLE
|
||||
Dim groupRowText
|
||||
Dim PROFIL_ID
|
||||
If hitInfo.InGroupRow Then
|
||||
GridViewItem_Clicked = "GROUP"
|
||||
groupRowText = GridView_Docs.GetGroupRowDisplayText(hitInfo.RowHandle)
|
||||
PROFIL_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hitInfo.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
|
||||
ElseIf hitInfo.InDataRow Then
|
||||
GridViewItem_Clicked = "ROW"
|
||||
If GRID_LOAD_TYPE = "OVERVIEW" Then
|
||||
Try
|
||||
groupRowText = LTrim(RTrim(groupRowText.ToString.Replace("GROUP_TEXT: ", "")))
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Dim _SPLIT As String()
|
||||
_SPLIT = groupRowText.Split("|")
|
||||
PROFIL_TITLE = LTrim(RTrim(_SPLIT(0).ToString))
|
||||
groupRowText = GridView_Docs.GetGroupRowDisplayText(GridView_Docs.GetParentRowHandle(hitInfo.RowHandle))
|
||||
PROFIL_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(GridView_Docs.GetParentRowHandle(hitInfo.RowHandle)), GridView_Docs.Columns("PROFILE_ID"))
|
||||
Else
|
||||
|
||||
PROFIL_ID = CURRENT_CLICKED_PROFILE_ID
|
||||
End If
|
||||
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
Dim PROFIL_TITLE
|
||||
If GRID_LOAD_TYPE = "OVERVIEW" Then
|
||||
Try
|
||||
groupRowText = LTrim(RTrim(groupRowText.ToString.Replace("GROUP_TEXT: ", "")))
|
||||
Catch ex As Exception
|
||||
|
||||
If Not IsNothing(PROFIL_ID) And IsNumeric(PROFIL_ID) Then
|
||||
End Try
|
||||
|
||||
Dim expression As String
|
||||
expression = "PROFILE_ID = " & PROFIL_ID
|
||||
If hitInfo.InGroupRow Or (startedFrom = "CMGROUP" And hitInfo.InDataRow) Then
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
CURRENT_DOC_GUID = 0
|
||||
CURRENT_ProfilGUID = PROFIL_ID
|
||||
Dim _SPLIT As String()
|
||||
_SPLIT = groupRowText.Split("|")
|
||||
PROFIL_TITLE = LTrim(RTrim(_SPLIT(0).ToString))
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not IsNothing(PROFIL_ID) And IsNumeric(PROFIL_ID) Then
|
||||
|
||||
Dim expression As String
|
||||
expression = "PROFILE_ID = " & PROFIL_ID
|
||||
If hitInfo.InGroupRow Or (startedFrom = "CMGROUP" And hitInfo.InDataRow) Then
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
CURRENT_DOC_GUID = 0
|
||||
CURRENT_ProfilGUID = PROFIL_ID
|
||||
|
||||
|
||||
Load_Profil_from_Grid(PROFIL_ID)
|
||||
|
||||
ElseIf hitInfo.InDataRow Then
|
||||
Dim DOC_GUID = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("GUID"))
|
||||
Dim DOC_ID = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("DOC_ID"))
|
||||
If IsNothing(DOC_ID) Then Exit Sub
|
||||
Dim DOC_PATH = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("FULL_FILE_PATH"))
|
||||
DOC_PATH = DOC_PATH.Replace("W:", "\\windream\objects")
|
||||
DOC_PATH = DOC_PATH.Replace("K:", "\\windream\objects")
|
||||
'Checking if table really contains one record with profile-id and docid
|
||||
expression = expression & " AND DOC_ID = " & DOC_ID
|
||||
Dim TEMP_TABLE = CURR_DT_PROFILEGRID
|
||||
Dim foundRows() As DataRow
|
||||
foundRows = TEMP_TABLE.Select(expression)
|
||||
Dim result = 0
|
||||
For i = 0 To foundRows.GetUpperBound(0)
|
||||
result += 1
|
||||
Next
|
||||
If result = 1 Then
|
||||
CURRENT_DOC_ID = DOC_ID
|
||||
CURRENT_JUMP_DOC_GUID = DOC_GUID
|
||||
CURRENT_DOC_GUID = CURRENT_JUMP_DOC_GUID
|
||||
CURRENT_DOC_PATH = DOC_PATH
|
||||
Load_Profil_from_Grid(PROFIL_ID)
|
||||
|
||||
ElseIf hitInfo.InDataRow Then
|
||||
Dim DOC_GUID = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("GUID"))
|
||||
Dim DOC_ID = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("DOC_ID"))
|
||||
If IsNothing(DOC_ID) Then Exit Sub
|
||||
Dim DOC_PATH = GridView_Docs.GetFocusedRowCellValue(GridView_Docs.Columns("FULL_FILE_PATH"))
|
||||
DOC_PATH = DOC_PATH.Replace("W:", "\\windream\objects")
|
||||
DOC_PATH = DOC_PATH.Replace("K:", "\\windream\objects")
|
||||
'Checking if table really contains one record with profile-id and docid
|
||||
expression = expression & " AND DOC_ID = " & DOC_ID
|
||||
Dim TEMP_TABLE = CURR_DT_PROFILEGRID
|
||||
Dim foundRows() As DataRow
|
||||
foundRows = TEMP_TABLE.Select(expression)
|
||||
Dim result = 0
|
||||
For i = 0 To foundRows.GetUpperBound(0)
|
||||
result += 1
|
||||
Next
|
||||
If result = 1 Then
|
||||
CURRENT_DOC_ID = DOC_ID
|
||||
CURRENT_JUMP_DOC_GUID = DOC_GUID
|
||||
CURRENT_DOC_GUID = CURRENT_JUMP_DOC_GUID
|
||||
CURRENT_DOC_PATH = DOC_PATH
|
||||
Load_Profil_from_Grid(PROFIL_ID)
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
MsgBox("Could not get the ProfileID of file! - Check Your configuration of MainView!", MsgBoxStyle.Critical)
|
||||
|
||||
End If
|
||||
Else
|
||||
MsgBox("Could not get the ProfileID of file! - Check Your configuration of MainView!", MsgBoxStyle.Critical)
|
||||
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -1673,4 +1674,8 @@ Public Class frmMain
|
||||
MsgBox("UserDebugMode is activated remotely. Debugdata will be transferred to database and will be deleted after 10 days!!", MsgBoxStyle.Information)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user