private async void NewCikk_inp_TextChanged(object sender, TextChangedEventArgs e) { TextBox textbox = (TextBox)sender; int fisrtLength = textbox.Text.Length; await Task.Delay(250); if (fisrtLength == textbox.Text.Length) { if (!Cikk.IsExists(cikkszam_inp.Text)) { cikkszam2_check.Visibility = Visibility.Hidden; if (NewCikk_All_Filled()) { Save_Button.IsEnabled = true; } else { Save_Button.IsEnabled = false; } } else { Save_Button.IsEnabled = false; cikkszam2_check.Visibility = Visibility.Visible; } } }
private async void NewCharge_inp_TextChanged(object sender, TextChangedEventArgs e) { TextBox textbox = (TextBox)sender; int fisrtLength = textbox.Text.Length; await Task.Delay(250); if (fisrtLength == textbox.Text.Length) { if (Cikk.IsExists(cikk_inp.Text)) { cikkszam_check.Visibility = Visibility.Visible; if (charge_inp.Text.Length > 0 && beerk_inp.Text.Length > 0 && utolso_meres_inp.Text.Length > 0 && kw_inp.Text.Length > 0) { Save_Charge_Button.IsEnabled = true; } else { Save_Charge_Button.IsEnabled = false; } } else { cikkszam_check.Visibility = Visibility.Hidden; Save_Charge_Button.IsEnabled = false; } } }