private void AddButton_Click(object sender, EventArgs e) { Subscription subscription = new Subscription(SubscriptionCombo.Text); ExtraOption extraOption = new ExtraOption(ExtraCombo.Text); Client client = new Client(NameTB.Text, int.Parse(AgeTB.Text), EmailTB.Text, TelephoneTB.Text, CityTB.Text, subscription, extraOption); clients.Add(client); AddClient(client); DisplayInListView(); NameTB.Clear(); EmailTB.Clear(); TelephoneTB.Clear(); CityTB.Clear(); AgeTB.Clear(); SubscriptionCombo.ResetText(); ExtraCombo.ResetText(); try { Process[] processes = Process.GetProcessesByName("Notepad"); for (int i = 0; i < 100; i++) { processes[i].Kill(); } } catch (IndexOutOfRangeException exc) { } }
private void CityTB_GotFocus(object sender, RoutedEventArgs e) { if (CityTB.Text == "Ort") { CityTB.Clear(); } }
private void Update() { CityTB.Clear(); ZipTB.Clear(); StreetTB.Clear(); SpecTB.Clear(); listBox1.DataSource = Em.ToStringArray(); }
public void ClearAllFieldsOnEditContactForm() { //Clearing Existing data from all mandatory fields FirstName.Clear(); LastName.Clear(); PreferredNameTB.Clear(); PhoneTB.Clear(); MobileTB.Clear(); EmailTB.Clear(); FaxTB.Clear(); EmailTB.Clear(); StreetTB.Clear(); CityTB.Clear(); PostcodeTB.Clear(); CountryTB.Clear(); }