Exemple #1
0
        static void Main()
        {
            //Properties.Settings.Default.Reset();
            Serial_id = HardwareInfo.GetHWID();
            Properties.Settings.Default.Serial_Id = Serial_id;
            Properties.Settings.Default.Save();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (Properties.Settings.Default.License != CryptoPack.SHA1_Salted(Serial_id + Properties.Settings.Default.Email))
            {
                Application.Run(new TrialMessage_and_Activation());
                if (goTrial && !time_is_over)
                {
                    Application.Run(new MainWindow());
                }
                else if (Properties.Settings.Default.License == CryptoPack.SHA1_Salted(Serial_id + Properties.Settings.Default.Email))
                {
                    Application.Run(new MainWindow());
                }
            }
            else
            {
                goTrial = false;
                Application.Run(new MainWindow());
            }
        }
Exemple #2
0
      private void button_Activate_Click(object sender, EventArgs e)
      {
          string license = CryptoPack.SHA1_Salted(textBox_Serial_Id.Text + textBox_Email.Text);

          if (textBox_Serial_Key.Text == license)
          {
              Program.goTrial      = false;
              Program.time_is_over = false;
              Properties.Settings.Default.License = license;
              Properties.Settings.Default.Email   = textBox_Email.Text;
              Properties.Settings.Default.Save();
              MessageBox.Show("Full Version is Activated!", "Thank you!", MessageBoxButtons.OK, MessageBoxIcon.Information);
              this.Close();
          }
          else
          {
              MessageBox.Show("Enter valid Serial Key!", "Oops!", MessageBoxButtons.OK, MessageBoxIcon.Information);
          }
      }