| 123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows;
- namespace DeviceCenter
- {
- /// <summary>
- /// App.xaml 的交互逻辑
- /// </summary>
- public partial class App : Application
- {
- System.Threading.Mutex mutex;
- public App()
- {
- this.Startup += new StartupEventHandler(App_Startup);
- }
- void App_Startup(object sender, StartupEventArgs e)
- {
- bool ret;
- mutex = new System.Threading.Mutex(true, "ElectronicNeedleTherapySystem", out ret);
- if (!ret)
- {
- Environment.Exit(0);
- }
- }
- }
- }
|