Advertisement
RevisionTool

Untitled

Mar 13th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.IO;
  11.  
  12. namespace WindowsFormsApplication2
  13. {
  14. public partial class Form1 : Form
  15. {
  16. public Form1()
  17. {
  18. InitializeComponent();
  19. }
  20.  
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23. if (Properties.Settings.Default.remember)
  24. {
  25. textBox1.Text = Properties.Settings.Default.username;
  26. textBox2.Text = Properties.Settings.Default.password;
  27. checkBox1.Checked = true;
  28. }
  29. }
  30.  
  31. private void button1_Click(object sender, EventArgs e)
  32. {
  33.  
  34. }
  35.  
  36. private void button1_Click_1(object sender, EventArgs e)
  37. {
  38. if(checkBox1.Checked)
  39. {
  40. Properties.Settings.Default.remember = true;
  41. Properties.Settings.Default.username = textBox1.Text;
  42. Properties.Settings.Default.password = textBox2.Text;
  43. Properties.Settings.Default.Save();
  44. }
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement