using System;
using System.Windows.Forms;
namespace KeyAuthApp
{
public partial class Form1 : Form
{
private string correctKey = "buraya-keyinizi-girin"; // Doğru key'i buraya ekleyin
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string enteredKey = textbox1.Text;
if (enteredKey == correctKey)
{
// Eğer key doğruysa Form1'i kapat ve Form2'yi aç
this.Hide();
Form2 form2 = new Form2();
form2.ShowDialog();
this.Close();
}
else
{
// Eğer key yanlışsa kullanıcıyı uyar
MessageBox.Show("Hatalı key! Lütfen doğru key'i girin.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
using System;
using System.Windows.Forms;
namespace KeyAuthApp
{
public partial class Form1 : Form
{
private string correctKey = "buraya-keyinizi-girin"; // Doğru key'i buraya ekleyin
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string enteredKey = textbox1.Text;
if (enteredKey == correctKey)
{
// Eğer key doğruysa Form1'i kapat ve Form2'yi aç
this.Hide();
Form2 form2 = new Form2();
form2.ShowDialog();
this.Close();
}
else
{
// Eğer key yanlışsa kullanıcıyı uyar
MessageBox.Show("Hatalı key! Lütfen doğru key'i girin.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}