Exemplo n.º 1
0
        //-------------------------------------------------------------------------
        private void FillItemTypeEO(
            TreeNode node,
            CTypeEntiteOrganisationnelle typeEO,
            Hashtable tableSel)
        {
            node.Text = typeEO.Libelle;
            COptionCorrespondanceEO option = new COptionCorrespondanceEO(typeEO, EModeComparaisonEO.FillesUniquement);

            if (tableSel.Contains(typeEO))
            {
                node.Checked = true;
                option       = new COptionCorrespondanceEO(typeEO, (EModeComparaisonEO)tableSel[typeEO]);
            }
            node.Tag = option;
            RedrawNode(node);
            foreach (CTypeEntiteOrganisationnelle tp in typeEO.TypesFils)
            {
                TreeNode newNode = new TreeNode();
                FillItemTypeEO(newNode, tp, tableSel);
                node.Nodes.Add(newNode);
                if (newNode.Checked || newNode.IsExpanded)
                {
                    node.Expand();
                }
            }
        }
Exemplo n.º 2
0
 //--------------------------------------------------------------
 private void SetOption(TreeNode node, EModeComparaisonEO mode)
 {
     if (node != null)
     {
         COptionCorrespondanceEO option = (COptionCorrespondanceEO)node.Tag;
         option.ModeComparaison = mode;
         RedrawNode(node);
     }
 }
Exemplo n.º 3
0
        //-------------------------------------------------------------------------
        private void RedrawNode(TreeNode node)
        {
            COptionCorrespondanceEO option = (COptionCorrespondanceEO)node.Tag;

            if (!node.Checked)
            {
                node.ImageIndex = 0;
            }
            else
            {
                node.ImageIndex = (int)option.ModeComparaison + 1;
            }
            node.SelectedImageIndex = node.ImageIndex;
        }
Exemplo n.º 4
0
 private void m_arbreEO_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node.Checked && m_gestionnaireModeEdition.ModeEdition)
     {
         Point pt = e.Location;
         TreeViewHitTestInfo info = m_arbreEO.HitTest(pt);
         if (info.Location == TreeViewHitTestLocations.Image)
         {
             COptionCorrespondanceEO option = (COptionCorrespondanceEO)e.Node.Tag;
             m_menuBrancheComplete.Checked  = option.ModeComparaison == EModeComparaisonEO.BrancheComplete;
             m_menuEgaliteStricte.Checked   = option.ModeComparaison == EModeComparaisonEO.Egalite;
             m_menuFillesSeulement.Checked  = option.ModeComparaison == EModeComparaisonEO.FillesUniquement;
             m_menuParentsSeulement.Checked = option.ModeComparaison == EModeComparaisonEO.ParentsUniquement;
             m_menuArbreEO.Show(m_arbreEO, pt);
             m_nodeMenu = e.Node;
         }
     }
 }