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;
- namespace Manevra
- {
- public partial class Login : Form
- {
- private int contor;
- private string username = "Narita";
- private string pass = "Narita";
- public Login()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (textBox1.Text.Equals(username))
- if (textBox2.Text.Equals(pass))
- {
- timer1.Enabled = true;
- contor = 0;
- timer1.Start();
- }
- else
- {
- MessageBox.Show("Date eronate!");
- }
- else
- {
- MessageBox.Show("Date eronate!");
- }
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- contor++;
- progressBar1.Value = contor;
- if(progressBar1.Value == 20)
- {
- timer1.Stop();
- timer1.Enabled = false;
- this.DialogResult = DialogResult.OK;
- Close();
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement