Example #1
0
 private void Login_Login_Button_Click(object sender, EventArgs e)
 {
     if (ItemFromJsonList.TryLogin(Login_Username_TextBox.Text, Login_Password_TextBox.Text))
     {
         Login_Message_RichTextBox.Text = "U bent ingelogd";
     }
 }
Example #2
0
        public static void NewUser(string Username, string Password, string Email)
        {
            string jsonFilePath = root + @"json\users.json";

            users.Add(new User(users.Count, Username, Password, Email));
            string json = JsonConvert.SerializeObject(users, Formatting.Indented);

            File.WriteAllText(jsonFilePath, json);
            ItemFromJsonList.Reload();
        }