public static void Main(string[] args) { //启动数据库 if (!ApplicationGlobal.EnsureApplicationSignal()) { System.Windows.MessageBox.Show("应用程序已经运行请不要重复运行"); System.Windows.Application.Current.Shutdown(0); return; } app = new App(); app.InitializeComponent(); app.Run(); }
private void App_Exit(object sender, ExitEventArgs e) { ApplicationGlobal.ReleaseApplicationSignal(); }