2 Commits

Author SHA1 Message Date
Jonathan Jenne
f3f6599fc0 Common: Version 1.7.0.0 2021-03-25 14:10:52 +01:00
Jonathan Jenne
5db5a508cb Common: Add Copy Folder Path to context menu 2021-03-25 14:10:25 +01:00
2 changed files with 15 additions and 7 deletions

View File

@@ -18,7 +18,8 @@ Public Class DocumentPropertyMenu
Public Const OPEN_FILE As String = "Datei öffnen"
Public Const OPEN_DIRECTORY As String = "Ordner öffnen"
Public Const COPY_PATH As String = "Dateipfad kopieren"
Public Const COPY_FILE_PATH As String = "Dateipfad kopieren"
Public Const COPY_FOLDER_PATH As String = "Ordnerpfad kopieren"
Public Const OPEN_PROPERTIES As String = "Eigenschaften"
Public Event FileOpened As EventHandler(Of String)
@@ -45,7 +46,8 @@ Public Class DocumentPropertyMenu
Public Function GetIDBMenuItems(AccessRight As AccessRight) As List(Of DXMenuItem)
Dim oOpenFile = New DXMenuItem(OPEN_FILE, AddressOf OpenFile_Click)
Dim oOpenFolder = New DXMenuItem(OPEN_DIRECTORY, AddressOf OpenFolder_Click)
Dim oCopyPath = New DXMenuItem(COPY_PATH, AddressOf CopyPath_Click)
Dim oCopyFilePath = New DXMenuItem(COPY_FILE_PATH, AddressOf CopyFilePath_Click)
Dim oCopyFolderPath = New DXMenuItem(COPY_FOLDER_PATH, AddressOf CopyFolderPath_Click)
Dim oProperties = New DXMenuItem(OPEN_PROPERTIES, AddressOf Properties_Click)
If AccessRight = AccessRight.VIEW_ONLY Then
@@ -56,7 +58,8 @@ Public Class DocumentPropertyMenu
Return New List(Of DXMenuItem) From {
oOpenFile,
oOpenFolder,
oCopyPath,
oCopyFilePath,
oCopyFolderPath,
oProperties
}
End If
@@ -65,7 +68,7 @@ Public Class DocumentPropertyMenu
Public Function GetLegacyMenuItems() As List(Of DXMenuItem)
Dim oOpenFile = New DXMenuItem(OPEN_FILE, AddressOf OpenFile_Click)
Dim oOpenFolder = New DXMenuItem(OPEN_DIRECTORY, AddressOf OpenFolder_Click)
Dim oCopyPath = New DXMenuItem(COPY_PATH, AddressOf CopyPath_Click)
Dim oCopyPath = New DXMenuItem(COPY_FILE_PATH, AddressOf CopyFilePath_Click)
Dim oProperties = New DXMenuItem(OPEN_PROPERTIES, AddressOf Properties_Click_Legacy)
Return New List(Of DXMenuItem) From {
@@ -93,10 +96,15 @@ Public Class DocumentPropertyMenu
_File.OpenFileProperties(_FilePath)
End Sub
Public Sub CopyPath_Click(sender As Object, e As EventArgs)
Public Sub CopyFilePath_Click(sender As Object, e As EventArgs)
Clipboard.SetText(_FilePath)
End Sub
Public Sub CopyFolderPath_Click(sender As Object, e As EventArgs)
Dim oFolderPath = IO.Path.GetDirectoryName(_FilePath)
Clipboard.SetText(oFolderPath)
End Sub
Public Sub OpenFile_Click(sender As Object, e As EventArgs)
If TestPathExists(OPEN_FILE) = False Then
Exit Sub

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.0.0")>
<Assembly: AssemblyFileVersion("1.6.0.0")>
<Assembly: AssemblyVersion("1.7.0.0")>
<Assembly: AssemblyFileVersion("1.7.0.0")>