//public ArrayList ListeDesFonctionsDeArbre(String NomARechercher = "", String TypeDeLaFonction = "", Boolean AvecLesSousFonctions = false) //{ // Log.Print(cNOMCLASSE); // List<eFonction> pListeFonctions = ListeDesFonctionsDeArbre(NomARechercher, TypeDeLaFonction, AvecLesSousFonctions); // ArrayList pArrayFonctions = new ArrayList(); // if (pListeFonctions.Count > 0) // pArrayFonctions = new ArrayList(pListeFonctions); // return pArrayFonctions; //} /// <summary> /// Scanner le FeatureManager pour rechercher la vue /// </summary> /// <param name="Noeud"></param> /// <param name="NoeudVue"></param> private void ScannerVueFeatureManager(TreeControlItem Noeud, ref TreeControlItem NoeudVue) { Log.Methode(cNOMCLASSE); TreeControlItem pNoeud = Noeud.GetFirstChild(); while (pNoeud != null) { if (pNoeud.Text == _SwVue.GetName2()) { NoeudVue = pNoeud; return; } if (pNoeud.ObjectType != (int)swTreeControlItemType_e.swFeatureManagerItem_Component) ScannerVueFeatureManager(pNoeud, ref NoeudVue); if (NoeudVue != null) return; pNoeud = pNoeud.GetNext(); } }
/// <summary> /// Scanner les fonctions de la vue à partir du FeatureManager /// </summary> /// <param name="Noeud"></param> /// <param name="ListeFonctions"></param> /// <param name="NomARechercher"></param> /// <param name="TypeDeLaFonction"></param> /// <param name="AvecLesSousFonctions"></param> private void ScannerFonctionsFeatureManager(TreeControlItem Noeud, ArrayList ListeFonctions, String NomARechercher, String TypeDeLaFonction, Boolean AvecLesSousFonctions) { Log.Methode(cNOMCLASSE); TreeControlItem pNoeud = Noeud.GetFirstChild(); while (pNoeud != null) { eFonction pFonction = new eFonction(); if (pNoeud.ObjectType == (int)swTreeControlItemType_e.swFeatureManagerItem_Feature) { if (pFonction.Init(pNoeud.Object, ModeleDeReference) && Regex.IsMatch(pFonction.Nom, NomARechercher) && Regex.IsMatch(pFonction.TypeDeLaFonction, TypeDeLaFonction)) { ListeFonctions.Add(pFonction); } } // On scanne dans tous les cas le dossier Tôlerie et le dossier Etat déplié if (AvecLesSousFonctions || (pFonction.EstInitialise && (pFonction.TypeDeLaFonction == "TemplateSheetMetal")) || (pFonction.EstInitialise && (pFonction.TypeDeLaFonction == "TemplateFlatPattern"))) ScannerFonctionsFeatureManager(pNoeud, ListeFonctions, NomARechercher, TypeDeLaFonction, AvecLesSousFonctions); pNoeud = pNoeud.GetNext(); } }