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
1111
1212 Private Async Sub Application_Startup(sender As Object , e As StartupEventArgs)
1313
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
1518
1619 If e.Args.Length <> 0 AndAlso e.Args( 0 ) = "-tray" Then
1720 MessageBox.Show( "An instance of CompactGUI is already running" )
@@ -27,7 +30,7 @@ Class Application
2730 End Using
2831
2932 Application.Current.Shutdown()
30- Else
33+ ElseIf Not SettingsHandler.AppSettings.AllowMultiInstance Then
3134
3235 ProcessNextInstanceMessage()
3336 End If
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ Public Class Settings : Inherits ObservableObject
105105 Public Property WindowWidth As Decimal = 500
106106 Public Property WindowHeight As Decimal = 800
107107
108+ Public Property AllowMultiInstance As Boolean = False
109+
108110 'TODO: Add local saving of per-folder skip list
109111 Public Sub Save()
110112 SettingsHandler.WriteToFile()
You can’t perform that action at this time.
0 commit comments