Exemplo n.º 1
0
        public static void StartProgram()
        {
            var success = MutexRunner.MutexRun(RunUI);

            if (!success)
            {
                MutexRunner.NotifyRunningInstance();
            }
        }
Exemplo n.º 2
0
        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;
            }
        }