We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a8579 commit b1bb405Copy full SHA for b1bb405
1 file changed
CutCode.CrossPlatform/Program.cs
@@ -1,4 +1,5 @@
1
using System;
2
+using System.Diagnostics;
3
using Avalonia;
4
using Avalonia.Controls.ApplicationLifetimes;
5
using Avalonia.ReactiveUI;
@@ -12,9 +13,10 @@ class Program
12
13
[STAThread]
14
public static void Main(string[] args)
15
{
-
16
- BuildAvaloniaApp()
17
- .StartWithClassicDesktopLifetime(args);
+ var isRunningInAnotherInstance = Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Length > 1;
+ if(!isRunningInAnotherInstance)
18
+ BuildAvaloniaApp()
19
+ .StartWithClassicDesktopLifetime(args);
20
}
21
22
// Avalonia configuration, don't remove; also used by visual designer.
0 commit comments