MS V 3.1.3 Beta RightGroups und NodeConfig-Adding
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
Imports System.IO
|
||||
Imports DD_LIB_Standards
|
||||
Imports System.Text
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
|
||||
Public Class frmDoc_Links
|
||||
|
||||
Private ENTITY_ID As Integer = 0
|
||||
Public Property Documents As New List(Of ClassWindreamDocGrid.WindreamDoc)
|
||||
|
||||
Private Sub frmDoc_DocLinks_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
Refresh_Grid_Data(Documents)
|
||||
Load_DocGrid_Layout()
|
||||
|
||||
If USER_IS_ADMIN Then
|
||||
bsiSource.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
@@ -150,7 +154,20 @@ Public Class frmDoc_Links
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Save_DocGrid_Layout()
|
||||
Try
|
||||
Dim XMLPath = Get_DocGrid_Layout_Filename()
|
||||
grvwGrid.SaveLayoutToXml(XMLPath)
|
||||
BarStaticItemStatus.Caption = "Grid-Layout saved - " + Now.ToShortTimeString
|
||||
|
||||
Catch ex As System.Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Save_DocGrid_Layout", ex.Message, ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
Private Function Get_DocGrid_Layout_Filename()
|
||||
Dim Filename As String = String.Format("GridViewDocLinks-{0}-UserLayout.xml", CURRENT_ENTITY_ID)
|
||||
Return System.IO.Path.Combine(System.Windows.Forms.Application.UserAppDataPath(), Filename)
|
||||
End Function
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
Try
|
||||
Dim saveFileDialogDocSearchResult As New SaveFileDialog With {
|
||||
@@ -209,4 +226,56 @@ Public Class frmDoc_Links
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Save_DocGrid_Layout()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick
|
||||
Reset_View_layout()
|
||||
End Sub
|
||||
Sub Reset_View_layout()
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Try
|
||||
Dim XMLPath = Get_DocGrid_Layout_Filename()
|
||||
If File.Exists(XMLPath) Then
|
||||
File.Delete(XMLPath)
|
||||
Refresh_Grid_Data(Documents)
|
||||
Else
|
||||
MsgBox("Resetting the layout was not successful - File not existing!", MsgBoxStyle.Information)
|
||||
End If
|
||||
Catch ex As System.Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Reset_View_layout: ", ex.Message)
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub grvwGrid_ColumnPositionChanged(sender As Object, e As EventArgs) Handles grvwGrid.ColumnPositionChanged
|
||||
Save_DocGrid_Layout()
|
||||
End Sub
|
||||
|
||||
Private Sub grvwGrid_ColumnWidthChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.ColumnEventArgs) Handles grvwGrid.ColumnWidthChanged
|
||||
Save_DocGrid_Layout()
|
||||
End Sub
|
||||
|
||||
Private Sub grvwGrid_ColumnFilterChanged(sender As Object, e As EventArgs) Handles grvwGrid.ColumnFilterChanged
|
||||
Save_DocGrid_Layout()
|
||||
End Sub
|
||||
|
||||
Private Sub grvwGrid_EndSorting(sender As Object, e As EventArgs) Handles grvwGrid.EndSorting
|
||||
Save_DocGrid_Layout()
|
||||
End Sub
|
||||
Sub Load_DocGrid_Layout()
|
||||
Try
|
||||
Dim XMLPath = Get_DocGrid_Layout_Filename()
|
||||
If File.Exists(XMLPath) Then
|
||||
grvwGrid.RestoreLayoutFromXml(XMLPath)
|
||||
grvwGrid.GuessAutoFilterRowValuesFromFilter()
|
||||
BarStaticItemStatus.Caption = "Grid-Layout loaded - " + Now.ToShortTimeString
|
||||
|
||||
End If
|
||||
Catch ex As System.Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Load_DocGrid_Layout", ex.Message, ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user