예제 #1
0
        public void CloseWindowsApplicationUsingMessages()
        {
            Unlocker.Allow = Unlocker.Result.Message;

            var process = CreateLock(tempFile, false);
            var wd = new WarmRemover();
            wd.Remove(tempFile);
            Assert.True(process.HasExited);
        }
예제 #2
0
파일: Program.cs 프로젝트: MCord/WarmDelete
        private static int Main(string[] args)
        {
            var options = new Options();
            if (!Parser.Default.ParseArguments(args, options))
            {
                return 1;
            }

            SetRights(options);
            SetTimeout(options);
            SetVerbosity(options);
            var wr = new WarmRemover
            {
                VerboseMode = options.Verbose
            };

            return wr.Remove(options.Target);
        }