コード例 #1
0
        //---------------------------------------------------------
        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;
        }
コード例 #2
0
ファイル: CTreeListeTables.cs プロジェクト: ykebaili/sc2idlls
        //--------------------------------------------------------------------------------
        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;
        }