OSDN Git Service

[Release] Ver.2.1.4
[dokopop/dokopop.git] / amodi / amodi / Program.cs
1 using System;
2 using System.Collections.Generic;
3 //using System.Linq;
4 using System.Windows.Forms;
5 using System.Threading;
6 using System.Reflection;
7
8 namespace amodi
9 {
10     static class Program
11     {
12         /// <summary>
13         /// アプリケーションのメイン エントリ ポイントです。
14         /// </summary>
15         [STAThread]
16         static void Main()
17         {
18                         Assembly asm = Assembly.GetEntryAssembly();
19                         string path = asm.Location;
20                         path = path.Replace('\\', '_');
21                         Mutex mutex = new Mutex(false, path);
22                         if (mutex.WaitOne(0, false) == false){
23                                 // すでに起動している
24                                 return;
25                         }
26
27             Application.EnableVisualStyles();
28             Application.SetCompatibleTextRenderingDefault(false);
29             Application.Run(new AutoMODIMainForm());
30
31                         mutex.ReleaseMutex();
32         }
33     }
34 }
35