QuickImage – Blame information for rev 5
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System; |
2 | using System.IO; |
||
3 | using System.Threading; |
||
4 | using System.Windows.Forms; |
||
5 | |||
6 | namespace QuickImage |
||
7 | { |
||
8 | internal static class Program |
||
9 | { |
||
10 | private static readonly Mutex Mutex = new Mutex(true, Constants.AssemblyGuid); |
||
11 | |||
12 | /// <summary> |
||
13 | /// The main entry point for the application. |
||
14 | /// </summary> |
||
15 | [STAThread] |
||
16 | private static void Main() |
||
17 | { |
||
18 | Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory); |
||
19 | // Set path to ffmpeg binaries for Magick.NET |
||
20 | Environment.SetEnvironmentVariable("PATH", |
||
21 | $"{Environment.GetEnvironmentVariable("PATH")};ffmpeg\\Windows\\x64"); |
||
22 | |||
23 | if (Mutex.WaitOne(TimeSpan.Zero, true)) |
||
24 | { |
||
25 | try |
||
26 | { |
||
27 | Application.EnableVisualStyles(); |
||
28 | Application.SetCompatibleTextRenderingDefault(false); |
||
5 | office | 29 | Application.Run(new QuickImage(Mutex)); |
1 | office | 30 | } |
31 | finally |
||
32 | { |
||
33 | Mutex.ReleaseMutex(); |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 | } |