private void ab_add_Click(object sender, EventArgs e) { if (websiteAddress_txtBox.Text != null && username_txtBox.Text != null && password_pswdBox.Password != null) { websites temp = new websites(); temp.webAddress = websiteAddress_txtBox.Text; temp.emailAddress = emailAddress_txtBox.Text; temp.username = username_txtBox.Text; //temp.password = password_pswdBox.Password; temp.addPassword(password_pswdBox.Password); temp.secQuestion = secQuestion_txtBox.Text; //temp.secAnswer = secAnswer_txtBox.Text; temp.addSecAnswer(secAnswer_txtBox.Text); webcollection.Add(temp); weblist.ItemsSource = webcollection; tb_clear(); } else { MessageBox.Show("Please Enter Required Values", "Error", MessageBoxButton.OK); } }
public website() { InitializeComponent(); weblist.ItemsSource = webcollection; websites t1 = new websites(); t1.webAddress = "gsarena.com"; t1.username = "******"; t1.addPassword("wetgdfre"); t1.secQuestion = "What is Williams GPE?"; t1.addSecAnswer("F1 Racing Team"); webcollection.Add(t1); }