Beispiel #1
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (fr1 != null)
            {
                if (fr1.adi == null || fr1.soyadi == null || fr1.numarasi == null)
                {
                    DevExpress.XtraEditors.XtraMessageBox.Show("Lütfen Alanlarınzı Boş Geçmeyiniz", "DİKKAT", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    baglantim.Open();

                    SqlCommand command = new SqlCommand("insert into tbl_ogrenciler(AD,SOYAD,NUMARA,KULUP,ORTALAMA,FOTOGRAF)values(@p1,@p2,@p3,@p4,@p5,@p6)", baglantim);
                    command.Parameters.AddWithValue("@p1", fr1.adi);
                    command.Parameters.AddWithValue("@p2", fr1.soyadi);
                    command.Parameters.AddWithValue("@p3", fr1.numarasi);
                    command.Parameters.AddWithValue("@p4", fr1.kulup);
                    command.Parameters.AddWithValue("@p5", fr1.gelenortalama);
                    command.Parameters.AddWithValue("@p6", fr1.yol);
                    command.ExecuteNonQuery();
                    baglantim.Close();
                    System.Windows.Forms.ProgressBar yukle = new System.Windows.Forms.ProgressBar();
                    yukle.Show();

                    fr1.Listele();
                }
            }
        }
Beispiel #2
0
        private void BatchSaveForUnitTests()
        {
            var path = @"d:\Programs\Benchmarks\Fraps\Screenshots";

            var pb = new ProgressBar();
            pb.Maximum = 18;
            pb.Dock = DockStyle.Bottom;
            Controls.Add(pb);
            pb.Show();

            foreach (var file in Directory.GetFiles(path, "*.png"))
            {
                var bmp = Bitmap.FromFile(file) as Bitmap;
                var result = Screenshot.GetTooltip(bmp, false);
                if (result == null)
                {
                    Debugger.Break();
                    return;
                }

                var tt = new D3Bit.Tooltip(result);
                var r = new Results(tt);

                pbItem.Image = tt.Processed;

                SaveForUnitTests(r, result, bmp.Size);
                pb.Increment(1);
                Trace.TraceInformation("Saved " + r.Name);
                bmp.Dispose();
            }
            pb.Hide();
            MessageBox.Show("Done!");
        }
Beispiel #3
0
 // this eventhandler will show the progress of reading each page.
 private void _engine_PageProgress(object sender, OcrPageProgressEventArgs e)
 {
     progressBar1.Show();
     progressBar1.Value = e.Progress;
 }