Exemplo n.º 1
0
 public static string statusBarInfo()
 {
     LoadGlobalSettings();
     if (isLicenseValid())
     {
         return("Licencja jest ważna do : " + CryptLib.getDateTo(gs.GetSettingValueOrDefault("LicenseKey", "")));
     }
     else
     {
         return("Licencja jest nieważna.");
     }
 }
Exemplo n.º 2
0
        public static bool isLicenseValid()
        {
            LoadGlobalSettings();
            String licenseKey = gs.GetSettingValueOrDefault("LicenseKey", "");
            bool   ret        = false;

            if (CryptLib.isKeyValid(licenseKey))
            {
                DateTime dateTo = Convert.ToDateTime(CryptLib.getDateTo(licenseKey));

                int compare = DateTime.Compare(DateTime.Now, dateTo);

                if (compare <= 0)
                {
                    ret = true;
                }
                //Console.WriteLine(compare);
            }

            return(ret);
        }
Exemplo n.º 3
0
 public static string getStartDateOfLicense()
 {
     LoadGlobalSettings();
     return(CryptLib.getDateFrom(gs.GetSettingValueOrDefault("LicenseKey", "")));
 }
Exemplo n.º 4
0
 public static int getNumberOfUsers()
 {
     LoadGlobalSettings();
     return(Int32.Parse(CryptLib.getNumOfUsers(gs.GetSettingValueOrDefault("LicenseKey", ""))));
 }