示例#1
0
        private void SignUpButton_Click(object sender, RoutedEventArgs e)
        {
            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"..\..\..\db1.txt", true))
            {
                file.Write(NameTextBox.Text);
                file.WriteLine("");
                file.Write(IDTextBox.Text);
                file.WriteLine("");
                file.Write(BankAccountNumberTextBox.Text);
                file.WriteLine("");
                if (PasswordTextBox.Text == PasswordAgainTextBox.Text)
                {
                    file.Write(Encrypt(PasswordAgainTextBox.Text));
                }
                file.WriteLine("");
                file.WriteLine("\n");
            }

            LoginWindow window = new LoginWindow();

            window.Show();
            this.Close();
        }