/// <summary>Shows the Memberpicker and automatically initializes it with the structureViever rebuild and the given specifications.</summary> /// <param name="fF">FilterElements: Enumeration to choose which Membertypes should be shown only.</param> /// <param name="fP">FilterPredicate: Method to check if the currently selected member could be chosen.</param> /// <param name="cb">Callback: Method that gets called when a member has been chosen.</param> /// <param name="mainmodonly">True if only the maindoule from the own assembly should be listed, false to show all.</param> public static MultiPicker <T> ShowStructure(DataStruct dataStruct, StructureView fE, Predicate <T> fP, Action <T> cb, bool mainmodonly = false) { MultiPicker <T> mp = new MultiPicker <T>(dataStruct); mp.structureViever.ContextAssemblyLoad = !mainmodonly; mp.filterPredicate = fP; mp.callback = cb; mp.structureViever.FilterElements = fE; mp.structureViever.RebuildAsync(mainmodonly); mp.Show(); return(mp); }
private void PickMethod_Click(object sender, EventArgs e) { MultiPicker <TypeReference> .ShowStructure(dataStruct, StructureView.Classes, x => true, SetTypeReference); }