MS 3.1.1.0
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Runtime.InteropServices
|
||||
'Imports System.Runtime.InteropServices
|
||||
'Imports System.Text
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
@@ -6,12 +7,39 @@ Imports DevExpress.XtraPrinting
|
||||
Imports DigitalData.Modules.Database
|
||||
|
||||
Public Class frmDocSearchResult
|
||||
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||
<DllImport("Shell32", CharSet:=CharSet.Auto, SetLastError:=True)>
|
||||
Public Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
|
||||
End Function
|
||||
Public Structure SHELLEXECUTEINFO
|
||||
Public cbSize As Integer
|
||||
Public fMask As Integer
|
||||
Public hwnd As IntPtr
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpVerb As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpFile As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpParameters As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
|
||||
Dim nShow As Integer
|
||||
Dim hInstApp As IntPtr
|
||||
Dim lpIDList As IntPtr
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpClass As String
|
||||
Public hkeyClass As IntPtr
|
||||
Public dwHotKey As Integer
|
||||
Public hIcon As IntPtr
|
||||
Public hProcess As IntPtr
|
||||
End Structure
|
||||
Private Const SEE_MASK_INVOKEIDLIST = &HC
|
||||
Private Const SEE_MASK_NOCLOSEPROCESS = &H40
|
||||
Private Const SEE_MASK_FLAG_NO_UI = &H400
|
||||
Public Const SW_SHOW As Short = 5
|
||||
Private _Helper As ClassHelper
|
||||
Private DT_RESULT As DataTable
|
||||
Private SelectedDocID As Int64
|
||||
Private SelectedFULL_FILEPATH As String
|
||||
|
||||
Private Sub frmDocSearchResult_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
LoadDocSearch(False)
|
||||
_Helper = New ClassHelper
|
||||
Text = CURRENT_DOCSEARCH_CAPTION
|
||||
|
||||
Dim oGDPictureLicenseKey = MYDB_ECM.GetScalarValue(Queries.DD_ECM.ThirdPartyModules.GdPictureLicense)
|
||||
@@ -57,10 +85,15 @@ Public Class frmDocSearchResult
|
||||
|
||||
Private Sub GridViewDoc_Search_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs) Handles GridViewDoc_Search.FocusedRowChanged
|
||||
If GridViewDoc_Search.RowCount > 0 Then
|
||||
GetDocID()
|
||||
Refresh_DocID()
|
||||
|
||||
DocumentViewer1.LoadFile(SelectedFULL_FILEPATH)
|
||||
LoadFile2Viewer()
|
||||
End If
|
||||
End Sub
|
||||
Sub LoadFile2Viewer()
|
||||
GetDocID()
|
||||
Refresh_DocID()
|
||||
If SplitContainerControl1.Collapsed = False Then
|
||||
Dim OFilePath = ClassHelper.FORMAT_WM_PATH(SelectedFULL_FILEPATH)
|
||||
DocumentViewer1.LoadFile(OFilePath)
|
||||
End If
|
||||
End Sub
|
||||
Sub Refresh_DocID()
|
||||
@@ -156,38 +189,54 @@ Public Class frmDocSearchResult
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim frm As New frmDoc_Links
|
||||
frm.Show()
|
||||
frm.BringToFront()
|
||||
Try
|
||||
For Each row In GridViewDoc_Search.GetSelectedRows
|
||||
Dim SELECTED_DOC_ID = GridViewDoc_Search.GetRowCellValue(row, "DocID")
|
||||
If IsNothing(SELECTED_DOC_ID) Then
|
||||
MsgBox("Could not Get a selected DocID!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
CURRENT_DOC_ID = SELECTED_DOC_ID
|
||||
Dim frm As New frmDoc_Links
|
||||
frm.Show()
|
||||
frm.BringToFront()
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Showing DocLinks: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Showing DocLinks: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub docCM_PropertiesFile_Click(sender As Object, e As EventArgs) Handles docCM_PropertiesFile.Click
|
||||
'Show_File_Properties()
|
||||
Show_File_Properties()
|
||||
End Sub
|
||||
'Sub Show_File_Properties()
|
||||
' If IsNothing(SelectedFULL_FILEPATH) Then
|
||||
' MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' If SelectedFULL_FILEPATH <> "" Then
|
||||
' Cursor = Cursors.WaitCursor
|
||||
' Dim sei As New SHELLEXECUTEINFO
|
||||
' sei.cbSize = Marshal.SizeOf(sei)
|
||||
' sei.lpVerb = "properties"
|
||||
' sei.lpFile = SelectedFULL_FILEPATH
|
||||
' sei.nShow = SW_SHOW
|
||||
' sei.fMask = SEE_MASK_INVOKEIDLIST
|
||||
' If Not ShellExecuteEx(sei) Then
|
||||
' Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
|
||||
' ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Open file properties:", ex.Message)
|
||||
' End If
|
||||
' End If
|
||||
' Cursor = Cursors.Default
|
||||
Sub Show_File_Properties()
|
||||
Try
|
||||
For Each row In GridViewDoc_Search.GetSelectedRows
|
||||
Dim SELECTED_DOC_PATH = _Helper.FORMAT_WM_PATH(GridViewDoc_Search.GetRowCellValue(row, "FULL_FILENAME"))
|
||||
Dim SELECTED_DOC_ID = GridViewDoc_Search.GetRowCellValue(row, "DocID")
|
||||
|
||||
'End Sub
|
||||
Cursor = Cursors.WaitCursor
|
||||
Dim sei As New SHELLEXECUTEINFO
|
||||
sei.cbSize = Marshal.SizeOf(sei)
|
||||
sei.lpVerb = "properties"
|
||||
sei.lpFile = SELECTED_DOC_PATH
|
||||
sei.nShow = SW_SHOW
|
||||
sei.fMask = SEE_MASK_INVOKEIDLIST
|
||||
If Not ShellExecuteEx(sei) Then
|
||||
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Open file propertys:", ex.Message)
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub Save_DocGrid_Layout()
|
||||
@@ -285,5 +334,8 @@ Public Class frmDocSearchResult
|
||||
|
||||
Private Sub bchlitmPreview_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bchlitmPreview.CheckedChanged
|
||||
SplitContainerControl1.Collapsed = Not bchlitmPreview.Checked
|
||||
If SplitContainerControl1.Collapsed = False Then
|
||||
LoadFile2Viewer()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user