public static void StartProgram() { var success = MutexRunner.MutexRun(RunUI); if (!success) { MutexRunner.NotifyRunningInstance(); } }
public static void Main(string[] args) { switch (args.FirstOrDefault()) { case "-i": new ProjectInstaller().Install(); return; case "-u": MutexRunner.CloseRunningInstance(); new ProjectInstaller().Uninstall(); return; case "--reinit": ServiceThread.NotifyRestartWorker(); return; default: StartProgram(); return; } }