Пример #1
0
        public async void StartUpdateChecker(string tempUserName, string tempPassword)
        {
            if (_isChecking)
            {
                return;
            }
            _isChecking = true;

            Status = $"Validating application license for “{_cfg?.Username}” ...";
            if (await _validr.ValidateThisMachine())
            {
                Status           = "Machine validation successful.";
                _updatr.PingNode = _validr.PingNode;
                StartAuthenticatedUpdaterLoop();
            }
            else
            {
                Status = _cfg?.WasRejected ?? true
                    ? $"Server rejected the credentials for “{_cfg?.Username}”."
                    : $"{_cfg?.Username} is not licensed to use this app on this machine.";

                StartTemporarySessionUpdaterLoop(tempUserName, tempPassword);
            }
        }