mirror of
https://github.com/ShareX/ShareX.git
synced 2024-08-15 10:12:12 +12:00
There was a race condition in ApplicationInstanceManager. Now we use Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase to do instance management properly.
24 lines
569 B
C#
24 lines
569 B
C#
using Microsoft.VisualBasic.ApplicationServices;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ShareX
|
|
{
|
|
class ShareXApplicationBase : WindowsFormsApplicationBase
|
|
{
|
|
public ShareXApplicationBase(bool isSingleInstance)
|
|
{
|
|
IsSingleInstance = isSingleInstance;
|
|
EnableVisualStyles = true;
|
|
}
|
|
|
|
public new Form MainForm
|
|
{
|
|
get { return base.MainForm; }
|
|
set { base.MainForm = value; }
|
|
}
|
|
}
|
|
}
|