Widow

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ HEAD  →  ?path2? @ 1
/trunk/Widow/Program.cs/Program.cs
@@ -1,5 +1,4 @@
using System;
using System.Threading;
using System.Windows.Forms;
 
namespace Widow
@@ -8,8 +7,6 @@
{
#region Static Fields and Constants
 
private static readonly Mutex Mutex = new Mutex(true, Constants.AssemblyGuid);
 
private static Form _form;
 
#endregion
@@ -32,22 +29,10 @@
[STAThread]
private static void Main()
{
if (Mutex.WaitOne(TimeSpan.Zero, true))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
_form = new MainForm();
Application.Run();
Mutex.ReleaseMutex();
return;
}
 
// Foreground current other application window.
Natives.PostMessage(
(IntPtr) Natives.HWND_BROADCAST,
Natives.WM_SHOWME,
IntPtr.Zero,
IntPtr.Zero);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
_form = new Form1();
Application.Run();
}
 
#endregion