예제 #1
0
 private void button_sec_Click(object sender, EventArgs e)
 {
     if (text_reply_sec.Text != "")
     {
         if (text_reply_sec.Text == reply)
         {
             new_password pass = new new_password();
             pass.ShowDialog();
             this.Close();
         }
         else
         {
             try
             {
                 baglan.Open();
                 // screenshot();
                 OleDbCommand gunce = new OleDbCommand("insert into gunce (olay,tarih,ekran_alıntısı) values(@olay,@tarih,@ekranalıntısı)", baglan);
                 gunce.Parameters.AddWithValue("@olay", "Güvenlik sorusu denemesi.");
                 gunce.Parameters.AddWithValue("@tarih", DateTime.Now.ToString());
                 gunce.Parameters.AddWithValue("@ekranalıntısı", base64);
                 gunce.ExecuteNonQuery();
                 baglan.Close();
                 //  MessageBox.Show("Veritabanı bağlantısı başarılı.", "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             catch (Exception hata)
             {
                 MessageBox.Show(hata.Message.ToString(), "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             MessageBox.Show("Cevap Yanlış.", "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
예제 #2
0
        private void button_mailcode_Click(object sender, EventArgs e)
        {
            if (text_mailcode.Text == sec_code.ToString())
            {
                linklabel_mail.Enabled       = false;
                timer_watch.Enabled          = false;
                label_wath.Text              = "";
                label_wath.ForeColor         = Color.Black;
                label_mail_newpass.Text      = "Yönlendiriliyorsunuz...";
                label_mail_newpass.ForeColor = Color.DodgerBlue;

                new_password pass = new new_password();
                pass.ShowDialog();
                this.Close();
            }
            else
            {
                try
                {
                    baglan.Open();
                    //screenshot();
                    OleDbCommand gunce = new OleDbCommand("insert into gunce (olay,tarih,ekran_alıntısı) values(@olay,@tarih,@ekranalıntısı)", baglan);
                    gunce.Parameters.AddWithValue("@olay", "E-posta kod denemesi.");
                    gunce.Parameters.AddWithValue("@tarih", DateTime.Now.ToString());
                    gunce.Parameters.AddWithValue("@ekranalıntısı", base64);
                    gunce.ExecuteNonQuery();
                    baglan.Close();
                    //  MessageBox.Show("Veritabanı bağlantısı başarılı.", "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception hata)
                {
                    MessageBox.Show(hata.Message.ToString(), "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                MessageBox.Show("Kod hatalı.", "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
예제 #3
0
        private void şifreDeğiştirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new_password pass = new new_password();

            pass.ShowDialog();
        }