Questor.frmMain.SetExitWhenIdle C# (CSharp) Méthode

SetExitWhenIdle() private méthode

private SetExitWhenIdle ( string args ) : int
args string
Résultat int
        private int SetExitWhenIdle(string[] args)
        {
            bool value;
            if (args.Length != 2 || !bool.TryParse(args[1], out value))
            {
                Logging.Log("SetExitWhenIdle true|false");
                Logging.Log("Note: AutoStart is automatically turned off when ExitWhenIdle is turned on");
                return -1;
            }

            _questor.ExitWhenIdle = value;

            Logging.Log("ExitWhenIdle is turned " + (value ? "[on]" : "[off]"));

            if (value && _questor.AutoStart)
            {
                _questor.AutoStart = false;
                Logging.Log("AutoStart is turned [off]");
            }

            return 0;
        }