static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { using (var mutex = new WurmAssistantGateway()) { mutex.Enter(1000); Application.Run(new FormLauncher()); } } catch (GatewayClosedException) { MessageBox.Show("Wurm Assistant is already running! Please close before starting this launcher.", "Wurm Assistant", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { using (var mutex = new WurmAssistantGateway()) { mutex.Enter(1000); Application.Run(new WurmAssistant()); } } catch (GatewayClosedException) { MessageBox.Show("Wurm Assistant is already running!", "Wurm Assistant", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }