コード例 #1
0
 private void btnOK_Click(object sender, System.EventArgs e)
 {
     try
     {
         string serial = this.txtSerial1.Text + this.txtSerial2.Text + this.txtSerial3.Text +
                         this.txtSerial4.Text + this.txtSerial5.Text;
         if (serial == RegistrationClass.GetEncryptedKeyFull())
         {
             int roomsCount = RegistrationClass.GetRoomsCount();
             RegistrationClass.StoreKeyToRegistry(serial);
             RegistrationClass.StoreKeyToRegistry("Vlera2", roomsCount.ToString().Length.ToString());
             MessageBox.Show("Rregjistrimi i programit u krye me sukses per " + roomsCount + " dhoma" +
                             Environment.NewLine + "Ju lutemi hapni dhe mbyllni programin perseri qe ndryshimet te "
                             + "te pasqyrohen ne program.", "Rregjistrimi", MessageBoxButtons.OK,
                             MessageBoxIcon.Information);
             this.Close();
         }
         else
         {
             MessageBox.Show("Numri serial qe ju futet nuk eshte i sakte. Ju lutemi provoni perseri ose merrni numrin serial nga VisionInfoSolution", "Rregjistrimi", MessageBoxButtons.OK,
                             MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         return;
     }
 }
コード例 #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            string serial = this.txtSerial1.Text + this.txtSerial2.Text + this.txtSerial3.Text + this.txtSerial4.Text;

            if (serial == RegistrationClass.GetEncryptedKeyFull())
            {
                RegistrationClass.StoreKeyToRegistry(serial);
                MessageBox.Show("Rregjistrimi i programit u krye me sukses", "Rregjistrimi i programit", MessageBoxButtons.OK, MessageBoxIcon.Information);
                regSakte = true;
            }
            else
            {
                MessageBox.Show("Numri qe vendoset nuk eshte i sakte. Ju lutemi kontaktoni me VisionInfoSolution!", "Rregjistrimi i programit", MessageBoxButtons.OK, MessageBoxIcon.Error);
                regSakte = false;
            }
            this.Close();
        }