コード例 #1
0
        /// <summary>
        /// Loads the embedded error file.
        /// </summary>
        /// <returns> The error file as single string or null. </returns>
        internal static string?LoadErrorMapping()
        {
            var currentAssembly  = DemoAgLinkPlcEmbeddedRequirementsHelper.CurrentAssembly;
            var resourceNames    = DemoAgLinkPlcEmbeddedRequirementsHelper.ResourceNames;
            var errorFileName    = "AGLink40_Error.txt";
            var resourceName     = resourceNames.FirstOrDefault(name => name.ToLower().Contains(errorFileName.ToLower()));
            var errorFileContent = AgLinkPlcEmbeddedRequirementsHelper.LoadInternalResourceAsString(resourceName, currentAssembly);

            return(errorFileContent);
        }
コード例 #2
0
        /// <summary>
        /// Loads the embedded license key.
        /// </summary>
        /// <returns> The license key or null. </returns>
        internal static string?LoadLicenseKey()
        {
            var currentAssembly = DemoAgLinkPlcEmbeddedRequirementsHelper.CurrentAssembly;
            var resourceNames   = DemoAgLinkPlcEmbeddedRequirementsHelper.ResourceNames;
            var licenseFileName = "AGLink.license";
            var resourceName    = resourceNames.FirstOrDefault(name => name.ToLower().Contains(licenseFileName.ToLower()));
            var licenseKey      = AgLinkPlcEmbeddedRequirementsHelper.LoadInternalResourceAsString(resourceName, currentAssembly);

            return(licenseKey);
        }