mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08: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();
|
|
}
|
|
}
|
|
}
|
|
}
|