Esempio n. 1
0
        private void Form1_Shown(object sender, EventArgs e)
        {
            Int32 len = Enigma_IDE.EP_ProtectedStringByKey("fyi6z02Y", null, 0);

            if (len > 0)
            {
                StringBuilder str = new StringBuilder(len);
                if (Enigma_IDE.EP_ProtectedStringByKey("fyi6z02Y", str, len) > 0)
                {
                    textBox1.Text = str.ToString();
                }
            }

            len = Enigma_IDE.EP_ProtectedStringByID(1, null, 0);
            if (len > 0)
            {
                StringBuilder str = new StringBuilder(len);
                if (Enigma_IDE.EP_ProtectedStringByID(1, str, len) > 0)
                {
                    textBox2.Text = str.ToString();
                }
            }

            len = Enigma_IDE.EP_ProtectedStringByKey("26Lu66Er", null, 0);
            if (len > 0)
            {
                StringBuilder str = new StringBuilder(len);
                if (Enigma_IDE.EP_ProtectedStringByKey("26Lu66Er", str, len) > 0)
                {
                    textBox3.Text = str.ToString();
                }
            }
        }
Esempio n. 2
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     if (Enigma_IDE.EP_RegCheckAndSaveKey(tbName.Text, tbKey.Text))
     {
         MessageBox.Show("New license is valid and installed!");
     }
     else
     {
         MessageBox.Show("License is invalid!");
     }
 }
Esempio n. 3
0
 private void btnRegister_Click(object sender, System.EventArgs e)
 {
     if (Enigma_IDE.EP_RegCheckAndSaveKey(tbUserInfo.Text, tbKey.Text))
     {
         MessageBox.Show("Registration key is valid!\nThanks you for registration!!!", "Registration completed");
     }
     else
     {
         MessageBox.Show("Registration key is invalid!\nPlease, try again!!!", "Registration incompleted");
     };
     ProcessRegistration();
 }
Esempio n. 4
0
 private void OnRegistration(bool registered)
 {
     if (registered)
     {
         string name, key;
         Enigma_IDE.EP_RegistrationLoadKeyA(out name, out key);
         lbRegName.Text = name;
     }
     else
     {
         lbRegName.Text = "UNREGISTERED";                 // Unregistered text
     }
 }
Esempio n. 5
0
 private DESEncrypt()
 {
     this.string_0 = "gowwwliz";
     this.string_1 = "www.geslock.com";
     this.encoding = new UnicodeEncoding();
     this.des_0    = new DESCryptoServiceProvider();
     #if !DEBUG
     if (!Enigma_IDE.EP_CheckupIsEnigmaOk() || !Enigma_IDE.EP_CheckupIsProtected())
     {
         this.des_0 = null;
     }
     #endif
 }
Esempio n. 6
0
 private void OnRegistration(bool registered)
 {
     if (registered)
     {
         string sName = "";                              // Create variable for registration name
         string sKey  = "";                              // Create variable for registration key
         Enigma_IDE.EP_RegLoadKeyW(ref sName, ref sKey); // Load registration information
         lbRegName.Text = sName;                         // Set control text to registred user information
     }
     else
     {
         lbRegName.Text = "UNREGISTERED";                 // Unregistered text
     }
 }
Esempio n. 7
0
        private void frmMain_Load(object sender, System.EventArgs e)
        {
            Int32 ExecsTotal = 0;
            Int32 ExecsLeft  = 0;
            Int32 DaysTotal  = 0;
            Int32 DaysLeft   = 0;
            Int32 ExpYear    = 0;
            Int32 ExpMonth   = 0;
            Int32 ExpDay     = 0;

            Enigma_IDE.EP_TrialExecutions(ref ExecsTotal, ref ExecsLeft);
            Enigma_IDE.EP_TrialDays(ref DaysTotal, ref DaysLeft);
            Enigma_IDE.EP_TrialExpirationDate(ref ExpYear, ref ExpMonth, ref ExpDay);

            lbExecsTotal.Text = string.Format("{0}", ExecsTotal);
            lbExecsLeft.Text  = string.Format("{0}", ExecsLeft);
            lbDaysTotal.Text  = string.Format("{0}", DaysTotal);
            lbDaysLeft.Text   = string.Format("{0}", DaysLeft);
            lbExpiration.Text = string.Format("{0}/{1}/{2}", ExpDay, ExpMonth, ExpYear);
        }
Esempio n. 8
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (Enigma_IDE.EP_RegLoadAndCheckKey())
     {
         int Total = 0;
         int Left  = 0;
         if (Enigma_IDE.EP_RegKeyRuntime(ref Total, ref Left))
         {
             ShowOurMessage(string.Format("Valid license, total runtime minute(s) {0}, left {1}", Total, Left));
         }
         else
         {
             ShowOurMessage("License is valid, but not runtime limited!");
         }
     }
     else
     {
         ShowOurMessage("License is invalid!");
     }
 }
Esempio n. 9
0
        private void timer1_Tick(object sender, System.EventArgs e)
        {
            Int32 MinTotal = 0;
            Int32 MinLeft  = 0;

            // Set system time
            tbSystemTime.Text = string.Format("{0:D2}:{1:D2}:{2:D2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
            // Incease local execution counter
            counter += 1000;
            // Set execution time
            tbExecutionTime.Text = string.Format("{0:D2}:{1:D2}:{2:D2}", counter / (60 * 60 * 1000) % 24, counter / (60 * 1000) % 60, counter / 1000 % 60);
            if (Enigma_IDE.EP_TrialExecutionTime(ref MinTotal, ref MinLeft))
            {
                tbStatus.Text = "OK";
                tbTotal.Text  = string.Format("{0}", MinTotal);
                tbLeft.Text   = string.Format("{0}", MinLeft);
            }
            else
            {
                tbStatus.Text = "UNUSED";
            }
        }
Esempio n. 10
0
        private void ProcessRegistration()
        {
            Int32 ExpYear  = 0;
            Int32 ExpMonth = 0;
            Int32 ExpDay   = 0;

            if (Enigma_IDE.EP_RegLoadAndCheckKey())
            {
                if (Enigma_IDE.EP_RegKeyExpirationDate(ref ExpYear, ref ExpMonth, ref ExpDay))
                {
                    tbStatus.Text = string.Format("REGISTERED. Expiration date: {0}/{1}/{2}", ExpDay, ExpMonth, ExpYear);
                }
                else
                {
                    tbStatus.Text = "REGISTERED. Key has not expiration!";
                }
            }
            else
            {
                tbStatus.Text = "APPLICATION IS UNREGISTERED";
            }
        }
Esempio n. 11
0
 private void frmMain_Load(object sender, System.EventArgs e)
 {
     tbHardware.Text = Enigma_IDE.EP_RegistrationHardwareID();
     OnRegistration(Enigma_IDE.EP_RegLoadAndCheckKey());
 }
Esempio n. 12
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     textBox1.Text = Enigma_IDE.EP_ProtectedStringByKeyAsAnsiString("fyi6z02Y");
     textBox2.Text = Enigma_IDE.EP_ProtectedStringByIDAsAnsiString(1);
     textBox3.Text = Enigma_IDE.EP_ProtectedStringByKeyAsAnsiString("26Lu66Er");
 }
Esempio n. 13
0
        private void button2_Click(object sender, EventArgs e)
        {
            Enigma_IDE.TKeyInformation ki = new Enigma_IDE.TKeyInformation();
            if (Enigma_IDE.EP_RegKeyInformation(tbName.Text, tbKey.Text, ref ki))
            {
                string res = string.Format("\rCreation date: {0}", (new DateTime(ki.CreationYear, ki.CreationMonth, ki.CreationDay)).ToLongDateString());
                if (ki.UseKeyExpiration)
                {
                    res += string.Format("\rExpiration date: {0}", (new DateTime(ki.ExpirationYear, ki.ExpirationMonth, ki.ExpirationDay)).ToLongDateString());
                }
                if (ki.UseHardwareLocking)
                {
                    res += "\rKey is Hardware Locked";
                }
                if (ki.UseExecutionsLimit)
                {
                    res += string.Format("\rExecutions number: {0}", ki.ExecutionsCount);
                }
                if (ki.UseDaysLimit)
                {
                    res += string.Format("\rDays number: {0}", ki.DaysCount);
                }
                if (ki.UseRunTimeLimit)
                {
                    res += string.Format("\rRun-time minutes: {0}", ki.RunTimeMinutes);
                }
                if (ki.UseGlobalTimeLimit)
                {
                    res += string.Format("\rGlobal time minutes: {0}", ki.GlobalTimeMinutes);
                }
                if (ki.UseCountyLimit)
                {
                    foreach (Enigma_IDE.TKeyCountries kc in Enigma_IDE.KEY_COUNTRIES)
                    {
                        if (kc.Code == ki.CountryCode)
                        {
                            res += string.Format("\rCountry lock: {0}", kc.Name);
                            break;
                        }
                    }
                }

                if (ki.UseRegisterAfter)
                {
                    res += string.Format("\rRegister After date: {0}", (new DateTime(ki.RegisterAfterYear, ki.RegisterAfterMonth, ki.RegisterAfterDay)).ToLongDateString());
                }
                if (ki.UseRegisterBefore)
                {
                    res += string.Format("\rRegister Before date: {0}", (new DateTime(ki.RegisterBeforeYear, ki.RegisterBeforeMonth, ki.RegisterBeforeDay)).ToLongDateString());
                }
                for (int i = 0; i < ki.EncryptedSections.Length; i++)
                {
                    if (ki.EncryptedSections[i])
                    {
                        res += string.Format("\rDecrypts section #{0}", i + 1);
                    }
                }
                MessageBox.Show("Registration Information is valid and contains the following information:" + res);
            }
            else
            {
                MessageBox.Show("Registration Information is invalid");
            }
        }