-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (28 loc) · 799 Bytes
/
Copy pathProgram.cs
File metadata and controls
31 lines (28 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Windows;
namespace Dwalia;
internal class Program
{
[STAThread]
static void Main(string[] args)
{
using var mutex = new Mutex(true, "Dwalia_WindowManager_Mutex", out bool createdNew);
if (!createdNew)
{
if (args.Length > 0)
{
var command = string.Join(" ", args);
var result = Managers.IpcServer.SendCommandAndExit(command);
Console.WriteLine(result);
}
else
{
MessageBox.Show("Dwalia is already running.", "Dwalia",
MessageBoxButton.OK, MessageBoxImage.Information);
}
return;
}
var app = new App();
app.InitializeComponent();
app.Run();
}
}