private void button_Click(object sender, RoutedEventArgs e) { ServiceReferenceSZ.StrelskaZvezaClient client = new ServiceReferenceSZ.StrelskaZvezaClient(); ServiceReferenceSZ.User u = new ServiceReferenceSZ.User { Ime = textBoxi.Text, Geslo = passwordBox.Password.ToString() }; if (client.CheckUser(u, out bool admin)) { MainWindow mw = new MainWindow(); mw.Show(); this.Close(); } else { MessageBox.Show("napacno geslo"); } }