static void Main() { SingleInstanceHelper = new SingleInstanceHelper(); //If not first instance if (!SingleInstanceHelper.Start(SingleInstanceHelper.SingleInstanceScope.CurrentUser)) { //Show first instance and return SingleInstanceHelper.ShowFirstInstance(); return; } if (UserHasCurrentVersion()) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainWindow()); } }
static void Main() { SingleInstanceHelper = new SingleInstanceHelper(); //If not first instance if (!SingleInstanceHelper.Start(SingleInstanceHelper.SingleInstanceScope.CurrentUser)) { //Show first instance and return SingleInstanceHelper.ShowFirstInstance(); return; } if (UserHasCurrentVersion()) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainWindow()); } }