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.Threading.Tasks;
- using System.Windows.Forms;
- using System.Data.SqlClient;
- namespace AplikacjaIO
- {
- public partial class Form1 : Form
- {
- string username = textBox1.Text;
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void label1_Click(object sender, EventArgs e)
- {
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- textBox1.Text = username;
- }
- private void textBox2_TextChanged(object sender, EventArgs e)
- {
- textBox2.Text = password;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string password = textBox2.Text;
- if (textBox1.Text == userName) & (textBox2.Text == Password)
- {
- this.Hide();
- Form2 ss = new Form2();
- ss.Show();
- }
- else
- {
- MessageBox.Show("Złe dane logowania");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement