Exemplo n.º 1
0
 private void btnDongY_Click(object sender, RoutedEventArgs e)
 {
     if (cboLoaiBanQuyen.SelectedItem != null)
     {
         if (txtMatKhau.Password == "Vu@998877")
         {
             if (Utilities.SecurityKaraoke.CheckProductID(txtMaSanPham.Text, HashMD5))
             {
                 LicenseType license = cboLoaiBanQuyen.SelectedItem as LicenseType;
                 txtBanQuyen.Text = Utilities.SecurityKaraoke.GetKey(license.ID, txtMaSanPham.Text, HashMD5);
             }
             else
             {
                 MessageBox.Show("Mã sản phẩm không đúng không đúng");
             }
         }
         else
         {
             MessageBox.Show("Mật khẩu không đúng");
         }
     }
     else
     {
         MessageBox.Show("Chọn loại bản quyền");
     }
 }
Exemplo n.º 2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DateTime dt = new DateTime(2015, 01, 20);

            if (DateTime.Now.CompareTo(dt) >= 0)
            {
                Application.Current.Shutdown();
            }
            cboLoaiBanQuyen.ItemsSource = LicenseType.GetListSecurityType();
            if (cboLoaiBanQuyen.Items.Count > 0)
            {
                cboLoaiBanQuyen.SelectedIndex = 0;
            }
        }