Ejemplo n.º 1
0
        private async Task LoadUserInfo()
        {
            lblStatus.Text   = $"Login Status: {loginUser.AccessType}";
            lblFullName.Text = $" {loginUser?.FullName.ToUpper()}";
            if (await licenseData.HasExpired(ProductStatus, HasLicensedKey))
            {
                //Disable all controls
                btnAllUsers.Enabled       = false;
                btnAllFiles.Enabled       = false;
                btnBackup.Enabled         = false;
                btnLog.Enabled            = false;
                btnReceiveFile.Enabled    = false;
                btnRegDepartment.Enabled  = false;
                btnRegUsers.Enabled       = false;
                btnRegInfo.Enabled        = false;
                btnSendMail.Enabled       = false;
                lblChangePassword.Enabled = false;
                lblExpiry.ForeColor       = Color.Red;
            }

            if (loginUser.AccessType.ToLower() != "administrator")
            {
                //Disable access to certain controls
                btnRegInfo.Enabled  = false;
                btnRegUsers.Enabled = false;
                btnAllUsers.Enabled = false;
                btnLog.Enabled      = false;
            }
        }
Ejemplo n.º 2
0
 private async Task InspectLicense()
 {
     if (await licenseData.HasExpired(ProductStatus, HasLicensedKey))
     {
         lblInsertLicense.Visible      = true;
         lblActivationStatus.ForeColor = Color.Red;
     }
 }