Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.IO;
- using System.Windows.Forms;
- namespace savingModule
- {
- public partial class Saving : Form
- {
- public string username;
- public string password;
- public string email;
- public string usernameSaved;
- public string passwordSaved;
- public string emailSaved;
- public void write()
- {
- String[] data = { username, password, email };
- System.IO.File.WriteAllLines(@"C:\\Users\\Jake\\Desktop\\saves\\saves.txt", data);
- }
- public void read()
- {
- StreamReader stream = new StreamReader(@"C:\\Users\\Jake\\Desktop\\saves\\saves.txt");
- usernameSaved = stream.ReadLine();
- Console.WriteLine("test");
- }
- public Saving()
- {
- InitializeComponent();
- }
- private void Saving_Load(object sender, EventArgs e)
- {
- }
- private void button1_MouseClick(object sender, MouseEventArgs e)
- {
- username = usernameBox.Text + "\n";
- password = passwordBox.Text + "\n";
- email = emailBox.Text + "\n";
- label4.Text = usernameSaved;
- write();
- read();
- }
- private void label4_Click(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement