Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vborovikov/only
Enables a WPF app to run as a single instance
https://github.com/vborovikov/only
desktop wpf wpf-application
Last synced: 3 days ago
JSON representation
Enables a WPF app to run as a single instance
- Host: GitHub
- URL: https://github.com/vborovikov/only
- Owner: vborovikov
- License: mit
- Created: 2016-12-11T16:28:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T01:24:29.000Z (about 2 months ago)
- Last Synced: 2024-11-05T18:55:30.771Z (10 days ago)
- Topics: desktop, wpf, wpf-application
- Language: C#
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Only
This library enables a WPF app to run as a single instance.[![Downloads](https://img.shields.io/nuget/dt/Only.svg)](https://www.nuget.org/packages/Only)
[![NuGet](https://img.shields.io/nuget/v/Only.svg)](https://www.nuget.org/packages/Only)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/vborovikov/only/blob/master/LICENSE)# Usage
Get the `Only` package from NuGet and update your `App.xaml` file as follows:
```xml...
```
Then modify `App.xaml.cs` to call `Only.InstanceAwareApp.RunSingle()` method:
```cs
public partial class App
{
public new int Run()
{
return RunSingle();
}
}
```That's it!