Example #1
0
File: Form1.cs Project: B10S2/Shop
        //Перед стартом выбрасываем форму для Авторизации
        private void Form1_Load(object sender, EventArgs e)
        {
            Authorization auth = new Authorization(this.Shop);

            if (auth.ShowDialog() == DialogResult.OK)
            {
                tabControl1_SelectedIndexChanged(tabControl1, EventArgs.Empty);
                this.Text = "Добро пожаловать " + Authorization.user.FirstName + " " + Authorization.user.LastName;
            }
            else
            {
                try { Shop.Close(); }
                catch (Exception ex) { }
                this.Close();
            }
        }