From 398b75c155e8eacc7ad861d071889457ec0ecb72 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Feb 2021 15:00:43 +0100 Subject: [PATCH] Common/DocumentPropertyMenu: Remove opening processes from menu --- .../DocumentPropertyMenu.vb | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb b/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb index 2c2965f9..67b75a67 100644 --- a/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb +++ b/GUIs.Common/DocumentPropertyMenu/DocumentPropertyMenu.vb @@ -102,22 +102,11 @@ Public Class DocumentPropertyMenu Exit Sub End If - Using oProc As New Process - Try - oProc.StartInfo.FileName = _FilePath - oProc.EnableRaisingEvents = True - AddHandler oProc.Exited, AddressOf Handle_OpenFile - - oProc.Start(_FilePath) - RaiseEvent FileOpened(Me, _FilePath) - Catch ex As Exception - _Logger.Error(ex) - End Try - End Using - End Sub - - Public Sub Handle_OpenFile(sender As Object, e As EventArgs) - RaiseEvent FileClosed(Me, _FilePath) + Try + RaiseEvent FileOpened(Me, _FilePath) + Catch ex As Exception + _Logger.Error(ex) + End Try End Sub Public Sub OpenFolder_Click(sender As Object, e As EventArgs)