Final-Bomber  0.1
Bomberman/Dynablaster remake in C# using XNA.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
Program.cs
Go to the documentation of this file.
1 using System;
2 using System.Net.Mime;
3 using System.Threading;
4 using log4net;
5 using log4net.Config;
6 using System.Reflection;
7 
8 namespace FBClient
9 {
10 #if WINDOWS || XBOX
11  static class Program
12  {
13  // Log class
14  public static readonly ILog Log = LogManager.GetLogger(typeof(Program));
15 
19  static void Main(string[] args)
20  {
21  // For log
22  XmlConfigurator.Configure();
23 
24  Assembly asm = Assembly.GetExecutingAssembly();
25  using (var mutex = new Mutex(false, @"Global\" + asm.GetType().GUID))
26  {
27 
28 #if !DEBUG
29  if (!mutex.WaitOne(0, false))
30  {
31  Log.Error("Instance already running");
32  return;
33  }
34 
35  GC.Collect();
36 #endif
37 
38  using (var game = new FinalBomber())
39  {
40  game.Run();
41  }
42  }
43  }
44  }
45 #endif
46 }
47