//--------------------------------------------------------- private void FillComboTypesConnexions() { m_cmbTypeConnexion.DisplayMember = "ConnexionTypeName"; List <CInfoTypeConnexion> lst = new List <CInfoTypeConnexion>(); foreach (IEasyQueryConnexion cnx in CAllocateurEasyQueryConnexions.GetConnexionsPossibles()) { lst.Add(new CInfoTypeConnexion(cnx)); } m_cmbTypeConnexion.ListDonnees = lst; }
//-------------------------------------------------------------------------------- private void m_menuTree_Opening(object sender, System.ComponentModel.CancelEventArgs e) { AssureEventsMenus(); if (m_menuAjouterConnexion.DropDownItems.Count == 0) { //Ajoute les items de connexions possibles foreach (IEasyQueryConnexion cnx in CAllocateurEasyQueryConnexions.GetConnexionsPossibles()) { ToolStripMenuItem itemNewCnx = new ToolStripMenuItem(cnx.ConnexionTypeName); itemNewCnx.Tag = cnx; itemNewCnx.Click += new EventHandler(itemNewCnx_Click); m_menuAjouterConnexion.DropDownItems.Add(itemNewCnx); } } m_menuPropsConnexion.Visible = SelectedNode != null && SelectedNode.Tag is CEasyQuerySource; m_menuRefreshConnexion.Visible = SelectedNode != null && SelectedNode.Tag is CEasyQuerySource; m_menuBrowse.Visible = SelectedNode != null && GetTableForNode(SelectedNode) != null; m_menuAjouterConnexion.Enabled = !LockEdition; m_menuPropsConnexion.Enabled = !LockEdition; }