Horizon – Blame information for rev 17
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
17 | office | 1 | using Serilog; |
2 | using System; |
||
1 | office | 3 | using System.IO; |
17 | office | 4 | using System.Reflection; |
1 | office | 5 | using System.Threading; |
6 | using System.Windows.Forms; |
||
7 | |||
8 | namespace Horizon |
||
9 | { |
||
10 | internal class Program |
||
11 | { |
||
12 | #region Static Fields and Constants |
||
13 | |||
14 | private static readonly Mutex Mutex = new Mutex(true, Constants.AssemblyGuid); |
||
15 | |||
16 | #endregion |
||
17 | |||
18 | #region Private Methods |
||
19 | |||
20 | /// <summary> |
||
21 | /// The main entry point for the application. |
||
22 | /// </summary> |
||
23 | [STAThread] |
||
24 | private static void Main() |
||
25 | { |
||
26 | Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory); |
||
27 | |||
28 | if (Mutex.WaitOne(TimeSpan.Zero, true)) |
||
29 | { |
||
30 | try |
||
31 | { |
||
32 | Application.EnableVisualStyles(); |
||
33 | Application.SetCompatibleTextRenderingDefault(false); |
||
34 | Application.Run(new MainForm(Mutex)); |
||
35 | } |
||
17 | office | 36 | catch(TargetInvocationException exception) |
37 | { |
||
38 | Log.Error(exception, "Error on startup."); |
||
39 | } |
||
1 | office | 40 | finally |
41 | { |
||
42 | Mutex.ReleaseMutex(); |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 | |||
47 | #endregion |
||
48 | } |
||
49 | } |