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.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace PiotrMrowczynski
- {
- public partial class LoginControl : UserControl
- {
- //Wlasny komponent! We wlasciwosciach mozna ustawic haslo, lub przez przeciazenie konstruktora podac przy tworzeniu jej w kodzie;
- string pass;
- public string Pass{
- get { return pass; }
- set { pass = value; }
- }
- public LoginControl()
- {
- InitializeComponent();
- }
- public LoginControl(string pass)
- {
- InitializeComponent();
- this.pass = pass;
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- if (Pass.Equals(textBox1.Text))
- {
- MessageBox.Show("Zalogowano!");
- Program.manager.zalogowany = true;
- Program.manager.loginWin = false;
- this.Hide();
- }
- else
- {
- MessageBox.Show("Zle haslo! >>> " + Pass);
- }
- }
- private void label1_Click(object sender, EventArgs e)
- {
- //this.ForeColorChanged("Yellow");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement