using System;
using System.Windows.Forms;
using System.Drawing;

namespace Commission
{
    public partial class Menu : Form
    {
        public Menu()
        {
            InitializeComponent();
            if (Avtorization.admin)
            {
                b_employee.Visible = true;
            }
        }

        private void b_cabinet_Click(object sender, EventArgs e)
        {
            Hide();
            Cabinet cab = new Cabinet();
            cab.Show();
            cab.Location = Location;
            DataBase.diagWrite("Переход на форму Личный кабинет");
        }

        private void b_back_Click(object sender, EventArgs e)
        {
            Hide();
            Avtorization avtor = new Avtorization();
            avtor.Show();
            avtor.Location = Location;
            DataBase.diagWrite("Переход на форму Авторизация");
        }

        private void b_faculty_Click(object sender, EventArgs e)
        {
            Hide();
            Faculty facul = new Faculty();
            facul.Show();
            facul.Location = Location;
            DataBase.diagWrite("Переход на форму Факультеты");
        }

        private void b_specialnost_Click(object sender, EventArgs e)
        {
            Hide();
            Specialization spec = new Specialization();
            spec.Show();
            spec.Location = Location;
            DataBase.diagWrite("Переход на форму Специальности");
        }

        private void b_employee_Click(object sender, EventArgs e)
        {
            Hide();
            Employees emp = new Employees();
            emp.Show();
            emp.Location = Location;
            DataBase.diagWrite("Переход на форму Сотрудники");
        }

        private void b_abiturient_Click(object sender, EventArgs e)
        {
            Hide();
            Entrant etr = new Entrant();
            etr.Show();
            etr.Location = Location;
            DataBase.diagWrite("Переход на форму Абитуриенты");
        }

        private void Menu_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void label2_Click(object sender, EventArgs e)
        {
            Hide();
            Cabinet cab = new Cabinet();
            cab.Show();
            cab.Location = Location;
            DataBase.diagWrite("Переход на форму Личный кабинет");
        }

        private void label2_MouseEnter(object sender, EventArgs e)
        {
            label2.ForeColor = Color.FromArgb(16, 118, 183);
        }

        private void label2_MouseLeave(object sender, EventArgs e)
        {
            label2.ForeColor = Color.FromArgb(17, 43, 85);
        }
    }
}
