File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ Class Application
11
11
12
12
Private Async Sub Application_Startup(sender As Object , e As StartupEventArgs)
13
13
14
- If Not mutex.WaitOne( 0 , False ) Then
14
+ SettingsHandler.InitialiseSettings()
15
+
16
+
17
+ If Not SettingsHandler.AppSettings.AllowMultiInstance AndAlso Not mutex.WaitOne( 0 , False ) Then
15
18
16
19
If e.Args.Length <> 0 AndAlso e.Args( 0 ) = "-tray" Then
17
20
MessageBox.Show( "An instance of CompactGUI is already running" )
@@ -27,7 +30,7 @@ Class Application
27
30
End Using
28
31
29
32
Application.Current.Shutdown()
30
- Else
33
+ ElseIf Not SettingsHandler.AppSettings.AllowMultiInstance Then
31
34
32
35
ProcessNextInstanceMessage()
33
36
End If
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ Public Class Settings : Inherits ObservableObject
105
105
Public Property WindowWidth As Decimal = 500
106
106
Public Property WindowHeight As Decimal = 800
107
107
108
+ Public Property AllowMultiInstance As Boolean = False
109
+
108
110
'TODO: Add local saving of per-folder skip list
109
111
Public Sub Save()
110
112
SettingsHandler.WriteToFile()
You can’t perform that action at this time.
0 commit comments