//cabeçalho do Form principal //botão "Home" private void BtnHome_Click(object sender, EventArgs e) { panelFill.Controls.Clear(); UCPrincipal uc = new UCPrincipal(); uc.Dock = DockStyle.Fill; panelFill.Controls.Add(uc); panelFill.Controls["UCPrincipal"].BringToFront(); btnCadastro.BackColor = Color.Transparent; btnRegistro.BackColor = Color.Transparent; btnVenda.BackColor = Color.Transparent; btnEstoque.BackColor = Color.Transparent; if (panelTop.BackColor == Color.Black) { btnClaro.Visible = true; } else { btnEscuro.Visible = true; } Point point = new Point(8, 19); btnHome.Location = point; }
private void BtnEscuro_Click(object sender, EventArgs e) { Tema tema = new Tema(); tema.usuario.Codigo = usuario.Codigo; tema.Modo = 0; btnFechar.ForeColor = Color.Gray; btnMin.ForeColor = Color.Gray; lblAjuda.ForeColor = Color.Gray; lblConf.ForeColor = Color.Gray; lblSair.ForeColor = Color.Gray; lblSobre.ForeColor = Color.Gray; panelFill.BackColor = Color.FromArgb(68, 68, 68); panelLeft.BackColor = Color.Black; panelTop.BackColor = Color.Black; btnClaro.Visible = true; btnEscuro.Visible = false; logo1.Visible = false; tema.MudaTema(); panelFill.Controls.Clear(); UCPrincipal uc = new UCPrincipal(); uc.Dock = DockStyle.Fill; panelFill.Controls.Add(uc); panelFill.Controls["UCPrincipal"].BringToFront(); }
private void Timer1_Tick(object sender, EventArgs e) { timer1.Stop(); FrmPrincipal.Instance.PanelFill.Controls.Clear(); UCPrincipal uc = new UCPrincipal(); uc.Dock = DockStyle.Fill; FrmPrincipal.Instance.PanelFill.Controls.Add(uc); FrmPrincipal.Instance.PanelLeft.Visible = true; FrmPrincipal.Instance.PanelTop.Visible = true; FrmPrincipal.Instance.PanelFill.Controls["UCPrincipal"].BringToFront(); }
private void BtnClaro_Click(object sender, EventArgs e) { Tema tema = new Tema(); tema.usuario.Codigo = usuario.Codigo; tema.Modo = 1; lblAjuda.ForeColor = Color.Black; lblConf.ForeColor = Color.Black; lblSair.ForeColor = Color.Black; lblSobre.ForeColor = Color.Black; panelFill.BackColor = Color.WhiteSmoke; panelTop.BackColor = Color.White; try { tema.GetCor(); panelLeft.BackColor = Color.FromArgb(Convert.ToInt32(tema.R), Convert.ToInt32(tema.G), Convert.ToInt32(tema.B)); tema.MudaTema(); } catch (Exception ex) { MessageBox.Show("Falha ao tentar carregar tema de usuário.", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show(ex.Message); } btnEscuro.Visible = true; btnClaro.Visible = false; logo1.Visible = true; panelFill.Controls.Clear(); UCPrincipal uc = new UCPrincipal(); uc.Dock = DockStyle.Fill; panelFill.Controls.Add(uc); panelFill.Controls["UCPrincipal"].BringToFront(); }