Example #1
0
        private void FrmLicense_Load(object sender, EventArgs e)
        {
            // getUniqueIDC("C");
            TxGet.Text = getUniqueIDC("C");

            getUniqueID("C");
            td.Text = getUniqueID("C");
            if (Settings.Default.IsLicensed == true)
            {
                Setting_Calaculate();
                if (TResult == Convert.ToDouble(Classes.ClsEncryption.Decrypt(Settings.Default.KT.ToString())))
                {
                    if (td.Text != Classes.ClsEncryption.Decrypt(Settings.Default.GI))
                    {
                        Application.Exit();
                    }
                    timer1.Enabled = false;
                    PL.Main.FrmMain fm = new PL.Main.FrmMain();
                    this.Hide();
                    fm.ShowDialog();
                    Close();
                }
                else
                {
                    Application.Exit();
                }
            }
        }
Example #2
0
 private void BuTrial_Click(object sender, EventArgs e)
 {
     if (Settings.Default.Trial.Add(new TimeSpan(30, 0, 0, 0)) > DateTime.Now)
     {
         Settings.Default.IsTrial = true;
         Settings.Default.Save();
         PL.Main.FrmMain fm = new PL.Main.FrmMain();
         this.Hide();
         fm.ShowDialog();
         this.Close();
     }
     else
     {
         timer1.Enabled = false;
         Application.Exit();
     }
 }
Example #3
0
        private void BuLogin_Click(object sender, EventArgs e)
        {
            if (TxSerial.Text == string.Empty || TxSerial1.Text == string.Empty || TxSerial2.Text == string.Empty ||
                TxSerial3.Text == string.Empty)
            {
                MessageBox.Show("عذرا اكتب السيريل أولا", "البرنامج", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            Calaculate();

            if (Result == Convert.ToDouble(Classes.ClsEncryption.Decrypt(Settings.Default.KT.ToString())))
            {
                getUniqueID("C");
                td.Text = getUniqueID("C");

                if (td.Text != Classes.ClsEncryption.Decrypt(Settings.Default.GI))
                {
                    MessageBox.Show("غير مرخص لك إستخدام البرنامج", "البرنامج", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Application.Exit();
                }
                else
                {
                    Settings.Default.M  = TxSerial.Text;
                    Settings.Default.M1 = TxSerial1.Text;
                    Settings.Default.M2 = TxSerial2.Text;
                    Settings.Default.M3 = TxSerial3.Text;
                    MessageBox.Show("تم التسجيل بنجاح", "البرنامج", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Settings.Default.IsLicensed = true;
                    Settings.Default.Save();
                    PL.Main.FrmMain fm = new PL.Main.FrmMain();
                    this.Hide();
                    fm.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("رقم السيريل المدخل غير صحيح", "البرنامج", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }