Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Disallow multiple instances of MSIRGB GUI running at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
ixjf committed Jan 28, 2019
1 parent bdb2a89 commit 9f1f920
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion MSIRGB.GUI/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
using System.Windows;
using System;
using System.Threading;
using System.Windows;

namespace MSIRGB
{
public partial class App : Application
{
static Mutex mutex = new Mutex(true, @"Global\MSIRGB.GUI");

App() : base()
{
if (!mutex.WaitOne(TimeSpan.Zero))
{
Current.Shutdown();
}
}
}
}
6 changes: 3 additions & 3 deletions MSIRGB.ScriptService/LuaBindings/Aida64Module.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Management;
using MoonSharp.Interpreter;
using System.Linq;
using System;

namespace MSIRGB.ScriptService.LuaBindings
{
Expand Down

0 comments on commit 9f1f920

Please sign in to comment.