Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox2.Text == "" && textBox1.Text == "")
     {
         label3.Text = "Kutuları doldurunuz!";
     }
     else
     {
         string text = File.ReadAllText(path + @"kullanicilar.dat");
         List <Kullanicilar> json = JsonConvert.DeserializeObject <List <Kullanicilar> >(text);
         bool giris = false;//eğerki aynı kullanıcı adı varsa iptal eder
         if (json != null)
         {
             foreach (Kullanicilar k in json)
             {
                 if (k.kullaniciAdi == textBox1.Text.ToLower() && k.sifre == sifreleme.sha256(textBox2.Text))
                 {
                     giris = true;
                     k1    = new Kullanicilar(k.kullaniciAdi, k.sifre, k.kurtarmaKey);
                     //anaEkran.k1 = k1;
                     break;
                 }
             }
         }
         if (!giris)
         {
             label3.Text = "Hatalı giriş!";
         }
         else
         {
             label3.Text = "Giriş başarılı!";
             context.girisBasarili(k1);
         }
     }
 }
 public kullaniciİslemleri(anaEkran form, Kullanicilar k)
 {
     InitializeComponent();
     FormBorderStyle = FormBorderStyle.None;
     TopLevel        = false;
     AutoScroll      = true;
     this.context    = form;
     this.k          = k;
 }
 public duzenle(anaEkran m, Kullanicilar k)
 {
     InitializeComponent();
     FormBorderStyle = FormBorderStyle.None;
     TopLevel        = false;
     AutoScroll      = true;
     this.context    = m;
     sif             = new sifreleme(k);
 }
 public void girisBasarili(Kullanicilar k1)
 {
     this.k = k1;
     me     = new menu(this);
     me.kullaniciAta(k1);
     ge.Close();
     panel1.Controls.Clear();
     panel1.Controls.Add(me);
     me.Show();
     //sif = new sifreleme(this,k);
 }
        public void CikisYap()
        {
            k = null;
            //sif = null;
            ge.Close();
            me.Close();
            //ol.Close();
            //du.Close();
            panel1.Controls.Clear();

            ge = new girisEkranı(this);
            panel1.Controls.Add(ge);
            ge.Show();
        }
 public sifreleme(Kullanicilar k)
 {
     //this.context = form;
     this.k = k;
     //rsa.ImportParameters(k.kurtarmaKey);
 }
Esempio n. 7
0
 public void kullaniciAta(Kullanicilar k)
 {
     this.k = k;
 }