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 Diplom_B { public partial class LoginForm : Form { public LoginForm() { InitializeComponent(); this.CenterToScreen(); label3.Text = ""; } private void button1_Click(object sender, EventArgs e) { label3.Text = ""; var usr = new User(comboBox1.Text, comboBox1.Text); if (!usr.CheckUser()) { label3.Text = "Пользователя нет"; return; } if (!usr.Login()) { label3.Text = "Неверный пароль"; return; } Program.user = usr; this.Hide(); var izdForm = new IzdForm(); izdForm.Closed += (s, args) => this.Close(); izdForm.Show(); } } }