Пример #1
0
 private void bunifuImageButton1_Click(object sender, EventArgs e)
 {
     btnMenu_Click(btnMenu, null);
     Vars.logado = false;
     if (Properties.Settings.Default.permInt != 3 || Properties.Settings.Default.permInt != 9)
     {
         Properties.Settings.Default.permInt = 0;
     }
     Properties.Settings.Default.nome         = "";
     Properties.Settings.Default.usuario      = "";
     Properties.Settings.Default.sala         = "";
     Properties.Settings.Default.lembrarsenha = 0;
     Properties.Settings.Default.Save();
     btnInicio.Normalcolor     = Color.DimGray;
     btnHorario.Normalcolor    = Color.DimGray;
     btnCalendario.Normalcolor = Color.DimGray;
     btnTurmas.Normalcolor     = Color.DimGray;
     btnCfg.Normalcolor        = Color.DimGray;
     sideBar.BackColor         = Color.DimGray;
     panel1.Enabled            = false;
     login1 = new login();
     panelTudo.Controls.Clear();
     panelTudo.Controls.Add(login1);
     nullBw();
     principal     = null;
     principalProf = null;
     addTarefa     = null;
     calendario    = null;
     dia           = null;
     diaProf       = null;
     info          = null;
     avisos        = null;
     registrar     = null;
 }
Пример #2
0
        public void btnMax_Click(object sender, EventArgs e)
        {
            if (this.Width != Screen.PrimaryScreen.WorkingArea.Width)
            {
                this.Left        = Top = 0;
                this.Size        = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
                this.WindowState = FormWindowState.Normal;
                Properties.Settings.Default.fullsc = 1;
                Properties.Settings.Default.Save();
            }
            else
            {
                this.Size = new Size(715, 600);
                this.CenterToScreen();
                Properties.Settings.Default.fullsc = 0;
                Properties.Settings.Default.Save();
            }

            if (btnMenu.Tag.ToString() == "1")
            {
                sideBar.Width = 50;
                panel2.Hide();
                panelLabels.Hide();
                sideBar.Visible = false;
                if (this.Width == 900)
                {
                    this.Width = 715;
                }
                btnMenu.Location = new System.Drawing.Point(0, 0);
                btnMenu.Image    = Properties.Resources.icons8_Forward_64px_1;
                transMenu2.Show(sideBar);
            }

            if (principal != null)
            {
                principal = new principal()
                {
                    Dock = DockStyle.Fill
                };
            }
            if (dia != null)
            {
                dia = new Dia()
                {
                    Dock = DockStyle.Fill
                };
            }
            if (diaProf != null)
            {
                diaProf = new DiaProf()
                {
                    Dock = DockStyle.Fill
                };
            }
            foreach (Control grr in panelTudo.Controls)
            {
                if (grr is principal)
                {
                    panelTudo.Hide();
                    panelTudo.Controls.Clear();
                    panelTudo.Show();
                    panelTudo.Controls.Add(principal);
                }
                if (grr is Dia)
                {
                    panelTudo.Hide();
                    panelTudo.Controls.Clear();
                    panelTudo.Show();
                    panelTudo.Controls.Add(dia);
                }
            }
        }