//----------------------------------------------------------------------- public static CInfoChampDynamique[] SelectProprietes(CInfoStructureDynamique structure, string[] listeSelectionnes, ref CInfoChampDynamique[] lstDecoches) { CFormSelectChampParentPourStructure form = new CFormSelectChampParentPourStructure(); form.m_tableSelectionnes.Clear(); foreach (string strCol in listeSelectionnes) { form.m_tableSelectionnes[strCol] = true; } form.m_structurePrincipale = structure; form.m_lblTable.Text = form.m_structurePrincipale.NomConvivial; form.FillTree(structure, form.m_arbre.Nodes, null); form.m_arbre.CheckBoxes = true; form.m_bMonoSelection = false; if (form.ShowDialog() == DialogResult.OK) { ArrayList lst = new ArrayList(); form.GetSelectedFields(lst, form.m_arbre.Nodes, null); lstDecoches = (CInfoChampDynamique[])form.m_listeDecoches.ToArray(typeof(CInfoChampDynamique)); //Lst contient la liste de ce qui a été coché en plus. Il faut ajouter à ça la //Liste de ce qui n'a pas été décoché return(( CInfoChampDynamique[] )lst.ToArray(typeof(CInfoChampDynamique))); } return(new CInfoChampDynamique[0]); }
//----------------------------------------------------------------------- public static CInfoChampDynamique SelectPropriete(CInfoStructureDynamique structure) { CFormSelectChampParentPourStructure form = new CFormSelectChampParentPourStructure(); form.m_tableSelectionnes.Clear(); form.m_structurePrincipale = structure; form.m_lblTable.Text = form.m_structurePrincipale.NomConvivial; form.FillTree(structure, form.m_arbre.Nodes, null); form.m_arbre.CheckBoxes = false; form.m_bMonoSelection = true; CInfoChampDynamique infoSel = null; if (form.ShowDialog() == DialogResult.OK) { infoSel = form.m_champSel; } form.Dispose(); return(infoSel); }