Beispiel #1
0
 private void btn_Analiz_Click(object sender, EventArgs e)
 {
     VeriTabani.KitapDuzenle(control);
     frm_Analiz = new frm_Analiz();
     this.Hide();
     frm_Analiz.Show();
 }
Beispiel #2
0
 private void btn_Search_Click(object sender, EventArgs e)
 {
     try
     {
         if (cmb_kitaplar.Text.Equals(null) || cmb_kitaplar.Text.Equals(""))
         {
             MessageBox.Show("lütfen aramak istediğiniz bilgiyi doldurunuz ☻");
         }
         else
         {
             add = new Add();
             VeriTabani.KitapDuzenle(cmb_kitaplar.Text);
             add.ekle = false;
             add.Show();
             this.Hide();
             GC.Collect();
             GC.Collect(2, GCCollectionMode.Optimized);
             GC.SuppressFinalize(this);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("lütfen aramak istediğiniz bilgiyi doldurunuz ☻");
     }
 }
Beispiel #3
0
 private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
 {
     boxs = sender as PictureBox;
     add  = new Add();
     VeriTabani.KitapDuzenle(VeriTabani.istenilen[0]);
     add.ekle = false;
     this.Hide();
     add.Show();
     GC.Collect();
     GC.Collect(2, GCCollectionMode.Optimized);
     GC.SuppressFinalize(this);
 }
Beispiel #4
0
 private void btn_ekle_Click(object sender, EventArgs e)
 {
     if (txt_basimyili.Text.Equals("") || txt_kitapadi.Text.Equals("") || cmbKitapTuru.Text.Equals("") || txt_resimYolu.Text.Equals("") || txt_sayfa.Text.Equals("") || txt_Yayinevi.Text.Equals("") || txt_Yazar.Text.Equals(""))
     {
         MessageBox.Show("lütfen boş bırakmayınız ☻");
     }
     else
     {
         VeriTabani.KitapEkle(txt_kitapadi.Text, txt_Yazar.Text, txt_basimyili.Text, txt_Yayinevi.Text, cmbKitapTuru.Text, txt_sayfa.Text, txt_resimYolu.Text, txt_Ozet.Text);
         pnl_Uyarı.Visible = true;
     }
 }
Beispiel #5
0
 private void btn_Sil_Click(object sender, EventArgs e)
 {
     try
     {
         VeriTabani.Sil("");
         pnl_Uyarı.Visible = true;
     }
     catch (Exception)
     {
         MessageBox.Show("Silme işleminde Hatanız var lütfen yeniden başlatın ☻");
     }
 }
Beispiel #6
0
        public Form1()
        {
            i = 0;
            InitializeComponent();

            VeriTabani.KitapSayisi();
            veri = new string[VeriTabani.veri.Length];
            while (i < VeriTabani.veri.Length)
            {
                veri[i] = VeriTabani.veri[i];
                i++;
            }

            pnl = new Panel[veri.Length / 8];
            lb  = new Label[pnl.Length * 6];
            box = new PictureBox[pnl.Length];
            Doldur();
            VeriTabani.GununSozu();
            GC.Collect();
            GC.Collect(2, GCCollectionMode.Optimized);
            GC.SuppressFinalize(this);
        }
Beispiel #7
0
        public void Doldur()
        {
            i = 0;
            k = -1;
            while (i < pnl.Length)
            {
                cmb_kitaplar.Visible = true;
                btn_Search.Visible   = true;
                btn_Analiz.Visible   = true;
                k++;
                p++;
                pnl[p]           = new Panel();
                pnl[p].Name      = veri[k];
                pnl[p].Size      = new Size(325, 200);
                pnl[p].BackColor = Color.Orange;

                l++;
                lb[l]          = new Label();
                control        = veri[k];
                lb[l].Text     = $"Kitap:{veri[k]}";
                lb[l].Location = new Point(152, 17);
                pnl[p].Controls.Add(lb[l]);
                cmb_kitaplar.Items.Add(veri[k]);


                l++;
                k++;
                lb[l]          = new Label();
                lb[l].Text     = $"Yazar:{veri[k]}";
                lb[l].Location = new Point(152, 47);
                pnl[p].Controls.Add(lb[l]);

                l++;
                k++;
                lb[l]          = new Label();
                lb[l].Text     = $"Basım Yılı:{veri[k]}";
                lb[l].Location = new Point(152, 77);
                pnl[p].Controls.Add(lb[l]);

                l++;
                k++;
                lb[l]          = new Label();
                lb[l].Text     = $"Yayın:{veri[k]}";
                lb[l].Location = new Point(152, 107);
                pnl[p].Controls.Add(lb[l]);

                l++;
                k++;
                lb[l]          = new Label();
                lb[l].Text     = $"Türü:{veri[k]}";
                lb[l].Location = new Point(152, 167);
                pnl[p].Controls.Add(lb[l]);

                l++;
                k++;
                lb[l]          = new Label();
                lb[l].Text     = $"Sayfa:{veri[k]}";
                lb[l].Location = new Point(152, 137);
                pnl[p].Controls.Add(lb[l]);
                b++;
                k++;
                try
                {
                    box[b]            = new PictureBox();
                    box[b].Name       = pnl[p].Name;
                    box[b].MouseDown += Form1_MouseDown;
                    box[b].Size       = new Size(140, 196);
                    box[b].Location   = new Point(0, 2);
                    box[b].SizeMode   = PictureBoxSizeMode.StretchImage;
                    box[b].Image      = Image.FromFile(veri[k]);
                    pnl[p].Controls.Add(box[b]);
                    kitapliste.Controls.Add(pnl[p]);
                }
                catch (Exception)
                {
                    lbl_Sonuc.Text    = "Sistem güncellenmesinden dolayı lütfen yeniden başlatınız!";
                    btn_no.Visible    = false;
                    btn_Yes.Text      = "Tamam";
                    btn_Yes.Location  = new Point(175, 133);
                    pnl_Uyarı.Visible = true;
                    VeriTabani.Sil(control);
                }

                i++;
            }
        }