Files
PowerToys/src/modules/poweraccent/PowerAccent.UI/App.xaml.cs
Jaime Bernardo 9b3e8503a8 [QuickAccent] Rename PowerAccent to Quick Accent (#20176)
* Rename PowerAccent to Keyboard Accent

* Fix bug report and translation issue templates

* Rename to Quick Accent

* missing mention
2022-08-31 19:05:54 +01:00

34 lines
862 B
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading;
using System.Windows;
namespace PowerAccent.UI
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private static Mutex _mutex;
protected override void OnStartup(StartupEventArgs e)
{
const string appName = "QuickAccent";
bool createdNew;
_mutex = new Mutex(true, appName, out createdNew);
if (!createdNew)
{
// app is already running! Exiting the application
Application.Current.Shutdown();
}
base.OnStartup(e);
}
}
}