mirror of
https://github.com/microsoft/PowerToys
synced 2024-11-22 08:11:25 +00:00
29 lines
690 B
C#
29 lines
690 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Windows;
|
|
|
|
namespace WinAlfred
|
|
{
|
|
/// <summary>
|
|
/// App.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class App : Application
|
|
{
|
|
protected override void OnStartup(StartupEventArgs e)
|
|
{
|
|
base.OnStartup(e);
|
|
bool startupFlag;
|
|
Mutex mutex = new Mutex(true, "WinAlfred", out startupFlag);
|
|
if (!startupFlag)
|
|
{
|
|
Environment.Exit(0);
|
|
}
|
|
else
|
|
{
|
|
MainWindow mainWindow = new MainWindow();
|
|
mainWindow.Show();
|
|
}
|
|
}
|
|
}
|
|
}
|