Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. TreeView t = new TreeView();
  2. t = treeView1;
  3. names.Add(textBox1.Text);
  4. passwords.Add(textBox2.Text);
  5. emails.Add(textBox3.Text);
  6. websites.Add(textBox4.Text);
  7.  
  8. string addedname = textBox1.Text;
  9. string addedpass = textBox2.Text;
  10. string addedemail = textBox3.Text;
  11. string addedwebsite = textBox4.Text;
  12. string nodename = textBox5.Text;
  13. int treecount = 0;
  14.  
  15. removewhat = nodename;
  16.  
  17. t.Nodes.Add(nodename);
  18. t.Nodes[treecount].Nodes.Add($"Username: {addedname?? "Empty"}");
  19. t.Nodes[treecount].Nodes.Add($"Password: {addedpass?? "Empty"}");
  20. t.Nodes[treecount].Nodes.Add($"Email: {addedemail?? "Empty"}");
  21. t.Nodes[treecount].Nodes.Add($"Website: {addedwebsite ?? "Empty"}");
  22.  
  23. treecount += 1;
  24.  
  25. removewhat = null;
  26. nodename = null;
  27. addedname = null;
  28. addedpass = null;
  29. addedemail = null;
  30. addedwebsite = null;
  31.  
  32. textBox3.Clear();
  33. textBox4.Clear();
  34. textBox1.Clear();
  35. textBox2.Clear();
  36. textBox5.Clear();
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement