Esempio n. 1
0
 private void Encrypt()
 {
     var frm = new Prijava();
     if (!string.IsNullOrEmpty(uporabnikTextBox.Text))
     {
         gesloTextBox.Text = frm.EncryptPassword(uporabnikTextBox.Text, gesloTextBox.Text);
     }
 }
Esempio n. 2
0
 public static void Reinit()
 {
     var frm = new Prijava();
     frm.ControlBox = false;
     frm.ShowInTaskbar = false;
     Application.Run(frm);
     if (frm.LogonSuccessfull)
     {
         Application.Run(new Main());
     }
     if (frm.Relogin)
     {
         Application.Run(frm);
     }
 }
Esempio n. 3
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     var frm = new Prijava();
     frm.ControlBox = false;
     frm.ShowInTaskbar = false;
     Application.Run(frm);
     if (frm.LogonSuccessfull)
     {
         Application.Run(new Main());
     }
     if (frm.Relogin)
     {
         Application.Run(frm);
     }
 }
Esempio n. 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     var frm = new Prijava();
     if (string.IsNullOrEmpty(uporabnikTextBox.Text) == false && string.IsNullOrEmpty(gesloTextBox.Text) == false)
     {
         VisliceDataSet.UporabnikiRow row = db.Uporabniki.NewUporabnikiRow();
         row.ID = Convert.ToInt64(iDTextBox.Text);
         row.Uporabnik = uporabnikTextBox.Text;
         row.Geslo = frm.EncryptPassword(uporabnikTextBox.Text, gesloTextBox.Text);
         row.DB = dBCheckBox.Checked;
         row.Uporabniki = uporabnikiCheckBox.Checked;
         db.Uporabniki.Rows.Add(row);
         this.Validate();
         this.tableAdapterManager.UpdateAll(db);
         this.Close();
     }
     else
     {
         MessageBox.Show("Prosim, da vnesete uporabnika in geslo");
     }
 }