コード例 #1
0
ファイル: ÖğrenciFormu.cs プロジェクト: egeerbilen/library
 private void button3_Click(object sender, EventArgs e)
 {
     for (int c = 0; c < 100; c++)
     {
         if (Kontrol != true)
         {
             if (textBox1.Text != "" && textBox2.Text != "")
             {
                 using (StreamReader Oku = new StreamReader(Okuma))
                 {
                     string Line = String.Empty;
                     while ((Line = Oku.ReadLine()) != null && i < 100)
                     {
                         Veriler[i] = Line;
                         i++;
                         if (GirişKontrol != true)
                         {
                             if (Veriler[0] == textBox1.Text && Veriler[1] == textBox2.Text)
                             {
                                 MessageBox.Show("Giriş başarılı");
                                 Kitapİçerik Kitap = new Kitapİçerik();
                                 Kitap.Show();
                                 this.Hide();
                                 GirişKontrol = true;
                                 Kontrol      = true;
                             }
                         }
                         if (i == 2)
                         {
                             i = 0;
                         }
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Girdiniz bilgileri kontrol ediniz", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 break;
             }
         }
     }
 }
コード例 #2
0
        private void btnKitapDetay_Click(object sender, EventArgs e)
        {
            Kitapİçerik deteaylıKitapBilgisi = new Kitapİçerik();

            deteaylıKitapBilgisi.Show();
        }