private void pcbRH_Click(object sender, EventArgs e) { try { if (DataBase.Entity.UsuarioLogadoModel.login.tp_hierarquia != "gerente") { throw new ArgumentException("Usuário não possui permissões necessárias para acessar este modulo"); } Image img = pcbRH.Image; img.RotateFlip(RotateFlipType.Rotate180FlipNone); pcbRH.Image = img; if (gpbRH.Height == 0) { FecharRH.Stop(); AbrirRH.Start(); } if (gpbRH.Height == 157) { AbrirRH.Stop(); FecharRH.Start(); } } catch (ArgumentException ex) { MessageBox.Show(ex.Message); } }
private void FecharRH_Tick(object sender, EventArgs e) { gpbRH.Height -= 15; if (gpbRH.Height <= 0) { gpbRH.Height = 0; AbrirRH.Stop(); } }
private void AbrirRH_Tick(object sender, EventArgs e) { gpbRH.Height += 15; if (gpbRH.Height >= 158) { gpbRH.Height = 157; AbrirRH.Stop(); } }