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 FlatDesignEmployeeRecordSystem
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private  void changeMenu(Label lbl)
        {
            btnActive.Left = lbl.Left;
            btnActive.Width = lbl.Width;
        }
      
        private  void addContent( UserControl frm,Label lbl)
        {
            btnActive.Left = lbl.Left;
            btnActive.Width = lbl.Width;

            pnlContent.Controls.Clear();
             UserControl f = new  UserControl();
            f = frm;
            f.Dock = DockStyle.Fill;
            pnlContent.Controls.Add(f);

            f.Visible = false ;
            animate1 .ShowSync(f);
        }

        private void btnHome_Click(object sender, EventArgs e)
        {
            addContent(frmHome1 , btnHome);
        }

        private void btnStudent_Click(object sender, EventArgs e)
        {

            addContent(frmEmployee1 , btnStudent);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            addContent(frmHome1, btnHome);
        }

        private void btnEnrollment_Click(object sender, EventArgs e)
        {
            addContent(frmListScannedFiles1, btnEnrollment );
        }

        private void btnUser_Click(object sender, EventArgs e)
        {
            addContent(frmUser1 , btnUser );
        }

        private void btnReports_Click(object sender, EventArgs e)
        {
            addContent(frmReports1, btnReports );

        }

        private void label1_Click(object sender, EventArgs e)
        {
            this.Close();

            Form f = new frmLogin();
            f.Show();

        }
    }
}
