protected override void OnStartup(StartupEventArgs e) { if (!GlobalMutex.TryGetMutex()) { Environment.Exit(0); } else { base.OnStartup(e); } }
protected override void OnStartup(StartupEventArgs e) { Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); if (!GlobalMutex.TryGetMutex()) { Environment.Exit(0); } else { base.OnStartup(e); } ServicePointManager.DefaultConnectionLimit = 25; }