예제 #1
0
 public static void ReadActivationCode(StringBuilder code, short prodId)
 {
     //            if (RegUtil.LicenseProperties == null || RegUtil.LicenseProperties.UserInfo == null)
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         UnManagedNCLicense.ReadActivationCode(code, prodId);
     }
     else
     {
         RegUtil.LoadRegistry();
         NCCryptoCode.Decode(RegUtil.LicenseProperties.UserInfo.AuthCode, code);
     }
 }
예제 #2
0
 public static void ReadInstallCode(StringBuilder s, short productId)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         UnManagedNCLicense.ReadInstallCode(s, productId);
     }
     else
     {
         if (!string.IsNullOrEmpty(_installCode))
         {
             s.Append(_installCode);
             return;
         }
         RegUtil.LoadRegistry();
         var installCode = RegUtil.GetInstallCode();
         NCCryptoCode.Decode(installCode, s);
         _installCode = s.ToString();
     }
 }