예제 #1
0
 //---------------------------------------------------------------------
 private void m_menuArbre_Opening(object sender, CancelEventArgs e)
 {
     if (m_arbre.SelectedNode == null)
     {
         e.Cancel = true;
     }
     else
     {
         CObjetDonnee objet = m_arbre.SelectedNode.Tag as CObjetDonnee;
         if (objet != null)
         {
             m_menuIgnorerCeType.Visible = false;
             m_menuAnalyserAutomatiquementCeType.Visible = false;
             m_menuAfficherEntite.Visible  = true;
             m_menuVoirDependances.Visible = true;
         }
         Type tp = m_arbre.SelectedNode.Tag as Type;
         if (tp != null)
         {
             m_menuIgnorerCeType.Visible = true;
             m_menuAnalyserAutomatiquementCeType.Visible = true;
             m_menuAfficherEntite.Visible  = false;
             m_menuVoirDependances.Visible = false;
             m_menuIgnorerCeType.Checked   = m_entitesManager.ConfigurationRecherche.IsIgnore(tp);
             COptionRechercheType option = m_entitesManager.ConfigurationRecherche.GetOption(tp);
             m_menuAnalyserAutomatiquementCeType.Checked = option != null && option.RecursiveSearch;
         }
     }
 }
예제 #2
0
 //-----------------------------------------------------------------------
 private void m_chkForcer_CheckedChanged(object sender, EventArgs e)
 {
     if (m_bIsUpdating)
     {
         return;
     }
     HasChange = true;
     if (m_chkForcer.Checked)
     {
         ShowForced();
         Type tp = CurrentType;
         if (tp != null)
         {
             if (m_configuration.GetOption(tp) == null)
             {
                 COptionRechercheType option = new COptionRechercheType(tp);
                 m_configuration.AddOption(option);
             }
         }
     }
     else
     {
         m_bIsUpdating          = true;
         m_chkRecursive.Checked = false;
         m_bIsUpdating          = false;
         Type tp = CurrentType;
         if (tp != null)
         {
             m_configuration.RemoveOptions(tp);
         }
     }
 }
예제 #3
0
        //-----------------------------------------------------------------------------------
        private void FillNodeObjet(TreeNode node, CObjetDonnee objet)
        {
            node.ImageIndex = 1;
            node.Tag        = objet;
            node.Text       = objet.DescriptionElement;
            COptionRechercheType option = m_entitesManager.ConfigurationRecherche.GetOption(objet.GetType());

            if (m_listeObjetsAnalyses.Contains(objet) || (option != null && option.RecursiveSearch))
            {
                node.ImageIndex = 2;
                node.Checked    = true;
            }
            else
            {
                node.Checked = false;
            }
            node.SelectedImageIndex = node.ImageIndex;
        }
예제 #4
0
        //--------------------------------------------------------
        protected override CResultAErreur MyInitChamps(CCustomizableListItem item)
        {
            CResultAErreur result = CResultAErreur.True;

            base.MyInitChamps(item);
            if (m_configuration == null)
            {
                return(result);
            }
            Type tpElement = item != null ?
                             item.Tag as Type:
                             null;

            if (tpElement != null)
            {
                m_lblTypeName.Text      = DynamicClassAttribute.GetNomConvivial(tpElement);
                m_lblTypeName.BackColor = Color.White;
                m_chkForcer.Checked     = false;
                m_chkIgnoreType.Checked = false;
                m_chkRecursive.Checked  = false;
                if (m_configuration.IsIgnore(tpElement))
                {
                    ShowIgnore();
                }
                else
                {
                    COptionRechercheType option = m_configuration.GetOption(tpElement);
                    if (option != null)
                    {
                        ShowForced();
                        if (option.RecursiveSearch)
                        {
                            ShowRecursive();
                        }
                    }
                }
            }
            HasChange = false;
            return(result);
        }
예제 #5
0
 //-----------------------------------------------------------------------
 private void m_chkRecursive_CheckedChanged(object sender, EventArgs e)
 {
     if (m_bIsUpdating)
     {
         return;
     }
     HasChange = true;
     if (m_chkRecursive.Checked)
     {
         ShowRecursive();
         Type tp = CurrentType;
         if (tp != null)
         {
             COptionRechercheType option = m_configuration.GetOption(tp);
             if (option == null)
             {
                 option = new COptionRechercheType(tp);
                 m_configuration.AddOption(option);
             }
             option.RecursiveSearch = true;
         }
     }
 }
예제 #6
0
        //------------------------------------------------------------
        private void m_menuAnalyserAutomatiquementCeType_Click(object sender, EventArgs e)
        {
            Type tp = m_arbre.SelectedNode != null ?
                      m_arbre.SelectedNode.Tag as Type : null;

            if (tp != null)
            {
                COptionRechercheType option = m_entitesManager.ConfigurationRecherche.GetOption(tp);
                ToolStripMenuItem    item   = sender as ToolStripMenuItem;
                if (item.Checked)
                {
                    if (option == null)
                    {
                        option = new COptionRechercheType(tp);
                        m_entitesManager.ConfigurationRecherche.AddOption(option);
                    }
                    option.RecursiveSearch = true;
                }
                else
                {
                    m_entitesManager.ConfigurationRecherche.RemoveOptions(tp);
                }
            }
        }