private void TabCentro_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (DetalhesProjeto.IsSelected == true) { if (addButtons == true) { if (buttonsDetails == null) { buttonsDetails = new Controls.ButtonsDetails(); } buttonsDetails.SaveClick += new EventHandler(Add_Projeto); buttonsDetails.HomeClick += new EventHandler(Home); buttonsDetails.DeleteClick += new EventHandler(DeleteProjeto); gridFundo.Children.Remove(buttonsGeral); gridFundo.Children.Add(buttonsDetails); actualizaButton = true; addButtons = false; } } else { if (actualizaButton == true) { if (buttonsGeral == null) { buttonsGeral = new Controls.ButtonsGeral(); } gridFundo.Children.Remove(buttonsDetails); gridFundo.Children.Add(buttonsGeral); addButtons = true; actualizaButton = false; } if (tabDatabases.IsSelected == true) { buttonsGeral.HomeClick += new EventHandler(Home); buttonsGeral.DeleteClick += new EventHandler(DeleteBD); buttonsGeral.EditClick += new EventHandler(EditBD); buttonsGeral.AddClick += new EventHandler(AddNewBD); buttonsGeral.RefreshClick += new EventHandler(RefreshBD); } else if (tabConhecimento.IsSelected == true) { buttonsGeral.HomeClick += new EventHandler(Home); buttonsGeral.DeleteClick += new EventHandler(DeleteConhecimento); buttonsGeral.EditClick += new EventHandler(EditConhecimento); buttonsGeral.AddClick += new EventHandler(AddNewConhecimento); buttonsGeral.RefreshClick += new EventHandler(Refresh); } } }
public PainelPessoas(UserControlCentro controlCentro) { InitializeComponent(); PainelCentro = controlCentro; dp = new Controls.DataGridPessoas(people.GetPessoas(), PainelCentro); dd1.Children.Add(dp); buttonsGeral = new Controls.ButtonsGeral(); GridFundo.Children.Add(buttonsGeral); buttonsGeral.DeleteClick += new EventHandler(EliminaPessoa); buttonsGeral.AddClick += new EventHandler(AddNewPessoa); buttonsGeral.EditClick += new EventHandler(EditaPessoa); buttonsGeral.RefreshClick += new EventHandler(Refresh); buttonsGeral.HomeClick += new EventHandler(Home); }
public PainelProjetos(UserControlCentro controlCentro) { InitializeComponent(); PainelCentro = controlCentro; dt = new Controls.DataGridProjetos(projetos.getProjetos(), PainelCentro); dd1.Children.Add(dt); buttonsGeral = new Controls.ButtonsGeral(); gridFundo.Children.Add(buttonsGeral); buttonsGeral.DeleteClick += new EventHandler(EliminaProjeto); buttonsGeral.AddClick += new EventHandler(AddNewProjeto); buttonsGeral.EditClick += new EventHandler(EditaProjeto); buttonsGeral.RefreshClick += new EventHandler(Refresh); buttonsGeral.HomeClick += new EventHandler(Home); }
public PainelUtilizadores(UserControlCentro controlCentro) { InitializeComponent(); PainelCentro = controlCentro; du = new Controls.DataGridUtilizadores(user.GetUtilizador(), PainelCentro); dd1.Children.Add(du); buttonsGeral = new Controls.ButtonsGeral(); GridFundo.Children.Add(buttonsGeral); buttonsGeral.DeleteClick += new EventHandler(EliminaUser); buttonsGeral.AddClick += new EventHandler(AddNewUser); buttonsGeral.EditClick += new EventHandler(EditaUser); buttonsGeral.RefreshClick += new EventHandler(Refresh); buttonsGeral.HomeClick += new EventHandler(Home); }
public PainelDatabases(UserControlCentro controlCentro) { InitializeComponent(); PainelCentro = controlCentro; db = new Controls.DataGridDatabases(database.GetBasesDeDados(), PainelCentro); dd1.Children.Add(db); buttonsGeral = new Controls.ButtonsGeral(); gridFundo.Children.Add(buttonsGeral); buttonsGeral.DeleteClick += new EventHandler(EliminaBD); buttonsGeral.AddClick += new EventHandler(AddNewBD); buttonsGeral.EditClick += new EventHandler(EditaBD); buttonsGeral.RefreshClick += new EventHandler(Refresh); buttonsGeral.HomeClick += new EventHandler(Home); }
public PainelConhecimento(UserControlCentro controlCentro) { InitializeComponent(); PainelCentro = controlCentro; dc = new Controls.DataGridConhecimento(conhecimento.GetConhecimentoGrid(), PainelCentro); dd1.Children.Add(dc); buttonsGeral = new Controls.ButtonsGeral(); gridFundo.Children.Add(buttonsGeral); buttonsGeral.DeleteClick += new EventHandler(EliminaConhecimento); buttonsGeral.AddClick += new EventHandler(AddNewConhecimento); buttonsGeral.EditClick += new EventHandler(EditaConhecimento); buttonsGeral.RefreshClick += new EventHandler(Refresh); buttonsGeral.HomeClick += new EventHandler(Home); }