mirror of
https://github.com/kimmknight/remoteapptool.git
synced 2025-08-09 20:24:05 +00:00
Add Duplicate RemoteApp feature in File menu. Issue #52
This commit is contained in:
@@ -95,6 +95,8 @@ Public Class SystemRemoteApps
|
||||
|
||||
Dim AppKey As Microsoft.Win32.RegistryKey = BaseKey.OpenSubKey(Name)
|
||||
|
||||
If AppKey Is Nothing Then Return Nothing
|
||||
|
||||
App.Name = Name
|
||||
App.FullName = AppKey.GetValue("Name", "")
|
||||
App.Path = AppKey.GetValue("Path", "")
|
||||
@@ -153,6 +155,20 @@ Public Class SystemRemoteApps
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub DuplicateApp(Name As String)
|
||||
Dim NewApp = GetApp(Name)
|
||||
|
||||
Dim NewName = NewApp.Name
|
||||
|
||||
While GetApp(NewName) IsNot Nothing
|
||||
NewName = NewName & " copy"
|
||||
End While
|
||||
|
||||
NewApp.Name = NewName
|
||||
|
||||
SaveApp(NewApp)
|
||||
End Sub
|
||||
|
||||
Public Sub RenameApp(RemoteAppOldName As String, RemoteAppNewName As String)
|
||||
Dim App As New RemoteApp
|
||||
Dim SystemApps As New SystemRemoteApps
|
||||
|
Reference in New Issue
Block a user