private void BtnPrijaviSe_Click(object sender, RoutedEventArgs e) { Radnik r = new Radnik(); string pravac; pravac = "IN"; r.Username = tbKorisnickoIme.Text; r.Password = tbLozinka.Text; r = k.prijava(r); //r = Broker.dajSesiju().prijava(r); if (r == null) { MessageBox.Show("Pogresno korisnicko ili lozinka!"); tbKorisnickoIme.Clear(); tbLozinka.Clear(); tbKorisnickoIme.Focus(); } else { SimulatorProlaska simulatorProlaska = new SimulatorProlaska(r, pravac, k); this.Hide(); simulatorProlaska.ShowDialog(); this.Close(); } tbKorisnickoIme.Clear(); tbLozinka.Clear(); }