Exemple #1
0
        private void GenerateKeyExecuteCommand()
        {
            var serverCore    = new ServerCore();
            var modelKeyQuery = serverCore.GetLicenseKeyQueryModelByKeyQuery(KeyQuery);

            ComputerName = modelKeyQuery.ComputerName;
            ProductName  = modelKeyQuery.ProductName;
            ProcessorId  = modelKeyQuery.ProcessorId;
            SerialOs     = modelKeyQuery.SystemSerial;

            var key = serverCore.GenerateKeyByKeyQueryBase64Url(KeyQuery);

            Key = key;
        }
Exemple #2
0
        static void GeneratorLicese(string id)
        {
            if (Properties.Settings.Default.IsFullScreen)
            {
                Console.WindowWidth = 120;
            }

            Console.WriteLine("Sn:\n{0}", id);
            Console.WriteLine();

            var srvLic = new ServerCore();

            var    xml          = srvLic.GetKeyQueryAsXmlString(id);
            string formattedXml = XElement.Parse(xml).ToString();

            Console.WriteLine(formattedXml);
            Console.WriteLine();

            var key = srvLic.GenerateKeyByKeyQueryBase64Url(id);

            Console.WriteLine("Key:\n{0}", key);
            Console.ReadLine();
        }