-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
36 lines (32 loc) · 1.04 KB
/
Copy pathProgram.cs
File metadata and controls
36 lines (32 loc) · 1.04 KB
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
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
namespace PA_Video_Encoder
{
static class Program
{
/// <summary>
/// Punto di ingresso principale dell'applicazione.
/// </summary>
///
private static string appGuid = "09de345e-3bd7-41da-a159-c5974c9a5591";
[STAThread]
static void Main()
{
using (Mutex mutex = new Mutex(false, "Global\\" + appGuid))
{
if (!mutex.WaitOne(0, false))
{
MessageBox.Show("Un'istanza dell'applicazione è già presente. Non è possibile avviarne un'altra.", "PA_Video_Encoder", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new PAVideoEncoder());
}
}
}
}