Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

patr96

User
  • Registriert

  • Letzter Besuch

Alle Beiträge von patr96

  1. Hallo, Ich habe noch eine Aufgabe, die ich noch für die Schule erledigen muss. Ich habe drei von vier Aufgaben erledigt. Den letzte Aufgabe habe ich leider noch nie gemacht. Ich hoffe, dass da jemand mir helfen kann. 4. Aufgabe: Wenn dreimal hintereinander ein falscher Benutzername oder ein falsches Passwort eingegeben wird, wird die GUI unter 4. durch eine Bezeichnung "lbl_code" und ein Textfeld "txt_code" ergänzt. Es ist nicht mehr möglich, den Benutzernamen und das Passwort einzugeben. Nach Eingabe des Codes "0815" zeigt die GUI wieder den Grundzustand an und die fehlgeschlagenen Versuche werden gelöscht. Hier ist meine Programm. namespace Projektarbeit_Pförtneranlage { public partial class FormLogin : Form { static int attempt = 3; public FormLogin() { InitializeComponent(); } //Verbindungszeichenfolge string cs = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\patri\Downloads\LoginApplicationSourceCode\LoginApplicationSourceCode\LoginApplication\LoginApplication\MyDatabase.mdf;Integrated Security=True;Connect Timeout=30;"; private void button2_Click(object sender, EventArgs e) { string username = txt_name.Text; string password = txt_pwd.Text; if (txt_name.Text == "" || txt_pwd.Text == "") { attempt = 0; MessageBox.Show("Bitte geben Sie Benutzername und Passwort ein!"); return; } else if ((attempt == 3) && (attempt > 0)) { lbl_versuch.Text = ("Sie haben nur noch " + Convert.ToString(attempt) + " Versuche."); --attempt; } else if ((attempt == 2) && (attempt > 0)) { lbl_versuch.Text = ("Sie haben nur noch " + Convert.ToString(attempt) + " Versuche."); --attempt; } else if ((attempt == 1) && (attempt > 0)) { lbl_versuch.Text = ("Sie haben nur noch " + Convert.ToString(attempt) + " Versuch."); --attempt; } try { //Erstellen Sie SqlConnection SqlConnection con = new SqlConnection(cs); SqlCommand cmd = new SqlCommand("Select * from tbl_Login where UserName=@username and Password=@password", con); cmd.Parameters.AddWithValue("@username", txt_name.Text); cmd.Parameters.AddWithValue("@password", txt_pwd.Text); con.Open(); SqlDataAdapter adapt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapt.Fill(ds); con.Close(); int count = ds.Tables[0].Rows.Count; //Wenn count gleich 1 ist, wird die Form frmMain angezeigt if (count == 1) { MessageBox.Show("Anmeldung erfolgreich!"); this.Hide(); FormGUI fm = new FormGUI(); fm.Show(); } else { MessageBox.Show("Login Failed!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void button1_Click(object sender, EventArgs e) { this.Close(); } } }

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.