public frmLogs(IlogModels userModels) { InitializeComponent(); this.userModels = userModels; this.Load += delegate { LoaderFormsXML(); Loader(); }; this.Disposed += delegate { SaveFormsXML(); }; //Menu contextMenuStrip1.Opened += ContextMenuStrip1_Opened; MenuApagar.Click += MenuApagar_Click; MenuRelatorios.Click += MenuRelatorios_Click; }
public MenuDesign(PermissoesModels permissoesModels, IlogModels logsRepository) { InitializeComponent(); this.permissoesModels = permissoesModels; this.logsRepository = logsRepository; Program.menuDesign = this; objectoUserSetings = new ObjectoUserSetings(); #region Time Time_ = new Timer(); Time_.Enabled = true; Time_.Start(); Time_.Tick += delegate { barStaticItem2.Caption = $"{DateTime.Now:F}"; }; // Sistema/Usuarios btnUsuariosConsultas.Click += delegate { OpenForms(new frmUsuarios(new UserRepository(new BiblioteContext()))); }; btnUsuariosAuditoria.Click += delegate { OpenForms(new frmLogs(new LogsRepository(new BiblioteContext()))); }; btnGrupos.Click += delegate { OpenForms(new frmGrupos(new GruposRepository(new BiblioteContext()))); }; btnPermissoes.Click += delegate { OpenFormsDialog.ShowForm(this, null, new frmPermisssoesAdd(new PermissoesRepository(new BiblioteContext()))); }; // Biblioteca btnLivros.Click += delegate { OpenForms(new frmLivros(new LivrosRepository(new BiblioteContext()))); }; btnAutores.Click += delegate { OpenForms(new frmAutor(new AutorRepositoty(new BiblioteContext()))); }; btnEditora.Click += delegate { OpenForms(new frmEditora(new EditoraRepository(new BiblioteContext()))); }; btnPais.Click += delegate { OpenForms(new frmPais(new PaisRepository(new BiblioteContext()))); }; // Estudantes btnAlunoConsultas.Click += delegate { OpenForms(new frmAlunos(new AlunoRepository(new BiblioteContext()))); }; btnInstituicaoConsultas.Click += delegate { OpenForms(new frmInstituicao(new InstituicaoRepository(new BiblioteContext()))); }; btnClasseConsultas.Click += delegate { OpenForms(new frmClasse(new ClasseRepository(new BiblioteContext()))); }; btnturmaConsultas.Click += delegate { OpenForms(new frmTurma(new TurmaRepository(new BiblioteContext()))); }; //Toos btnTatil.CheckedChanged += delegate { WindowsFormsSettings.TouchUIMode = btnTatil.Checked == true ? TouchUIMode.True : TouchUIMode.False; ObjectoUserSetings.Default.TouchUI = btnTatil.Checked; ObjectoUserSetings.Default.Save(); }; //Requisições StocksConsultas.Click += delegate { OpenForms(new frmStocks(new StocksModelsRepository(new BiblioteContext()))); }; StocksRegistar.Click += delegate { OpenFormsDialog.ShowForm(this, null, new frmStocksAdd(null, new StocksModelsRepository(new BiblioteContext()), new LivrosRepository(new BiblioteContext()))); }; RequisicoesLeitura.Click += delegate { OpenFormsDialog.ShowForm(this, null, new frmPedidosRequisicoesAdd(new PedidosRepository(new BiblioteContext()), new AlunoRepository(new BiblioteContext()), new StocksModelsRepository(new BiblioteContext()))); }; RequisicoesPedidos.Click += delegate { OpenForms(new frmPedidosRequisicoes(new PedidosRepository(new BiblioteContext()))); }; AplicarPermissoes(); FormsThemeReader(); SetStatuBar(); this.FormClosed += MenuDesign_FormClosed; btnDefinicoes.Click += delegate { OpenFormsDialog.ShowForm(this, null, new frmDefinicoesAdd(new DefinicoesRepository(new BiblioteContext()))); }; //tabbedView1.DocumentClosed += TabbedView1_DocumentClosed; tabbedView1.AddDocument(new frmBackground()); }